diff --git a/README.md b/README.md index 1839563d..5126fe67 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,9 @@ The official Java client library for the [Unit API](https://unit.co/docs/api/). ## Requirements Building the API client library requires: -1. Java 1.8+ -2. Maven (3.8.3+)/Gradle (7.2+) + +1. Java 11+ +2. Maven/Gradle ## Installation Add this dependency to your project's POM: @@ -23,7 +24,7 @@ Add this dependency to your project's POM: co.unit java-sdk - 0.0.1 + 0.0.3 ``` @@ -33,9 +34,8 @@ For more examples of basic usage, see the [Test suites](https://github.com/unit- ```java String access_token = System.getenv("access_token"); -ApiClient cl = new ApiClient(); -cl.setBearerToken(access_token); -Configuration.setDefaultApiClient(cl); +ApiClient apiClient = new ApiClient(); +apiClient.setRequestInterceptor(r -> r.header("Authorization", "Bearer " + access_token)); CreateIndividualApplication createIndividualApplication = new CreateIndividualApplication(); CreateIndividualApplicationAttributes attr = new CreateIndividualApplicationAttributes(); @@ -65,11 +65,10 @@ attr.setOccupation(Occupation.ARCHITECTORENGINEER); createIndividualApplication.setAttributes(attr); -CreateApplication request = new CreateApplication(); -request.data(new CreateApplicationData(createIndividualApplication)); - +CreateApplication ca = new CreateApplication(); +ca.data(new CreateApplicationData(createIndividualApplication)); -CreateApplicationApi apiClient = new CreateApplicationApi(); +CreateApplicationApi createApiClient = new CreateApplicationApi(apiClient); UnitCreateApplicationResponse res = apiClient.execute(request); ``` @@ -77,23 +76,8 @@ UnitCreateApplicationResponse res = apiClient.execute(request); To generate a customized version of the unit-java-sdk using our [OpenAPI project](https://github.com/unit-finance/openapi-unit-sdk) we suggest using the open-generator-cli to generate the Java client using the following command: ```commandline -openapi-generator-cli generate -g java -i openapi.json -o unit-java-sdk ---additional-properties hideGenerationTimestamp=true -``` -Please note that the current generator version lacks support for deepObjects. After generating the Java client, if you wish to enable functionality for list parameters, you'll need to implement a serialization function. A sample of this function, named `toParams()`, can be found in `client/model/ExecuteFilterParameter.java`. - -Additionally, modifications need to be made to the executeCall function in each GetList file that utilizes parameters: -```java -if (page != null) { - localVarQueryParams.addAll(page.toParams()); -} - -if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); -} - -if (include != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("include", include)); -} +openapi-generator-cli generate -g java -i openapi.json -o unit +-p hideGenerationTimestamp=true -p packageName=unit.java.sdk +-p modelPackage=unit.java.sdk.model -p apiPackage=unit.java.sdk.api +--library native -p useJakartaEe=true ``` -For parameters defined as deepObjects (beyond primitive types), these should be appended to localVarQueryParams after serialization using the `toParams()` function, rather than using `localVarApiClient.parameterToPair()` which is designed for primitive types exclusively. diff --git a/api/openapi.yaml b/api/openapi.yaml index 1a3a62f5..03d7a960 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -2,7 +2,7 @@ openapi: 3.0.2 info: description: An OpenAPI specifications for unit-sdk clients title: Unit OpenAPI specifications - version: 0.0.2 + version: 0.0.3 servers: - url: https://api.s.unit.sh security: @@ -98,10 +98,12 @@ paths: description: 'Get List Applications from API ' operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - allowReserved: true in: query name: filter @@ -454,14 +456,14 @@ paths: responses: "200": content: - application/vnd.api+json; charset=utf-8: + application/vnd.api+json: schema: $ref: '#/components/schemas/UnitDocumentResponse' description: Successful Response summary: Create a document tags: - Create a Document for an Application - x-accepts: application/vnd.api+json; charset=utf-8 + x-accepts: application/vnd.api+json /applications/{applicationId}/documents/{documentId}/verify: put: description: 'Verify a document via API ' @@ -587,10 +589,12 @@ paths: description: 'Get List Accounts from API ' operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - allowReserved: true in: query name: filter @@ -963,10 +967,12 @@ paths: description: 'Get Customers List from API ' operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - allowReserved: true in: query name: filter @@ -1023,10 +1029,12 @@ paths: description: 'Get List Payments from API ' operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - allowReserved: true in: query name: filter @@ -1253,10 +1261,12 @@ paths: description: 'Get Counterparties List from API ' operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - allowReserved: true in: query name: filter @@ -1399,10 +1409,12 @@ paths: description: 'Get Recurring Payments List from API ' operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - allowReserved: true in: query name: filter @@ -1517,10 +1529,12 @@ paths: description: 'Get List of Cards from API ' operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - allowReserved: true in: query name: filter @@ -1782,10 +1796,12 @@ paths: description: 'Get List Authorizations from API ' operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - allowReserved: true in: query name: filter @@ -1838,10 +1854,12 @@ paths: description: 'Get List Authorization Requests from API ' operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - allowReserved: true in: query name: filter @@ -1946,10 +1964,12 @@ paths: description: 'Get List Statements from API ' operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - allowReserved: true in: query name: filter @@ -2044,10 +2064,12 @@ paths: description: 'Get Rewards List from API ' operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - allowReserved: true in: query name: filter @@ -2122,10 +2144,12 @@ paths: description: 'Get Events List from API ' operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - allowReserved: true in: query name: filter @@ -2236,10 +2260,12 @@ paths: description: 'Get List Check Deposits from API ' operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - allowReserved: true in: query name: filter @@ -2548,10 +2574,12 @@ paths: description: 'Get List Webhooks from API ' operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - allowReserved: true in: query name: filter @@ -2783,10 +2811,12 @@ paths: description: 'Get List Transactions from API ' operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - allowReserved: true in: query name: filter @@ -2817,10 +2847,12 @@ paths: description: 'Get List Disputes from API ' operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - allowReserved: true in: query name: filter @@ -2868,10 +2900,12 @@ paths: description: 'Get List Repayments from API ' operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - allowReserved: true in: query name: filter @@ -2944,10 +2978,12 @@ paths: description: 'Get List Check Payments from API ' operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - in: query name: filter schema: @@ -3147,10 +3183,12 @@ paths: get: operationId: execute parameters: - - in: query + - allowReserved: true + in: query name: page schema: $ref: '#/components/schemas/listPageParametersObject' + style: deepObject - in: query name: filter schema: @@ -4086,7 +4124,7 @@ components: title: IndividualCustomer type: object customerRelationships: - additionalProperties: false + additionalProperties: true properties: org: $ref: '#/components/schemas/orgRelationship' @@ -4621,6 +4659,7 @@ components: title: Received Payment Resource type: object receivedPaymentRelationships: + additionalProperties: true properties: account: $ref: '#/components/schemas/relationships_account' @@ -8840,7 +8879,7 @@ components: type: string type: object documentsRelationship: - additionalProperties: false + additionalProperties: true properties: data: items: @@ -12390,7 +12429,7 @@ components: - type type: object checkDepositRelationships_account: - additionalProperties: false + additionalProperties: true properties: data: $ref: '#/components/schemas/checkDepositRelationships_account_data' diff --git a/build.gradle b/build.gradle index 331dfd8b..aadf3e40 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'co.unit.sdk' -version = '0.0.2' +version = '0.0.3' buildscript { repositories { @@ -37,8 +37,8 @@ if(hasProperty('target') && target == 'android') { targetSdkVersion 25 } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } // Rename the aar correctly @@ -83,15 +83,15 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'java' apply plugin: 'maven-publish' - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 publishing { publications { maven(MavenPublication) { groupId = 'co.unit' artifactId = 'java-sdk' - version = '0.0.2' + version = '0.0.3' from components.java pom { @@ -120,25 +120,22 @@ if(hasProperty('target') && target == 'android') { } ext { - jakarta_annotation_version = "1.3.5" + jackson_version = "2.14.1" + jakarta_annotation_version = "2.1.1" + junit_version = "4.13.2" } dependencies { - implementation 'io.swagger:swagger-annotations:1.6.8' implementation "com.google.code.findbugs:jsr305:3.0.2" - 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 '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' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + implementation "org.openapitools:jackson-databind-nullable:0.2.1" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1' - testImplementation 'org.mockito:mockito-core:3.12.4' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.1' -} + implementation 'jakarta.annotation:jakarta.annotation-api:2.1.1' + testImplementation "junit:junit:$junit_version" +} javadoc { options.tags = [ "http.response.details:a:Http Response Details" ] @@ -172,15 +169,17 @@ spotless { } test { - // Enable JUnit 5 (Gradle 4.6+). - useJUnitPlatform() - - // Always run tests, even when nothing changed. - dependsOn 'cleanTest' - - // Show test results. - testLogging { - events "passed", "skipped", "failed" - } - + useJUnit() } +// // Enable JUnit 5 (Gradle 4.6+). +// useJUnitPlatform() +// +// // Always run tests, even when nothing changed. +// dependsOn 'cleanTest' +// +// // Show test results. +// testLogging { +// events "passed", "skipped", "failed" +// } +// +//} diff --git a/build.sbt b/build.sbt index c0c7313e..6b666af3 100644 --- a/build.sbt +++ b/build.sbt @@ -1,28 +1,23 @@ lazy val root = (project in file(".")). settings( - organization := "org.openapitools", - name := "openapi-java-client", - version := "0.0.2", + organization := "unit", + name := "unit-java-client", + version := "0.0.3", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), publishArtifact in (Compile, packageDoc) := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.6.5", - "com.squareup.okhttp3" % "okhttp" % "4.10.0", - "com.squareup.okhttp3" % "logging-interceptor" % "4.10.0", - "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", - "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", - "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", - "org.junit.jupiter" % "junit-jupiter-api" % "5.9.1" % "test", - "com.novocode" % "junit-interface" % "0.10" % "test", - "org.mockito" % "mockito-core" % "3.12.4" % "test" + "com.fasterxml.jackson.core" % "jackson-core" % "2.14.1" + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.14.1" + "com.fasterxml.jackson.core" % "jackson-databind" % "2.14.1" + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.14.1" + "org.openapitools" % "jackson-databind-nullable" % "0.2.1", + "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", + "junit" % "junit" % "4.13.2" + "org.junit.jupiter" % "junit-jupiter-api" % "5.9.1" % "test" ) ) diff --git a/pom.xml b/pom.xml index 89c8c76c..20b4cea1 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ openapi-java-client jar openapi-java-client - 0.0.2 + 0.0.3 https://github.com/openapitools/openapi-generator OpenAPI Java @@ -33,22 +33,7 @@ - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - true - 128m - 512m - - -Xlint:all - -J-Xss4m - - - - org.apache.maven.plugins maven-enforcer-plugin 3.1.0 @@ -60,36 +45,27 @@ - 2.2.0 + 3 + + 11 + - org.apache.maven.plugins maven-surefire-plugin - 2.22.2 + 3.0.0-M7 - - - loggerPath - conf/log4j.properties - - + + conf/log4j.properties + -Xms512m -Xmx1500m methods 10 - - - - org.junit.jupiter - junit-jupiter-engine - ${junit-version} - - maven-dependency-plugin @@ -106,6 +82,7 @@ + org.apache.maven.plugins @@ -122,35 +99,8 @@ - org.codehaus.mojo - build-helper-maven-plugin - 3.3.0 - - - add_sources - generate-sources - - add-source - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - src/test/java - - - - + maven-compiler-plugin + 3.10.1 org.apache.maven.plugins @@ -164,19 +114,8 @@ - - none - - - http.response.details - a - Http Response Details: - - - - org.apache.maven.plugins maven-source-plugin 3.2.1 @@ -223,10 +162,8 @@ true - - @@ -239,7 +176,6 @@ - org.apache.maven.plugins maven-gpg-plugin 3.0.1 @@ -258,36 +194,39 @@ - + + - com.google.code.findbugs - jsr305 - 3.0.2 + com.fasterxml.jackson.core + jackson-core + ${jackson-version} - com.squareup.okhttp3 - okhttp - ${okhttp-version} + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} - com.squareup.okhttp3 - logging-interceptor - ${okhttp-version} + com.fasterxml.jackson.core + jackson-databind + ${jackson-version} - com.google.code.gson - gson - ${gson-version} + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} - io.gsonfire - gson-fire - ${gson-fire-version} + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + - org.apache.commons - commons-lang3 - ${commons-lang3-version} + com.google.code.findbugs + jsr305 + 3.0.2 jakarta.annotation @@ -295,58 +234,24 @@ ${jakarta-annotation-version} provided - - org.openapitools - jackson-databind-nullable - ${jackson-databind-nullable-version} - - - javax.ws.rs - jsr311-api - ${jsr311-api-version} - - - javax.ws.rs - javax.ws.rs-api - ${javax.ws.rs-api-version} - - org.junit.jupiter - junit-jupiter-engine + junit + junit ${junit-version} test - - org.junit.platform - junit-platform-runner - ${junit-platform-runner.version} - test - - - org.mockito - mockito-core - ${mockito-core-version} - test - + - 1.8 - ${java.version} - ${java.version} - 1.8.5 - 4.10.0 - 2.9.1 - 3.12.0 - 0.2.6 - 1.3.5 - 5.9.1 - 1.9.1 - 3.12.4 - 2.1.1 - 1.1.1 UTF-8 + 11 + 11 + 2.14.1 + 0.2.6 + 2.1.1 + 4.13.2 2.27.2 diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index 54fbcb3d..baaf6ac0 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -1,3 +1,3 @@ - + diff --git a/src/main/java/org/openapitools/client/ApiCallback.java b/src/main/java/org/openapitools/client/ApiCallback.java deleted file mode 100644 index 4d99cf06..00000000 --- a/src/main/java/org/openapitools/client/ApiCallback.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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; - -import java.io.IOException; - -import java.util.Map; -import java.util.List; - -/** - * Callback for asynchronous API call. - * - * @param The return type - */ -public interface ApiCallback { - /** - * This is called when the API call fails. - * - * @param e The exception causing the failure - * @param statusCode Status code of the response if available, otherwise it would be 0 - * @param responseHeaders Headers of the response if available, otherwise it would be null - */ - void onFailure(ApiException e, int statusCode, Map> responseHeaders); - - /** - * This is called when the API call succeeded. - * - * @param result The result deserialized from response - * @param statusCode Status code of the response - * @param responseHeaders Headers of the response - */ - void onSuccess(T result, int statusCode, Map> responseHeaders); - - /** - * This is called when the API upload processing. - * - * @param bytesWritten bytes Written - * @param contentLength content length of request body - * @param done write end - */ - void onUploadProgress(long bytesWritten, long contentLength, boolean done); - - /** - * This is called when the API download processing. - * - * @param bytesRead bytes Read - * @param contentLength content length of the response - * @param done Read end - */ - void onDownloadProgress(long bytesRead, long contentLength, boolean done); -} diff --git a/src/main/java/org/openapitools/client/ApiClient.java b/src/main/java/org/openapitools/client/ApiClient.java deleted file mode 100644 index 7b2d14cf..00000000 --- a/src/main/java/org/openapitools/client/ApiClient.java +++ /dev/null @@ -1,1565 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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; - -import okhttp3.*; -import okhttp3.internal.http.HttpMethod; -import okhttp3.internal.tls.OkHostnameVerifier; -import okhttp3.logging.HttpLoggingInterceptor; -import okhttp3.logging.HttpLoggingInterceptor.Level; -import okio.Buffer; -import okio.BufferedSink; -import okio.Okio; - -import javax.net.ssl.*; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.lang.reflect.Type; -import java.net.URI; -import java.net.URLConnection; -import java.net.URLEncoder; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.security.GeneralSecurityException; -import java.security.KeyStore; -import java.security.SecureRandom; -import java.security.cert.Certificate; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.text.DateFormat; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.*; -import java.util.Map.Entry; -import java.util.concurrent.TimeUnit; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.openapitools.client.auth.Authentication; -import org.openapitools.client.auth.HttpBasicAuth; -import org.openapitools.client.auth.HttpBearerAuth; -import org.openapitools.client.auth.ApiKeyAuth; - -/** - *

ApiClient class.

- */ -public class ApiClient { - - private String basePath = "https://api.s.unit.sh"; - protected List servers = new ArrayList(Arrays.asList( - new ServerConfiguration( - "https://api.s.unit.sh", - "No description provided", - new HashMap() - ) - )); - protected Integer serverIndex = 0; - protected Map serverVariables = null; - private boolean debugging = false; - private Map defaultHeaderMap = new HashMap(); - private Map defaultCookieMap = new HashMap(); - private String tempFolderPath = null; - - private Map authentications; - - private DateFormat dateFormat; - private DateFormat datetimeFormat; - private boolean lenientDatetimeFormat; - private int dateLength; - - private InputStream sslCaCert; - private boolean verifyingSsl; - private KeyManager[] keyManagers; - - private OkHttpClient httpClient; - private JSON json; - - private HttpLoggingInterceptor loggingInterceptor; - - /** - * Basic constructor for ApiClient - */ - public ApiClient() { - init(); - initHttpClient(); - - // Setup authentications (key: authentication name, value: authentication). - authentications.put("bearerAuth", new HttpBearerAuth("bearer")); - // Prevent the authentications from being modified. - authentications = Collections.unmodifiableMap(authentications); - } - - /** - * Basic constructor with custom OkHttpClient - * - * @param client a {@link okhttp3.OkHttpClient} object - */ - public ApiClient(OkHttpClient client) { - init(); - - httpClient = client; - - // Setup authentications (key: authentication name, value: authentication). - authentications.put("bearerAuth", new HttpBearerAuth("bearer")); - // Prevent the authentications from being modified. - authentications = Collections.unmodifiableMap(authentications); - } - - private void initHttpClient() { - initHttpClient(Collections.emptyList()); - } - - private void initHttpClient(List interceptors) { - OkHttpClient.Builder builder = new OkHttpClient.Builder(); - builder.addNetworkInterceptor(getProgressInterceptor()); - for (Interceptor interceptor: interceptors) { - builder.addInterceptor(interceptor); - } - - httpClient = builder.build(); - } - - private void init() { - verifyingSsl = true; - - json = new JSON(); - - // Set default User-Agent. - setUserAgent("OpenAPI-Generator/0.0.2/java"); - - authentications = new HashMap(); - } - - /** - * Get base path - * - * @return Base path - */ - public String getBasePath() { - return basePath; - } - - /** - * Set base path - * - * @param basePath Base path of the URL (e.g https://api.s.unit.sh - * @return An instance of OkHttpClient - */ - public ApiClient setBasePath(String basePath) { - this.basePath = basePath; - this.serverIndex = null; - return this; - } - - public List getServers() { - return servers; - } - - public ApiClient setServers(List servers) { - this.servers = servers; - return this; - } - - public Integer getServerIndex() { - return serverIndex; - } - - public ApiClient setServerIndex(Integer serverIndex) { - this.serverIndex = serverIndex; - return this; - } - - public Map getServerVariables() { - return serverVariables; - } - - public ApiClient setServerVariables(Map serverVariables) { - this.serverVariables = serverVariables; - return this; - } - - /** - * Get HTTP client - * - * @return An instance of OkHttpClient - */ - public OkHttpClient getHttpClient() { - return httpClient; - } - - /** - * Set HTTP client, which must never be null. - * - * @param newHttpClient An instance of OkHttpClient - * @return Api Client - * @throws java.lang.NullPointerException when newHttpClient is null - */ - public ApiClient setHttpClient(OkHttpClient newHttpClient) { - this.httpClient = Objects.requireNonNull(newHttpClient, "HttpClient must not be null!"); - return this; - } - - /** - * Get JSON - * - * @return JSON object - */ - public JSON getJSON() { - return json; - } - - /** - * Set JSON - * - * @param json JSON object - * @return Api client - */ - public ApiClient setJSON(JSON json) { - this.json = json; - return this; - } - - /** - * True if isVerifyingSsl flag is on - * - * @return True if isVerifySsl flag is on - */ - public boolean isVerifyingSsl() { - return verifyingSsl; - } - - /** - * Configure whether to verify certificate and hostname when making https requests. - * Default to true. - * NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks. - * - * @param verifyingSsl True to verify TLS/SSL connection - * @return ApiClient - */ - public ApiClient setVerifyingSsl(boolean verifyingSsl) { - this.verifyingSsl = verifyingSsl; - applySslSettings(); - return this; - } - - /** - * Get SSL CA cert. - * - * @return Input stream to the SSL CA cert - */ - public InputStream getSslCaCert() { - return sslCaCert; - } - - /** - * Configure the CA certificate to be trusted when making https requests. - * Use null to reset to default. - * - * @param sslCaCert input stream for SSL CA cert - * @return ApiClient - */ - public ApiClient setSslCaCert(InputStream sslCaCert) { - this.sslCaCert = sslCaCert; - applySslSettings(); - return this; - } - - /** - *

Getter for the field keyManagers.

- * - * @return an array of {@link javax.net.ssl.KeyManager} objects - */ - public KeyManager[] getKeyManagers() { - return keyManagers; - } - - /** - * Configure client keys to use for authorization in an SSL session. - * Use null to reset to default. - * - * @param managers The KeyManagers to use - * @return ApiClient - */ - public ApiClient setKeyManagers(KeyManager[] managers) { - this.keyManagers = managers; - applySslSettings(); - return this; - } - - /** - *

Getter for the field dateFormat.

- * - * @return a {@link java.text.DateFormat} object - */ - public DateFormat getDateFormat() { - return dateFormat; - } - - /** - *

Setter for the field dateFormat.

- * - * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link org.openapitools.client.ApiClient} object - */ - public ApiClient setDateFormat(DateFormat dateFormat) { - JSON.setDateFormat(dateFormat); - return this; - } - - /** - *

Set SqlDateFormat.

- * - * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link org.openapitools.client.ApiClient} object - */ - public ApiClient setSqlDateFormat(DateFormat dateFormat) { - JSON.setSqlDateFormat(dateFormat); - return this; - } - - /** - *

Set OffsetDateTimeFormat.

- * - * @param dateFormat a {@link java.time.format.DateTimeFormatter} object - * @return a {@link org.openapitools.client.ApiClient} object - */ - public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - JSON.setOffsetDateTimeFormat(dateFormat); - return this; - } - - /** - *

Set LocalDateFormat.

- * - * @param dateFormat a {@link java.time.format.DateTimeFormatter} object - * @return a {@link org.openapitools.client.ApiClient} object - */ - public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { - JSON.setLocalDateFormat(dateFormat); - return this; - } - - /** - *

Set LenientOnJson.

- * - * @param lenientOnJson a boolean - * @return a {@link org.openapitools.client.ApiClient} object - */ - public ApiClient setLenientOnJson(boolean lenientOnJson) { - JSON.setLenientOnJson(lenientOnJson); - return this; - } - - /** - * Get authentications (key: authentication name, value: authentication). - * - * @return Map of authentication objects - */ - public Map getAuthentications() { - return authentications; - } - - /** - * Get authentication for the given name. - * - * @param authName The authentication name - * @return The authentication, null if not found - */ - public Authentication getAuthentication(String authName) { - return authentications.get(authName); - } - - /** - * Helper method to set access token for the first Bearer authentication. - * @param bearerToken Bearer token - */ - public void setBearerToken(String bearerToken) { - for (Authentication auth : authentications.values()) { - if (auth instanceof HttpBearerAuth) { - ((HttpBearerAuth) auth).setBearerToken(bearerToken); - return; - } - } - throw new RuntimeException("No Bearer authentication configured!"); - } - - /** - * Helper method to set username for the first HTTP basic authentication. - * - * @param username Username - */ - public void setUsername(String username) { - for (Authentication auth : authentications.values()) { - if (auth instanceof HttpBasicAuth) { - ((HttpBasicAuth) auth).setUsername(username); - return; - } - } - throw new RuntimeException("No HTTP basic authentication configured!"); - } - - /** - * Helper method to set password for the first HTTP basic authentication. - * - * @param password Password - */ - public void setPassword(String password) { - for (Authentication auth : authentications.values()) { - if (auth instanceof HttpBasicAuth) { - ((HttpBasicAuth) auth).setPassword(password); - return; - } - } - throw new RuntimeException("No HTTP basic authentication configured!"); - } - - /** - * Helper method to set API key value for the first API key authentication. - * - * @param apiKey API key - */ - public void setApiKey(String apiKey) { - for (Authentication auth : authentications.values()) { - if (auth instanceof ApiKeyAuth) { - ((ApiKeyAuth) auth).setApiKey(apiKey); - return; - } - } - throw new RuntimeException("No API key authentication configured!"); - } - - /** - * Helper method to set API key prefix for the first API key authentication. - * - * @param apiKeyPrefix API key prefix - */ - public void setApiKeyPrefix(String apiKeyPrefix) { - for (Authentication auth : authentications.values()) { - if (auth instanceof ApiKeyAuth) { - ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); - return; - } - } - throw new RuntimeException("No API key authentication configured!"); - } - - /** - * Helper method to set access token for the first OAuth2 authentication. - * - * @param accessToken Access token - */ - public void setAccessToken(String accessToken) { - throw new RuntimeException("No OAuth2 authentication configured!"); - } - - /** - * Helper method to set credentials for AWSV4 Signature - * - * @param accessKey Access Key - * @param secretKey Secret Key - * @param region Region - * @param service Service to access to - */ - public void setAWS4Configuration(String accessKey, String secretKey, String region, String service) { - throw new RuntimeException("No AWS4 authentication configured!"); - } - - /** - * Set the User-Agent header's value (by adding to the default header map). - * - * @param userAgent HTTP request's user agent - * @return ApiClient - */ - public ApiClient setUserAgent(String userAgent) { - addDefaultHeader("User-Agent", userAgent); - return this; - } - - /** - * Add a default header. - * - * @param key The header's key - * @param value The header's value - * @return ApiClient - */ - public ApiClient addDefaultHeader(String key, String value) { - defaultHeaderMap.put(key, value); - return this; - } - - /** - * Add a default cookie. - * - * @param key The cookie's key - * @param value The cookie's value - * @return ApiClient - */ - public ApiClient addDefaultCookie(String key, String value) { - defaultCookieMap.put(key, value); - return this; - } - - /** - * Check that whether debugging is enabled for this API client. - * - * @return True if debugging is enabled, false otherwise. - */ - public boolean isDebugging() { - return debugging; - } - - /** - * Enable/disable debugging for this API client. - * - * @param debugging To enable (true) or disable (false) debugging - * @return ApiClient - */ - public ApiClient setDebugging(boolean debugging) { - if (debugging != this.debugging) { - if (debugging) { - loggingInterceptor = new HttpLoggingInterceptor(); - loggingInterceptor.setLevel(Level.BODY); - httpClient = httpClient.newBuilder().addInterceptor(loggingInterceptor).build(); - } else { - final OkHttpClient.Builder builder = httpClient.newBuilder(); - builder.interceptors().remove(loggingInterceptor); - httpClient = builder.build(); - loggingInterceptor = null; - } - } - this.debugging = debugging; - return this; - } - - /** - * The path of temporary folder used to store downloaded files from endpoints - * with file response. The default value is null, i.e. using - * the system's default temporary folder. - * - * @see createTempFile - * @return Temporary folder path - */ - public String getTempFolderPath() { - return tempFolderPath; - } - - /** - * Set the temporary folder path (for downloading files) - * - * @param tempFolderPath Temporary folder path - * @return ApiClient - */ - public ApiClient setTempFolderPath(String tempFolderPath) { - this.tempFolderPath = tempFolderPath; - return this; - } - - /** - * Get connection timeout (in milliseconds). - * - * @return Timeout in milliseconds - */ - public int getConnectTimeout() { - return httpClient.connectTimeoutMillis(); - } - - /** - * Sets the connect timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link java.lang.Integer#MAX_VALUE}. - * - * @param connectionTimeout connection timeout in milliseconds - * @return Api client - */ - public ApiClient setConnectTimeout(int connectionTimeout) { - httpClient = httpClient.newBuilder().connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS).build(); - return this; - } - - /** - * Get read timeout (in milliseconds). - * - * @return Timeout in milliseconds - */ - public int getReadTimeout() { - return httpClient.readTimeoutMillis(); - } - - /** - * Sets the read timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link java.lang.Integer#MAX_VALUE}. - * - * @param readTimeout read timeout in milliseconds - * @return Api client - */ - public ApiClient setReadTimeout(int readTimeout) { - httpClient = httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build(); - return this; - } - - /** - * Get write timeout (in milliseconds). - * - * @return Timeout in milliseconds - */ - public int getWriteTimeout() { - return httpClient.writeTimeoutMillis(); - } - - /** - * Sets the write timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link java.lang.Integer#MAX_VALUE}. - * - * @param writeTimeout connection timeout in milliseconds - * @return Api client - */ - public ApiClient setWriteTimeout(int writeTimeout) { - httpClient = httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build(); - return this; - } - - - /** - * Format the given parameter object into string. - * - * @param param Parameter - * @return String representation of the parameter - */ - public String parameterToString(Object param) { - if (param == null) { - return ""; - } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) { - //Serialize to json string and remove the " enclosing characters - String jsonStr = JSON.serialize(param); - return jsonStr.substring(1, jsonStr.length() - 1); - } else if (param instanceof Collection) { - StringBuilder b = new StringBuilder(); - for (Object o : (Collection) param) { - if (b.length() > 0) { - b.append(","); - } - b.append(o); - } - return b.toString(); - } else { - return String.valueOf(param); - } - } - - /** - * Formats the specified query parameter to a list containing a single {@code Pair} object. - * - * Note that {@code value} must not be a collection. - * - * @param name The name of the parameter. - * @param value The value of the parameter. - * @return A list containing a single {@code Pair} object. - */ - public List parameterToPair(String name, Object value) { - List params = new ArrayList(); - - // preconditions - if (name == null || name.isEmpty() || value == null || value instanceof Collection) { - return params; - } - - params.add(new Pair(name, parameterToString(value))); - return params; - } - - /** - * Formats the specified collection query parameters to a list of {@code Pair} objects. - * - * Note that the values of each of the returned Pair objects are percent-encoded. - * - * @param collectionFormat The collection format of the parameter. - * @param name The name of the parameter. - * @param value The value of the parameter. - * @return A list of {@code Pair} objects. - */ - public List parameterToPairs(String collectionFormat, String name, Collection value) { - List params = new ArrayList(); - - // preconditions - if (name == null || name.isEmpty() || value == null || value.isEmpty()) { - return params; - } - - // create the params based on the collection format - if ("multi".equals(collectionFormat)) { - for (Object item : value) { - params.add(new Pair(name, escapeString(parameterToString(item)))); - } - return params; - } - - // collectionFormat is assumed to be "csv" by default - String delimiter = ","; - - // escape all delimiters except commas, which are URI reserved - // characters - if ("ssv".equals(collectionFormat)) { - delimiter = escapeString(" "); - } else if ("tsv".equals(collectionFormat)) { - delimiter = escapeString("\t"); - } else if ("pipes".equals(collectionFormat)) { - delimiter = escapeString("|"); - } - - StringBuilder sb = new StringBuilder(); - for (Object item : value) { - sb.append(delimiter); - sb.append(escapeString(parameterToString(item))); - } - - params.add(new Pair(name, sb.substring(delimiter.length()))); - - return params; - } - - /** - * Formats the specified collection path parameter to a string value. - * - * @param collectionFormat The collection format of the parameter. - * @param value The value of the parameter. - * @return String representation of the parameter - */ - public String collectionPathParameterToString(String collectionFormat, Collection value) { - // create the value based on the collection format - if ("multi".equals(collectionFormat)) { - // not valid for path params - return parameterToString(value); - } - - // collectionFormat is assumed to be "csv" by default - String delimiter = ","; - - if ("ssv".equals(collectionFormat)) { - delimiter = " "; - } else if ("tsv".equals(collectionFormat)) { - delimiter = "\t"; - } else if ("pipes".equals(collectionFormat)) { - delimiter = "|"; - } - - StringBuilder sb = new StringBuilder() ; - for (Object item : value) { - sb.append(delimiter); - sb.append(parameterToString(item)); - } - - return sb.substring(delimiter.length()); - } - - /** - * Sanitize filename by removing path. - * e.g. ../../sun.gif becomes sun.gif - * - * @param filename The filename to be sanitized - * @return The sanitized filename - */ - public String sanitizeFilename(String filename) { - return filename.replaceAll(".*[/\\\\]", ""); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * "* / *" is also default to JSON - * @param mime MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public boolean isJsonMime(String mime) { - String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; - return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); - } - - /** - * Select the Accept header's value from the given accepts array: - * if JSON exists in the given array, use it; - * otherwise use all of them (joining into a string) - * - * @param accepts The accepts array to select from - * @return The Accept header to use. If the given array is empty, - * null will be returned (not to set the Accept header explicitly). - */ - public String selectHeaderAccept(String[] accepts) { - if (accepts.length == 0) { - return null; - } - for (String accept : accepts) { - if (isJsonMime(accept)) { - return accept; - } - } - return StringUtil.join(accepts, ","); - } - - /** - * Select the Content-Type header's value from the given array: - * if JSON exists in the given array, use it; - * otherwise use the first one of the array. - * - * @param contentTypes The Content-Type array to select from - * @return The Content-Type header to use. If the given array is empty, - * returns null. If it matches "any", JSON will be used. - */ - public String selectHeaderContentType(String[] contentTypes) { - if (contentTypes.length == 0) { - return null; - } - - if (contentTypes[0].equals("*/*")) { - return "application/json"; - } - - for (String contentType : contentTypes) { - if (isJsonMime(contentType)) { - return contentType; - } - } - - return contentTypes[0]; - } - - /** - * Escape the given string to be used as URL query value. - * - * @param str String to be escaped - * @return Escaped string - */ - public String escapeString(String str) { - try { - return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); - } catch (UnsupportedEncodingException e) { - return str; - } - } - - /** - * Deserialize response body to Java object, according to the return type and - * the Content-Type response header. - * - * @param Type - * @param response HTTP response - * @param returnType The type of the Java object - * @return The deserialized Java object - * @throws org.openapitools.client.ApiException If fail to deserialize response body, i.e. cannot read response body - * or the Content-Type of the response is not supported. - */ - @SuppressWarnings("unchecked") - public T deserialize(Response response, Type returnType) throws ApiException { - if (response == null || returnType == null) { - return null; - } - - if ("byte[]".equals(returnType.toString())) { - // Handle binary response (byte array). - try { - return (T) response.body().bytes(); - } catch (IOException e) { - throw new ApiException(e); - } - } else if (returnType.equals(File.class)) { - // Handle file downloading. - return (T) downloadFileFromResponse(response); - } - - String respBody; - try { - if (response.body() != null) - respBody = response.body().string(); - else - respBody = null; - } catch (IOException e) { - throw new ApiException(e); - } - - if (respBody == null || "".equals(respBody)) { - return null; - } - - String contentType = response.headers().get("Content-Type"); - if (contentType == null) { - // ensuring a default content type - contentType = "application/json"; - } - if (isJsonMime(contentType)) { - return JSON.deserialize(respBody, returnType); - } else if (returnType.equals(String.class)) { - // Expecting string, return the raw response body. - return (T) respBody; - } else { - throw new ApiException( - "Content type \"" + contentType + "\" is not supported for type: " + returnType, - response.code(), - response.headers().toMultimap(), - respBody); - } - } - - /** - * Serialize the given Java object into request body according to the object's - * class and the request Content-Type. - * - * @param obj The Java object - * @param contentType The request Content-Type - * @return The serialized request body - * @throws org.openapitools.client.ApiException If fail to serialize the given object - */ - public RequestBody serialize(Object obj, String contentType) throws ApiException { - if (obj instanceof byte[]) { - // Binary (byte array) body parameter support. - return RequestBody.create((byte[]) obj, MediaType.parse(contentType)); - } else if (obj instanceof File) { - // File body parameter support. - return RequestBody.create((File) obj, MediaType.parse(contentType)); - } else if ("text/plain".equals(contentType) && obj instanceof String) { - return RequestBody.create((String) obj, MediaType.parse(contentType)); - } else if (isJsonMime(contentType)) { - String content; - if (obj != null) { - content = JSON.serialize(obj); - } else { - content = null; - } - return RequestBody.create(content, MediaType.parse(contentType)); - } else if (obj instanceof String) { - return RequestBody.create((String) obj, MediaType.parse(contentType)); - } else { - throw new ApiException("Content type \"" + contentType + "\" is not supported"); - } - } - - /** - * Download file from the given response. - * - * @param response An instance of the Response object - * @throws org.openapitools.client.ApiException If fail to read file content from response and write to disk - * @return Downloaded file - */ - public File downloadFileFromResponse(Response response) throws ApiException { - try { - File file = prepareDownloadFile(response); - BufferedSink sink = Okio.buffer(Okio.sink(file)); - sink.writeAll(response.body().source()); - sink.close(); - return file; - } catch (IOException e) { - throw new ApiException(e); - } - } - - /** - * Prepare file for download - * - * @param response An instance of the Response object - * @return Prepared file for the download - * @throws java.io.IOException If fail to prepare file for download - */ - public File prepareDownloadFile(Response response) throws IOException { - String filename = null; - String contentDisposition = response.header("Content-Disposition"); - if (contentDisposition != null && !"".equals(contentDisposition)) { - // Get filename from the Content-Disposition header. - Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); - Matcher matcher = pattern.matcher(contentDisposition); - if (matcher.find()) { - filename = sanitizeFilename(matcher.group(1)); - } - } - - String prefix = null; - String suffix = null; - if (filename == null) { - prefix = "download-"; - suffix = ""; - } else { - int pos = filename.lastIndexOf("."); - if (pos == -1) { - prefix = filename + "-"; - } else { - prefix = filename.substring(0, pos) + "-"; - suffix = filename.substring(pos); - } - // Files.createTempFile requires the prefix to be at least three characters long - if (prefix.length() < 3) - prefix = "download-"; - } - - if (tempFolderPath == null) - return Files.createTempFile(prefix, suffix).toFile(); - else - return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); - } - - /** - * {@link #execute(Call, Type)} - * - * @param Type - * @param call An instance of the Call object - * @return ApiResponse<T> - * @throws org.openapitools.client.ApiException If fail to execute the call - */ - public ApiResponse execute(Call call) throws ApiException { - return execute(call, null); - } - - /** - * Execute HTTP call and deserialize the HTTP response body into the given return type. - * - * @param returnType The return type used to deserialize HTTP response body - * @param The return type corresponding to (same with) returnType - * @param call Call - * @return ApiResponse object containing response status, headers and - * data, which is a Java object deserialized from response body and would be null - * when returnType is null. - * @throws org.openapitools.client.ApiException If fail to execute the call - */ - public ApiResponse execute(Call call, Type returnType) throws ApiException { - try { - Response response = call.execute(); - T data = handleResponse(response, returnType); - return new ApiResponse(response.code(), response.headers().toMultimap(), data); - } catch (IOException e) { - throw new ApiException(e); - } - } - - /** - * {@link #executeAsync(Call, Type, ApiCallback)} - * - * @param Type - * @param call An instance of the Call object - * @param callback ApiCallback<T> - */ - public void executeAsync(Call call, ApiCallback callback) { - executeAsync(call, null, callback); - } - - /** - * Execute HTTP call asynchronously. - * - * @param Type - * @param call The callback to be executed when the API call finishes - * @param returnType Return type - * @param callback ApiCallback - * @see #execute(Call, Type) - */ - @SuppressWarnings("unchecked") - public void executeAsync(Call call, final Type returnType, final ApiCallback callback) { - call.enqueue(new Callback() { - @Override - public void onFailure(Call call, IOException e) { - callback.onFailure(new ApiException(e), 0, null); - } - - @Override - public void onResponse(Call call, Response response) throws IOException { - T result; - try { - result = (T) handleResponse(response, returnType); - } catch (ApiException e) { - callback.onFailure(e, response.code(), response.headers().toMultimap()); - return; - } catch (Exception e) { - callback.onFailure(new ApiException(e), response.code(), response.headers().toMultimap()); - return; - } - callback.onSuccess(result, response.code(), response.headers().toMultimap()); - } - }); - } - - /** - * Handle the given response, return the deserialized object when the response is successful. - * - * @param Type - * @param response Response - * @param returnType Return type - * @return Type - * @throws org.openapitools.client.ApiException If the response has an unsuccessful status code or - * fail to deserialize the response body - */ - public T handleResponse(Response response, Type returnType) throws ApiException { - if (response.isSuccessful()) { - if (returnType == null || response.code() == 204) { - // returning null if the returnType is not defined, - // or the status code is 204 (No Content) - if (response.body() != null) { - try { - response.body().close(); - } catch (Exception e) { - throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); - } - } - return null; - } else { - return deserialize(response, returnType); - } - } else { - String respBody = null; - if (response.body() != null) { - try { - respBody = response.body().string(); - } catch (IOException e) { - throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); - } - } - throw new ApiException(response.message(), response.code(), response.headers().toMultimap(), respBody); - } - } - - /** - * Build HTTP call with the given options. - * - * @param baseUrl The base URL - * @param path The sub-path of the HTTP URL - * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" - * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters - * @param body The request body object - * @param headerParams The header parameters - * @param cookieParams The cookie parameters - * @param formParams The form parameters - * @param authNames The authentications to apply - * @param callback Callback for upload/download progress - * @return The HTTP call - * @throws org.openapitools.client.ApiException If fail to serialize the request body object - */ - public Call buildCall(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - Request request = buildRequest(baseUrl, path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); - - return httpClient.newCall(request); - } - - /** - * Build an HTTP request with the given options. - * - * @param baseUrl The base URL - * @param path The sub-path of the HTTP URL - * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" - * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters - * @param body The request body object - * @param headerParams The header parameters - * @param cookieParams The cookie parameters - * @param formParams The form parameters - * @param authNames The authentications to apply - * @param callback Callback for upload/download progress - * @return The HTTP request - * @throws org.openapitools.client.ApiException If fail to serialize the request body object - */ - public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - // aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams - List allQueryParams = new ArrayList(queryParams); - allQueryParams.addAll(collectionQueryParams); - - final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams); - - // prepare HTTP request body - RequestBody reqBody; - String contentType = headerParams.get("Content-Type"); - String contentTypePure = contentType; - if (contentTypePure != null && contentTypePure.contains(";")) { - contentTypePure = contentType.substring(0, contentType.indexOf(";")); - } - if (!HttpMethod.permitsRequestBody(method)) { - reqBody = null; - } else if ("application/x-www-form-urlencoded".equals(contentTypePure)) { - reqBody = buildRequestBodyFormEncoding(formParams); - } else if ("multipart/form-data".equals(contentTypePure)) { - reqBody = buildRequestBodyMultipart(formParams); - } else if (body == null) { - if ("DELETE".equals(method)) { - // allow calling DELETE without sending a request body - reqBody = null; - } else { - // use an empty request body (for POST, PUT and PATCH) - reqBody = RequestBody.create("", contentType == null ? null : MediaType.parse(contentType)); - } - } else { - reqBody = serialize(body, contentType); - } - - // update parameters with authentication settings - updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); - - final Request.Builder reqBuilder = new Request.Builder().url(url); - processHeaderParams(headerParams, reqBuilder); - processCookieParams(cookieParams, reqBuilder); - - // Associate callback with request (if not null) so interceptor can - // access it when creating ProgressResponseBody - reqBuilder.tag(callback); - - Request request = null; - - if (callback != null && reqBody != null) { - ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, callback); - request = reqBuilder.method(method, progressRequestBody).build(); - } else { - request = reqBuilder.method(method, reqBody).build(); - } - - return request; - } - - /** - * Build full URL by concatenating base path, the given sub path and query parameters. - * - * @param baseUrl The base URL - * @param path The sub path - * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters - * @return The full URL - */ - public String buildUrl(String baseUrl, String path, List queryParams, List collectionQueryParams) { - final StringBuilder url = new StringBuilder(); - if (baseUrl != null) { - url.append(baseUrl).append(path); - } else { - String baseURL; - if (serverIndex != null) { - if (serverIndex < 0 || serverIndex >= servers.size()) { - throw new ArrayIndexOutOfBoundsException(String.format( - "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() - )); - } - baseURL = servers.get(serverIndex).URL(serverVariables); - } else { - baseURL = basePath; - } - url.append(baseURL).append(path); - } - - if (queryParams != null && !queryParams.isEmpty()) { - // support (constant) query string in `path`, e.g. "/posts?draft=1" - String prefix = path.contains("?") ? "&" : "?"; - for (Pair param : queryParams) { - if (param.getValue() != null) { - if (prefix != null) { - url.append(prefix); - prefix = null; - } else { - url.append("&"); - } - String value = parameterToString(param.getValue()); - url.append(escapeString(param.getName())).append("=").append(escapeString(value)); - } - } - } - - if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { - String prefix = url.toString().contains("?") ? "&" : "?"; - for (Pair param : collectionQueryParams) { - if (param.getValue() != null) { - if (prefix != null) { - url.append(prefix); - prefix = null; - } else { - url.append("&"); - } - String value = parameterToString(param.getValue()); - // collection query parameter value already escaped as part of parameterToPairs - url.append(escapeString(param.getName())).append("=").append(value); - } - } - } - - return url.toString(); - } - - /** - * Set header parameters to the request builder, including default headers. - * - * @param headerParams Header parameters in the form of Map - * @param reqBuilder Request.Builder - */ - public void processHeaderParams(Map headerParams, Request.Builder reqBuilder) { - for (Entry param : headerParams.entrySet()) { - reqBuilder.header(param.getKey(), parameterToString(param.getValue())); - } - for (Entry header : defaultHeaderMap.entrySet()) { - if (!headerParams.containsKey(header.getKey())) { - reqBuilder.header(header.getKey(), parameterToString(header.getValue())); - } - } - } - - /** - * Set cookie parameters to the request builder, including default cookies. - * - * @param cookieParams Cookie parameters in the form of Map - * @param reqBuilder Request.Builder - */ - public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { - for (Entry param : cookieParams.entrySet()) { - reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); - } - for (Entry param : defaultCookieMap.entrySet()) { - if (!cookieParams.containsKey(param.getKey())) { - reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); - } - } - } - - /** - * Update query and header parameters based on authentication settings. - * - * @param authNames The authentications to apply - * @param queryParams List of query parameters - * @param headerParams Map of header parameters - * @param cookieParams Map of cookie parameters - * @param payload HTTP request body - * @param method HTTP method - * @param uri URI - * @throws org.openapitools.client.ApiException If fails to update the parameters - */ - public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, - Map cookieParams, String payload, String method, URI uri) throws ApiException { - for (String authName : authNames) { - Authentication auth = authentications.get(authName); - if (auth == null) { - throw new RuntimeException("Authentication undefined: " + authName); - } - auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); - } - } - - /** - * Build a form-encoding request body with the given form parameters. - * - * @param formParams Form parameters in the form of Map - * @return RequestBody - */ - public RequestBody buildRequestBodyFormEncoding(Map formParams) { - okhttp3.FormBody.Builder formBuilder = new okhttp3.FormBody.Builder(); - for (Entry param : formParams.entrySet()) { - formBuilder.add(param.getKey(), parameterToString(param.getValue())); - } - return formBuilder.build(); - } - - /** - * Build a multipart (file uploading) request body with the given form parameters, - * which could contain text fields and file fields. - * - * @param formParams Form parameters in the form of Map - * @return RequestBody - */ - public RequestBody buildRequestBodyMultipart(Map formParams) { - MultipartBody.Builder mpBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - for (Entry param : formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); - } else if (param.getValue() instanceof List) { - List list = (List) param.getValue(); - for (Object item: list) { - if (item instanceof File) { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); - } else { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); - } - } - } else { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); - } - } - return mpBuilder.build(); - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - public String guessContentTypeFromFile(File file) { - String contentType = URLConnection.guessContentTypeFromName(file.getName()); - if (contentType == null) { - return "application/octet-stream"; - } else { - return contentType; - } - } - - /** - * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder. - * - * @param mpBuilder MultipartBody.Builder - * @param key The key of the Header element - * @param file The file to add to the Header - */ - private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); - MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); - mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); - } - - /** - * Add a Content-Disposition Header for the given key and complex object to the MultipartBody Builder. - * - * @param mpBuilder MultipartBody.Builder - * @param key The key of the Header element - * @param obj The complex object to add to the Header - */ - private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { - RequestBody requestBody; - if (obj instanceof String) { - requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain")); - } else { - String content; - if (obj != null) { - content = JSON.serialize(obj); - } else { - content = null; - } - requestBody = RequestBody.create(content, MediaType.parse("application/json")); - } - - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\""); - mpBuilder.addPart(partHeaders, requestBody); - } - - /** - * Get network interceptor to add it to the httpClient to track download progress for - * async requests. - */ - private Interceptor getProgressInterceptor() { - return new Interceptor() { - @Override - public Response intercept(Interceptor.Chain chain) throws IOException { - final Request request = chain.request(); - final Response originalResponse = chain.proceed(request); - if (request.tag() instanceof ApiCallback) { - final ApiCallback callback = (ApiCallback) request.tag(); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), callback)) - .build(); - } - return originalResponse; - } - }; - } - - /** - * Apply SSL related settings to httpClient according to the current values of - * verifyingSsl and sslCaCert. - */ - private void applySslSettings() { - try { - TrustManager[] trustManagers; - HostnameVerifier hostnameVerifier; - if (!verifyingSsl) { - trustManagers = new TrustManager[]{ - new X509TrustManager() { - @Override - public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { - } - - @Override - public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { - } - - @Override - public java.security.cert.X509Certificate[] getAcceptedIssuers() { - return new java.security.cert.X509Certificate[]{}; - } - } - }; - hostnameVerifier = new HostnameVerifier() { - @Override - public boolean verify(String hostname, SSLSession session) { - return true; - } - }; - } else { - TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); - - if (sslCaCert == null) { - trustManagerFactory.init((KeyStore) null); - } else { - char[] password = null; // Any password will work. - CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); - Collection certificates = certificateFactory.generateCertificates(sslCaCert); - if (certificates.isEmpty()) { - throw new IllegalArgumentException("expected non-empty set of trusted certificates"); - } - KeyStore caKeyStore = newEmptyKeyStore(password); - int index = 0; - for (Certificate certificate : certificates) { - String certificateAlias = "ca" + (index++); - caKeyStore.setCertificateEntry(certificateAlias, certificate); - } - trustManagerFactory.init(caKeyStore); - } - trustManagers = trustManagerFactory.getTrustManagers(); - hostnameVerifier = OkHostnameVerifier.INSTANCE; - } - - SSLContext sslContext = SSLContext.getInstance("TLS"); - sslContext.init(keyManagers, trustManagers, new SecureRandom()); - httpClient = httpClient.newBuilder() - .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]) - .hostnameVerifier(hostnameVerifier) - .build(); - } catch (GeneralSecurityException e) { - throw new RuntimeException(e); - } - } - - private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { - try { - KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); - keyStore.load(null, password); - return keyStore; - } catch (IOException e) { - throw new AssertionError(e); - } - } - - /** - * Convert the HTTP request body to a string. - * - * @param requestBody The HTTP request object - * @return The string representation of the HTTP request body - * @throws org.openapitools.client.ApiException If fail to serialize the request body object into a string - */ - private String requestBodyToString(RequestBody requestBody) throws ApiException { - if (requestBody != null) { - try { - final Buffer buffer = new Buffer(); - requestBody.writeTo(buffer); - return buffer.readUtf8(); - } catch (final IOException e) { - throw new ApiException(e); - } - } - - // empty http request body - return ""; - } -} diff --git a/src/main/java/org/openapitools/client/ApiException.java b/src/main/java/org/openapitools/client/ApiException.java deleted file mode 100644 index 7e9fce2c..00000000 --- a/src/main/java/org/openapitools/client/ApiException.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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; - -import java.util.Map; -import java.util.List; - - -/** - *

ApiException class.

- */ -@SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApiException extends Exception { - private int code = 0; - private Map> responseHeaders = null; - private String responseBody = null; - - /** - *

Constructor for ApiException.

- */ - public ApiException() {} - - /** - *

Constructor for ApiException.

- * - * @param throwable a {@link java.lang.Throwable} object - */ - public ApiException(Throwable throwable) { - super(throwable); - } - - /** - *

Constructor for ApiException.

- * - * @param message the error message - */ - public ApiException(String message) { - super(message); - } - - /** - *

Constructor for ApiException.

- * - * @param message the error message - * @param throwable a {@link java.lang.Throwable} object - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { - super(message, throwable); - this.code = code; - this.responseHeaders = responseHeaders; - this.responseBody = responseBody; - } - - /** - *

Constructor for ApiException.

- * - * @param message the error message - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException(String message, int code, Map> responseHeaders, String responseBody) { - this(message, (Throwable) null, code, responseHeaders, responseBody); - } - - /** - *

Constructor for ApiException.

- * - * @param message the error message - * @param throwable a {@link java.lang.Throwable} object - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - */ - public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { - this(message, throwable, code, responseHeaders, null); - } - - /** - *

Constructor for ApiException.

- * - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException(int code, Map> responseHeaders, String responseBody) { - this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); - } - - /** - *

Constructor for ApiException.

- * - * @param code HTTP status code - * @param message a {@link java.lang.String} object - */ - public ApiException(int code, String message) { - super(message); - this.code = code; - } - - /** - *

Constructor for ApiException.

- * - * @param code HTTP status code - * @param message the error message - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException(int code, String message, Map> responseHeaders, String responseBody) { - this(code, message); - this.responseHeaders = responseHeaders; - this.responseBody = responseBody; - } - - /** - * Get the HTTP status code. - * - * @return HTTP status code - */ - public int getCode() { - return code; - } - - /** - * Get the HTTP response headers. - * - * @return A map of list of string - */ - public Map> getResponseHeaders() { - return responseHeaders; - } - - /** - * Get the HTTP response body. - * - * @return Response body in the form of string - */ - public String getResponseBody() { - return responseBody; - } - - /** - * Get the exception message including HTTP response data. - * - * @return The exception message - */ - public String getMessage() { - return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", - super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders()); - } -} diff --git a/src/main/java/org/openapitools/client/ApiResponse.java b/src/main/java/org/openapitools/client/ApiResponse.java deleted file mode 100644 index 73c0c962..00000000 --- a/src/main/java/org/openapitools/client/ApiResponse.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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; - -import java.util.List; -import java.util.Map; - -/** - * API response returned by API call. - */ -public class ApiResponse { - final private int statusCode; - final private Map> headers; - final private T data; - - /** - *

Constructor for ApiResponse.

- * - * @param statusCode The status code of HTTP response - * @param headers The headers of HTTP response - */ - public ApiResponse(int statusCode, Map> headers) { - this(statusCode, headers, null); - } - - /** - *

Constructor for ApiResponse.

- * - * @param statusCode The status code of HTTP response - * @param headers The headers of HTTP response - * @param data The object deserialized from response bod - */ - public ApiResponse(int statusCode, Map> headers, T data) { - this.statusCode = statusCode; - this.headers = headers; - this.data = data; - } - - /** - *

Get the status code.

- * - * @return the status code - */ - public int getStatusCode() { - return statusCode; - } - - /** - *

Get the headers.

- * - * @return a {@link java.util.Map} of headers - */ - public Map> getHeaders() { - return headers; - } - - /** - *

Get the data.

- * - * @return the data - */ - public T getData() { - return data; - } -} diff --git a/src/main/java/org/openapitools/client/GzipRequestInterceptor.java b/src/main/java/org/openapitools/client/GzipRequestInterceptor.java deleted file mode 100644 index 6f6efd15..00000000 --- a/src/main/java/org/openapitools/client/GzipRequestInterceptor.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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; - -import okhttp3.*; -import okio.Buffer; -import okio.BufferedSink; -import okio.GzipSink; -import okio.Okio; - -import java.io.IOException; - -/** - * Encodes request bodies using gzip. - * - * Taken from https://github.com/square/okhttp/issues/350 - */ -class GzipRequestInterceptor implements Interceptor { - @Override - public Response intercept(Chain chain) throws IOException { - Request originalRequest = chain.request(); - if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { - return chain.proceed(originalRequest); - } - - Request compressedRequest = originalRequest.newBuilder() - .header("Content-Encoding", "gzip") - .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body()))) - .build(); - return chain.proceed(compressedRequest); - } - - private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { - final Buffer buffer = new Buffer(); - requestBody.writeTo(buffer); - return new RequestBody() { - @Override - public MediaType contentType() { - return requestBody.contentType(); - } - - @Override - public long contentLength() { - return buffer.size(); - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - sink.write(buffer.snapshot()); - } - }; - } - - private RequestBody gzip(final RequestBody body) { - return new RequestBody() { - @Override - public MediaType contentType() { - return body.contentType(); - } - - @Override - public long contentLength() { - return -1; // We don't know the compressed length in advance! - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); - body.writeTo(gzipSink); - gzipSink.close(); - } - }; - } -} diff --git a/src/main/java/org/openapitools/client/JSON.java b/src/main/java/org/openapitools/client/JSON.java deleted file mode 100644 index cb9728e4..00000000 --- a/src/main/java/org/openapitools/client/JSON.java +++ /dev/null @@ -1,1738 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.internal.bind.util.ISO8601Utils; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonElement; -import io.gsonfire.GsonFireBuilder; -import io.gsonfire.TypeSelector; - -import okio.ByteString; - -import java.io.IOException; -import java.io.StringReader; -import java.lang.reflect.Type; -import java.text.DateFormat; -import java.text.ParseException; -import java.text.ParsePosition; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.Date; -import java.util.Locale; -import java.util.Map; -import java.util.HashMap; - -/* - * A JSON utility class - * - * NOTE: in the future, this class may be converted to static, which may break - * backward-compatibility - */ -public class JSON { - private static Gson gson; - private static boolean isLenientOnJson = false; - private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); - private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); - private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); - private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); - private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); - - @SuppressWarnings("unchecked") - public static GsonBuilder createGson() { - GsonFireBuilder fireBuilder = new GsonFireBuilder() - .registerTypeSelector(org.openapitools.client.model.Account.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("creditAccount", org.openapitools.client.model.CreditAccount.class); - classByDiscriminatorValue.put("depositAccount", org.openapitools.client.model.DepositAccount.class); - classByDiscriminatorValue.put("account", org.openapitools.client.model.Account.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.AccountLowBalanceClosureTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("AccountLowBalanceClosureTransaction", org.openapitools.client.model.AccountLowBalanceClosureTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.AchPayment.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("AchPayment", org.openapitools.client.model.AchPayment.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.AchRepayment.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("AchRepayment", org.openapitools.client.model.AchRepayment.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.AdjustmentTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("AdjustmentTransaction", org.openapitools.client.model.AdjustmentTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.Application.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("businessApplication", org.openapitools.client.model.BusinessApplication.class); - classByDiscriminatorValue.put("individualApplication", org.openapitools.client.model.IndividualApplication.class); - classByDiscriminatorValue.put("trustApplication", org.openapitools.client.model.TrustApplication.class); - classByDiscriminatorValue.put("application", org.openapitools.client.model.Application.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.AtmAuthorizationRequest.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("AtmAuthorizationRequest", org.openapitools.client.model.AtmAuthorizationRequest.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.AtmTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("AtmTransaction", org.openapitools.client.model.AtmTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.AuthorizationRequest.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("atmAuthorizationRequest", org.openapitools.client.model.AtmAuthorizationRequest.class); - classByDiscriminatorValue.put("cardTransactionAuthorizationRequest", org.openapitools.client.model.CardTransactionAuthorizationRequest.class); - classByDiscriminatorValue.put("purchaseAuthorizationRequest", org.openapitools.client.model.PurchaseAuthorizationRequest.class); - classByDiscriminatorValue.put("authorization_request", org.openapitools.client.model.AuthorizationRequest.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.BankRepaymentTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("BankRepaymentTransaction", org.openapitools.client.model.BankRepaymentTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.BillPayTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("BillPayTransaction", org.openapitools.client.model.BillPayTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.BillPayment.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("BillPayment", org.openapitools.client.model.BillPayment.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.BookPayment.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("BookPayment", org.openapitools.client.model.BookPayment.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.BookRepayment.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("BookRepayment", org.openapitools.client.model.BookRepayment.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.BookTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("BookTransaction", org.openapitools.client.model.BookTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.BusinessApplication.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("BusinessApplication", org.openapitools.client.model.BusinessApplication.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.BusinessCreditCard.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("BusinessCreditCard", org.openapitools.client.model.BusinessCreditCard.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.BusinessCustomer.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("BusinessCustomer", org.openapitools.client.model.BusinessCustomer.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.BusinessDebitCard.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("BusinessDebitCard", org.openapitools.client.model.BusinessDebitCard.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.BusinessVirtualCreditCard.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("BusinessVirtualCreditCard", org.openapitools.client.model.BusinessVirtualCreditCard.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.BusinessVirtualDebitCard.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("BusinessVirtualDebitCard", org.openapitools.client.model.BusinessVirtualDebitCard.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.Card.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("businessCreditCard", org.openapitools.client.model.BusinessCreditCard.class); - classByDiscriminatorValue.put("businessDebitCard", org.openapitools.client.model.BusinessDebitCard.class); - classByDiscriminatorValue.put("businessVirtualCreditCard", org.openapitools.client.model.BusinessVirtualCreditCard.class); - classByDiscriminatorValue.put("businessVirtualDebitCard", org.openapitools.client.model.BusinessVirtualDebitCard.class); - classByDiscriminatorValue.put("individualDebitCard", org.openapitools.client.model.IndividualDebitCard.class); - classByDiscriminatorValue.put("individualVirtualDebitCard", org.openapitools.client.model.IndividualVirtualDebitCard.class); - classByDiscriminatorValue.put("card", org.openapitools.client.model.Card.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.CardTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("CardTransaction", org.openapitools.client.model.CardTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.CardTransactionAuthorizationRequest.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("CardTransactionAuthorizationRequest", org.openapitools.client.model.CardTransactionAuthorizationRequest.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.CashDepositTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("CashDepositTransaction", org.openapitools.client.model.CashDepositTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.ChargebackTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("ChargebackTransaction", org.openapitools.client.model.ChargebackTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.CheckDepositTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("CheckDepositTransaction", org.openapitools.client.model.CheckDepositTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.CheckPaymentTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("CheckPaymentTransaction", org.openapitools.client.model.CheckPaymentTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.CreditAccount.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("CreditAccount", org.openapitools.client.model.CreditAccount.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.CreditLimits.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("CreditLimits", org.openapitools.client.model.CreditLimits.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.Customer.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("businessCustomer", org.openapitools.client.model.BusinessCustomer.class); - classByDiscriminatorValue.put("individualCustomer", org.openapitools.client.model.IndividualCustomer.class); - classByDiscriminatorValue.put("trustCustomer", org.openapitools.client.model.TrustCustomer.class); - classByDiscriminatorValue.put("customer", org.openapitools.client.model.Customer.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.CustomerRepaymentReturnedTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("CustomerRepaymentReturnedTransaction", org.openapitools.client.model.CustomerRepaymentReturnedTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.CustomerRepaymentTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("CustomerRepaymentTransaction", org.openapitools.client.model.CustomerRepaymentTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.DepositAccount.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("DepositAccount", org.openapitools.client.model.DepositAccount.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.DepositLimits.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("DepositLimits", org.openapitools.client.model.DepositLimits.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.DishonoredAchTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("DishonoredAchTransaction", org.openapitools.client.model.DishonoredAchTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.DisputeSettlementTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("DisputeSettlementTransaction", org.openapitools.client.model.DisputeSettlementTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.DisputeTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("DisputeTransaction", org.openapitools.client.model.DisputeTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.FeeTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("FeeTransaction", org.openapitools.client.model.FeeTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.IndividualApplication.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("IndividualApplication", org.openapitools.client.model.IndividualApplication.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.IndividualCustomer.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("IndividualCustomer", org.openapitools.client.model.IndividualCustomer.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.IndividualDebitCard.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("IndividualDebitCard", org.openapitools.client.model.IndividualDebitCard.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.IndividualVirtualDebitCard.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("IndividualVirtualDebitCard", org.openapitools.client.model.IndividualVirtualDebitCard.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.InterchangeTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("InterchangeTransaction", org.openapitools.client.model.InterchangeTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.InterestShareTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("InterestShareTransaction", org.openapitools.client.model.InterestShareTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.InterestTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("InterestTransaction", org.openapitools.client.model.InterestTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.Limits1.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("creditLimits", org.openapitools.client.model.CreditLimits.class); - classByDiscriminatorValue.put("limits", org.openapitools.client.model.DepositLimits.class); - classByDiscriminatorValue.put("limits_1", org.openapitools.client.model.Limits1.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.NegativeBalanceCoverageTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("NegativeBalanceCoverageTransaction", org.openapitools.client.model.NegativeBalanceCoverageTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.OriginatedAchTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("OriginatedAchTransaction", org.openapitools.client.model.OriginatedAchTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.Payment.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("achPayment", org.openapitools.client.model.AchPayment.class); - classByDiscriminatorValue.put("billPayment", org.openapitools.client.model.BillPayment.class); - classByDiscriminatorValue.put("bookPayment", org.openapitools.client.model.BookPayment.class); - classByDiscriminatorValue.put("wirePayment", org.openapitools.client.model.WirePayment.class); - classByDiscriminatorValue.put("payment", org.openapitools.client.model.Payment.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.PaymentAdvanceTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("PaymentAdvanceTransaction", org.openapitools.client.model.PaymentAdvanceTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.PurchaseAuthorizationRequest.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("PurchaseAuthorizationRequest", org.openapitools.client.model.PurchaseAuthorizationRequest.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.PurchaseTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("PurchaseTransaction", org.openapitools.client.model.PurchaseTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.ReceivedAchTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("ReceivedAchTransaction", org.openapitools.client.model.ReceivedAchTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.RecurringCreditAchPayment.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("RecurringCreditAchPayment", org.openapitools.client.model.RecurringCreditAchPayment.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.RecurringCreditBookPayment.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("RecurringCreditBookPayment", org.openapitools.client.model.RecurringCreditBookPayment.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.RecurringDebitAchPayment.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("RecurringDebitAchPayment", org.openapitools.client.model.RecurringDebitAchPayment.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.RecurringPayment.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("recurringCreditAchPayment", org.openapitools.client.model.RecurringCreditAchPayment.class); - classByDiscriminatorValue.put("recurringCreditBookPayment", org.openapitools.client.model.RecurringCreditBookPayment.class); - classByDiscriminatorValue.put("recurringDebitAchPayment", org.openapitools.client.model.RecurringDebitAchPayment.class); - classByDiscriminatorValue.put("recurring_payment", org.openapitools.client.model.RecurringPayment.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.ReleaseTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("ReleaseTransaction", org.openapitools.client.model.ReleaseTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.RepaidPaymentAdvanceTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("RepaidPaymentAdvanceTransaction", org.openapitools.client.model.RepaidPaymentAdvanceTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.Repayment.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("achRepayment", org.openapitools.client.model.AchRepayment.class); - classByDiscriminatorValue.put("bookRepayment", org.openapitools.client.model.BookRepayment.class); - classByDiscriminatorValue.put("repayment", org.openapitools.client.model.Repayment.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.ReturnedAchTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("ReturnedAchTransaction", org.openapitools.client.model.ReturnedAchTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.ReturnedCheckDepositTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("ReturnedCheckDepositTransaction", org.openapitools.client.model.ReturnedCheckDepositTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.ReturnedCheckPaymentTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("ReturnedCheckPaymentTransaction", org.openapitools.client.model.ReturnedCheckPaymentTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.ReturnedReceivedAchTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("ReturnedReceivedAchTransaction", org.openapitools.client.model.ReturnedReceivedAchTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.ReversalTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("ReversalTransaction", org.openapitools.client.model.ReversalTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.RewardTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("RewardTransaction", org.openapitools.client.model.RewardTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.SettlementTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("SettlementTransaction", org.openapitools.client.model.SettlementTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.SponsoredInterestTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("SponsoredInterestTransaction", org.openapitools.client.model.SponsoredInterestTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.Transaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("accountLowBalanceClosureTransaction", org.openapitools.client.model.AccountLowBalanceClosureTransaction.class); - classByDiscriminatorValue.put("adjustmentTransaction", org.openapitools.client.model.AdjustmentTransaction.class); - classByDiscriminatorValue.put("atmTransaction", org.openapitools.client.model.AtmTransaction.class); - classByDiscriminatorValue.put("bankRepaymentTransaction", org.openapitools.client.model.BankRepaymentTransaction.class); - classByDiscriminatorValue.put("billPayTransaction", org.openapitools.client.model.BillPayTransaction.class); - classByDiscriminatorValue.put("bookTransaction", org.openapitools.client.model.BookTransaction.class); - classByDiscriminatorValue.put("cardTransaction", org.openapitools.client.model.CardTransaction.class); - classByDiscriminatorValue.put("cashDepositTransaction", org.openapitools.client.model.CashDepositTransaction.class); - classByDiscriminatorValue.put("chargebackTransaction", org.openapitools.client.model.ChargebackTransaction.class); - classByDiscriminatorValue.put("checkDepositTransaction", org.openapitools.client.model.CheckDepositTransaction.class); - classByDiscriminatorValue.put("checkPaymentTransaction", org.openapitools.client.model.CheckPaymentTransaction.class); - classByDiscriminatorValue.put("customerRepaymentReturnedTransaction", org.openapitools.client.model.CustomerRepaymentReturnedTransaction.class); - classByDiscriminatorValue.put("customerRepaymentTransaction", org.openapitools.client.model.CustomerRepaymentTransaction.class); - classByDiscriminatorValue.put("dishonoredAchTransaction", org.openapitools.client.model.DishonoredAchTransaction.class); - classByDiscriminatorValue.put("disputeSettlementTransaction", org.openapitools.client.model.DisputeSettlementTransaction.class); - classByDiscriminatorValue.put("disputeTransaction", org.openapitools.client.model.DisputeTransaction.class); - classByDiscriminatorValue.put("feeTransaction", org.openapitools.client.model.FeeTransaction.class); - classByDiscriminatorValue.put("interchangeTransaction", org.openapitools.client.model.InterchangeTransaction.class); - classByDiscriminatorValue.put("interestShareTransaction", org.openapitools.client.model.InterestShareTransaction.class); - classByDiscriminatorValue.put("interestTransaction", org.openapitools.client.model.InterestTransaction.class); - classByDiscriminatorValue.put("negativeBalanceCoverageTransaction", org.openapitools.client.model.NegativeBalanceCoverageTransaction.class); - classByDiscriminatorValue.put("originatedAchTransaction", org.openapitools.client.model.OriginatedAchTransaction.class); - classByDiscriminatorValue.put("paymentAdvanceTransaction", org.openapitools.client.model.PaymentAdvanceTransaction.class); - classByDiscriminatorValue.put("purchaseTransaction", org.openapitools.client.model.PurchaseTransaction.class); - classByDiscriminatorValue.put("receivedAchTransaction", org.openapitools.client.model.ReceivedAchTransaction.class); - classByDiscriminatorValue.put("releaseTransaction", org.openapitools.client.model.ReleaseTransaction.class); - classByDiscriminatorValue.put("repaidPaymentAdvanceTransaction", org.openapitools.client.model.RepaidPaymentAdvanceTransaction.class); - classByDiscriminatorValue.put("returnedAchTransaction", org.openapitools.client.model.ReturnedAchTransaction.class); - classByDiscriminatorValue.put("returnedCheckDepositTransaction", org.openapitools.client.model.ReturnedCheckDepositTransaction.class); - classByDiscriminatorValue.put("returnedCheckPaymentTransaction", org.openapitools.client.model.ReturnedCheckPaymentTransaction.class); - classByDiscriminatorValue.put("returnedReceivedAchTransaction", org.openapitools.client.model.ReturnedReceivedAchTransaction.class); - classByDiscriminatorValue.put("reversalTransaction", org.openapitools.client.model.ReversalTransaction.class); - classByDiscriminatorValue.put("rewardTransaction", org.openapitools.client.model.RewardTransaction.class); - classByDiscriminatorValue.put("settlementTransaction", org.openapitools.client.model.SettlementTransaction.class); - classByDiscriminatorValue.put("sponsoredInterestTransaction", org.openapitools.client.model.SponsoredInterestTransaction.class); - classByDiscriminatorValue.put("wireTransaction", org.openapitools.client.model.WireTransaction.class); - classByDiscriminatorValue.put("transaction", org.openapitools.client.model.Transaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.TrustApplication.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("TrustApplication", org.openapitools.client.model.TrustApplication.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.TrustCustomer.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("TrustCustomer", org.openapitools.client.model.TrustCustomer.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.WirePayment.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("WirePayment", org.openapitools.client.model.WirePayment.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - .registerTypeSelector(org.openapitools.client.model.WireTransaction.class, new TypeSelector() { - @Override - public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("WireTransaction", org.openapitools.client.model.WireTransaction.class); - return getClassByDiscriminator(classByDiscriminatorValue, - getDiscriminatorValue(readElement, "type")); - } - }) - ; - GsonBuilder builder = fireBuilder.createGsonBuilder(); - return builder; - } - - private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { - JsonElement element = readElement.getAsJsonObject().get(discriminatorField); - if (null == element) { - throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); - } - return element.getAsString(); - } - - /** - * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. - * - * @param classByDiscriminatorValue The map of discriminator values to Java classes. - * @param discriminatorValue The value of the OpenAPI discriminator in the input data. - * @return The Java class that implements the OpenAPI schema - */ - private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { - Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); - if (null == clazz) { - throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); - } - return clazz; - } - - { - GsonBuilder gsonBuilder = createGson(); - gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); - gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); - gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); - gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); - gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AccountEndOfDay.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AccountEndOfDayAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AccountLowBalanceClosureTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AccountLowBalanceClosureTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AccountRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AccountRelationship1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AccountRelationship2.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AccountRelationship2Data.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AccountRelationshipData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AchPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AchPaymentAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AchRepayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AchRepaymentAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AchRepaymentAllOfRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AchRepaymentAllOfRelationshipsAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AchRepaymentAllOfRelationshipsAccountData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AchRepaymentAllOfRelationshipsCounterparty.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AchRepaymentAllOfRelationshipsCounterpartyData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AchRepaymentAllOfRelationshipsCreditAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AchRepaymentAllOfRelationshipsCreditAccountData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AchRepaymentAllOfRelationshipsCustomer.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AchRepaymentAllOfRelationshipsCustomerData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AchRepaymentAllOfRelationshipsPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AchRepaymentAllOfRelationshipsPaymentData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Address.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AdjustmentTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AdjustmentTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApiToken.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApiTokenAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationForm.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationFormAdditionalDisclosuresInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationFormAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationFormPrefill.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationFormRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationFormRelationshipsApplication.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationFormRelationshipsApplicationData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationFormSettingsOverride.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationRelationshipsBeneficialOwners.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationRelationshipsBeneficialOwnersDataInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationRelationshipsBeneficiaries.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationRelationshipsBeneficiariesDataInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationRelationshipsTrustees.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApplicationRelationshipsTrusteesDataInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApproveAuthorizationRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApproveAuthorizationRequestAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApproveCheckPaymentRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ApproveCheckPaymentRequestData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArchiveCustomerRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArchiveCustomerRequestAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Astra.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AtmAuthorizationRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AtmAuthorizationRequestAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AtmLocation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AtmLocationAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AtmTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AtmTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Authorization.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AuthorizationAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AuthorizationRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AuthorizationRelationshipData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AuthorizationRequestRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AuthorizationRequestRelationshipData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AuthorizationRequestRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AuthorizationRequestRelationshipsCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AuthorizationRequestRelationshipsCardData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AuthorizedUser.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BIN.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BankRepaymentTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BankRepaymentTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BeneficialOwner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Beneficiary.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BillPayTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BillPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BillPaymentAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BookPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BookPaymentAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BookRepayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BookRepaymentAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BookRepaymentAllOfRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BookRepaymentAllOfRelationshipsCounterpartyAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BookRepaymentAllOfRelationshipsCounterpartyAccountData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BookTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BookTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BusinessApplication.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BusinessApplicationAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BusinessCreditCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BusinessCustomer.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BusinessCustomerAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BusinessDebitCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BusinessDebitCardAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BusinessVirtualCreditCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BusinessVirtualDebitCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BusinessVirtualDebitCardAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CancelApplicationRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CancelApplicationRequestData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CancelApplicationRequestDataAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CardLevelLimits.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CardRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CardRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CardRelationshipsAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CardTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CardTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CardTransactionAuthorizationRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CardTransactionAuthorizationRequestAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CardVerificationData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CashDepositTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CashDepositTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ChargebackRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ChargebackRelationshipData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ChargebackTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ChargebackTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CheckDeposit.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CheckDepositAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CheckDepositRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CheckDepositRelationshipData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CheckDepositRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CheckDepositRelationshipsAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CheckDepositRelationshipsAccountData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CheckDepositTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CheckDepositTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CheckPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CheckPaymentAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CheckPaymentAttributesCounterparty.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CheckPaymentRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CheckPaymentRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CheckPaymentTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CloseAccountRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CloseAccountRequestAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Contact.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Coordinates.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Counterparty.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Counterparty1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Counterparty1Attributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Counterparty2.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CounterpartyAccountRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CounterpartyAccountRelationship1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CounterpartyAccountRelationshipData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CounterpartyBalance.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CounterpartyBalanceAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CounterpartyBalanceRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CounterpartyBalanceRelationshipsCounterparty.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CounterpartyBalanceRelationshipsCounterpartyData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CounterpartyCustomerRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CounterpartyRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CounterpartyRelationshipData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CounterpartyRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateAccountData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateAchCounterparty.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateAchCounterpartyAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateAchPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateAchPaymentAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateAchPaymentCounterparty.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateAchPaymentCounterpartyAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateAchPaymentCounterpartyRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateAchPaymentPlaid.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateAchPaymentPlaidAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateAchPaymentRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateAchRepayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateAchRepaymentAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateAchRepaymentRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApiToken.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApiTokenData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApiTokenDataAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApiTokenDataAttributesResourcesInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApplication.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApplicationData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApplicationForm.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApplicationFormData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApplicationFormDataAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateApplicationFormRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBeneficialOwner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBillPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBillPaymentAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBookPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBookPaymentAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBookPaymentRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBookRepayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBookRepaymentAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBookRepaymentRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBusinessApplication.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBusinessApplicationAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBusinessCreditCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBusinessDebitCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBusinessDebitCardAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBusinessVirtualCreditCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBusinessVirtualDebitCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateBusinessVirtualDebitCardAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCardData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCardRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCheckDeposit.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCheckDepositData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCheckDepositDataAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCheckDepositRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCheckPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCounterparty.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCounterpartyData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCounterpartyRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCreditAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCreditAccountAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCreditAccountRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCustomerToken.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCustomerTokenData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCustomerTokenDataAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCustomerTokenVerification.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCustomerTokenVerificationData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateCustomerTokenVerificationDataAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateDepositAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateDepositAccountAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateDepositAccountRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateIndividualApplication.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateIndividualApplicationAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateIndividualDebitCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateIndividualDebitCardAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateIndividualVirtualDebitCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateIndividualVirtualDebitCardAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateOfficer.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePaymentData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePlaidCounterparty.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePlaidCounterpartyAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePowerOfAttorneyAgent.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePushToCardPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePushToCardPaymentAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePushToCardPaymentAttributesConfiguration.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRecurringCreditAchPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRecurringCreditAchPaymentAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRecurringCreditBookPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRecurringCreditBookPaymentAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRecurringDebitAchPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRecurringDebitAchPaymentAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRecurringPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRecurringPaymentData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRepayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRepaymentData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateReward.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRewardData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRewardDataAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateRewardRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateSoleProprietorApplication.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateSoleProprietorApplicationAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateStopPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateTrustApplication.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateTrustApplicationAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateWebhook.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateWebhookData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateWebhookDataAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateWirePayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateWirePaymentAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreditAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreditAccountAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreditAccountRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreditLimits.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreditLimitsAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CustomerLinkage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CustomerLinkageData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CustomerRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CustomerRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CustomerRepaymentReturnedTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CustomerRepaymentTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CustomerToken.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CustomerTokenAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CustomerTokenVerification.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CustomerTokenVerificationAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CustomersRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CustomersRelationshipDataInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DeclineAuthorizationRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DeclineAuthorizationRequestAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DepositAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DepositAccountAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DepositAccountAllOfAttributesSecondaryAccountNumber.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DepositAccountRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DepositLimits.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DepositLimitsAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DepositLimitsAllOfAttributesAch.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DepositLimitsAllOfAttributesAchLimits.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DepositLimitsAllOfAttributesAchTotalsDaily.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DepositLimitsAllOfAttributesCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DepositLimitsAllOfAttributesCardLimits.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DepositLimitsAllOfAttributesCardTotalsDaily.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DepositLimitsAllOfAttributesCheckDeposit.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DepositLimitsAllOfAttributesCheckDepositLimits.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DeviceFingerprint.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DishonoredAchTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DishonoredAchTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Dispute.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DisputeAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DisputeAttributesStatusHistoryInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DisputeRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DisputeSettlementTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DisputeTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DisputeTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Document.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DocumentAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DocumentsRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DocumentsRelationshipDataInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.EvaluationParams.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Event.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter10.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter11.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter12.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter13.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter14.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter15.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter16.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter17.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter18.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter19.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter2.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter20.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter3.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter4.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter5.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter6.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter7.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter8.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExecuteFilterParameter9.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Fee.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FeeAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FeeRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FeeTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FeeTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FreezeAccountRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FreezeAccountRequestAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FullName.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Grantor.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.HealthcareAmounts.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.IncludedResourceInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.IncomingAchRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.IncomingAchRelationshipData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.IndividualApplication.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.IndividualApplicationAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.IndividualCustomer.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.IndividualCustomerAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.IndividualDebitCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.IndividualDebitCardAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.IndividualVirtualDebitCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.IndividualVirtualDebitCardAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Institution.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.InstitutionAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.InterchangeTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.InterestShareTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.InterestTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Limits.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.LimitsAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.LimitsAttributesCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.LimitsAttributesCardLimits.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.LimitsAttributesCardTotalsDaily.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ListPageParametersObject.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Merchant.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MonthlySchedule.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NegativeBalanceCoverageTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Officer.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OrgRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OrgRelationshipData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OriginatedAchTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OriginatedAchTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PaginationMeta.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PaginationMetaPagination.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchAccountData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchAchPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchAchReceivedPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBookPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBookTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBookTransactionAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBookTransactionRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessApplication.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessApplicationAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessApplicationBeneficialOwner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessApplicationBeneficialOwnerAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessApplicationOfficer.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessApplicationOfficerAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessApplicationOfficerAttributesOfficer.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessCreditCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessDebitCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessDebitCardAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessVirtualCreditCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessVirtualDebitCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchBusinessVirtualDebitCardAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchChargebackTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchCheckDeposit.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchCheckDepositAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchCounterparty.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchCounterpartyAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchIndividualApplication.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchIndividualApplicationAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchIndividualDebitCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchIndividualDebitCardAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchIndividualVirtualDebitCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchIndividualVirtualDebitCardAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchSoleProprietorApplication.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchSoleProprietorApplicationAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchTransactionTags.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchTransactionTagsAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchTrustApplication.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PatchTrustApplicationAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PaymentAdvanceTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PaymentRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PaymentRelationshipData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PaymentRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PaymentRelationshipsCustomers.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PaymentRelationshipsCustomersDataInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Phone.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PinStatus.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PinStatusAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PowerOfAttorneyAgent.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PurchaseAuthorizationRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PurchaseAuthorizationRequestAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PurchaseTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PurchaseTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReceivedAchTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReceivedAchTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReceivedPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReceivedPaymentAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReceivedPaymentRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReceivedPaymentRelationshipData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReceivedPaymentRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReceivedPaymentRelationshipsCustomer.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReceivedPaymentRelationshipsCustomerData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReceivedPaymentRelationshipsReceivePaymentTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReceivedPaymentRelationshipsReceivePaymentTransactionData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReceivingAccountRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RecurringAchPaymentRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RecurringAchPaymentRelationshipsAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RecurringAchPaymentRelationshipsAccountData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RecurringAchPaymentRelationshipsCounterparty.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RecurringAchPaymentRelationshipsCounterpartyData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RecurringAchPaymentRelationshipsOrg.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RecurringAchPaymentRelationshipsOrgData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RecurringBookPaymentRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RecurringBookPaymentRelationshipsCounterpartyAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RecurringBookPaymentRelationshipsCounterpartyAccountData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RecurringCreditAchPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RecurringCreditAchPaymentAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RecurringCreditBookPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RecurringCreditBookPaymentAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RecurringDebitAchPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RecurringDebitAchPaymentAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RecurringPaymentRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RecurringPaymentRelationshipData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RelatedTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RelatedTransactionRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Relationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RelationshipData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Relationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Relationships1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Relationships1Account.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Relationships1AccountData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RelationshipsAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RelationshipsAccountData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RelationshipsCustomer.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RelationshipsCustomerData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReleaseTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReleaseTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RepaidPaymentAdvanceTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RepaymentRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RepaymentRelationshipData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RequireIdVerification.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ResponseContact.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReturnCheckPaymentRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReturnCheckPaymentRequestData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReturnCheckPaymentRequestDataAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReturnedAchTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReturnedAchTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReturnedCheckDepositTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReturnedCheckDepositTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReturnedCheckPaymentTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReturnedCheckPaymentTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReturnedReceivedAchTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReturnedReceivedAchTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReturnedRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReversalTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReversalTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Reward.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RewardAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RewardRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RewardRelationshipData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RewardRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RewardTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RewardTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Schedule.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Schedule1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SettlementTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SponsoredInterestTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Statement.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.StatementAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.StatementRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.StatusEvent.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.StatusEventStatus.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.StopPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.StopPaymentAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.StopPaymentListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.StopPaymentRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.StopPaymentRelationshipsCheckPayments.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.StopPaymentRelationshipsCheckPaymentsDataInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.StopPaymentResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TransactionRelationship.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TransactionRelationships.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TrustApplication.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TrustApplicationAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TrustContact.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TrustCustomer.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TrustCustomerAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Trustee.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitAccountResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitAccountResponseWithIncluded.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitAccountsListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitApiTokenResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitApplicationFormResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitApplicationFormResponseWithIncluded.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitApplicationFormsListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitApplicationResponseWithIncluded.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitAuthorizationRequestResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitAuthorizationRequestsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitAuthorizationResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitCancelApplicationResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitCardResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitCardResponse1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitCardResponse2.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitCardResponse3.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitCardResponseCardsList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitCheckDepositResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitCheckDepositResponse1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitCheckPaymentResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitCounterpartiesListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitCounterpartyResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitCounterpartyResponse1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitCreateApplicationResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitCustomerResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitCustomerTokenResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitCustomerTokenVerificationResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitCustomersListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitDisputeResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitDocumentResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitEventListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitEventResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitEventResponse1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitFeeResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitGetAccountEndOfDayListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitGetAccountLimitsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitInstitutionResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitListApplicationsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitListAuthorizationRequestsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitListAuthorizationsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitListCheckDepositsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitListCheckPaymentsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitListDocumentsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitOrgApiTokensListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitPaymentResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitPaymentResponseWithIncluded.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitPaymentsListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitReceivedPaymentListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitReceivedPaymentResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitReceivedPaymentResponseWithIncluded.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitRecurringPaymentListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitRecurringPaymentResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitRepaymentResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitRepaymentsListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitRewardResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitRewardsListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitStatementsResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitTransactionResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitTransactionResponse1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitTransactionsListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitWebhookResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UnitWebhooksListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateApplication.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateApplicationData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateBusinessCustomer.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateBusinessCustomerAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateCard.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateCardData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateCheckDeposit.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateCounterparty.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateCounterpartyData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateCreditAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateCreditAccountAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateCustomer.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateCustomerData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateDepositAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateDepositAccountAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateIndividualCustomer.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateIndividualCustomerAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdatePayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdatePaymentData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateReceivedPayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateReceivedPaymentData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateTransactionData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateTrustCustomer.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateTrustCustomerAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateUnitRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateUnitRequestData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateUnitRequestDataAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.VerifyDocument.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Webhook.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.WebhookAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.WireCounterparty.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.WirePayment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.WirePaymentAllOfAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.WirePaymentAllOfAttributesImadOmad.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.WireTransaction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.WireTransactionAllOfAttributes.CustomTypeAdapterFactory()); - gson = gsonBuilder.create(); - } - - /** - * Get Gson. - * - * @return Gson - */ - public static Gson getGson() { - return gson; - } - - /** - * Set Gson. - * - * @param gson Gson - */ - public static void setGson(Gson gson) { - JSON.gson = gson; - } - - public static void setLenientOnJson(boolean lenientOnJson) { - isLenientOnJson = lenientOnJson; - } - - /** - * Serialize the given Java object into JSON string. - * - * @param obj Object - * @return String representation of the JSON - */ - public static String serialize(Object obj) { - return gson.toJson(obj); - } - - /** - * Deserialize the given JSON string to Java object. - * - * @param Type - * @param body The JSON string - * @param returnType The type to deserialize into - * @return The deserialized Java object - */ - @SuppressWarnings("unchecked") - public static T deserialize(String body, Type returnType) { - try { - if (isLenientOnJson) { - JsonReader jsonReader = new JsonReader(new StringReader(body)); - // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) - jsonReader.setLenient(true); - return gson.fromJson(jsonReader, returnType); - } else { - return gson.fromJson(body, returnType); - } - } catch (JsonParseException e) { - // Fallback processing when failed to parse JSON form response body: - // return the response body string directly for the String return type; - if (returnType.equals(String.class)) { - return (T) body; - } else { - throw (e); - } - } - } - - /** - * Gson TypeAdapter for Byte Array type - */ - public static class ByteArrayAdapter extends TypeAdapter { - - @Override - public void write(JsonWriter out, byte[] value) throws IOException { - if (value == null) { - out.nullValue(); - } else { - out.value(ByteString.of(value).base64()); - } - } - - @Override - public byte[] read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String bytesAsBase64 = in.nextString(); - ByteString byteString = ByteString.decodeBase64(bytesAsBase64); - return byteString.toByteArray(); - } - } - } - - /** - * Gson TypeAdapter for JSR310 OffsetDateTime type - */ - public static class OffsetDateTimeTypeAdapter extends TypeAdapter { - - private DateTimeFormatter formatter; - - public OffsetDateTimeTypeAdapter() { - this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); - } - - public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } - - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } - - @Override - public void write(JsonWriter out, OffsetDateTime date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } - - @Override - public OffsetDateTime read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - if (date.endsWith("+0000")) { - date = date.substring(0, date.length()-5) + "Z"; - } - return OffsetDateTime.parse(date, formatter); - } - } - } - - /** - * Gson TypeAdapter for JSR310 LocalDate type - */ - public static class LocalDateTypeAdapter extends TypeAdapter { - - private DateTimeFormatter formatter; - - public LocalDateTypeAdapter() { - this(DateTimeFormatter.ISO_LOCAL_DATE); - } - - public LocalDateTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } - - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } - - @Override - public void write(JsonWriter out, LocalDate date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } - - @Override - public LocalDate read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - return LocalDate.parse(date, formatter); - } - } - } - - public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - offsetDateTimeTypeAdapter.setFormat(dateFormat); - } - - public static void setLocalDateFormat(DateTimeFormatter dateFormat) { - localDateTypeAdapter.setFormat(dateFormat); - } - - /** - * Gson TypeAdapter for java.sql.Date type - * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used - * (more efficient than SimpleDateFormat). - */ - public static class SqlDateTypeAdapter extends TypeAdapter { - - private DateFormat dateFormat; - - public SqlDateTypeAdapter() {} - - public SqlDateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - @Override - public void write(JsonWriter out, java.sql.Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = date.toString(); - } - out.value(value); - } - } - - @Override - public java.sql.Date read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return new java.sql.Date(dateFormat.parse(date).getTime()); - } - return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } - } - } - - /** - * Gson TypeAdapter for java.util.Date type - * If the dateFormat is null, ISO8601Utils will be used. - */ - public static class DateTypeAdapter extends TypeAdapter { - - private DateFormat dateFormat; - - public DateTypeAdapter() {} - - public DateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - @Override - public void write(JsonWriter out, Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = ISO8601Utils.format(date, true); - } - out.value(value); - } - } - - @Override - public Date read(JsonReader in) throws IOException { - try { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return dateFormat.parse(date); - } - return ISO8601Utils.parse(date, new ParsePosition(0)); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } - } catch (IllegalArgumentException e) { - throw new JsonParseException(e); - } - } - } - - public static void setDateFormat(DateFormat dateFormat) { - dateTypeAdapter.setFormat(dateFormat); - } - - public static void setSqlDateFormat(DateFormat dateFormat) { - sqlDateTypeAdapter.setFormat(dateFormat); - } -} diff --git a/src/main/java/org/openapitools/client/ProgressRequestBody.java b/src/main/java/org/openapitools/client/ProgressRequestBody.java deleted file mode 100644 index 87df59cb..00000000 --- a/src/main/java/org/openapitools/client/ProgressRequestBody.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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; - -import okhttp3.MediaType; -import okhttp3.RequestBody; - -import java.io.IOException; - -import okio.Buffer; -import okio.BufferedSink; -import okio.ForwardingSink; -import okio.Okio; -import okio.Sink; - -public class ProgressRequestBody extends RequestBody { - - private final RequestBody requestBody; - - private final ApiCallback callback; - - public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) { - this.requestBody = requestBody; - this.callback = callback; - } - - @Override - public MediaType contentType() { - return requestBody.contentType(); - } - - @Override - public long contentLength() throws IOException { - return requestBody.contentLength(); - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - BufferedSink bufferedSink = Okio.buffer(sink(sink)); - requestBody.writeTo(bufferedSink); - bufferedSink.flush(); - } - - private Sink sink(Sink sink) { - return new ForwardingSink(sink) { - - long bytesWritten = 0L; - long contentLength = 0L; - - @Override - public void write(Buffer source, long byteCount) throws IOException { - super.write(source, byteCount); - if (contentLength == 0) { - contentLength = contentLength(); - } - - bytesWritten += byteCount; - callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength); - } - }; - } -} diff --git a/src/main/java/org/openapitools/client/ProgressResponseBody.java b/src/main/java/org/openapitools/client/ProgressResponseBody.java deleted file mode 100644 index 41ad1ebe..00000000 --- a/src/main/java/org/openapitools/client/ProgressResponseBody.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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; - -import okhttp3.MediaType; -import okhttp3.ResponseBody; - -import java.io.IOException; - -import okio.Buffer; -import okio.BufferedSource; -import okio.ForwardingSource; -import okio.Okio; -import okio.Source; - -public class ProgressResponseBody extends ResponseBody { - - private final ResponseBody responseBody; - private final ApiCallback callback; - private BufferedSource bufferedSource; - - public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) { - this.responseBody = responseBody; - this.callback = callback; - } - - @Override - public MediaType contentType() { - return responseBody.contentType(); - } - - @Override - public long contentLength() { - return responseBody.contentLength(); - } - - @Override - public BufferedSource source() { - if (bufferedSource == null) { - bufferedSource = Okio.buffer(source(responseBody.source())); - } - return bufferedSource; - } - - private Source source(Source source) { - return new ForwardingSource(source) { - long totalBytesRead = 0L; - - @Override - public long read(Buffer sink, long byteCount) throws IOException { - long bytesRead = super.read(sink, byteCount); - // read() returns the number of bytes read, or -1 if this source is exhausted. - totalBytesRead += bytesRead != -1 ? bytesRead : 0; - callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1); - return bytesRead; - } - }; - } -} diff --git a/src/main/java/org/openapitools/client/StringUtil.java b/src/main/java/org/openapitools/client/StringUtil.java deleted file mode 100644 index 97c0874b..00000000 --- a/src/main/java/org/openapitools/client/StringUtil.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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; - -import java.util.Collection; -import java.util.Iterator; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StringUtil { - /** - * Check if the given array contains the given value (with case-insensitive comparison). - * - * @param array The array - * @param value The value to search - * @return true if the array contains the value - */ - public static boolean containsIgnoreCase(String[] array, String value) { - for (String str : array) { - if (value == null && str == null) { - return true; - } - if (value != null && value.equalsIgnoreCase(str)) { - return true; - } - } - return false; - } - - /** - * Join an array of strings with the given separator. - *

- * Note: This might be replaced by utility method from commons-lang or guava someday - * if one of those libraries is added as dependency. - *

- * - * @param array The array of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(String[] array, String separator) { - int len = array.length; - if (len == 0) { - return ""; - } - - StringBuilder out = new StringBuilder(); - out.append(array[0]); - for (int i = 1; i < len; i++) { - out.append(separator).append(array[i]); - } - return out.toString(); - } - - /** - * Join a list of strings with the given separator. - * - * @param list The list of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(Collection list, String separator) { - Iterator iterator = list.iterator(); - StringBuilder out = new StringBuilder(); - if (iterator.hasNext()) { - out.append(iterator.next()); - } - while (iterator.hasNext()) { - out.append(separator).append(iterator.next()); - } - return out.toString(); - } -} diff --git a/src/main/java/org/openapitools/client/api/ActivateControlAgreementForAccountApi.java b/src/main/java/org/openapitools/client/api/ActivateControlAgreementForAccountApi.java deleted file mode 100644 index fe30b431..00000000 --- a/src/main/java/org/openapitools/client/api/ActivateControlAgreementForAccountApi.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitAccountResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ActivateControlAgreementForAccountApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ActivateControlAgreementForAccountApi() { - this(Configuration.getDefaultApiClient()); - } - - public ActivateControlAgreementForAccountApi(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 execute - * @param accountId ID of the account (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 Successful Response -
0 -
- */ - public okhttp3.Call executeCall(String accountId, 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 = "/accounts/{accountId}/activate-daca" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling execute(Async)"); - } - - return executeCall(accountId, _callback); - - } - - /** - * Activate Account Control Agreement by Id - * Activate Control Agreement for Account via API - * @param accountId ID of the account (required) - * @return UnitAccountResponse - * @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 Successful Response -
0 -
- */ - public UnitAccountResponse execute(String accountId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(accountId); - return localVarResp.getData(); - } - - /** - * Activate Account Control Agreement by Id - * Activate Control Agreement for Account via API - * @param accountId ID of the account (required) - * @return ApiResponse<UnitAccountResponse> - * @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 Successful Response -
0 -
- */ - public ApiResponse executeWithHttpInfo(String accountId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Activate Account Control Agreement by Id (asynchronously) - * Activate Control Agreement for Account via API - * @param accountId ID of the account (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 Successful Response -
0 -
- */ - public okhttp3.Call executeAsync(String accountId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/AdvanceReceivedPaymentApi.java b/src/main/java/org/openapitools/client/api/AdvanceReceivedPaymentApi.java deleted file mode 100644 index bbe2678c..00000000 --- a/src/main/java/org/openapitools/client/api/AdvanceReceivedPaymentApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitReceivedPaymentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class AdvanceReceivedPaymentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public AdvanceReceivedPaymentApi() { - this(Configuration.getDefaultApiClient()); - } - - public AdvanceReceivedPaymentApi(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 execute - * @param paymentId ID of the payment to advance (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 Successful Response -
- */ - public okhttp3.Call executeCall(String paymentId, 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 = "/received-payments/{paymentId}/advance" - .replace("{" + "paymentId" + "}", localVarApiClient.escapeString(paymentId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String paymentId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'paymentId' is set - if (paymentId == null) { - throw new ApiException("Missing the required parameter 'paymentId' when calling execute(Async)"); - } - - return executeCall(paymentId, _callback); - - } - - /** - * Advance Received Payment by Id - * Advance a Received Payment via API - * @param paymentId ID of the payment to advance (required) - * @return UnitReceivedPaymentResponse - * @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 Successful Response -
- */ - public UnitReceivedPaymentResponse execute(String paymentId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(paymentId); - return localVarResp.getData(); - } - - /** - * Advance Received Payment by Id - * Advance a Received Payment via API - * @param paymentId ID of the payment to advance (required) - * @return ApiResponse<UnitReceivedPaymentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String paymentId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(paymentId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Advance Received Payment by Id (asynchronously) - * Advance a Received Payment via API - * @param paymentId ID of the payment to advance (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String paymentId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(paymentId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/ApproveAuthorizationRequestApi.java b/src/main/java/org/openapitools/client/api/ApproveAuthorizationRequestApi.java deleted file mode 100644 index 9dd12a97..00000000 --- a/src/main/java/org/openapitools/client/api/ApproveAuthorizationRequestApi.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ApproveAuthorizationRequest; -import org.openapitools.client.model.UnitAuthorizationRequestResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ApproveAuthorizationRequestApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ApproveAuthorizationRequestApi() { - this(Configuration.getDefaultApiClient()); - } - - public ApproveAuthorizationRequestApi(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 execute - * @param authorizationId ID of the authorization request to approve (required) - * @param approveAuthorizationRequest Approve Authorization Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(String authorizationId, ApproveAuthorizationRequest approveAuthorizationRequest, 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 = approveAuthorizationRequest; - - // create path and map variables - String localVarPath = "/authorization-requests/{authorizationId}/approve" - .replace("{" + "authorizationId" + "}", localVarApiClient.escapeString(authorizationId.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/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String authorizationId, ApproveAuthorizationRequest approveAuthorizationRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'authorizationId' is set - if (authorizationId == null) { - throw new ApiException("Missing the required parameter 'authorizationId' when calling execute(Async)"); - } - - // verify the required parameter 'approveAuthorizationRequest' is set - if (approveAuthorizationRequest == null) { - throw new ApiException("Missing the required parameter 'approveAuthorizationRequest' when calling execute(Async)"); - } - - return executeCall(authorizationId, approveAuthorizationRequest, _callback); - - } - - /** - * Approve Authorization Request by Id - * Approve a Authorization Request via API - * @param authorizationId ID of the authorization request to approve (required) - * @param approveAuthorizationRequest Approve Authorization Request (required) - * @return UnitAuthorizationRequestResponse - * @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 Successful Response -
- */ - public UnitAuthorizationRequestResponse execute(String authorizationId, ApproveAuthorizationRequest approveAuthorizationRequest) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(authorizationId, approveAuthorizationRequest); - return localVarResp.getData(); - } - - /** - * Approve Authorization Request by Id - * Approve a Authorization Request via API - * @param authorizationId ID of the authorization request to approve (required) - * @param approveAuthorizationRequest Approve Authorization Request (required) - * @return ApiResponse<UnitAuthorizationRequestResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String authorizationId, ApproveAuthorizationRequest approveAuthorizationRequest) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(authorizationId, approveAuthorizationRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Approve Authorization Request by Id (asynchronously) - * Approve a Authorization Request via API - * @param authorizationId ID of the authorization request to approve (required) - * @param approveAuthorizationRequest Approve Authorization Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String authorizationId, ApproveAuthorizationRequest approveAuthorizationRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(authorizationId, approveAuthorizationRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/ApproveCheckPaymentApi.java b/src/main/java/org/openapitools/client/api/ApproveCheckPaymentApi.java deleted file mode 100644 index be8c6fa4..00000000 --- a/src/main/java/org/openapitools/client/api/ApproveCheckPaymentApi.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ApproveCheckPaymentRequest; -import org.openapitools.client.model.UnitCheckPaymentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ApproveCheckPaymentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ApproveCheckPaymentApi() { - this(Configuration.getDefaultApiClient()); - } - - public ApproveCheckPaymentApi(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 execute - * @param checkPaymentId ID of the check payment to approve (required) - * @param approveCheckPaymentRequest Approve Check Payment Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(String checkPaymentId, ApproveCheckPaymentRequest approveCheckPaymentRequest, 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 = approveCheckPaymentRequest; - - // create path and map variables - String localVarPath = "/check-payments/{checkPaymentId}/approve" - .replace("{" + "checkPaymentId" + "}", localVarApiClient.escapeString(checkPaymentId.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/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String checkPaymentId, ApproveCheckPaymentRequest approveCheckPaymentRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'checkPaymentId' is set - if (checkPaymentId == null) { - throw new ApiException("Missing the required parameter 'checkPaymentId' when calling execute(Async)"); - } - - // verify the required parameter 'approveCheckPaymentRequest' is set - if (approveCheckPaymentRequest == null) { - throw new ApiException("Missing the required parameter 'approveCheckPaymentRequest' when calling execute(Async)"); - } - - return executeCall(checkPaymentId, approveCheckPaymentRequest, _callback); - - } - - /** - * Approve Check Payment by Id - * Approve a Check Payment via API - * @param checkPaymentId ID of the check payment to approve (required) - * @param approveCheckPaymentRequest Approve Check Payment Request (required) - * @return UnitCheckPaymentResponse - * @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 Successful Response -
- */ - public UnitCheckPaymentResponse execute(String checkPaymentId, ApproveCheckPaymentRequest approveCheckPaymentRequest) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(checkPaymentId, approveCheckPaymentRequest); - return localVarResp.getData(); - } - - /** - * Approve Check Payment by Id - * Approve a Check Payment via API - * @param checkPaymentId ID of the check payment to approve (required) - * @param approveCheckPaymentRequest Approve Check Payment Request (required) - * @return ApiResponse<UnitCheckPaymentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String checkPaymentId, ApproveCheckPaymentRequest approveCheckPaymentRequest) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, approveCheckPaymentRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Approve Check Payment by Id (asynchronously) - * Approve a Check Payment via API - * @param checkPaymentId ID of the check payment to approve (required) - * @param approveCheckPaymentRequest Approve Check Payment Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String checkPaymentId, ApproveCheckPaymentRequest approveCheckPaymentRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, approveCheckPaymentRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/ArchiveCustomerApi.java b/src/main/java/org/openapitools/client/api/ArchiveCustomerApi.java deleted file mode 100644 index 624d6d09..00000000 --- a/src/main/java/org/openapitools/client/api/ArchiveCustomerApi.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ArchiveCustomerRequest; -import org.openapitools.client.model.UnitCustomerResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ArchiveCustomerApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ArchiveCustomerApi() { - this(Configuration.getDefaultApiClient()); - } - - public ArchiveCustomerApi(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 execute - * @param customerId ID of the customer to archive (required) - * @param archiveCustomerRequest Archive Customer Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(String customerId, ArchiveCustomerRequest archiveCustomerRequest, 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 = archiveCustomerRequest; - - // create path and map variables - String localVarPath = "/customers/{customerId}/archive" - .replace("{" + "customerId" + "}", localVarApiClient.escapeString(customerId.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/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String customerId, ArchiveCustomerRequest archiveCustomerRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'customerId' is set - if (customerId == null) { - throw new ApiException("Missing the required parameter 'customerId' when calling execute(Async)"); - } - - // verify the required parameter 'archiveCustomerRequest' is set - if (archiveCustomerRequest == null) { - throw new ApiException("Missing the required parameter 'archiveCustomerRequest' when calling execute(Async)"); - } - - return executeCall(customerId, archiveCustomerRequest, _callback); - - } - - /** - * Archive Customer by Id - * Archive a Customer via API - * @param customerId ID of the customer to archive (required) - * @param archiveCustomerRequest Archive Customer Request (required) - * @return UnitCustomerResponse - * @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 Successful Response -
- */ - public UnitCustomerResponse execute(String customerId, ArchiveCustomerRequest archiveCustomerRequest) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(customerId, archiveCustomerRequest); - return localVarResp.getData(); - } - - /** - * Archive Customer by Id - * Archive a Customer via API - * @param customerId ID of the customer to archive (required) - * @param archiveCustomerRequest Archive Customer Request (required) - * @return ApiResponse<UnitCustomerResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String customerId, ArchiveCustomerRequest archiveCustomerRequest) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, archiveCustomerRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Archive Customer by Id (asynchronously) - * Archive a Customer via API - * @param customerId ID of the customer to archive (required) - * @param archiveCustomerRequest Archive Customer Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String customerId, ArchiveCustomerRequest archiveCustomerRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, archiveCustomerRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CancelApplicationApi.java b/src/main/java/org/openapitools/client/api/CancelApplicationApi.java deleted file mode 100644 index d2d2a8d5..00000000 --- a/src/main/java/org/openapitools/client/api/CancelApplicationApi.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.CancelApplicationRequest; -import org.openapitools.client.model.UnitCancelApplicationResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CancelApplicationApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CancelApplicationApi() { - this(Configuration.getDefaultApiClient()); - } - - public CancelApplicationApi(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 execute - * @param applicationId ID of the application to get (required) - * @param cancelApplicationRequest Cancel Application Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(String applicationId, CancelApplicationRequest cancelApplicationRequest, 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 = cancelApplicationRequest; - - // create path and map variables - String localVarPath = "/applications/{applicationId}/cancel" - .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.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/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String applicationId, CancelApplicationRequest cancelApplicationRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'applicationId' is set - if (applicationId == null) { - throw new ApiException("Missing the required parameter 'applicationId' when calling execute(Async)"); - } - - // verify the required parameter 'cancelApplicationRequest' is set - if (cancelApplicationRequest == null) { - throw new ApiException("Missing the required parameter 'cancelApplicationRequest' when calling execute(Async)"); - } - - return executeCall(applicationId, cancelApplicationRequest, _callback); - - } - - /** - * Cancel Application by Id - * Cancel a Application via API - * @param applicationId ID of the application to get (required) - * @param cancelApplicationRequest Cancel Application Request (required) - * @return UnitCancelApplicationResponse - * @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 Successful Response -
- */ - public UnitCancelApplicationResponse execute(String applicationId, CancelApplicationRequest cancelApplicationRequest) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(applicationId, cancelApplicationRequest); - return localVarResp.getData(); - } - - /** - * Cancel Application by Id - * Cancel a Application via API - * @param applicationId ID of the application to get (required) - * @param cancelApplicationRequest Cancel Application Request (required) - * @return ApiResponse<UnitCancelApplicationResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String applicationId, CancelApplicationRequest cancelApplicationRequest) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, cancelApplicationRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Cancel Application by Id (asynchronously) - * Cancel a Application via API - * @param applicationId ID of the application to get (required) - * @param cancelApplicationRequest Cancel Application Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String applicationId, CancelApplicationRequest cancelApplicationRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, cancelApplicationRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CancelCheckPaymentApi.java b/src/main/java/org/openapitools/client/api/CancelCheckPaymentApi.java deleted file mode 100644 index 50dedc8e..00000000 --- a/src/main/java/org/openapitools/client/api/CancelCheckPaymentApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCheckPaymentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CancelCheckPaymentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CancelCheckPaymentApi() { - this(Configuration.getDefaultApiClient()); - } - - public CancelCheckPaymentApi(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 execute - * @param checkPaymentId ID of the check payment to cancel (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 Successful Response -
- */ - public okhttp3.Call executeCall(String checkPaymentId, 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 = "/check-payments/{checkPaymentId}/cancel" - .replace("{" + "checkPaymentId" + "}", localVarApiClient.escapeString(checkPaymentId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String checkPaymentId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'checkPaymentId' is set - if (checkPaymentId == null) { - throw new ApiException("Missing the required parameter 'checkPaymentId' when calling execute(Async)"); - } - - return executeCall(checkPaymentId, _callback); - - } - - /** - * Cancel Check Payment by Id - * Cancel a Check Payment via API - * @param checkPaymentId ID of the check payment to cancel (required) - * @return UnitCheckPaymentResponse - * @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 Successful Response -
- */ - public UnitCheckPaymentResponse execute(String checkPaymentId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(checkPaymentId); - return localVarResp.getData(); - } - - /** - * Cancel Check Payment by Id - * Cancel a Check Payment via API - * @param checkPaymentId ID of the check payment to cancel (required) - * @return ApiResponse<UnitCheckPaymentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String checkPaymentId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Cancel Check Payment by Id (asynchronously) - * Cancel a Check Payment via API - * @param checkPaymentId ID of the check payment to cancel (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String checkPaymentId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CancelPaymentApi.java b/src/main/java/org/openapitools/client/api/CancelPaymentApi.java deleted file mode 100644 index d17a5944..00000000 --- a/src/main/java/org/openapitools/client/api/CancelPaymentApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitPaymentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CancelPaymentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CancelPaymentApi() { - this(Configuration.getDefaultApiClient()); - } - - public CancelPaymentApi(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 execute - * @param paymentId ID of the payment to cancel (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 Successful Response -
- */ - public okhttp3.Call executeCall(String paymentId, 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 = "/payments/{paymentId}/cancel" - .replace("{" + "paymentId" + "}", localVarApiClient.escapeString(paymentId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String paymentId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'paymentId' is set - if (paymentId == null) { - throw new ApiException("Missing the required parameter 'paymentId' when calling execute(Async)"); - } - - return executeCall(paymentId, _callback); - - } - - /** - * Cancel a Payment by Id - * Cancel a Payment via API - * @param paymentId ID of the payment to cancel (required) - * @return UnitPaymentResponse - * @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 Successful Response -
- */ - public UnitPaymentResponse execute(String paymentId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(paymentId); - return localVarResp.getData(); - } - - /** - * Cancel a Payment by Id - * Cancel a Payment via API - * @param paymentId ID of the payment to cancel (required) - * @return ApiResponse<UnitPaymentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String paymentId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(paymentId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Cancel a Payment by Id (asynchronously) - * Cancel a Payment via API - * @param paymentId ID of the payment to cancel (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String paymentId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(paymentId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CloseACardApi.java b/src/main/java/org/openapitools/client/api/CloseACardApi.java deleted file mode 100644 index 38a92b27..00000000 --- a/src/main/java/org/openapitools/client/api/CloseACardApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCardResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CloseACardApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CloseACardApi() { - this(Configuration.getDefaultApiClient()); - } - - public CloseACardApi(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 execute - * @param cardId ID of the card to close (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 Successful Response -
- */ - public okhttp3.Call executeCall(String cardId, 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 = "/cards/{cardId}/close" - .replace("{" + "cardId" + "}", localVarApiClient.escapeString(cardId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String cardId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'cardId' is set - if (cardId == null) { - throw new ApiException("Missing the required parameter 'cardId' when calling execute(Async)"); - } - - return executeCall(cardId, _callback); - - } - - /** - * Close a Card - * Close a Card via API - * @param cardId ID of the card to close (required) - * @return UnitCardResponse - * @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 Successful Response -
- */ - public UnitCardResponse execute(String cardId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(cardId); - return localVarResp.getData(); - } - - /** - * Close a Card - * Close a Card via API - * @param cardId ID of the card to close (required) - * @return ApiResponse<UnitCardResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String cardId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(cardId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Close a Card (asynchronously) - * Close a Card via API - * @param cardId ID of the card to close (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String cardId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(cardId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CloseAnAccountApi.java b/src/main/java/org/openapitools/client/api/CloseAnAccountApi.java deleted file mode 100644 index 6d632665..00000000 --- a/src/main/java/org/openapitools/client/api/CloseAnAccountApi.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.CloseAccountRequest; -import org.openapitools.client.model.UnitAccountResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CloseAnAccountApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CloseAnAccountApi() { - this(Configuration.getDefaultApiClient()); - } - - public CloseAnAccountApi(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 execute - * @param accountId ID of the account to close (required) - * @param closeAccountRequest Close Account Request (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 Successful Response -
0 -
- */ - public okhttp3.Call executeCall(String accountId, CloseAccountRequest closeAccountRequest, 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 = closeAccountRequest; - - // create path and map variables - String localVarPath = "/accounts/{accountId}/close" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.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/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String accountId, CloseAccountRequest closeAccountRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling execute(Async)"); - } - - // verify the required parameter 'closeAccountRequest' is set - if (closeAccountRequest == null) { - throw new ApiException("Missing the required parameter 'closeAccountRequest' when calling execute(Async)"); - } - - return executeCall(accountId, closeAccountRequest, _callback); - - } - - /** - * Close an Account by Id - * Close an Account via API - * @param accountId ID of the account to close (required) - * @param closeAccountRequest Close Account Request (required) - * @return UnitAccountResponse - * @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 Successful Response -
0 -
- */ - public UnitAccountResponse execute(String accountId, CloseAccountRequest closeAccountRequest) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(accountId, closeAccountRequest); - return localVarResp.getData(); - } - - /** - * Close an Account by Id - * Close an Account via API - * @param accountId ID of the account to close (required) - * @param closeAccountRequest Close Account Request (required) - * @return ApiResponse<UnitAccountResponse> - * @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 Successful Response -
0 -
- */ - public ApiResponse executeWithHttpInfo(String accountId, CloseAccountRequest closeAccountRequest) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, closeAccountRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Close an Account by Id (asynchronously) - * Close an Account via API - * @param accountId ID of the account to close (required) - * @param closeAccountRequest Close Account Request (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 Successful Response -
0 -
- */ - public okhttp3.Call executeAsync(String accountId, CloseAccountRequest closeAccountRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, closeAccountRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/ConfirmCheckDepositApi.java b/src/main/java/org/openapitools/client/api/ConfirmCheckDepositApi.java deleted file mode 100644 index a3318ad7..00000000 --- a/src/main/java/org/openapitools/client/api/ConfirmCheckDepositApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCheckDepositResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ConfirmCheckDepositApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ConfirmCheckDepositApi() { - this(Configuration.getDefaultApiClient()); - } - - public ConfirmCheckDepositApi(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 execute - * @param checkDepositId ID of the check deposit to confirm (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 Successful Response -
- */ - public okhttp3.Call executeCall(String checkDepositId, 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 = "/check-deposits/{checkDepositId}/confirm" - .replace("{" + "checkDepositId" + "}", localVarApiClient.escapeString(checkDepositId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String checkDepositId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'checkDepositId' is set - if (checkDepositId == null) { - throw new ApiException("Missing the required parameter 'checkDepositId' when calling execute(Async)"); - } - - return executeCall(checkDepositId, _callback); - - } - - /** - * Confirm by Id - * Confirm a Check Deposit from API - * @param checkDepositId ID of the check deposit to confirm (required) - * @return UnitCheckDepositResponse - * @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 Successful Response -
- */ - public UnitCheckDepositResponse execute(String checkDepositId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(checkDepositId); - return localVarResp.getData(); - } - - /** - * Confirm by Id - * Confirm a Check Deposit from API - * @param checkDepositId ID of the check deposit to confirm (required) - * @return ApiResponse<UnitCheckDepositResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String checkDepositId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(checkDepositId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Confirm by Id (asynchronously) - * Confirm a Check Deposit from API - * @param checkDepositId ID of the check deposit to confirm (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String checkDepositId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(checkDepositId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CreateACardApi.java b/src/main/java/org/openapitools/client/api/CreateACardApi.java deleted file mode 100644 index 55228288..00000000 --- a/src/main/java/org/openapitools/client/api/CreateACardApi.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.CreateCard; -import org.openapitools.client.model.UnitCardResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CreateACardApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CreateACardApi() { - this(Configuration.getDefaultApiClient()); - } - - public CreateACardApi(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 execute - * @param createCard Create Card Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(CreateCard createCard, 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 = createCard; - - // create path and map variables - String localVarPath = "/cards"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(CreateCard createCard, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'createCard' is set - if (createCard == null) { - throw new ApiException("Missing the required parameter 'createCard' when calling execute(Async)"); - } - - return executeCall(createCard, _callback); - - } - - /** - * Create a Card - * Create a Card via API - * @param createCard Create Card Request (required) - * @return UnitCardResponse - * @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 Successful Response -
- */ - public UnitCardResponse execute(CreateCard createCard) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(createCard); - return localVarResp.getData(); - } - - /** - * Create a Card - * Create a Card via API - * @param createCard Create Card Request (required) - * @return ApiResponse<UnitCardResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(CreateCard createCard) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(createCard, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a Card (asynchronously) - * Create a Card via API - * @param createCard Create Card Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(CreateCard createCard, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(createCard, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CreateADocumentForAnApplicationApi.java b/src/main/java/org/openapitools/client/api/CreateADocumentForAnApplicationApi.java deleted file mode 100644 index 42a04543..00000000 --- a/src/main/java/org/openapitools/client/api/CreateADocumentForAnApplicationApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitDocumentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CreateADocumentForAnApplicationApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CreateADocumentForAnApplicationApi() { - this(Configuration.getDefaultApiClient()); - } - - public CreateADocumentForAnApplicationApi(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 execute - * @param applicationId ID of the application to create a file for (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 Successful Response -
- */ - public okhttp3.Call executeCall(String applicationId, 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 = "/applications/{applicationId}/documents" - .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String applicationId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'applicationId' is set - if (applicationId == null) { - throw new ApiException("Missing the required parameter 'applicationId' when calling execute(Async)"); - } - - return executeCall(applicationId, _callback); - - } - - /** - * Create a document - * Create a document via API - * @param applicationId ID of the application to create a file for (required) - * @return UnitDocumentResponse - * @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 Successful Response -
- */ - public UnitDocumentResponse execute(String applicationId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(applicationId); - return localVarResp.getData(); - } - - /** - * Create a document - * Create a document via API - * @param applicationId ID of the application to create a file for (required) - * @return ApiResponse<UnitDocumentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String applicationId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a document (asynchronously) - * Create a document via API - * @param applicationId ID of the application to create a file for (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String applicationId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CreateAPaymentApi.java b/src/main/java/org/openapitools/client/api/CreateAPaymentApi.java deleted file mode 100644 index b7212e89..00000000 --- a/src/main/java/org/openapitools/client/api/CreateAPaymentApi.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.CreatePayment; -import org.openapitools.client.model.UnitPaymentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CreateAPaymentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CreateAPaymentApi() { - this(Configuration.getDefaultApiClient()); - } - - public CreateAPaymentApi(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 execute - * @param createPayment Create Payment Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(CreatePayment createPayment, 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 = createPayment; - - // create path and map variables - String localVarPath = "/payments"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(CreatePayment createPayment, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'createPayment' is set - if (createPayment == null) { - throw new ApiException("Missing the required parameter 'createPayment' when calling execute(Async)"); - } - - return executeCall(createPayment, _callback); - - } - - /** - * Create a Payment - * Create a Payment via API - * @param createPayment Create Payment Request (required) - * @return UnitPaymentResponse - * @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 Successful Response -
- */ - public UnitPaymentResponse execute(CreatePayment createPayment) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(createPayment); - return localVarResp.getData(); - } - - /** - * Create a Payment - * Create a Payment via API - * @param createPayment Create Payment Request (required) - * @return ApiResponse<UnitPaymentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(CreatePayment createPayment) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(createPayment, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a Payment (asynchronously) - * Create a Payment via API - * @param createPayment Create Payment Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(CreatePayment createPayment, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(createPayment, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CreateARepaymentApi.java b/src/main/java/org/openapitools/client/api/CreateARepaymentApi.java deleted file mode 100644 index 0c4648ed..00000000 --- a/src/main/java/org/openapitools/client/api/CreateARepaymentApi.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.CreateRepayment; -import org.openapitools.client.model.UnitRepaymentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CreateARepaymentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CreateARepaymentApi() { - this(Configuration.getDefaultApiClient()); - } - - public CreateARepaymentApi(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 execute - * @param createRepayment Create a Repayment Request (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 Successful Response -
0 -
- */ - public okhttp3.Call executeCall(CreateRepayment createRepayment, 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 = createRepayment; - - // create path and map variables - String localVarPath = "/repayments"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(CreateRepayment createRepayment, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'createRepayment' is set - if (createRepayment == null) { - throw new ApiException("Missing the required parameter 'createRepayment' when calling execute(Async)"); - } - - return executeCall(createRepayment, _callback); - - } - - /** - * Create a Repayment - * Create a Repayment via API - * @param createRepayment Create a Repayment Request (required) - * @return UnitRepaymentResponse - * @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 Successful Response -
0 -
- */ - public UnitRepaymentResponse execute(CreateRepayment createRepayment) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(createRepayment); - return localVarResp.getData(); - } - - /** - * Create a Repayment - * Create a Repayment via API - * @param createRepayment Create a Repayment Request (required) - * @return ApiResponse<UnitRepaymentResponse> - * @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 Successful Response -
0 -
- */ - public ApiResponse executeWithHttpInfo(CreateRepayment createRepayment) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(createRepayment, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a Repayment (asynchronously) - * Create a Repayment via API - * @param createRepayment Create a Repayment Request (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 Successful Response -
0 -
- */ - public okhttp3.Call executeAsync(CreateRepayment createRepayment, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(createRepayment, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CreateAccountApi.java b/src/main/java/org/openapitools/client/api/CreateAccountApi.java deleted file mode 100644 index 246d5717..00000000 --- a/src/main/java/org/openapitools/client/api/CreateAccountApi.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.CreateAccount; -import org.openapitools.client.model.UnitAccountResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CreateAccountApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CreateAccountApi() { - this(Configuration.getDefaultApiClient()); - } - - public CreateAccountApi(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 execute - * @param createAccount Create Account Request (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 Successful Response -
0 -
- */ - public okhttp3.Call executeCall(CreateAccount createAccount, 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 = createAccount; - - // create path and map variables - String localVarPath = "/accounts"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(CreateAccount createAccount, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'createAccount' is set - if (createAccount == null) { - throw new ApiException("Missing the required parameter 'createAccount' when calling execute(Async)"); - } - - return executeCall(createAccount, _callback); - - } - - /** - * Create Account - * Create Account via API - * @param createAccount Create Account Request (required) - * @return UnitAccountResponse - * @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 Successful Response -
0 -
- */ - public UnitAccountResponse execute(CreateAccount createAccount) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(createAccount); - return localVarResp.getData(); - } - - /** - * Create Account - * Create Account via API - * @param createAccount Create Account Request (required) - * @return ApiResponse<UnitAccountResponse> - * @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 Successful Response -
0 -
- */ - public ApiResponse executeWithHttpInfo(CreateAccount createAccount) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(createAccount, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create Account (asynchronously) - * Create Account via API - * @param createAccount Create Account Request (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 Successful Response -
0 -
- */ - public okhttp3.Call executeAsync(CreateAccount createAccount, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(createAccount, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CreateApplicationApi.java b/src/main/java/org/openapitools/client/api/CreateApplicationApi.java deleted file mode 100644 index 69a7fb2f..00000000 --- a/src/main/java/org/openapitools/client/api/CreateApplicationApi.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.CreateApplication; -import org.openapitools.client.model.UnitCreateApplicationResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CreateApplicationApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CreateApplicationApi() { - this(Configuration.getDefaultApiClient()); - } - - public CreateApplicationApi(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 execute - * @param createApplication Create Application Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(CreateApplication createApplication, 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 = createApplication; - - // create path and map variables - String localVarPath = "/applications"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(CreateApplication createApplication, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'createApplication' is set - if (createApplication == null) { - throw new ApiException("Missing the required parameter 'createApplication' when calling execute(Async)"); - } - - return executeCall(createApplication, _callback); - - } - - /** - * Create Application - * Create an Application via API - * @param createApplication Create Application Request (required) - * @return UnitCreateApplicationResponse - * @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 Successful Response -
- */ - public UnitCreateApplicationResponse execute(CreateApplication createApplication) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(createApplication); - return localVarResp.getData(); - } - - /** - * Create Application - * Create an Application via API - * @param createApplication Create Application Request (required) - * @return ApiResponse<UnitCreateApplicationResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(CreateApplication createApplication) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(createApplication, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create Application (asynchronously) - * Create an Application via API - * @param createApplication Create Application Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(CreateApplication createApplication, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(createApplication, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CreateApplicationFormApi.java b/src/main/java/org/openapitools/client/api/CreateApplicationFormApi.java deleted file mode 100644 index db045904..00000000 --- a/src/main/java/org/openapitools/client/api/CreateApplicationFormApi.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.CreateApplicationForm; -import org.openapitools.client.model.UnitApplicationFormResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CreateApplicationFormApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CreateApplicationFormApi() { - this(Configuration.getDefaultApiClient()); - } - - public CreateApplicationFormApi(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 execute - * @param createApplicationForm Create Application Form Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(CreateApplicationForm createApplicationForm, 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 = createApplicationForm; - - // create path and map variables - String localVarPath = "/application-forms"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(CreateApplicationForm createApplicationForm, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'createApplicationForm' is set - if (createApplicationForm == null) { - throw new ApiException("Missing the required parameter 'createApplicationForm' when calling execute(Async)"); - } - - return executeCall(createApplicationForm, _callback); - - } - - /** - * Create Application Form - * Create an Application Form via API - * @param createApplicationForm Create Application Form Request (required) - * @return UnitApplicationFormResponse - * @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 Successful Response -
- */ - public UnitApplicationFormResponse execute(CreateApplicationForm createApplicationForm) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(createApplicationForm); - return localVarResp.getData(); - } - - /** - * Create Application Form - * Create an Application Form via API - * @param createApplicationForm Create Application Form Request (required) - * @return ApiResponse<UnitApplicationFormResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(CreateApplicationForm createApplicationForm) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(createApplicationForm, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create Application Form (asynchronously) - * Create an Application Form via API - * @param createApplicationForm Create Application Form Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(CreateApplicationForm createApplicationForm, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(createApplicationForm, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CreateCheckDepositApi.java b/src/main/java/org/openapitools/client/api/CreateCheckDepositApi.java deleted file mode 100644 index cef657fe..00000000 --- a/src/main/java/org/openapitools/client/api/CreateCheckDepositApi.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.CreateCheckDeposit; -import org.openapitools.client.model.UnitCheckDepositResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CreateCheckDepositApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CreateCheckDepositApi() { - this(Configuration.getDefaultApiClient()); - } - - public CreateCheckDepositApi(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 execute - * @param createCheckDeposit Create Check Deposit Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(CreateCheckDeposit createCheckDeposit, 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 = createCheckDeposit; - - // create path and map variables - String localVarPath = "/check-deposits"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(CreateCheckDeposit createCheckDeposit, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'createCheckDeposit' is set - if (createCheckDeposit == null) { - throw new ApiException("Missing the required parameter 'createCheckDeposit' when calling execute(Async)"); - } - - return executeCall(createCheckDeposit, _callback); - - } - - /** - * Create Check Deposit - * Create a Check Deposit via API - * @param createCheckDeposit Create Check Deposit Request (required) - * @return UnitCheckDepositResponse - * @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 Successful Response -
- */ - public UnitCheckDepositResponse execute(CreateCheckDeposit createCheckDeposit) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(createCheckDeposit); - return localVarResp.getData(); - } - - /** - * Create Check Deposit - * Create a Check Deposit via API - * @param createCheckDeposit Create Check Deposit Request (required) - * @return ApiResponse<UnitCheckDepositResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(CreateCheckDeposit createCheckDeposit) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(createCheckDeposit, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create Check Deposit (asynchronously) - * Create a Check Deposit via API - * @param createCheckDeposit Create Check Deposit Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(CreateCheckDeposit createCheckDeposit, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(createCheckDeposit, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CreateCheckPaymentApi.java b/src/main/java/org/openapitools/client/api/CreateCheckPaymentApi.java deleted file mode 100644 index 429f31f1..00000000 --- a/src/main/java/org/openapitools/client/api/CreateCheckPaymentApi.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.CreateCheckPayment; -import org.openapitools.client.model.UnitCheckPaymentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CreateCheckPaymentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CreateCheckPaymentApi() { - this(Configuration.getDefaultApiClient()); - } - - public CreateCheckPaymentApi(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 execute - * @param createCheckPayment Create Check Payment Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(CreateCheckPayment createCheckPayment, 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 = createCheckPayment; - - // create path and map variables - String localVarPath = "/check-payments"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(CreateCheckPayment createCheckPayment, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'createCheckPayment' is set - if (createCheckPayment == null) { - throw new ApiException("Missing the required parameter 'createCheckPayment' when calling execute(Async)"); - } - - return executeCall(createCheckPayment, _callback); - - } - - /** - * Create Check Payment - * Create Check Payment via API - * @param createCheckPayment Create Check Payment Request (required) - * @return UnitCheckPaymentResponse - * @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 Successful Response -
- */ - public UnitCheckPaymentResponse execute(CreateCheckPayment createCheckPayment) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(createCheckPayment); - return localVarResp.getData(); - } - - /** - * Create Check Payment - * Create Check Payment via API - * @param createCheckPayment Create Check Payment Request (required) - * @return ApiResponse<UnitCheckPaymentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(CreateCheckPayment createCheckPayment) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(createCheckPayment, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create Check Payment (asynchronously) - * Create Check Payment via API - * @param createCheckPayment Create Check Payment Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(CreateCheckPayment createCheckPayment, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(createCheckPayment, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CreateCounterpartyApi.java b/src/main/java/org/openapitools/client/api/CreateCounterpartyApi.java deleted file mode 100644 index 334412d2..00000000 --- a/src/main/java/org/openapitools/client/api/CreateCounterpartyApi.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.CreateCounterparty; -import org.openapitools.client.model.UnitCounterpartyResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CreateCounterpartyApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CreateCounterpartyApi() { - this(Configuration.getDefaultApiClient()); - } - - public CreateCounterpartyApi(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 execute - * @param createCounterparty Create Counterparty Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(CreateCounterparty createCounterparty, 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 = createCounterparty; - - // create path and map variables - String localVarPath = "/counterparties"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(CreateCounterparty createCounterparty, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'createCounterparty' is set - if (createCounterparty == null) { - throw new ApiException("Missing the required parameter 'createCounterparty' when calling execute(Async)"); - } - - return executeCall(createCounterparty, _callback); - - } - - /** - * Create Counterparty - * Create a counterparty via API - * @param createCounterparty Create Counterparty Request (required) - * @return UnitCounterpartyResponse - * @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 Successful Response -
- */ - public UnitCounterpartyResponse execute(CreateCounterparty createCounterparty) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(createCounterparty); - return localVarResp.getData(); - } - - /** - * Create Counterparty - * Create a counterparty via API - * @param createCounterparty Create Counterparty Request (required) - * @return ApiResponse<UnitCounterpartyResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(CreateCounterparty createCounterparty) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(createCounterparty, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create Counterparty (asynchronously) - * Create a counterparty via API - * @param createCounterparty Create Counterparty Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(CreateCounterparty createCounterparty, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(createCounterparty, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CreateCustomerTokenApi.java b/src/main/java/org/openapitools/client/api/CreateCustomerTokenApi.java deleted file mode 100644 index 3e8875a8..00000000 --- a/src/main/java/org/openapitools/client/api/CreateCustomerTokenApi.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.CreateCustomerToken; -import org.openapitools.client.model.UnitCustomerTokenResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CreateCustomerTokenApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CreateCustomerTokenApi() { - this(Configuration.getDefaultApiClient()); - } - - public CreateCustomerTokenApi(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 execute - * @param customerId ID of the customer to create token for (required) - * @param createCustomerToken Create Customer Token Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(String customerId, CreateCustomerToken createCustomerToken, 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 = createCustomerToken; - - // create path and map variables - String localVarPath = "/customers/{customerId}/token" - .replace("{" + "customerId" + "}", localVarApiClient.escapeString(customerId.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/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String customerId, CreateCustomerToken createCustomerToken, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'customerId' is set - if (customerId == null) { - throw new ApiException("Missing the required parameter 'customerId' when calling execute(Async)"); - } - - // verify the required parameter 'createCustomerToken' is set - if (createCustomerToken == null) { - throw new ApiException("Missing the required parameter 'createCustomerToken' when calling execute(Async)"); - } - - return executeCall(customerId, createCustomerToken, _callback); - - } - - /** - * Create Customer Token - * Create a Customer Token via API - * @param customerId ID of the customer to create token for (required) - * @param createCustomerToken Create Customer Token Request (required) - * @return UnitCustomerTokenResponse - * @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 Successful Response -
- */ - public UnitCustomerTokenResponse execute(String customerId, CreateCustomerToken createCustomerToken) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(customerId, createCustomerToken); - return localVarResp.getData(); - } - - /** - * Create Customer Token - * Create a Customer Token via API - * @param customerId ID of the customer to create token for (required) - * @param createCustomerToken Create Customer Token Request (required) - * @return ApiResponse<UnitCustomerTokenResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String customerId, CreateCustomerToken createCustomerToken) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, createCustomerToken, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create Customer Token (asynchronously) - * Create a Customer Token via API - * @param customerId ID of the customer to create token for (required) - * @param createCustomerToken Create Customer Token Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String customerId, CreateCustomerToken createCustomerToken, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, createCustomerToken, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CreateCustomerTokenVerificationApi.java b/src/main/java/org/openapitools/client/api/CreateCustomerTokenVerificationApi.java deleted file mode 100644 index d3dfb519..00000000 --- a/src/main/java/org/openapitools/client/api/CreateCustomerTokenVerificationApi.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.CreateCustomerTokenVerification; -import org.openapitools.client.model.UnitCustomerTokenVerificationResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CreateCustomerTokenVerificationApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CreateCustomerTokenVerificationApi() { - this(Configuration.getDefaultApiClient()); - } - - public CreateCustomerTokenVerificationApi(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 execute - * @param customerId ID of the customer to create token for (required) - * @param createCustomerTokenVerification Create Customer Token Verification Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(String customerId, CreateCustomerTokenVerification createCustomerTokenVerification, 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 = createCustomerTokenVerification; - - // create path and map variables - String localVarPath = "/customers/{customerId}/token/verification" - .replace("{" + "customerId" + "}", localVarApiClient.escapeString(customerId.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/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String customerId, CreateCustomerTokenVerification createCustomerTokenVerification, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'customerId' is set - if (customerId == null) { - throw new ApiException("Missing the required parameter 'customerId' when calling execute(Async)"); - } - - // verify the required parameter 'createCustomerTokenVerification' is set - if (createCustomerTokenVerification == null) { - throw new ApiException("Missing the required parameter 'createCustomerTokenVerification' when calling execute(Async)"); - } - - return executeCall(customerId, createCustomerTokenVerification, _callback); - - } - - /** - * Create Customer Token Verification - * Create a Customer Token Verification via API - * @param customerId ID of the customer to create token for (required) - * @param createCustomerTokenVerification Create Customer Token Verification Request (required) - * @return UnitCustomerTokenVerificationResponse - * @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 Successful Response -
- */ - public UnitCustomerTokenVerificationResponse execute(String customerId, CreateCustomerTokenVerification createCustomerTokenVerification) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(customerId, createCustomerTokenVerification); - return localVarResp.getData(); - } - - /** - * Create Customer Token Verification - * Create a Customer Token Verification via API - * @param customerId ID of the customer to create token for (required) - * @param createCustomerTokenVerification Create Customer Token Verification Request (required) - * @return ApiResponse<UnitCustomerTokenVerificationResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String customerId, CreateCustomerTokenVerification createCustomerTokenVerification) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, createCustomerTokenVerification, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create Customer Token Verification (asynchronously) - * Create a Customer Token Verification via API - * @param customerId ID of the customer to create token for (required) - * @param createCustomerTokenVerification Create Customer Token Verification Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String customerId, CreateCustomerTokenVerification createCustomerTokenVerification, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, createCustomerTokenVerification, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CreateFeeApi.java b/src/main/java/org/openapitools/client/api/CreateFeeApi.java deleted file mode 100644 index 8e0553c2..00000000 --- a/src/main/java/org/openapitools/client/api/CreateFeeApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitFeeResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CreateFeeApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CreateFeeApi() { - this(Configuration.getDefaultApiClient()); - } - - public CreateFeeApi(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 execute - * @param body Create Fee Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(Object body, 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 = body; - - // create path and map variables - String localVarPath = "/fees"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(Object body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling execute(Async)"); - } - - return executeCall(body, _callback); - - } - - /** - * Create Fee - * Create a Fee via API - * @param body Create Fee Request (required) - * @return UnitFeeResponse - * @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 Successful Response -
- */ - public UnitFeeResponse execute(Object body) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(body); - return localVarResp.getData(); - } - - /** - * Create Fee - * Create a Fee via API - * @param body Create Fee Request (required) - * @return ApiResponse<UnitFeeResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(Object body) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create Fee (asynchronously) - * Create a Fee via API - * @param body Create Fee Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(Object body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CreateOrgApiTokenApi.java b/src/main/java/org/openapitools/client/api/CreateOrgApiTokenApi.java deleted file mode 100644 index b1bd7873..00000000 --- a/src/main/java/org/openapitools/client/api/CreateOrgApiTokenApi.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.CreateApiToken; -import org.openapitools.client.model.UnitApiTokenResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CreateOrgApiTokenApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CreateOrgApiTokenApi() { - this(Configuration.getDefaultApiClient()); - } - - public CreateOrgApiTokenApi(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 execute - * @param userId ID of the user to create token for (required) - * @param createApiToken Create Org API Token Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(String userId, CreateApiToken createApiToken, 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 = createApiToken; - - // create path and map variables - String localVarPath = "/users/{userId}/api-tokens" - .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.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/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String userId, CreateApiToken createApiToken, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling execute(Async)"); - } - - // verify the required parameter 'createApiToken' is set - if (createApiToken == null) { - throw new ApiException("Missing the required parameter 'createApiToken' when calling execute(Async)"); - } - - return executeCall(userId, createApiToken, _callback); - - } - - /** - * Create Org API Token - * Create an Org API Token via API - * @param userId ID of the user to create token for (required) - * @param createApiToken Create Org API Token Request (required) - * @return UnitApiTokenResponse - * @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 Successful Response -
- */ - public UnitApiTokenResponse execute(String userId, CreateApiToken createApiToken) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(userId, createApiToken); - return localVarResp.getData(); - } - - /** - * Create Org API Token - * Create an Org API Token via API - * @param userId ID of the user to create token for (required) - * @param createApiToken Create Org API Token Request (required) - * @return ApiResponse<UnitApiTokenResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String userId, CreateApiToken createApiToken) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(userId, createApiToken, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create Org API Token (asynchronously) - * Create an Org API Token via API - * @param userId ID of the user to create token for (required) - * @param createApiToken Create Org API Token Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String userId, CreateApiToken createApiToken, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(userId, createApiToken, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CreateRecurringPaymentApi.java b/src/main/java/org/openapitools/client/api/CreateRecurringPaymentApi.java deleted file mode 100644 index b8d34da4..00000000 --- a/src/main/java/org/openapitools/client/api/CreateRecurringPaymentApi.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.CreateRecurringPayment; -import org.openapitools.client.model.UnitRecurringPaymentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CreateRecurringPaymentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CreateRecurringPaymentApi() { - this(Configuration.getDefaultApiClient()); - } - - public CreateRecurringPaymentApi(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 execute - * @param createRecurringPayment Create Recurring Payment Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(CreateRecurringPayment createRecurringPayment, 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 = createRecurringPayment; - - // create path and map variables - String localVarPath = "/recurring-payments"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(CreateRecurringPayment createRecurringPayment, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'createRecurringPayment' is set - if (createRecurringPayment == null) { - throw new ApiException("Missing the required parameter 'createRecurringPayment' when calling execute(Async)"); - } - - return executeCall(createRecurringPayment, _callback); - - } - - /** - * Create Recurring Payment - * Create a Recurring Payment via API - * @param createRecurringPayment Create Recurring Payment Request (required) - * @return UnitRecurringPaymentResponse - * @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 Successful Response -
- */ - public UnitRecurringPaymentResponse execute(CreateRecurringPayment createRecurringPayment) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(createRecurringPayment); - return localVarResp.getData(); - } - - /** - * Create Recurring Payment - * Create a Recurring Payment via API - * @param createRecurringPayment Create Recurring Payment Request (required) - * @return ApiResponse<UnitRecurringPaymentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(CreateRecurringPayment createRecurringPayment) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(createRecurringPayment, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create Recurring Payment (asynchronously) - * Create a Recurring Payment via API - * @param createRecurringPayment Create Recurring Payment Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(CreateRecurringPayment createRecurringPayment, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(createRecurringPayment, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CreateRewardApi.java b/src/main/java/org/openapitools/client/api/CreateRewardApi.java deleted file mode 100644 index b2699e03..00000000 --- a/src/main/java/org/openapitools/client/api/CreateRewardApi.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.CreateReward; -import org.openapitools.client.model.UnitRewardResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CreateRewardApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CreateRewardApi() { - this(Configuration.getDefaultApiClient()); - } - - public CreateRewardApi(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 execute - * @param createReward Create Reward Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(CreateReward createReward, 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 = createReward; - - // create path and map variables - String localVarPath = "/rewards"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(CreateReward createReward, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'createReward' is set - if (createReward == null) { - throw new ApiException("Missing the required parameter 'createReward' when calling execute(Async)"); - } - - return executeCall(createReward, _callback); - - } - - /** - * Create Reward - * Create a Reward via API - * @param createReward Create Reward Request (required) - * @return UnitRewardResponse - * @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 Successful Response -
- */ - public UnitRewardResponse execute(CreateReward createReward) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(createReward); - return localVarResp.getData(); - } - - /** - * Create Reward - * Create a Reward via API - * @param createReward Create Reward Request (required) - * @return ApiResponse<UnitRewardResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(CreateReward createReward) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(createReward, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create Reward (asynchronously) - * Create a Reward via API - * @param createReward Create Reward Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(CreateReward createReward, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(createReward, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/CreateWebhookApi.java b/src/main/java/org/openapitools/client/api/CreateWebhookApi.java deleted file mode 100644 index 9d58ae7e..00000000 --- a/src/main/java/org/openapitools/client/api/CreateWebhookApi.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.CreateWebhook; -import org.openapitools.client.model.UnitWebhookResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CreateWebhookApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CreateWebhookApi() { - this(Configuration.getDefaultApiClient()); - } - - public CreateWebhookApi(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 execute - * @param createWebhook Create Webhook Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(CreateWebhook createWebhook, 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 = createWebhook; - - // create path and map variables - String localVarPath = "/webhooks"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(CreateWebhook createWebhook, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'createWebhook' is set - if (createWebhook == null) { - throw new ApiException("Missing the required parameter 'createWebhook' when calling execute(Async)"); - } - - return executeCall(createWebhook, _callback); - - } - - /** - * Create Webhook - * Create a Webhook via API - * @param createWebhook Create Webhook Request (required) - * @return UnitWebhookResponse - * @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 Successful Response -
- */ - public UnitWebhookResponse execute(CreateWebhook createWebhook) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(createWebhook); - return localVarResp.getData(); - } - - /** - * Create Webhook - * Create a Webhook via API - * @param createWebhook Create Webhook Request (required) - * @return ApiResponse<UnitWebhookResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(CreateWebhook createWebhook) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(createWebhook, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create Webhook (asynchronously) - * Create a Webhook via API - * @param createWebhook Create Webhook Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(CreateWebhook createWebhook, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(createWebhook, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/DeactivateControlAgreementForAccountApi.java b/src/main/java/org/openapitools/client/api/DeactivateControlAgreementForAccountApi.java deleted file mode 100644 index 26bbe248..00000000 --- a/src/main/java/org/openapitools/client/api/DeactivateControlAgreementForAccountApi.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitAccountResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class DeactivateControlAgreementForAccountApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public DeactivateControlAgreementForAccountApi() { - this(Configuration.getDefaultApiClient()); - } - - public DeactivateControlAgreementForAccountApi(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 execute - * @param accountId ID of the account (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 Successful Response -
404 -
- */ - public okhttp3.Call executeCall(String accountId, 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 = "/accounts/{accountId}/deactivate-daca" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling execute(Async)"); - } - - return executeCall(accountId, _callback); - - } - - /** - * Deactivate Account Control Agreement by Id - * Deactivate Control Agreement for Account via API - * @param accountId ID of the account (required) - * @return UnitAccountResponse - * @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 Successful Response -
404 -
- */ - public UnitAccountResponse execute(String accountId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(accountId); - return localVarResp.getData(); - } - - /** - * Deactivate Account Control Agreement by Id - * Deactivate Control Agreement for Account via API - * @param accountId ID of the account (required) - * @return ApiResponse<UnitAccountResponse> - * @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 Successful Response -
404 -
- */ - public ApiResponse executeWithHttpInfo(String accountId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Deactivate Account Control Agreement by Id (asynchronously) - * Deactivate Control Agreement for Account via API - * @param accountId ID of the account (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 Successful Response -
404 -
- */ - public okhttp3.Call executeAsync(String accountId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/DeclineAuthorizationRequestApi.java b/src/main/java/org/openapitools/client/api/DeclineAuthorizationRequestApi.java deleted file mode 100644 index 1dc62ce3..00000000 --- a/src/main/java/org/openapitools/client/api/DeclineAuthorizationRequestApi.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.DeclineAuthorizationRequest; -import org.openapitools.client.model.UnitAuthorizationRequestResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class DeclineAuthorizationRequestApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public DeclineAuthorizationRequestApi() { - this(Configuration.getDefaultApiClient()); - } - - public DeclineAuthorizationRequestApi(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 execute - * @param authorizationId ID of the authorization request to decline (required) - * @param declineAuthorizationRequest Decline Authorization Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(String authorizationId, DeclineAuthorizationRequest declineAuthorizationRequest, 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 = declineAuthorizationRequest; - - // create path and map variables - String localVarPath = "/authorization-requests/{authorizationId}/decline" - .replace("{" + "authorizationId" + "}", localVarApiClient.escapeString(authorizationId.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/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String authorizationId, DeclineAuthorizationRequest declineAuthorizationRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'authorizationId' is set - if (authorizationId == null) { - throw new ApiException("Missing the required parameter 'authorizationId' when calling execute(Async)"); - } - - // verify the required parameter 'declineAuthorizationRequest' is set - if (declineAuthorizationRequest == null) { - throw new ApiException("Missing the required parameter 'declineAuthorizationRequest' when calling execute(Async)"); - } - - return executeCall(authorizationId, declineAuthorizationRequest, _callback); - - } - - /** - * Decline Authorization Request - * Decline Authorization Request via API - * @param authorizationId ID of the authorization request to decline (required) - * @param declineAuthorizationRequest Decline Authorization Request (required) - * @return UnitAuthorizationRequestResponse - * @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 Successful Response -
- */ - public UnitAuthorizationRequestResponse execute(String authorizationId, DeclineAuthorizationRequest declineAuthorizationRequest) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(authorizationId, declineAuthorizationRequest); - return localVarResp.getData(); - } - - /** - * Decline Authorization Request - * Decline Authorization Request via API - * @param authorizationId ID of the authorization request to decline (required) - * @param declineAuthorizationRequest Decline Authorization Request (required) - * @return ApiResponse<UnitAuthorizationRequestResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String authorizationId, DeclineAuthorizationRequest declineAuthorizationRequest) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(authorizationId, declineAuthorizationRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Decline Authorization Request (asynchronously) - * Decline Authorization Request via API - * @param authorizationId ID of the authorization request to decline (required) - * @param declineAuthorizationRequest Decline Authorization Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String authorizationId, DeclineAuthorizationRequest declineAuthorizationRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(authorizationId, declineAuthorizationRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/DefaultApi.java b/src/main/java/org/openapitools/client/api/DefaultApi.java deleted file mode 100644 index 70aa3231..00000000 --- a/src/main/java/org/openapitools/client/api/DefaultApi.java +++ /dev/null @@ -1,715 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.CreateStopPayment; -import org.openapitools.client.model.ExecuteFilterParameter20; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.StopPaymentListResponse; -import org.openapitools.client.model.StopPaymentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class DefaultApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public DefaultApi() { - this(Configuration.getDefaultApiClient()); - } - - public DefaultApi(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 execute - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @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 OK -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter20 filter, String sort, 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 = "/stop-payments"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - if (sort != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); - } - - final String[] localVarAccepts = { - "application/json" - }; - 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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter20 filter, String sort, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, sort, _callback); - - } - - /** - * Get a list of stop payments - * - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @return StopPaymentListResponse - * @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 OK -
- */ - public StopPaymentListResponse execute(ListPageParametersObject page, ExecuteFilterParameter20 filter, String sort) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter, sort); - return localVarResp.getData(); - } - - /** - * Get a list of stop payments - * - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @return ApiResponse<StopPaymentListResponse> - * @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 OK -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter20 filter, String sort) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get a list of stop payments (asynchronously) - * - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @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 OK -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter20 filter, String sort, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for execute_0 - * @param createStopPayment (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 OK -
- */ - public okhttp3.Call execute_0Call(CreateStopPayment createStopPayment, 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 = createStopPayment; - - // create path and map variables - String localVarPath = "/stop-payments"; - - 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" - }; - 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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call execute_0ValidateBeforeCall(CreateStopPayment createStopPayment, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'createStopPayment' is set - if (createStopPayment == null) { - throw new ApiException("Missing the required parameter 'createStopPayment' when calling execute_0(Async)"); - } - - return execute_0Call(createStopPayment, _callback); - - } - - /** - * Create Stop Payment - * - * @param createStopPayment (required) - * @return StopPaymentResponse - * @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 OK -
- */ - public StopPaymentResponse execute_0(CreateStopPayment createStopPayment) throws ApiException { - ApiResponse localVarResp = execute_0WithHttpInfo(createStopPayment); - return localVarResp.getData(); - } - - /** - * Create Stop Payment - * - * @param createStopPayment (required) - * @return ApiResponse<StopPaymentResponse> - * @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 OK -
- */ - public ApiResponse execute_0WithHttpInfo(CreateStopPayment createStopPayment) throws ApiException { - okhttp3.Call localVarCall = execute_0ValidateBeforeCall(createStopPayment, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create Stop Payment (asynchronously) - * - * @param createStopPayment (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 OK -
- */ - public okhttp3.Call execute_0Async(CreateStopPayment createStopPayment, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = execute_0ValidateBeforeCall(createStopPayment, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for execute_1 - * @param stopPaymentId ID of the stop payment (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 OK -
404 Stop payment not found -
- */ - public okhttp3.Call execute_1Call(String stopPaymentId, 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 = "/stop-payments/{stop_payment_id}" - .replace("{" + "stop_payment_id" + "}", localVarApiClient.escapeString(stopPaymentId.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" - }; - 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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call execute_1ValidateBeforeCall(String stopPaymentId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'stopPaymentId' is set - if (stopPaymentId == null) { - throw new ApiException("Missing the required parameter 'stopPaymentId' when calling execute_1(Async)"); - } - - return execute_1Call(stopPaymentId, _callback); - - } - - /** - * Get details of a specific stop payment - * - * @param stopPaymentId ID of the stop payment (required) - * @return StopPaymentResponse - * @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 OK -
404 Stop payment not found -
- */ - public StopPaymentResponse execute_1(String stopPaymentId) throws ApiException { - ApiResponse localVarResp = execute_1WithHttpInfo(stopPaymentId); - return localVarResp.getData(); - } - - /** - * Get details of a specific stop payment - * - * @param stopPaymentId ID of the stop payment (required) - * @return ApiResponse<StopPaymentResponse> - * @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 OK -
404 Stop payment not found -
- */ - public ApiResponse execute_1WithHttpInfo(String stopPaymentId) throws ApiException { - okhttp3.Call localVarCall = execute_1ValidateBeforeCall(stopPaymentId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get details of a specific stop payment (asynchronously) - * - * @param stopPaymentId ID of the stop payment (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 OK -
404 Stop payment not found -
- */ - public okhttp3.Call execute_1Async(String stopPaymentId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = execute_1ValidateBeforeCall(stopPaymentId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for execute_2 - * @param stopPaymentId ID of the stop payment (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
204 Stop payment successfully canceled -
404 Stop payment not found -
- */ - public okhttp3.Call execute_2Call(String stopPaymentId, 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 = "/stop-payments/{stop_payment_id}" - .replace("{" + "stop_payment_id" + "}", localVarApiClient.escapeString(stopPaymentId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - }; - 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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call execute_2ValidateBeforeCall(String stopPaymentId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'stopPaymentId' is set - if (stopPaymentId == null) { - throw new ApiException("Missing the required parameter 'stopPaymentId' when calling execute_2(Async)"); - } - - return execute_2Call(stopPaymentId, _callback); - - } - - /** - * Cancel a stop payment - * - * @param stopPaymentId ID of the stop payment (required) - * @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
204 Stop payment successfully canceled -
404 Stop payment not found -
- */ - public void execute_2(String stopPaymentId) throws ApiException { - execute_2WithHttpInfo(stopPaymentId); - } - - /** - * Cancel a stop payment - * - * @param stopPaymentId ID of the stop payment (required) - * @return ApiResponse<Void> - * @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
204 Stop payment successfully canceled -
404 Stop payment not found -
- */ - public ApiResponse execute_2WithHttpInfo(String stopPaymentId) throws ApiException { - okhttp3.Call localVarCall = execute_2ValidateBeforeCall(stopPaymentId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Cancel a stop payment (asynchronously) - * - * @param stopPaymentId ID of the stop payment (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
204 Stop payment successfully canceled -
404 Stop payment not found -
- */ - public okhttp3.Call execute_2Async(String stopPaymentId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = execute_2ValidateBeforeCall(stopPaymentId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for execute_3 - * @param stopPaymentId ID of the stop payment (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 OK -
404 Stop payment not found -
- */ - public okhttp3.Call execute_3Call(String stopPaymentId, 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 = "/stop-payments/{stop_payment_id}/disable" - .replace("{" + "stop_payment_id" + "}", localVarApiClient.escapeString(stopPaymentId.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" - }; - 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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call execute_3ValidateBeforeCall(String stopPaymentId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'stopPaymentId' is set - if (stopPaymentId == null) { - throw new ApiException("Missing the required parameter 'stopPaymentId' when calling execute_3(Async)"); - } - - return execute_3Call(stopPaymentId, _callback); - - } - - /** - * Disable a stop payment - * - * @param stopPaymentId ID of the stop payment (required) - * @return StopPaymentResponse - * @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 OK -
404 Stop payment not found -
- */ - public StopPaymentResponse execute_3(String stopPaymentId) throws ApiException { - ApiResponse localVarResp = execute_3WithHttpInfo(stopPaymentId); - return localVarResp.getData(); - } - - /** - * Disable a stop payment - * - * @param stopPaymentId ID of the stop payment (required) - * @return ApiResponse<StopPaymentResponse> - * @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 OK -
404 Stop payment not found -
- */ - public ApiResponse execute_3WithHttpInfo(String stopPaymentId) throws ApiException { - okhttp3.Call localVarCall = execute_3ValidateBeforeCall(stopPaymentId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Disable a stop payment (asynchronously) - * - * @param stopPaymentId ID of the stop payment (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 OK -
404 Stop payment not found -
- */ - public okhttp3.Call execute_3Async(String stopPaymentId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = execute_3ValidateBeforeCall(stopPaymentId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/DeleteCounterpartyApi.java b/src/main/java/org/openapitools/client/api/DeleteCounterpartyApi.java deleted file mode 100644 index 50032232..00000000 --- a/src/main/java/org/openapitools/client/api/DeleteCounterpartyApi.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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 java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class DeleteCounterpartyApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public DeleteCounterpartyApi() { - this(Configuration.getDefaultApiClient()); - } - - public DeleteCounterpartyApi(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 execute - * @param counterpartyId ID of the counterparty to delete (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
204 Successful Response -
- */ - public okhttp3.Call executeCall(String counterpartyId, 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 = "/counterparties/{counterpartyId}" - .replace("{" + "counterpartyId" + "}", localVarApiClient.escapeString(counterpartyId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - }; - 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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String counterpartyId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'counterpartyId' is set - if (counterpartyId == null) { - throw new ApiException("Missing the required parameter 'counterpartyId' when calling execute(Async)"); - } - - return executeCall(counterpartyId, _callback); - - } - - /** - * Delete Counterparty by Id - * Delete Counterparty via API - * @param counterpartyId ID of the counterparty to delete (required) - * @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
204 Successful Response -
- */ - public void execute(String counterpartyId) throws ApiException { - executeWithHttpInfo(counterpartyId); - } - - /** - * Delete Counterparty by Id - * Delete Counterparty via API - * @param counterpartyId ID of the counterparty to delete (required) - * @return ApiResponse<Void> - * @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
204 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String counterpartyId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(counterpartyId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete Counterparty by Id (asynchronously) - * Delete Counterparty via API - * @param counterpartyId ID of the counterparty to delete (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
204 Successful Response -
- */ - public okhttp3.Call executeAsync(String counterpartyId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(counterpartyId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/DisableRecurringPaymentApi.java b/src/main/java/org/openapitools/client/api/DisableRecurringPaymentApi.java deleted file mode 100644 index 982306fa..00000000 --- a/src/main/java/org/openapitools/client/api/DisableRecurringPaymentApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitRecurringPaymentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class DisableRecurringPaymentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public DisableRecurringPaymentApi() { - this(Configuration.getDefaultApiClient()); - } - - public DisableRecurringPaymentApi(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 execute - * @param paymentId ID of the payment to disable (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 Successful Response -
- */ - public okhttp3.Call executeCall(String paymentId, 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 = "/recurring-payments/{paymentId}/disable" - .replace("{" + "paymentId" + "}", localVarApiClient.escapeString(paymentId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String paymentId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'paymentId' is set - if (paymentId == null) { - throw new ApiException("Missing the required parameter 'paymentId' when calling execute(Async)"); - } - - return executeCall(paymentId, _callback); - - } - - /** - * Disable Recurring Payment - * Disable Recurring Payment via API - * @param paymentId ID of the payment to disable (required) - * @return UnitRecurringPaymentResponse - * @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 Successful Response -
- */ - public UnitRecurringPaymentResponse execute(String paymentId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(paymentId); - return localVarResp.getData(); - } - - /** - * Disable Recurring Payment - * Disable Recurring Payment via API - * @param paymentId ID of the payment to disable (required) - * @return ApiResponse<UnitRecurringPaymentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String paymentId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(paymentId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Disable Recurring Payment (asynchronously) - * Disable Recurring Payment via API - * @param paymentId ID of the payment to disable (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String paymentId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(paymentId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/DisableWebhookApi.java b/src/main/java/org/openapitools/client/api/DisableWebhookApi.java deleted file mode 100644 index a5604256..00000000 --- a/src/main/java/org/openapitools/client/api/DisableWebhookApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitWebhookResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class DisableWebhookApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public DisableWebhookApi() { - this(Configuration.getDefaultApiClient()); - } - - public DisableWebhookApi(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 execute - * @param webhookId ID of the webhook to disable (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 Successful Response -
- */ - public okhttp3.Call executeCall(String webhookId, 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 = "/webhooks/{webhookId}/disable" - .replace("{" + "webhookId" + "}", localVarApiClient.escapeString(webhookId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String webhookId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'webhookId' is set - if (webhookId == null) { - throw new ApiException("Missing the required parameter 'webhookId' when calling execute(Async)"); - } - - return executeCall(webhookId, _callback); - - } - - /** - * Disable a Webhook - * Disable a Webhook via API - * @param webhookId ID of the webhook to disable (required) - * @return UnitWebhookResponse - * @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 Successful Response -
- */ - public UnitWebhookResponse execute(String webhookId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(webhookId); - return localVarResp.getData(); - } - - /** - * Disable a Webhook - * Disable a Webhook via API - * @param webhookId ID of the webhook to disable (required) - * @return ApiResponse<UnitWebhookResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String webhookId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(webhookId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Disable a Webhook (asynchronously) - * Disable a Webhook via API - * @param webhookId ID of the webhook to disable (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String webhookId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(webhookId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/DownloadADocumentApi.java b/src/main/java/org/openapitools/client/api/DownloadADocumentApi.java deleted file mode 100644 index 621064e1..00000000 --- a/src/main/java/org/openapitools/client/api/DownloadADocumentApi.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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 java.io.File; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class DownloadADocumentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public DownloadADocumentApi() { - this(Configuration.getDefaultApiClient()); - } - - public DownloadADocumentApi(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 execute - * @param applicationId ID of the application (required) - * @param documentId ID of the document to download (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 Successful Response -
- */ - public okhttp3.Call executeCall(String applicationId, String documentId, 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 = "/applications/{applicationId}/documents/{documentId}/download" - .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.toString())) - .replace("{" + "documentId" + "}", localVarApiClient.escapeString(documentId.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/octet-stream" - }; - 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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String applicationId, String documentId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'applicationId' is set - if (applicationId == null) { - throw new ApiException("Missing the required parameter 'applicationId' when calling execute(Async)"); - } - - // verify the required parameter 'documentId' is set - if (documentId == null) { - throw new ApiException("Missing the required parameter 'documentId' when calling execute(Async)"); - } - - return executeCall(applicationId, documentId, _callback); - - } - - /** - * Download a Document - * Download a Document via API - * @param applicationId ID of the application (required) - * @param documentId ID of the document to download (required) - * @return File - * @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 Successful Response -
- */ - public File execute(String applicationId, String documentId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(applicationId, documentId); - return localVarResp.getData(); - } - - /** - * Download a Document - * Download a Document via API - * @param applicationId ID of the application (required) - * @param documentId ID of the document to download (required) - * @return ApiResponse<File> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String applicationId, String documentId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Download a Document (asynchronously) - * Download a Document via API - * @param applicationId ID of the application (required) - * @param documentId ID of the document to download (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String applicationId, String documentId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/DownloadADocumentBackSideApi.java b/src/main/java/org/openapitools/client/api/DownloadADocumentBackSideApi.java deleted file mode 100644 index d5f54376..00000000 --- a/src/main/java/org/openapitools/client/api/DownloadADocumentBackSideApi.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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 java.io.File; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class DownloadADocumentBackSideApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public DownloadADocumentBackSideApi() { - this(Configuration.getDefaultApiClient()); - } - - public DownloadADocumentBackSideApi(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 execute - * @param applicationId ID of the application (required) - * @param documentId ID of the document to download (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 Successful Response -
- */ - public okhttp3.Call executeCall(String applicationId, String documentId, 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 = "/applications/{applicationId}/documents/{documentId}/download/back" - .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.toString())) - .replace("{" + "documentId" + "}", localVarApiClient.escapeString(documentId.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/octet-stream" - }; - 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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String applicationId, String documentId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'applicationId' is set - if (applicationId == null) { - throw new ApiException("Missing the required parameter 'applicationId' when calling execute(Async)"); - } - - // verify the required parameter 'documentId' is set - if (documentId == null) { - throw new ApiException("Missing the required parameter 'documentId' when calling execute(Async)"); - } - - return executeCall(applicationId, documentId, _callback); - - } - - /** - * Download a Document - Back Side - * Download a Document - Back Side via API - * @param applicationId ID of the application (required) - * @param documentId ID of the document to download (required) - * @return File - * @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 Successful Response -
- */ - public File execute(String applicationId, String documentId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(applicationId, documentId); - return localVarResp.getData(); - } - - /** - * Download a Document - Back Side - * Download a Document - Back Side via API - * @param applicationId ID of the application (required) - * @param documentId ID of the document to download (required) - * @return ApiResponse<File> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String applicationId, String documentId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Download a Document - Back Side (asynchronously) - * Download a Document - Back Side via API - * @param applicationId ID of the application (required) - * @param documentId ID of the document to download (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String applicationId, String documentId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/EnableRecurringPaymentApi.java b/src/main/java/org/openapitools/client/api/EnableRecurringPaymentApi.java deleted file mode 100644 index 3cccd3c3..00000000 --- a/src/main/java/org/openapitools/client/api/EnableRecurringPaymentApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitRecurringPaymentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class EnableRecurringPaymentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public EnableRecurringPaymentApi() { - this(Configuration.getDefaultApiClient()); - } - - public EnableRecurringPaymentApi(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 execute - * @param paymentId ID of the payment to enable (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 Successful Response -
- */ - public okhttp3.Call executeCall(String paymentId, 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 = "/recurring-payments/{paymentId}/enable" - .replace("{" + "paymentId" + "}", localVarApiClient.escapeString(paymentId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String paymentId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'paymentId' is set - if (paymentId == null) { - throw new ApiException("Missing the required parameter 'paymentId' when calling execute(Async)"); - } - - return executeCall(paymentId, _callback); - - } - - /** - * Enable Recurring Payment - * Enable Recurring Payment via API - * @param paymentId ID of the payment to enable (required) - * @return UnitRecurringPaymentResponse - * @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 Successful Response -
- */ - public UnitRecurringPaymentResponse execute(String paymentId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(paymentId); - return localVarResp.getData(); - } - - /** - * Enable Recurring Payment - * Enable Recurring Payment via API - * @param paymentId ID of the payment to enable (required) - * @return ApiResponse<UnitRecurringPaymentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String paymentId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(paymentId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Enable Recurring Payment (asynchronously) - * Enable Recurring Payment via API - * @param paymentId ID of the payment to enable (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String paymentId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(paymentId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/EnableWebhookApi.java b/src/main/java/org/openapitools/client/api/EnableWebhookApi.java deleted file mode 100644 index d99a40ba..00000000 --- a/src/main/java/org/openapitools/client/api/EnableWebhookApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitWebhookResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class EnableWebhookApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public EnableWebhookApi() { - this(Configuration.getDefaultApiClient()); - } - - public EnableWebhookApi(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 execute - * @param webhookId ID of the webhook to enable (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 Successful Response -
- */ - public okhttp3.Call executeCall(String webhookId, 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 = "/webhooks/{webhookId}/enable" - .replace("{" + "webhookId" + "}", localVarApiClient.escapeString(webhookId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String webhookId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'webhookId' is set - if (webhookId == null) { - throw new ApiException("Missing the required parameter 'webhookId' when calling execute(Async)"); - } - - return executeCall(webhookId, _callback); - - } - - /** - * Enable Webhook - * Enable a Webhook via API - * @param webhookId ID of the webhook to enable (required) - * @return UnitWebhookResponse - * @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 Successful Response -
- */ - public UnitWebhookResponse execute(String webhookId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(webhookId); - return localVarResp.getData(); - } - - /** - * Enable Webhook - * Enable a Webhook via API - * @param webhookId ID of the webhook to enable (required) - * @return ApiResponse<UnitWebhookResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String webhookId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(webhookId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Enable Webhook (asynchronously) - * Enable a Webhook via API - * @param webhookId ID of the webhook to enable (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String webhookId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(webhookId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/EnterControlAgreementForAccountApi.java b/src/main/java/org/openapitools/client/api/EnterControlAgreementForAccountApi.java deleted file mode 100644 index 27c14a9a..00000000 --- a/src/main/java/org/openapitools/client/api/EnterControlAgreementForAccountApi.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitAccountResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class EnterControlAgreementForAccountApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public EnterControlAgreementForAccountApi() { - this(Configuration.getDefaultApiClient()); - } - - public EnterControlAgreementForAccountApi(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 execute - * @param accountId ID of the account (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 Successful Response -
0 -
- */ - public okhttp3.Call executeCall(String accountId, 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 = "/accounts/{accountId}/enter-daca" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling execute(Async)"); - } - - return executeCall(accountId, _callback); - - } - - /** - * Enter Account Control Agreement by Id - * Enter Control Agreement for Account via API - * @param accountId ID of the account (required) - * @return UnitAccountResponse - * @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 Successful Response -
0 -
- */ - public UnitAccountResponse execute(String accountId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(accountId); - return localVarResp.getData(); - } - - /** - * Enter Account Control Agreement by Id - * Enter Control Agreement for Account via API - * @param accountId ID of the account (required) - * @return ApiResponse<UnitAccountResponse> - * @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 Successful Response -
0 -
- */ - public ApiResponse executeWithHttpInfo(String accountId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Enter Account Control Agreement by Id (asynchronously) - * Enter Control Agreement for Account via API - * @param accountId ID of the account (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 Successful Response -
0 -
- */ - public okhttp3.Call executeAsync(String accountId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/FireEventApi.java b/src/main/java/org/openapitools/client/api/FireEventApi.java deleted file mode 100644 index e3daa4ff..00000000 --- a/src/main/java/org/openapitools/client/api/FireEventApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitEventResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class FireEventApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public FireEventApi() { - this(Configuration.getDefaultApiClient()); - } - - public FireEventApi(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 execute - * @param eventId ID of the event to fire (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 Successful Response -
- */ - public okhttp3.Call executeCall(String eventId, 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 = "/events/{eventId}" - .replace("{" + "eventId" + "}", localVarApiClient.escapeString(eventId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String eventId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'eventId' is set - if (eventId == null) { - throw new ApiException("Missing the required parameter 'eventId' when calling execute(Async)"); - } - - return executeCall(eventId, _callback); - - } - - /** - * Fire Event by Id - * Fire an Event via API - * @param eventId ID of the event to fire (required) - * @return UnitEventResponse - * @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 Successful Response -
- */ - public UnitEventResponse execute(String eventId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(eventId); - return localVarResp.getData(); - } - - /** - * Fire Event by Id - * Fire an Event via API - * @param eventId ID of the event to fire (required) - * @return ApiResponse<UnitEventResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String eventId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(eventId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Fire Event by Id (asynchronously) - * Fire an Event via API - * @param eventId ID of the event to fire (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String eventId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(eventId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/FreezeACardApi.java b/src/main/java/org/openapitools/client/api/FreezeACardApi.java deleted file mode 100644 index 98090dd8..00000000 --- a/src/main/java/org/openapitools/client/api/FreezeACardApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCardResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class FreezeACardApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public FreezeACardApi() { - this(Configuration.getDefaultApiClient()); - } - - public FreezeACardApi(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 execute - * @param cardId ID of the card to freeze (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 Successful Response -
- */ - public okhttp3.Call executeCall(String cardId, 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 = "/cards/{cardId}/freeze" - .replace("{" + "cardId" + "}", localVarApiClient.escapeString(cardId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String cardId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'cardId' is set - if (cardId == null) { - throw new ApiException("Missing the required parameter 'cardId' when calling execute(Async)"); - } - - return executeCall(cardId, _callback); - - } - - /** - * Freeze a Card - * Freeze a Card via API - * @param cardId ID of the card to freeze (required) - * @return UnitCardResponse - * @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 Successful Response -
- */ - public UnitCardResponse execute(String cardId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(cardId); - return localVarResp.getData(); - } - - /** - * Freeze a Card - * Freeze a Card via API - * @param cardId ID of the card to freeze (required) - * @return ApiResponse<UnitCardResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String cardId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(cardId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Freeze a Card (asynchronously) - * Freeze a Card via API - * @param cardId ID of the card to freeze (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String cardId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(cardId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/FreezeAnAccountApi.java b/src/main/java/org/openapitools/client/api/FreezeAnAccountApi.java deleted file mode 100644 index c40c34fb..00000000 --- a/src/main/java/org/openapitools/client/api/FreezeAnAccountApi.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.FreezeAccountRequest; -import org.openapitools.client.model.UnitAccountResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class FreezeAnAccountApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public FreezeAnAccountApi() { - this(Configuration.getDefaultApiClient()); - } - - public FreezeAnAccountApi(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 execute - * @param accountId ID of the account to freeze (required) - * @param freezeAccountRequest Freeze Account Request (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 Successful Response -
0 -
- */ - public okhttp3.Call executeCall(String accountId, FreezeAccountRequest freezeAccountRequest, 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 = freezeAccountRequest; - - // create path and map variables - String localVarPath = "/accounts/{accountId}/freeze" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.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/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String accountId, FreezeAccountRequest freezeAccountRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling execute(Async)"); - } - - // verify the required parameter 'freezeAccountRequest' is set - if (freezeAccountRequest == null) { - throw new ApiException("Missing the required parameter 'freezeAccountRequest' when calling execute(Async)"); - } - - return executeCall(accountId, freezeAccountRequest, _callback); - - } - - /** - * Freeze Account by Id - * Freeze Account via API - * @param accountId ID of the account to freeze (required) - * @param freezeAccountRequest Freeze Account Request (required) - * @return UnitAccountResponse - * @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 Successful Response -
0 -
- */ - public UnitAccountResponse execute(String accountId, FreezeAccountRequest freezeAccountRequest) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(accountId, freezeAccountRequest); - return localVarResp.getData(); - } - - /** - * Freeze Account by Id - * Freeze Account via API - * @param accountId ID of the account to freeze (required) - * @param freezeAccountRequest Freeze Account Request (required) - * @return ApiResponse<UnitAccountResponse> - * @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 Successful Response -
0 -
- */ - public ApiResponse executeWithHttpInfo(String accountId, FreezeAccountRequest freezeAccountRequest) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, freezeAccountRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Freeze Account by Id (asynchronously) - * Freeze Account via API - * @param accountId ID of the account to freeze (required) - * @param freezeAccountRequest Freeze Account Request (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 Successful Response -
0 -
- */ - public okhttp3.Call executeAsync(String accountId, FreezeAccountRequest freezeAccountRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, freezeAccountRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetABackImageApi.java b/src/main/java/org/openapitools/client/api/GetABackImageApi.java deleted file mode 100644 index f77e29b8..00000000 --- a/src/main/java/org/openapitools/client/api/GetABackImageApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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 java.io.File; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetABackImageApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetABackImageApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetABackImageApi(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 execute - * @param checkPaymentId ID of the check payment (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 Successful Response -
- */ - public okhttp3.Call executeCall(String checkPaymentId, 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 = "/check-payments/{checkPaymentId}/back" - .replace("{" + "checkPaymentId" + "}", localVarApiClient.escapeString(checkPaymentId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "image/png" - }; - 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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String checkPaymentId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'checkPaymentId' is set - if (checkPaymentId == null) { - throw new ApiException("Missing the required parameter 'checkPaymentId' when calling execute(Async)"); - } - - return executeCall(checkPaymentId, _callback); - - } - - /** - * Get back image - * Get back image via API - * @param checkPaymentId ID of the check payment (required) - * @return File - * @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 Successful Response -
- */ - public File execute(String checkPaymentId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(checkPaymentId); - return localVarResp.getData(); - } - - /** - * Get back image - * Get back image via API - * @param checkPaymentId ID of the check payment (required) - * @return ApiResponse<File> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String checkPaymentId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get back image (asynchronously) - * Get back image via API - * @param checkPaymentId ID of the check payment (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String checkPaymentId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetAFrontImageApi.java b/src/main/java/org/openapitools/client/api/GetAFrontImageApi.java deleted file mode 100644 index f40223ac..00000000 --- a/src/main/java/org/openapitools/client/api/GetAFrontImageApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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 java.io.File; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetAFrontImageApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetAFrontImageApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetAFrontImageApi(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 execute - * @param checkPaymentId ID of the check payment (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 Successful Response -
- */ - public okhttp3.Call executeCall(String checkPaymentId, 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 = "/check-payments/{checkPaymentId}/front" - .replace("{" + "checkPaymentId" + "}", localVarApiClient.escapeString(checkPaymentId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "image/png" - }; - 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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String checkPaymentId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'checkPaymentId' is set - if (checkPaymentId == null) { - throw new ApiException("Missing the required parameter 'checkPaymentId' when calling execute(Async)"); - } - - return executeCall(checkPaymentId, _callback); - - } - - /** - * Get front image - * Get front image via API - * @param checkPaymentId ID of the check payment (required) - * @return File - * @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 Successful Response -
- */ - public File execute(String checkPaymentId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(checkPaymentId); - return localVarResp.getData(); - } - - /** - * Get front image - * Get front image via API - * @param checkPaymentId ID of the check payment (required) - * @return ApiResponse<File> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String checkPaymentId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get front image (asynchronously) - * Get front image via API - * @param checkPaymentId ID of the check payment (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String checkPaymentId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetAccountApi.java b/src/main/java/org/openapitools/client/api/GetAccountApi.java deleted file mode 100644 index 651888c4..00000000 --- a/src/main/java/org/openapitools/client/api/GetAccountApi.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitAccountResponseWithIncluded; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetAccountApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetAccountApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetAccountApi(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 execute - * @param accountId ID of the account to get (required) - * @param include (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(String accountId, String include, 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 = "/accounts/{accountId}" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("include", include)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String accountId, String include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling execute(Async)"); - } - - return executeCall(accountId, include, _callback); - - } - - /** - * Get Account by Id - * Get an Account from API - * @param accountId ID of the account to get (required) - * @param include (optional) - * @return UnitAccountResponseWithIncluded - * @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 Successful Response -
- */ - public UnitAccountResponseWithIncluded execute(String accountId, String include) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(accountId, include); - return localVarResp.getData(); - } - - /** - * Get Account by Id - * Get an Account from API - * @param accountId ID of the account to get (required) - * @param include (optional) - * @return ApiResponse<UnitAccountResponseWithIncluded> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String accountId, String include) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Account by Id (asynchronously) - * Get an Account from API - * @param accountId ID of the account to get (required) - * @param include (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(String accountId, String include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetAccountLimitsApi.java b/src/main/java/org/openapitools/client/api/GetAccountLimitsApi.java deleted file mode 100644 index 18f138cb..00000000 --- a/src/main/java/org/openapitools/client/api/GetAccountLimitsApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitGetAccountLimitsResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetAccountLimitsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetAccountLimitsApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetAccountLimitsApi(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 execute - * @param accountId ID of the account to get (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 Successful Response -
- */ - public okhttp3.Call executeCall(String accountId, 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 = "/accounts/{accountId}/limits" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling execute(Async)"); - } - - return executeCall(accountId, _callback); - - } - - /** - * Get Account Limits by Id - * Get Account Limits from API - * @param accountId ID of the account to get (required) - * @return UnitGetAccountLimitsResponse - * @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 Successful Response -
- */ - public UnitGetAccountLimitsResponse execute(String accountId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(accountId); - return localVarResp.getData(); - } - - /** - * Get Account Limits by Id - * Get Account Limits from API - * @param accountId ID of the account to get (required) - * @return ApiResponse<UnitGetAccountLimitsResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String accountId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Account Limits by Id (asynchronously) - * Get Account Limits from API - * @param accountId ID of the account to get (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String accountId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetApplicationApi.java b/src/main/java/org/openapitools/client/api/GetApplicationApi.java deleted file mode 100644 index e22bb734..00000000 --- a/src/main/java/org/openapitools/client/api/GetApplicationApi.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitApplicationResponseWithIncluded; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetApplicationApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetApplicationApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetApplicationApi(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 execute - * @param applicationId ID of the application to get (required) - * @param included (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(String applicationId, String included, 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 = "/applications/{applicationId}" - .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (included != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("included", included)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String applicationId, String included, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'applicationId' is set - if (applicationId == null) { - throw new ApiException("Missing the required parameter 'applicationId' when calling execute(Async)"); - } - - return executeCall(applicationId, included, _callback); - - } - - /** - * Get Application by Id - * Get an Application from API - * @param applicationId ID of the application to get (required) - * @param included (optional) - * @return UnitApplicationResponseWithIncluded - * @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 Successful Response -
- */ - public UnitApplicationResponseWithIncluded execute(String applicationId, String included) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(applicationId, included); - return localVarResp.getData(); - } - - /** - * Get Application by Id - * Get an Application from API - * @param applicationId ID of the application to get (required) - * @param included (optional) - * @return ApiResponse<UnitApplicationResponseWithIncluded> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String applicationId, String included) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, included, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Application by Id (asynchronously) - * Get an Application from API - * @param applicationId ID of the application to get (required) - * @param included (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(String applicationId, String included, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, included, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetApplicationFormApi.java b/src/main/java/org/openapitools/client/api/GetApplicationFormApi.java deleted file mode 100644 index 07565302..00000000 --- a/src/main/java/org/openapitools/client/api/GetApplicationFormApi.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitApplicationFormResponseWithIncluded; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetApplicationFormApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetApplicationFormApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetApplicationFormApi(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 execute - * @param applicationFormId ID of the application form to get (required) - * @param included (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(String applicationFormId, String included, 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 = "/application-forms/{applicationFormId}" - .replace("{" + "applicationFormId" + "}", localVarApiClient.escapeString(applicationFormId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (included != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("included", included)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String applicationFormId, String included, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'applicationFormId' is set - if (applicationFormId == null) { - throw new ApiException("Missing the required parameter 'applicationFormId' when calling execute(Async)"); - } - - return executeCall(applicationFormId, included, _callback); - - } - - /** - * Get ApplicationForm by Id - * Get an Application Form from API - * @param applicationFormId ID of the application form to get (required) - * @param included (optional) - * @return UnitApplicationFormResponseWithIncluded - * @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 Successful Response -
- */ - public UnitApplicationFormResponseWithIncluded execute(String applicationFormId, String included) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(applicationFormId, included); - return localVarResp.getData(); - } - - /** - * Get ApplicationForm by Id - * Get an Application Form from API - * @param applicationFormId ID of the application form to get (required) - * @param included (optional) - * @return ApiResponse<UnitApplicationFormResponseWithIncluded> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String applicationFormId, String included) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationFormId, included, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get ApplicationForm by Id (asynchronously) - * Get an Application Form from API - * @param applicationFormId ID of the application form to get (required) - * @param included (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(String applicationFormId, String included, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationFormId, included, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetAtmLocationsListApi.java b/src/main/java/org/openapitools/client/api/GetAtmLocationsListApi.java deleted file mode 100644 index 4f501765..00000000 --- a/src/main/java/org/openapitools/client/api/GetAtmLocationsListApi.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.AtmLocation; -import org.openapitools.client.model.ExecuteFilterParameter15; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetAtmLocationsListApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetAtmLocationsListApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetAtmLocationsListApi(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 execute - * @param filter (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(ExecuteFilterParameter15 filter, 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 = "/atm-locations"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ExecuteFilterParameter15 filter, final ApiCallback _callback) throws ApiException { - return executeCall(filter, _callback); - - } - - /** - * Get List ATM Locations - * Get List ATM Locations from API - * @param filter (optional) - * @return List<AtmLocation> - * @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 Successful Response -
- */ - public List execute(ExecuteFilterParameter15 filter) throws ApiException { - ApiResponse> localVarResp = executeWithHttpInfo(filter); - return localVarResp.getData(); - } - - /** - * Get List ATM Locations - * Get List ATM Locations from API - * @param filter (optional) - * @return ApiResponse<List<AtmLocation>> - * @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 Successful Response -
- */ - public ApiResponse> executeWithHttpInfo(ExecuteFilterParameter15 filter) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(filter, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get List ATM Locations (asynchronously) - * Get List ATM Locations from API - * @param filter (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(ExecuteFilterParameter15 filter, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(filter, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetAuthorizationApi.java b/src/main/java/org/openapitools/client/api/GetAuthorizationApi.java deleted file mode 100644 index e3467ef4..00000000 --- a/src/main/java/org/openapitools/client/api/GetAuthorizationApi.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitAuthorizationResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetAuthorizationApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetAuthorizationApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetAuthorizationApi(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 execute - * @param authorizationId ID of the authorization to get (required) - * @param includeNoneAuthorized (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(String authorizationId, Boolean includeNoneAuthorized, 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 = "/authorizations/{authorizationId}" - .replace("{" + "authorizationId" + "}", localVarApiClient.escapeString(authorizationId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (includeNoneAuthorized != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("includeNoneAuthorized", includeNoneAuthorized)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String authorizationId, Boolean includeNoneAuthorized, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'authorizationId' is set - if (authorizationId == null) { - throw new ApiException("Missing the required parameter 'authorizationId' when calling execute(Async)"); - } - - return executeCall(authorizationId, includeNoneAuthorized, _callback); - - } - - /** - * Get Authorization by Id - * Get a Authorization from API - * @param authorizationId ID of the authorization to get (required) - * @param includeNoneAuthorized (optional) - * @return UnitAuthorizationResponse - * @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 Successful Response -
- */ - public UnitAuthorizationResponse execute(String authorizationId, Boolean includeNoneAuthorized) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(authorizationId, includeNoneAuthorized); - return localVarResp.getData(); - } - - /** - * Get Authorization by Id - * Get a Authorization from API - * @param authorizationId ID of the authorization to get (required) - * @param includeNoneAuthorized (optional) - * @return ApiResponse<UnitAuthorizationResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String authorizationId, Boolean includeNoneAuthorized) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(authorizationId, includeNoneAuthorized, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Authorization by Id (asynchronously) - * Get a Authorization from API - * @param authorizationId ID of the authorization to get (required) - * @param includeNoneAuthorized (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(String authorizationId, Boolean includeNoneAuthorized, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(authorizationId, includeNoneAuthorized, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetAuthorizationRequestApi.java b/src/main/java/org/openapitools/client/api/GetAuthorizationRequestApi.java deleted file mode 100644 index de8dab80..00000000 --- a/src/main/java/org/openapitools/client/api/GetAuthorizationRequestApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitAuthorizationRequestsResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetAuthorizationRequestApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetAuthorizationRequestApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetAuthorizationRequestApi(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 execute - * @param authorizationId ID of the authorization request to get (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 Successful Response -
- */ - public okhttp3.Call executeCall(String authorizationId, 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 = "/authorization-requests/{authorizationId}" - .replace("{" + "authorizationId" + "}", localVarApiClient.escapeString(authorizationId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String authorizationId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'authorizationId' is set - if (authorizationId == null) { - throw new ApiException("Missing the required parameter 'authorizationId' when calling execute(Async)"); - } - - return executeCall(authorizationId, _callback); - - } - - /** - * Get Authorization Request by Id - * Get a Authorization Request from API - * @param authorizationId ID of the authorization request to get (required) - * @return UnitAuthorizationRequestsResponse - * @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 Successful Response -
- */ - public UnitAuthorizationRequestsResponse execute(String authorizationId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(authorizationId); - return localVarResp.getData(); - } - - /** - * Get Authorization Request by Id - * Get a Authorization Request from API - * @param authorizationId ID of the authorization request to get (required) - * @return ApiResponse<UnitAuthorizationRequestsResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String authorizationId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(authorizationId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Authorization Request by Id (asynchronously) - * Get a Authorization Request from API - * @param authorizationId ID of the authorization request to get (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String authorizationId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(authorizationId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetBankVerificationPdfApi.java b/src/main/java/org/openapitools/client/api/GetBankVerificationPdfApi.java deleted file mode 100644 index 59cb7359..00000000 --- a/src/main/java/org/openapitools/client/api/GetBankVerificationPdfApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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 java.io.File; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetBankVerificationPdfApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetBankVerificationPdfApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetBankVerificationPdfApi(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 execute - * @param accountId ID of the account to get (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 Successful Response -
- */ - public okhttp3.Call executeCall(String accountId, 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 = "/statements/{accountId}/bank/pdf" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.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/pdf" - }; - 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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling execute(Async)"); - } - - return executeCall(accountId, _callback); - - } - - /** - * Get Bank verification PDF - * Get Get Bank verification PDF from API - * @param accountId ID of the account to get (required) - * @return File - * @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 Successful Response -
- */ - public File execute(String accountId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(accountId); - return localVarResp.getData(); - } - - /** - * Get Bank verification PDF - * Get Get Bank verification PDF from API - * @param accountId ID of the account to get (required) - * @return ApiResponse<File> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String accountId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Bank verification PDF (asynchronously) - * Get Get Bank verification PDF from API - * @param accountId ID of the account to get (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String accountId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetCardApi.java b/src/main/java/org/openapitools/client/api/GetCardApi.java deleted file mode 100644 index e2d7fd3e..00000000 --- a/src/main/java/org/openapitools/client/api/GetCardApi.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCardResponse1; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetCardApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetCardApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetCardApi(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 execute - * @param cardId ID of the card to get (required) - * @param included (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(String cardId, String included, 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 = "/cards/{cardId}" - .replace("{" + "cardId" + "}", localVarApiClient.escapeString(cardId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (included != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("included", included)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String cardId, String included, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'cardId' is set - if (cardId == null) { - throw new ApiException("Missing the required parameter 'cardId' when calling execute(Async)"); - } - - return executeCall(cardId, included, _callback); - - } - - /** - * Get Card by Id - * Get a Card from API - * @param cardId ID of the card to get (required) - * @param included (optional) - * @return UnitCardResponse1 - * @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 Successful Response -
- */ - public UnitCardResponse1 execute(String cardId, String included) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(cardId, included); - return localVarResp.getData(); - } - - /** - * Get Card by Id - * Get a Card from API - * @param cardId ID of the card to get (required) - * @param included (optional) - * @return ApiResponse<UnitCardResponse1> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String cardId, String included) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(cardId, included, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Card by Id (asynchronously) - * Get a Card from API - * @param cardId ID of the card to get (required) - * @param included (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(String cardId, String included, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(cardId, included, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetCardLimitsApi.java b/src/main/java/org/openapitools/client/api/GetCardLimitsApi.java deleted file mode 100644 index eaf5cad4..00000000 --- a/src/main/java/org/openapitools/client/api/GetCardLimitsApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCardResponse3; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetCardLimitsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetCardLimitsApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetCardLimitsApi(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 execute - * @param cardId ID of the card to get (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 Successful Response -
- */ - public okhttp3.Call executeCall(String cardId, 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 = "/cards/{cardId}/limits" - .replace("{" + "cardId" + "}", localVarApiClient.escapeString(cardId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String cardId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'cardId' is set - if (cardId == null) { - throw new ApiException("Missing the required parameter 'cardId' when calling execute(Async)"); - } - - return executeCall(cardId, _callback); - - } - - /** - * Get Card Limit by Id - * Get a Card Limits from API - * @param cardId ID of the card to get (required) - * @return UnitCardResponse3 - * @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 Successful Response -
- */ - public UnitCardResponse3 execute(String cardId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(cardId); - return localVarResp.getData(); - } - - /** - * Get Card Limit by Id - * Get a Card Limits from API - * @param cardId ID of the card to get (required) - * @return ApiResponse<UnitCardResponse3> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String cardId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(cardId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Card Limit by Id (asynchronously) - * Get a Card Limits from API - * @param cardId ID of the card to get (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String cardId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(cardId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetCardPinStatusApi.java b/src/main/java/org/openapitools/client/api/GetCardPinStatusApi.java deleted file mode 100644 index e5fd3a41..00000000 --- a/src/main/java/org/openapitools/client/api/GetCardPinStatusApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCardResponse2; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetCardPinStatusApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetCardPinStatusApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetCardPinStatusApi(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 execute - * @param cardId ID of the card to get PIN status (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 Successful Response -
- */ - public okhttp3.Call executeCall(String cardId, 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 = "/cards/{cardId}/secure-data/pin/status" - .replace("{" + "cardId" + "}", localVarApiClient.escapeString(cardId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String cardId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'cardId' is set - if (cardId == null) { - throw new ApiException("Missing the required parameter 'cardId' when calling execute(Async)"); - } - - return executeCall(cardId, _callback); - - } - - /** - * Get Card PIN Status - * Get Card PIN Status via API - * @param cardId ID of the card to get PIN status (required) - * @return UnitCardResponse2 - * @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 Successful Response -
- */ - public UnitCardResponse2 execute(String cardId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(cardId); - return localVarResp.getData(); - } - - /** - * Get Card PIN Status - * Get Card PIN Status via API - * @param cardId ID of the card to get PIN status (required) - * @return ApiResponse<UnitCardResponse2> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String cardId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(cardId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Card PIN Status (asynchronously) - * Get Card PIN Status via API - * @param cardId ID of the card to get PIN status (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String cardId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(cardId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetCheckDepositApi.java b/src/main/java/org/openapitools/client/api/GetCheckDepositApi.java deleted file mode 100644 index e3fbdfaa..00000000 --- a/src/main/java/org/openapitools/client/api/GetCheckDepositApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCheckDepositResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetCheckDepositApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetCheckDepositApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetCheckDepositApi(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 execute - * @param checkDepositId ID of the check deposit to get (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 Successful Response -
- */ - public okhttp3.Call executeCall(String checkDepositId, 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 = "/check-deposits/{checkDepositId}" - .replace("{" + "checkDepositId" + "}", localVarApiClient.escapeString(checkDepositId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String checkDepositId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'checkDepositId' is set - if (checkDepositId == null) { - throw new ApiException("Missing the required parameter 'checkDepositId' when calling execute(Async)"); - } - - return executeCall(checkDepositId, _callback); - - } - - /** - * Get Check Deposit by Id - * Get a Check Deposit from API - * @param checkDepositId ID of the check deposit to get (required) - * @return UnitCheckDepositResponse - * @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 Successful Response -
- */ - public UnitCheckDepositResponse execute(String checkDepositId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(checkDepositId); - return localVarResp.getData(); - } - - /** - * Get Check Deposit by Id - * Get a Check Deposit from API - * @param checkDepositId ID of the check deposit to get (required) - * @return ApiResponse<UnitCheckDepositResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String checkDepositId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(checkDepositId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Check Deposit by Id (asynchronously) - * Get a Check Deposit from API - * @param checkDepositId ID of the check deposit to get (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String checkDepositId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(checkDepositId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetCheckDepositBackImageApi.java b/src/main/java/org/openapitools/client/api/GetCheckDepositBackImageApi.java deleted file mode 100644 index bcb4a55a..00000000 --- a/src/main/java/org/openapitools/client/api/GetCheckDepositBackImageApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCheckDepositResponse1; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetCheckDepositBackImageApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetCheckDepositBackImageApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetCheckDepositBackImageApi(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 execute - * @param checkDepositId ID of the check deposit to get (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 Successful Response -
- */ - public okhttp3.Call executeCall(String checkDepositId, 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 = "/check-deposits/{checkDepositId}/back" - .replace("{" + "checkDepositId" + "}", localVarApiClient.escapeString(checkDepositId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String checkDepositId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'checkDepositId' is set - if (checkDepositId == null) { - throw new ApiException("Missing the required parameter 'checkDepositId' when calling execute(Async)"); - } - - return executeCall(checkDepositId, _callback); - - } - - /** - * Get Back Check Deposit Image by Id - * Get Back Check Deposit Image from API - * @param checkDepositId ID of the check deposit to get (required) - * @return UnitCheckDepositResponse1 - * @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 Successful Response -
- */ - public UnitCheckDepositResponse1 execute(String checkDepositId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(checkDepositId); - return localVarResp.getData(); - } - - /** - * Get Back Check Deposit Image by Id - * Get Back Check Deposit Image from API - * @param checkDepositId ID of the check deposit to get (required) - * @return ApiResponse<UnitCheckDepositResponse1> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String checkDepositId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(checkDepositId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Back Check Deposit Image by Id (asynchronously) - * Get Back Check Deposit Image from API - * @param checkDepositId ID of the check deposit to get (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String checkDepositId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(checkDepositId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetCheckDepositFrontImageApi.java b/src/main/java/org/openapitools/client/api/GetCheckDepositFrontImageApi.java deleted file mode 100644 index 15f432be..00000000 --- a/src/main/java/org/openapitools/client/api/GetCheckDepositFrontImageApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCheckDepositResponse1; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetCheckDepositFrontImageApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetCheckDepositFrontImageApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetCheckDepositFrontImageApi(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 execute - * @param checkDepositId ID of the check deposit to get (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 Successful Response -
- */ - public okhttp3.Call executeCall(String checkDepositId, 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 = "/check-deposits/{checkDepositId}/front" - .replace("{" + "checkDepositId" + "}", localVarApiClient.escapeString(checkDepositId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String checkDepositId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'checkDepositId' is set - if (checkDepositId == null) { - throw new ApiException("Missing the required parameter 'checkDepositId' when calling execute(Async)"); - } - - return executeCall(checkDepositId, _callback); - - } - - /** - * Get Front Check Deposit Image by Id - * Get Front Check Deposit Image from API - * @param checkDepositId ID of the check deposit to get (required) - * @return UnitCheckDepositResponse1 - * @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 Successful Response -
- */ - public UnitCheckDepositResponse1 execute(String checkDepositId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(checkDepositId); - return localVarResp.getData(); - } - - /** - * Get Front Check Deposit Image by Id - * Get Front Check Deposit Image from API - * @param checkDepositId ID of the check deposit to get (required) - * @return ApiResponse<UnitCheckDepositResponse1> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String checkDepositId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(checkDepositId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Front Check Deposit Image by Id (asynchronously) - * Get Front Check Deposit Image from API - * @param checkDepositId ID of the check deposit to get (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String checkDepositId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(checkDepositId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetCheckPaymentApi.java b/src/main/java/org/openapitools/client/api/GetCheckPaymentApi.java deleted file mode 100644 index e0c797fd..00000000 --- a/src/main/java/org/openapitools/client/api/GetCheckPaymentApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCheckPaymentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetCheckPaymentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetCheckPaymentApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetCheckPaymentApi(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 execute - * @param checkPaymentId ID of the check payment to get (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 Successful Response -
- */ - public okhttp3.Call executeCall(String checkPaymentId, 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 = "/check-payments/{checkPaymentId}" - .replace("{" + "checkPaymentId" + "}", localVarApiClient.escapeString(checkPaymentId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String checkPaymentId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'checkPaymentId' is set - if (checkPaymentId == null) { - throw new ApiException("Missing the required parameter 'checkPaymentId' when calling execute(Async)"); - } - - return executeCall(checkPaymentId, _callback); - - } - - /** - * Get Check Payment by Id - * Get a Check Payment from API - * @param checkPaymentId ID of the check payment to get (required) - * @return UnitCheckPaymentResponse - * @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 Successful Response -
- */ - public UnitCheckPaymentResponse execute(String checkPaymentId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(checkPaymentId); - return localVarResp.getData(); - } - - /** - * Get Check Payment by Id - * Get a Check Payment from API - * @param checkPaymentId ID of the check payment to get (required) - * @return ApiResponse<UnitCheckPaymentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String checkPaymentId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Check Payment by Id (asynchronously) - * Get a Check Payment from API - * @param checkPaymentId ID of the check payment to get (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String checkPaymentId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetCounterpartyApi.java b/src/main/java/org/openapitools/client/api/GetCounterpartyApi.java deleted file mode 100644 index e35ca831..00000000 --- a/src/main/java/org/openapitools/client/api/GetCounterpartyApi.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCounterpartyResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetCounterpartyApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetCounterpartyApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetCounterpartyApi(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 execute - * @param counterpartyId ID of the counterparty to get (required) - * @param included (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(String counterpartyId, String included, 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 = "/counterparties/{counterpartyId}" - .replace("{" + "counterpartyId" + "}", localVarApiClient.escapeString(counterpartyId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (included != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("included", included)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String counterpartyId, String included, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'counterpartyId' is set - if (counterpartyId == null) { - throw new ApiException("Missing the required parameter 'counterpartyId' when calling execute(Async)"); - } - - return executeCall(counterpartyId, included, _callback); - - } - - /** - * Get Counterparty by Id - * Get a Counterparty from API - * @param counterpartyId ID of the counterparty to get (required) - * @param included (optional) - * @return UnitCounterpartyResponse - * @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 Successful Response -
- */ - public UnitCounterpartyResponse execute(String counterpartyId, String included) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(counterpartyId, included); - return localVarResp.getData(); - } - - /** - * Get Counterparty by Id - * Get a Counterparty from API - * @param counterpartyId ID of the counterparty to get (required) - * @param included (optional) - * @return ApiResponse<UnitCounterpartyResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String counterpartyId, String included) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(counterpartyId, included, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Counterparty by Id (asynchronously) - * Get a Counterparty from API - * @param counterpartyId ID of the counterparty to get (required) - * @param included (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(String counterpartyId, String included, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(counterpartyId, included, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetCounterpartyBalanceApi.java b/src/main/java/org/openapitools/client/api/GetCounterpartyBalanceApi.java deleted file mode 100644 index caa58047..00000000 --- a/src/main/java/org/openapitools/client/api/GetCounterpartyBalanceApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCounterpartyResponse1; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetCounterpartyBalanceApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetCounterpartyBalanceApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetCounterpartyBalanceApi(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 execute - * @param counterpartyId ID of the counterparty to get (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 Successful Response -
- */ - public okhttp3.Call executeCall(String counterpartyId, 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 = "/counterparties/{counterpartyId}/balance" - .replace("{" + "counterpartyId" + "}", localVarApiClient.escapeString(counterpartyId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String counterpartyId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'counterpartyId' is set - if (counterpartyId == null) { - throw new ApiException("Missing the required parameter 'counterpartyId' when calling execute(Async)"); - } - - return executeCall(counterpartyId, _callback); - - } - - /** - * Get Counterparty Balance - * Get Recurring Payment from API - * @param counterpartyId ID of the counterparty to get (required) - * @return UnitCounterpartyResponse1 - * @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 Successful Response -
- */ - public UnitCounterpartyResponse1 execute(String counterpartyId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(counterpartyId); - return localVarResp.getData(); - } - - /** - * Get Counterparty Balance - * Get Recurring Payment from API - * @param counterpartyId ID of the counterparty to get (required) - * @return ApiResponse<UnitCounterpartyResponse1> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String counterpartyId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(counterpartyId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Counterparty Balance (asynchronously) - * Get Recurring Payment from API - * @param counterpartyId ID of the counterparty to get (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String counterpartyId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(counterpartyId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetCustomerApi.java b/src/main/java/org/openapitools/client/api/GetCustomerApi.java deleted file mode 100644 index f032fdc9..00000000 --- a/src/main/java/org/openapitools/client/api/GetCustomerApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCustomerResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetCustomerApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetCustomerApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetCustomerApi(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 execute - * @param customerId ID of the customer to get (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 Successful Response -
- */ - public okhttp3.Call executeCall(String customerId, 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 = "/customers/{customerId}" - .replace("{" + "customerId" + "}", localVarApiClient.escapeString(customerId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String customerId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'customerId' is set - if (customerId == null) { - throw new ApiException("Missing the required parameter 'customerId' when calling execute(Async)"); - } - - return executeCall(customerId, _callback); - - } - - /** - * Get Customer by Id - * Get a Customer from API - * @param customerId ID of the customer to get (required) - * @return UnitCustomerResponse - * @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 Successful Response -
- */ - public UnitCustomerResponse execute(String customerId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(customerId); - return localVarResp.getData(); - } - - /** - * Get Customer by Id - * Get a Customer from API - * @param customerId ID of the customer to get (required) - * @return ApiResponse<UnitCustomerResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String customerId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Customer by Id (asynchronously) - * Get a Customer from API - * @param customerId ID of the customer to get (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String customerId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetDisputeApi.java b/src/main/java/org/openapitools/client/api/GetDisputeApi.java deleted file mode 100644 index 8d9efcfb..00000000 --- a/src/main/java/org/openapitools/client/api/GetDisputeApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitDisputeResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetDisputeApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetDisputeApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetDisputeApi(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 execute - * @param disputeId ID of the dispute to get (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 Successful Response -
- */ - public okhttp3.Call executeCall(String disputeId, 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 = "/disputes/{disputeId}" - .replace("{" + "disputeId" + "}", localVarApiClient.escapeString(disputeId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String disputeId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'disputeId' is set - if (disputeId == null) { - throw new ApiException("Missing the required parameter 'disputeId' when calling execute(Async)"); - } - - return executeCall(disputeId, _callback); - - } - - /** - * Get Dispute by Id - * Get a Dispute from API - * @param disputeId ID of the dispute to get (required) - * @return UnitDisputeResponse - * @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 Successful Response -
- */ - public UnitDisputeResponse execute(String disputeId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(disputeId); - return localVarResp.getData(); - } - - /** - * Get Dispute by Id - * Get a Dispute from API - * @param disputeId ID of the dispute to get (required) - * @return ApiResponse<UnitDisputeResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String disputeId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(disputeId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Dispute by Id (asynchronously) - * Get a Dispute from API - * @param disputeId ID of the dispute to get (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String disputeId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(disputeId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetEventApi.java b/src/main/java/org/openapitools/client/api/GetEventApi.java deleted file mode 100644 index 3db525b3..00000000 --- a/src/main/java/org/openapitools/client/api/GetEventApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitEventResponse1; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetEventApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetEventApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetEventApi(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 execute - * @param eventId ID of the event to get (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 Successful Response -
- */ - public okhttp3.Call executeCall(String eventId, 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 = "/events/{eventId}" - .replace("{" + "eventId" + "}", localVarApiClient.escapeString(eventId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String eventId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'eventId' is set - if (eventId == null) { - throw new ApiException("Missing the required parameter 'eventId' when calling execute(Async)"); - } - - return executeCall(eventId, _callback); - - } - - /** - * Get Event by Id - * Get an Event from API - * @param eventId ID of the event to get (required) - * @return UnitEventResponse1 - * @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 Successful Response -
- */ - public UnitEventResponse1 execute(String eventId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(eventId); - return localVarResp.getData(); - } - - /** - * Get Event by Id - * Get an Event from API - * @param eventId ID of the event to get (required) - * @return ApiResponse<UnitEventResponse1> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String eventId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(eventId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Event by Id (asynchronously) - * Get an Event from API - * @param eventId ID of the event to get (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String eventId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(eventId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetInstitutionApi.java b/src/main/java/org/openapitools/client/api/GetInstitutionApi.java deleted file mode 100644 index 9466a71d..00000000 --- a/src/main/java/org/openapitools/client/api/GetInstitutionApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitInstitutionResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetInstitutionApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetInstitutionApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetInstitutionApi(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 execute - * @param routingNumber routingNumber of the institution to get (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 Successful Response -
- */ - public okhttp3.Call executeCall(String routingNumber, 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 = "/institutions/{routingNumber}" - .replace("{" + "routingNumber" + "}", localVarApiClient.escapeString(routingNumber.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String routingNumber, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'routingNumber' is set - if (routingNumber == null) { - throw new ApiException("Missing the required parameter 'routingNumber' when calling execute(Async)"); - } - - return executeCall(routingNumber, _callback); - - } - - /** - * Get Institution by Routing Number - * Get an Institution from API - * @param routingNumber routingNumber of the institution to get (required) - * @return UnitInstitutionResponse - * @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 Successful Response -
- */ - public UnitInstitutionResponse execute(String routingNumber) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(routingNumber); - return localVarResp.getData(); - } - - /** - * Get Institution by Routing Number - * Get an Institution from API - * @param routingNumber routingNumber of the institution to get (required) - * @return ApiResponse<UnitInstitutionResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String routingNumber) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(routingNumber, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Institution by Routing Number (asynchronously) - * Get an Institution from API - * @param routingNumber routingNumber of the institution to get (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String routingNumber, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(routingNumber, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListAccountEndOfDayBalancesHistoryApi.java b/src/main/java/org/openapitools/client/api/GetListAccountEndOfDayBalancesHistoryApi.java deleted file mode 100644 index 448d81e0..00000000 --- a/src/main/java/org/openapitools/client/api/GetListAccountEndOfDayBalancesHistoryApi.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitGetAccountEndOfDayListResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListAccountEndOfDayBalancesHistoryApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListAccountEndOfDayBalancesHistoryApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListAccountEndOfDayBalancesHistoryApi(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 execute - * @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 Successful Response -
0 -
- */ - public okhttp3.Call executeCall(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 = "/account-end-of-day"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return executeCall(_callback); - - } - - /** - * Get AccountEndOfDay List - * Get AccountEndOfDay List from API - * @return UnitGetAccountEndOfDayListResponse - * @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 Successful Response -
0 -
- */ - public UnitGetAccountEndOfDayListResponse execute() throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Get AccountEndOfDay List - * Get AccountEndOfDay List from API - * @return ApiResponse<UnitGetAccountEndOfDayListResponse> - * @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 Successful Response -
0 -
- */ - public ApiResponse executeWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get AccountEndOfDay List (asynchronously) - * Get AccountEndOfDay List from API - * @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 Successful Response -
0 -
- */ - public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListAccountsApi.java b/src/main/java/org/openapitools/client/api/GetListAccountsApi.java deleted file mode 100644 index bb7a1d34..00000000 --- a/src/main/java/org/openapitools/client/api/GetListAccountsApi.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ExecuteFilterParameter2; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.UnitAccountsListResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListAccountsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListAccountsApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListAccountsApi(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 execute - * @param page (optional) - * @param filter (optional) - * @param include (optional) - * @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 Successful Response -
401 -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter2 filter, String include, 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 = "/accounts"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - if (include != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("include", include)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter2 filter, String include, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, include, _callback); - - } - - /** - * Get List Accounts - * Get List Accounts from API - * @param page (optional) - * @param filter (optional) - * @param include (optional) - * @return UnitAccountsListResponse - * @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 Successful Response -
401 -
- */ - public UnitAccountsListResponse execute(ListPageParametersObject page, ExecuteFilterParameter2 filter, String include) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter, include); - return localVarResp.getData(); - } - - /** - * Get List Accounts - * Get List Accounts from API - * @param page (optional) - * @param filter (optional) - * @param include (optional) - * @return ApiResponse<UnitAccountsListResponse> - * @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 Successful Response -
401 -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter2 filter, String include) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get List Accounts (asynchronously) - * Get List Accounts from API - * @param page (optional) - * @param filter (optional) - * @param include (optional) - * @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 Successful Response -
401 -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter2 filter, String include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListApplicationFormsApi.java b/src/main/java/org/openapitools/client/api/GetListApplicationFormsApi.java deleted file mode 100644 index 4f1c4423..00000000 --- a/src/main/java/org/openapitools/client/api/GetListApplicationFormsApi.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ExecuteFilterParameter1; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.UnitApplicationFormsListResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListApplicationFormsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListApplicationFormsApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListApplicationFormsApi(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 execute - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter1 filter, String sort, 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 = "/application-forms"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - if (sort != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter1 filter, String sort, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, sort, _callback); - - } - - /** - * Get List Application Forms - * Get List Application Forms from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @return UnitApplicationFormsListResponse - * @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 Successful Response -
- */ - public UnitApplicationFormsListResponse execute(ListPageParametersObject page, ExecuteFilterParameter1 filter, String sort) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter, sort); - return localVarResp.getData(); - } - - /** - * Get List Application Forms - * Get List Application Forms from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @return ApiResponse<UnitApplicationFormsListResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter1 filter, String sort) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get List Application Forms (asynchronously) - * Get List Application Forms from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter1 filter, String sort, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListApplicationsApi.java b/src/main/java/org/openapitools/client/api/GetListApplicationsApi.java deleted file mode 100644 index 0e4ef257..00000000 --- a/src/main/java/org/openapitools/client/api/GetListApplicationsApi.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ExecuteFilterParameter; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.UnitListApplicationsResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListApplicationsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListApplicationsApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListApplicationsApi(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 execute - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @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 Successful Response -
0 Unexpected error -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter filter, String sort, 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 = "/applications"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - if (sort != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); - } - - final String[] localVarAccepts = { - "application/vnd.api+json", - "application/json" - }; - 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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter filter, String sort, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, sort, _callback); - - } - - /** - * Get List Application - * Get List Applications from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @return UnitListApplicationsResponse - * @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 Successful Response -
0 Unexpected error -
- */ - public UnitListApplicationsResponse execute(ListPageParametersObject page, ExecuteFilterParameter filter, String sort) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter, sort); - return localVarResp.getData(); - } - - /** - * Get List Application - * Get List Applications from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @return ApiResponse<UnitListApplicationsResponse> - * @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 Successful Response -
0 Unexpected error -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter filter, String sort) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get List Application (asynchronously) - * Get List Applications from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @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 Successful Response -
0 Unexpected error -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter filter, String sort, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListAuthorizationRequestsApi.java b/src/main/java/org/openapitools/client/api/GetListAuthorizationRequestsApi.java deleted file mode 100644 index f1d2d28d..00000000 --- a/src/main/java/org/openapitools/client/api/GetListAuthorizationRequestsApi.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ExecuteFilterParameter9; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.UnitListAuthorizationRequestsResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListAuthorizationRequestsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListAuthorizationRequestsApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListAuthorizationRequestsApi(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 execute - * @param page (optional) - * @param filter (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter9 filter, 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 = "/authorization-requests"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter9 filter, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, _callback); - - } - - /** - * Get List Authorization Requests - * Get List Authorization Requests from API - * @param page (optional) - * @param filter (optional) - * @return UnitListAuthorizationRequestsResponse - * @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 Successful Response -
- */ - public UnitListAuthorizationRequestsResponse execute(ListPageParametersObject page, ExecuteFilterParameter9 filter) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter); - return localVarResp.getData(); - } - - /** - * Get List Authorization Requests - * Get List Authorization Requests from API - * @param page (optional) - * @param filter (optional) - * @return ApiResponse<UnitListAuthorizationRequestsResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter9 filter) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get List Authorization Requests (asynchronously) - * Get List Authorization Requests from API - * @param page (optional) - * @param filter (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter9 filter, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListAuthorizationsApi.java b/src/main/java/org/openapitools/client/api/GetListAuthorizationsApi.java deleted file mode 100644 index da39780e..00000000 --- a/src/main/java/org/openapitools/client/api/GetListAuthorizationsApi.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ExecuteFilterParameter8; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.UnitListAuthorizationsResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListAuthorizationsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListAuthorizationsApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListAuthorizationsApi(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 execute - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter8 filter, String sort, 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 = "/authorizations"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - if (sort != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter8 filter, String sort, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, sort, _callback); - - } - - /** - * Get List authorizations - * Get List Authorizations from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @return UnitListAuthorizationsResponse - * @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 Successful Response -
- */ - public UnitListAuthorizationsResponse execute(ListPageParametersObject page, ExecuteFilterParameter8 filter, String sort) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter, sort); - return localVarResp.getData(); - } - - /** - * Get List authorizations - * Get List Authorizations from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @return ApiResponse<UnitListAuthorizationsResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter8 filter, String sort) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get List authorizations (asynchronously) - * Get List Authorizations from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter8 filter, String sort, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListCheckDepositsApi.java b/src/main/java/org/openapitools/client/api/GetListCheckDepositsApi.java deleted file mode 100644 index 8519764a..00000000 --- a/src/main/java/org/openapitools/client/api/GetListCheckDepositsApi.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ExecuteFilterParameter13; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.UnitListCheckDepositsResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListCheckDepositsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListCheckDepositsApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListCheckDepositsApi(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 execute - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @param include (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter13 filter, String sort, String include, 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 = "/check-deposits"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - if (sort != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); - } - - if (include != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("include", include)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter13 filter, String sort, String include, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, sort, include, _callback); - - } - - /** - * Get List Check Deposits - * Get List Check Deposits from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @param include (optional) - * @return UnitListCheckDepositsResponse - * @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 Successful Response -
- */ - public UnitListCheckDepositsResponse execute(ListPageParametersObject page, ExecuteFilterParameter13 filter, String sort, String include) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter, sort, include); - return localVarResp.getData(); - } - - /** - * Get List Check Deposits - * Get List Check Deposits from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @param include (optional) - * @return ApiResponse<UnitListCheckDepositsResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter13 filter, String sort, String include) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get List Check Deposits (asynchronously) - * Get List Check Deposits from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @param include (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter13 filter, String sort, String include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListCheckPaymentsApi.java b/src/main/java/org/openapitools/client/api/GetListCheckPaymentsApi.java deleted file mode 100644 index f7f26310..00000000 --- a/src/main/java/org/openapitools/client/api/GetListCheckPaymentsApi.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ExecuteFilterParameter19; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.UnitListCheckPaymentsResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListCheckPaymentsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListCheckPaymentsApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListCheckPaymentsApi(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 execute - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @param include (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter19 filter, String sort, String include, 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 = "/check-payments"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - if (sort != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); - } - - if (include != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("include", include)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter19 filter, String sort, String include, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, sort, include, _callback); - - } - - /** - * Get List Check Payments - * Get List Check Payments from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @param include (optional) - * @return UnitListCheckPaymentsResponse - * @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 Successful Response -
- */ - public UnitListCheckPaymentsResponse execute(ListPageParametersObject page, ExecuteFilterParameter19 filter, String sort, String include) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter, sort, include); - return localVarResp.getData(); - } - - /** - * Get List Check Payments - * Get List Check Payments from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @param include (optional) - * @return ApiResponse<UnitListCheckPaymentsResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter19 filter, String sort, String include) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get List Check Payments (asynchronously) - * Get List Check Payments from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @param include (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter19 filter, String sort, String include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListCounterpartiesApi.java b/src/main/java/org/openapitools/client/api/GetListCounterpartiesApi.java deleted file mode 100644 index 9e15d84d..00000000 --- a/src/main/java/org/openapitools/client/api/GetListCounterpartiesApi.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ExecuteFilterParameter5; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.UnitCounterpartiesListResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListCounterpartiesApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListCounterpartiesApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListCounterpartiesApi(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 execute - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter5 filter, String sort, 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 = "/counterparties"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - if (sort != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter5 filter, String sort, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, sort, _callback); - - } - - /** - * Get Counterparties List - * Get Counterparties List from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @return UnitCounterpartiesListResponse - * @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 Successful Response -
- */ - public UnitCounterpartiesListResponse execute(ListPageParametersObject page, ExecuteFilterParameter5 filter, String sort) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter, sort); - return localVarResp.getData(); - } - - /** - * Get Counterparties List - * Get Counterparties List from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @return ApiResponse<UnitCounterpartiesListResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter5 filter, String sort) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Counterparties List (asynchronously) - * Get Counterparties List from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter5 filter, String sort, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListCustomersApi.java b/src/main/java/org/openapitools/client/api/GetListCustomersApi.java deleted file mode 100644 index ceb9ea34..00000000 --- a/src/main/java/org/openapitools/client/api/GetListCustomersApi.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ExecuteFilterParameter3; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.UnitCustomersListResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListCustomersApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListCustomersApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListCustomersApi(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 execute - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter3 filter, String sort, 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 = "/customers"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - if (sort != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter3 filter, String sort, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, sort, _callback); - - } - - /** - * Get Customers List - * Get Customers List from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @return UnitCustomersListResponse - * @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 Successful Response -
- */ - public UnitCustomersListResponse execute(ListPageParametersObject page, ExecuteFilterParameter3 filter, String sort) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter, sort); - return localVarResp.getData(); - } - - /** - * Get Customers List - * Get Customers List from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @return ApiResponse<UnitCustomersListResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter3 filter, String sort) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Customers List (asynchronously) - * Get Customers List from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter3 filter, String sort, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListDisputesApi.java b/src/main/java/org/openapitools/client/api/GetListDisputesApi.java deleted file mode 100644 index 331bf3fd..00000000 --- a/src/main/java/org/openapitools/client/api/GetListDisputesApi.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.Dispute; -import org.openapitools.client.model.ExecuteFilterParameter17; -import org.openapitools.client.model.ListPageParametersObject; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListDisputesApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListDisputesApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListDisputesApi(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 execute - * @param page (optional) - * @param filter (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter17 filter, 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 = "/disputes"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter17 filter, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, _callback); - - } - - /** - * Get List Disputes - * Get List Disputes from API - * @param page (optional) - * @param filter (optional) - * @return List<Dispute> - * @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 Successful Response -
- */ - public List execute(ListPageParametersObject page, ExecuteFilterParameter17 filter) throws ApiException { - ApiResponse> localVarResp = executeWithHttpInfo(page, filter); - return localVarResp.getData(); - } - - /** - * Get List Disputes - * Get List Disputes from API - * @param page (optional) - * @param filter (optional) - * @return ApiResponse<List<Dispute>> - * @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 Successful Response -
- */ - public ApiResponse> executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter17 filter) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get List Disputes (asynchronously) - * Get List Disputes from API - * @param page (optional) - * @param filter (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter17 filter, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListEventsApi.java b/src/main/java/org/openapitools/client/api/GetListEventsApi.java deleted file mode 100644 index 80f629b9..00000000 --- a/src/main/java/org/openapitools/client/api/GetListEventsApi.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ExecuteFilterParameter12; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.UnitEventListResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListEventsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListEventsApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListEventsApi(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 execute - * @param page (optional) - * @param filter (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter12 filter, 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 = "/events"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter12 filter, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, _callback); - - } - - /** - * Get Events List - * Get Events List from API - * @param page (optional) - * @param filter (optional) - * @return UnitEventListResponse - * @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 Successful Response -
- */ - public UnitEventListResponse execute(ListPageParametersObject page, ExecuteFilterParameter12 filter) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter); - return localVarResp.getData(); - } - - /** - * Get Events List - * Get Events List from API - * @param page (optional) - * @param filter (optional) - * @return ApiResponse<UnitEventListResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter12 filter) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Events List (asynchronously) - * Get Events List from API - * @param page (optional) - * @param filter (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter12 filter, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListOfCardsApi.java b/src/main/java/org/openapitools/client/api/GetListOfCardsApi.java deleted file mode 100644 index 0a1a2135..00000000 --- a/src/main/java/org/openapitools/client/api/GetListOfCardsApi.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ExecuteFilterParameter7; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.UnitCardResponseCardsList; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListOfCardsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListOfCardsApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListOfCardsApi(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 execute - * @param page (optional) - * @param filter (optional) - * @param include (optional) - * @param sort (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter7 filter, String include, String sort, 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 = "/cards"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - if (include != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("include", include)); - } - - if (sort != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter7 filter, String include, String sort, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, include, sort, _callback); - - } - - /** - * Get List of Cards - * Get List of Cards from API - * @param page (optional) - * @param filter (optional) - * @param include (optional) - * @param sort (optional) - * @return UnitCardResponseCardsList - * @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 Successful Response -
- */ - public UnitCardResponseCardsList execute(ListPageParametersObject page, ExecuteFilterParameter7 filter, String include, String sort) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter, include, sort); - return localVarResp.getData(); - } - - /** - * Get List of Cards - * Get List of Cards from API - * @param page (optional) - * @param filter (optional) - * @param include (optional) - * @param sort (optional) - * @return ApiResponse<UnitCardResponseCardsList> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter7 filter, String include, String sort) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, include, sort, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get List of Cards (asynchronously) - * Get List of Cards from API - * @param page (optional) - * @param filter (optional) - * @param include (optional) - * @param sort (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter7 filter, String include, String sort, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, include, sort, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListOfDocumentsApi.java b/src/main/java/org/openapitools/client/api/GetListOfDocumentsApi.java deleted file mode 100644 index afe4a046..00000000 --- a/src/main/java/org/openapitools/client/api/GetListOfDocumentsApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitListDocumentsResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListOfDocumentsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListOfDocumentsApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListOfDocumentsApi(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 execute - * @param applicationId ID of the application to get documents for (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 Successful Response -
- */ - public okhttp3.Call executeCall(String applicationId, 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 = "/applications/{applicationId}/documents" - .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String applicationId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'applicationId' is set - if (applicationId == null) { - throw new ApiException("Missing the required parameter 'applicationId' when calling execute(Async)"); - } - - return executeCall(applicationId, _callback); - - } - - /** - * Get List of Documents - * Get List of Documents via API - * @param applicationId ID of the application to get documents for (required) - * @return UnitListDocumentsResponse - * @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 Successful Response -
- */ - public UnitListDocumentsResponse execute(String applicationId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(applicationId); - return localVarResp.getData(); - } - - /** - * Get List of Documents - * Get List of Documents via API - * @param applicationId ID of the application to get documents for (required) - * @return ApiResponse<UnitListDocumentsResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String applicationId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get List of Documents (asynchronously) - * Get List of Documents via API - * @param applicationId ID of the application to get documents for (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String applicationId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListOrgApiTokensApi.java b/src/main/java/org/openapitools/client/api/GetListOrgApiTokensApi.java deleted file mode 100644 index 2b84e569..00000000 --- a/src/main/java/org/openapitools/client/api/GetListOrgApiTokensApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitOrgApiTokensListResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListOrgApiTokensApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListOrgApiTokensApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListOrgApiTokensApi(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 execute - * @param userId ID of the user to revoke token (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 Successful Response -
- */ - public okhttp3.Call executeCall(String userId, 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 = "/users/{userId}/api-tokens" - .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling execute(Async)"); - } - - return executeCall(userId, _callback); - - } - - /** - * Get List Org API Tokens - * Get List Org API Tokens from API - * @param userId ID of the user to revoke token (required) - * @return UnitOrgApiTokensListResponse - * @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 Successful Response -
- */ - public UnitOrgApiTokensListResponse execute(String userId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(userId); - return localVarResp.getData(); - } - - /** - * Get List Org API Tokens - * Get List Org API Tokens from API - * @param userId ID of the user to revoke token (required) - * @return ApiResponse<UnitOrgApiTokensListResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String userId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(userId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get List Org API Tokens (asynchronously) - * Get List Org API Tokens from API - * @param userId ID of the user to revoke token (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String userId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(userId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListPaymentsApi.java b/src/main/java/org/openapitools/client/api/GetListPaymentsApi.java deleted file mode 100644 index 34e4d403..00000000 --- a/src/main/java/org/openapitools/client/api/GetListPaymentsApi.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ExecuteFilterParameter4; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.UnitPaymentsListResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListPaymentsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListPaymentsApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListPaymentsApi(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 execute - * @param page (optional) - * @param filter (optional) - * @param include (optional) - * @param sort (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter4 filter, String include, String sort, 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 = "/payments"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - if (include != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("include", include)); - } - - if (sort != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter4 filter, String include, String sort, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, include, sort, _callback); - - } - - /** - * Get List Payments - * Get List Payments from API - * @param page (optional) - * @param filter (optional) - * @param include (optional) - * @param sort (optional) - * @return UnitPaymentsListResponse - * @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 Successful Response -
- */ - public UnitPaymentsListResponse execute(ListPageParametersObject page, ExecuteFilterParameter4 filter, String include, String sort) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter, include, sort); - return localVarResp.getData(); - } - - /** - * Get List Payments - * Get List Payments from API - * @param page (optional) - * @param filter (optional) - * @param include (optional) - * @param sort (optional) - * @return ApiResponse<UnitPaymentsListResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter4 filter, String include, String sort) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, include, sort, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get List Payments (asynchronously) - * Get List Payments from API - * @param page (optional) - * @param filter (optional) - * @param include (optional) - * @param sort (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter4 filter, String include, String sort, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, include, sort, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListRecurringPaymentsApi.java b/src/main/java/org/openapitools/client/api/GetListRecurringPaymentsApi.java deleted file mode 100644 index b5c4057a..00000000 --- a/src/main/java/org/openapitools/client/api/GetListRecurringPaymentsApi.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ExecuteFilterParameter6; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.UnitRecurringPaymentListResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListRecurringPaymentsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListRecurringPaymentsApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListRecurringPaymentsApi(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 execute - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter6 filter, String sort, 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 = "/recurring-payments"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - if (sort != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter6 filter, String sort, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, sort, _callback); - - } - - /** - * Get Recurring Payments List - * Get Recurring Payments List from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @return UnitRecurringPaymentListResponse - * @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 Successful Response -
- */ - public UnitRecurringPaymentListResponse execute(ListPageParametersObject page, ExecuteFilterParameter6 filter, String sort) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter, sort); - return localVarResp.getData(); - } - - /** - * Get Recurring Payments List - * Get Recurring Payments List from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @return ApiResponse<UnitRecurringPaymentListResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter6 filter, String sort) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Recurring Payments List (asynchronously) - * Get Recurring Payments List from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter6 filter, String sort, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListRepaymentsApi.java b/src/main/java/org/openapitools/client/api/GetListRepaymentsApi.java deleted file mode 100644 index fd4e0abf..00000000 --- a/src/main/java/org/openapitools/client/api/GetListRepaymentsApi.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ExecuteFilterParameter18; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.UnitRepaymentsListResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListRepaymentsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListRepaymentsApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListRepaymentsApi(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 execute - * @param page (optional) - * @param filter (optional) - * @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 Successful Response -
401 -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter18 filter, 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 = "/repayments"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter18 filter, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, _callback); - - } - - /** - * Get List Repayments - * Get List Repayments from API - * @param page (optional) - * @param filter (optional) - * @return UnitRepaymentsListResponse - * @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 Successful Response -
401 -
- */ - public UnitRepaymentsListResponse execute(ListPageParametersObject page, ExecuteFilterParameter18 filter) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter); - return localVarResp.getData(); - } - - /** - * Get List Repayments - * Get List Repayments from API - * @param page (optional) - * @param filter (optional) - * @return ApiResponse<UnitRepaymentsListResponse> - * @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 Successful Response -
401 -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter18 filter) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get List Repayments (asynchronously) - * Get List Repayments from API - * @param page (optional) - * @param filter (optional) - * @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 Successful Response -
401 -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter18 filter, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListRewardsApi.java b/src/main/java/org/openapitools/client/api/GetListRewardsApi.java deleted file mode 100644 index 6c0d1eaa..00000000 --- a/src/main/java/org/openapitools/client/api/GetListRewardsApi.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ExecuteFilterParameter11; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.UnitRewardsListResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListRewardsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListRewardsApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListRewardsApi(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 execute - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @param include (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter11 filter, String sort, String include, 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 = "/rewards"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - if (sort != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); - } - - if (include != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("include", include)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter11 filter, String sort, String include, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, sort, include, _callback); - - } - - /** - * Get Rewards List - * Get Rewards List from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @param include (optional) - * @return UnitRewardsListResponse - * @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 Successful Response -
- */ - public UnitRewardsListResponse execute(ListPageParametersObject page, ExecuteFilterParameter11 filter, String sort, String include) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter, sort, include); - return localVarResp.getData(); - } - - /** - * Get Rewards List - * Get Rewards List from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @param include (optional) - * @return ApiResponse<UnitRewardsListResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter11 filter, String sort, String include) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Rewards List (asynchronously) - * Get Rewards List from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @param include (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter11 filter, String sort, String include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListStatementsApi.java b/src/main/java/org/openapitools/client/api/GetListStatementsApi.java deleted file mode 100644 index decea2da..00000000 --- a/src/main/java/org/openapitools/client/api/GetListStatementsApi.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ExecuteFilterParameter10; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.UnitStatementsResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListStatementsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListStatementsApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListStatementsApi(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 execute - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter10 filter, String sort, 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 = "/statements"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - if (sort != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter10 filter, String sort, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, sort, _callback); - - } - - /** - * Get List Statements - * Get List Statements from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @return UnitStatementsResponse - * @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 Successful Response -
- */ - public UnitStatementsResponse execute(ListPageParametersObject page, ExecuteFilterParameter10 filter, String sort) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter, sort); - return localVarResp.getData(); - } - - /** - * Get List Statements - * Get List Statements from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @return ApiResponse<UnitStatementsResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter10 filter, String sort) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get List Statements (asynchronously) - * Get List Statements from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter10 filter, String sort, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListTransactionsApi.java b/src/main/java/org/openapitools/client/api/GetListTransactionsApi.java deleted file mode 100644 index 04a42b05..00000000 --- a/src/main/java/org/openapitools/client/api/GetListTransactionsApi.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ExecuteFilterParameter16; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.UnitTransactionsListResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListTransactionsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListTransactionsApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListTransactionsApi(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 execute - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @param include (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter16 filter, String sort, String include, 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 = "/transactions"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - if (sort != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); - } - - if (include != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("include", include)); - } - - final String[] localVarAccepts = { - "application/vnd.api+json" - }; - 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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter16 filter, String sort, String include, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, sort, include, _callback); - - } - - /** - * Get List Transactions - * Get List Transactions from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @param include (optional) - * @return UnitTransactionsListResponse - * @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 Successful Response -
- */ - public UnitTransactionsListResponse execute(ListPageParametersObject page, ExecuteFilterParameter16 filter, String sort, String include) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter, sort, include); - return localVarResp.getData(); - } - - /** - * Get List Transactions - * Get List Transactions from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @param include (optional) - * @return ApiResponse<UnitTransactionsListResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter16 filter, String sort, String include) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get List Transactions (asynchronously) - * Get List Transactions from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @param include (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter16 filter, String sort, String include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetListWebhooksApi.java b/src/main/java/org/openapitools/client/api/GetListWebhooksApi.java deleted file mode 100644 index b72a8c4c..00000000 --- a/src/main/java/org/openapitools/client/api/GetListWebhooksApi.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ExecuteFilterParameter14; -import org.openapitools.client.model.ListPageParametersObject; -import org.openapitools.client.model.UnitWebhooksListResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetListWebhooksApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetListWebhooksApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetListWebhooksApi(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 execute - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(ListPageParametersObject page, ExecuteFilterParameter14 filter, String sort, 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 = "/webhooks"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(page.toParams()); - } - - if (filter != null) { - localVarQueryParams.addAll(filter.toParams()); - } - - if (sort != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); - } - - final String[] localVarAccepts = { - "application/vnd.api+json" - }; - 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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(ListPageParametersObject page, ExecuteFilterParameter14 filter, String sort, final ApiCallback _callback) throws ApiException { - return executeCall(page, filter, sort, _callback); - - } - - /** - * Get List Webhooks - * Get List Webhooks from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @return UnitWebhooksListResponse - * @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 Successful Response -
- */ - public UnitWebhooksListResponse execute(ListPageParametersObject page, ExecuteFilterParameter14 filter, String sort) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(page, filter, sort); - return localVarResp.getData(); - } - - /** - * Get List Webhooks - * Get List Webhooks from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @return ApiResponse<UnitWebhooksListResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter14 filter, String sort) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get List Webhooks (asynchronously) - * Get List Webhooks from API - * @param page (optional) - * @param filter (optional) - * @param sort (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(ListPageParametersObject page, ExecuteFilterParameter14 filter, String sort, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(page, filter, sort, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetPaymentApi.java b/src/main/java/org/openapitools/client/api/GetPaymentApi.java deleted file mode 100644 index dd08ea21..00000000 --- a/src/main/java/org/openapitools/client/api/GetPaymentApi.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitPaymentResponseWithIncluded; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetPaymentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetPaymentApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetPaymentApi(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 execute - * @param paymentId ID of the payment to get (required) - * @param included (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(String paymentId, String included, 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 = "/payments/{paymentId}" - .replace("{" + "paymentId" + "}", localVarApiClient.escapeString(paymentId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (included != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("included", included)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String paymentId, String included, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'paymentId' is set - if (paymentId == null) { - throw new ApiException("Missing the required parameter 'paymentId' when calling execute(Async)"); - } - - return executeCall(paymentId, included, _callback); - - } - - /** - * Get Payment by Id - * Get a Payment from API - * @param paymentId ID of the payment to get (required) - * @param included (optional) - * @return UnitPaymentResponseWithIncluded - * @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 Successful Response -
- */ - public UnitPaymentResponseWithIncluded execute(String paymentId, String included) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(paymentId, included); - return localVarResp.getData(); - } - - /** - * Get Payment by Id - * Get a Payment from API - * @param paymentId ID of the payment to get (required) - * @param included (optional) - * @return ApiResponse<UnitPaymentResponseWithIncluded> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String paymentId, String included) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(paymentId, included, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Payment by Id (asynchronously) - * Get a Payment from API - * @param paymentId ID of the payment to get (required) - * @param included (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(String paymentId, String included, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(paymentId, included, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetReceivedPaymentApi.java b/src/main/java/org/openapitools/client/api/GetReceivedPaymentApi.java deleted file mode 100644 index 405e2cf3..00000000 --- a/src/main/java/org/openapitools/client/api/GetReceivedPaymentApi.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitReceivedPaymentResponseWithIncluded; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetReceivedPaymentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetReceivedPaymentApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetReceivedPaymentApi(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 execute - * @param paymentId ID of the payment to get (required) - * @param included (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(String paymentId, String included, 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 = "/received-payments/{paymentId}" - .replace("{" + "paymentId" + "}", localVarApiClient.escapeString(paymentId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (included != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("included", included)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String paymentId, String included, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'paymentId' is set - if (paymentId == null) { - throw new ApiException("Missing the required parameter 'paymentId' when calling execute(Async)"); - } - - return executeCall(paymentId, included, _callback); - - } - - /** - * Get Received Payment by Id - * Get a Received Payment from API - * @param paymentId ID of the payment to get (required) - * @param included (optional) - * @return UnitReceivedPaymentResponseWithIncluded - * @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 Successful Response -
- */ - public UnitReceivedPaymentResponseWithIncluded execute(String paymentId, String included) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(paymentId, included); - return localVarResp.getData(); - } - - /** - * Get Received Payment by Id - * Get a Received Payment from API - * @param paymentId ID of the payment to get (required) - * @param included (optional) - * @return ApiResponse<UnitReceivedPaymentResponseWithIncluded> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String paymentId, String included) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(paymentId, included, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Received Payment by Id (asynchronously) - * Get a Received Payment from API - * @param paymentId ID of the payment to get (required) - * @param included (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(String paymentId, String included, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(paymentId, included, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetReceivedPaymentsListApi.java b/src/main/java/org/openapitools/client/api/GetReceivedPaymentsListApi.java deleted file mode 100644 index ee4f079b..00000000 --- a/src/main/java/org/openapitools/client/api/GetReceivedPaymentsListApi.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitReceivedPaymentListResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetReceivedPaymentsListApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetReceivedPaymentsListApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetReceivedPaymentsListApi(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 execute - * @param included (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(String included, 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 = "/received-payments"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (included != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("included", included)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String included, final ApiCallback _callback) throws ApiException { - return executeCall(included, _callback); - - } - - /** - * Get Received Payments List - * Get Received Payments from API - * @param included (optional) - * @return UnitReceivedPaymentListResponse - * @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 Successful Response -
- */ - public UnitReceivedPaymentListResponse execute(String included) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(included); - return localVarResp.getData(); - } - - /** - * Get Received Payments List - * Get Received Payments from API - * @param included (optional) - * @return ApiResponse<UnitReceivedPaymentListResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String included) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(included, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Received Payments List (asynchronously) - * Get Received Payments from API - * @param included (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(String included, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(included, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetRecurringPaymentApi.java b/src/main/java/org/openapitools/client/api/GetRecurringPaymentApi.java deleted file mode 100644 index 6e71c00b..00000000 --- a/src/main/java/org/openapitools/client/api/GetRecurringPaymentApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitRecurringPaymentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetRecurringPaymentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetRecurringPaymentApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetRecurringPaymentApi(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 execute - * @param paymentId ID of the payment to get (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 Successful Response -
- */ - public okhttp3.Call executeCall(String paymentId, 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 = "/recurring-payments/{paymentId}" - .replace("{" + "paymentId" + "}", localVarApiClient.escapeString(paymentId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String paymentId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'paymentId' is set - if (paymentId == null) { - throw new ApiException("Missing the required parameter 'paymentId' when calling execute(Async)"); - } - - return executeCall(paymentId, _callback); - - } - - /** - * Get Recurring Payment - * Get Recurring Payment from API - * @param paymentId ID of the payment to get (required) - * @return UnitRecurringPaymentResponse - * @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 Successful Response -
- */ - public UnitRecurringPaymentResponse execute(String paymentId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(paymentId); - return localVarResp.getData(); - } - - /** - * Get Recurring Payment - * Get Recurring Payment from API - * @param paymentId ID of the payment to get (required) - * @return ApiResponse<UnitRecurringPaymentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String paymentId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(paymentId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Recurring Payment (asynchronously) - * Get Recurring Payment from API - * @param paymentId ID of the payment to get (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String paymentId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(paymentId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetRepaymentApi.java b/src/main/java/org/openapitools/client/api/GetRepaymentApi.java deleted file mode 100644 index 3dea4ed0..00000000 --- a/src/main/java/org/openapitools/client/api/GetRepaymentApi.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitRepaymentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetRepaymentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetRepaymentApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetRepaymentApi(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 execute - * @param repaymentId ID of the repayment to get (required) - * @param include (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeCall(String repaymentId, String include, 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 = "/repayments/{repaymentId}" - .replace("{" + "repaymentId" + "}", localVarApiClient.escapeString(repaymentId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("include", include)); - } - - final String[] localVarAccepts = { - "application/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String repaymentId, String include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'repaymentId' is set - if (repaymentId == null) { - throw new ApiException("Missing the required parameter 'repaymentId' when calling execute(Async)"); - } - - return executeCall(repaymentId, include, _callback); - - } - - /** - * Get Repayment by Id - * Get an Repayment from API - * @param repaymentId ID of the repayment to get (required) - * @param include (optional) - * @return UnitRepaymentResponse - * @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 Successful Response -
- */ - public UnitRepaymentResponse execute(String repaymentId, String include) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(repaymentId, include); - return localVarResp.getData(); - } - - /** - * Get Repayment by Id - * Get an Repayment from API - * @param repaymentId ID of the repayment to get (required) - * @param include (optional) - * @return ApiResponse<UnitRepaymentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String repaymentId, String include) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(repaymentId, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Repayment by Id (asynchronously) - * Get an Repayment from API - * @param repaymentId ID of the repayment to get (required) - * @param include (optional) - * @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 Successful Response -
- */ - public okhttp3.Call executeAsync(String repaymentId, String include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(repaymentId, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetRewardApi.java b/src/main/java/org/openapitools/client/api/GetRewardApi.java deleted file mode 100644 index 57f1f422..00000000 --- a/src/main/java/org/openapitools/client/api/GetRewardApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitRewardResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetRewardApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetRewardApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetRewardApi(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 execute - * @param rewardId ID of the reward to get (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 Successful Response -
- */ - public okhttp3.Call executeCall(String rewardId, 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 = "/rewards/{rewardId}" - .replace("{" + "rewardId" + "}", localVarApiClient.escapeString(rewardId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String rewardId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'rewardId' is set - if (rewardId == null) { - throw new ApiException("Missing the required parameter 'rewardId' when calling execute(Async)"); - } - - return executeCall(rewardId, _callback); - - } - - /** - * Get Reward by Id - * Get a Reward from API - * @param rewardId ID of the reward to get (required) - * @return UnitRewardResponse - * @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 Successful Response -
- */ - public UnitRewardResponse execute(String rewardId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(rewardId); - return localVarResp.getData(); - } - - /** - * Get Reward by Id - * Get a Reward from API - * @param rewardId ID of the reward to get (required) - * @return ApiResponse<UnitRewardResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String rewardId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(rewardId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Reward by Id (asynchronously) - * Get a Reward from API - * @param rewardId ID of the reward to get (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String rewardId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(rewardId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetStatementHtmlApi.java b/src/main/java/org/openapitools/client/api/GetStatementHtmlApi.java deleted file mode 100644 index d92fc08a..00000000 --- a/src/main/java/org/openapitools/client/api/GetStatementHtmlApi.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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 java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetStatementHtmlApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetStatementHtmlApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetStatementHtmlApi(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 execute - * @param statementId ID of the statement to get (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 Successful Response -
- */ - public okhttp3.Call executeCall(String statementId, 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 = "/statements/{statementId}/html" - .replace("{" + "statementId" + "}", localVarApiClient.escapeString(statementId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "text/html" - }; - 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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String statementId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'statementId' is set - if (statementId == null) { - throw new ApiException("Missing the required parameter 'statementId' when calling execute(Async)"); - } - - return executeCall(statementId, _callback); - - } - - /** - * Get HTML Statement by Id - * Get a HTML Statement from API - * @param statementId ID of the statement to get (required) - * @return String - * @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 Successful Response -
- */ - public String execute(String statementId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(statementId); - return localVarResp.getData(); - } - - /** - * Get HTML Statement by Id - * Get a HTML Statement from API - * @param statementId ID of the statement to get (required) - * @return ApiResponse<String> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String statementId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(statementId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get HTML Statement by Id (asynchronously) - * Get a HTML Statement from API - * @param statementId ID of the statement to get (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String statementId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(statementId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetStatementPdfApi.java b/src/main/java/org/openapitools/client/api/GetStatementPdfApi.java deleted file mode 100644 index 8854a76a..00000000 --- a/src/main/java/org/openapitools/client/api/GetStatementPdfApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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 java.io.File; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetStatementPdfApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetStatementPdfApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetStatementPdfApi(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 execute - * @param statementId ID of the statement to get (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 Successful Response -
- */ - public okhttp3.Call executeCall(String statementId, 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 = "/statements/{statementId}/pdf" - .replace("{" + "statementId" + "}", localVarApiClient.escapeString(statementId.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/pdf" - }; - 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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String statementId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'statementId' is set - if (statementId == null) { - throw new ApiException("Missing the required parameter 'statementId' when calling execute(Async)"); - } - - return executeCall(statementId, _callback); - - } - - /** - * Get PDF Statement by Id - * Get a PDF Statement from API - * @param statementId ID of the statement to get (required) - * @return File - * @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 Successful Response -
- */ - public File execute(String statementId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(statementId); - return localVarResp.getData(); - } - - /** - * Get PDF Statement by Id - * Get a PDF Statement from API - * @param statementId ID of the statement to get (required) - * @return ApiResponse<File> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String statementId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(statementId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get PDF Statement by Id (asynchronously) - * Get a PDF Statement from API - * @param statementId ID of the statement to get (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String statementId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(statementId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetTransactionApi.java b/src/main/java/org/openapitools/client/api/GetTransactionApi.java deleted file mode 100644 index c2fe35c9..00000000 --- a/src/main/java/org/openapitools/client/api/GetTransactionApi.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitTransactionResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetTransactionApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetTransactionApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetTransactionApi(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 execute - * @param accountId ID of the account to get transaction from (required) - * @param transactionId ID of the transaction (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 Successful Response -
- */ - public okhttp3.Call executeCall(String accountId, String transactionId, 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 = "/accounts/{accountId}/transactions/{transactionId}" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())) - .replace("{" + "transactionId" + "}", localVarApiClient.escapeString(transactionId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String accountId, String transactionId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling execute(Async)"); - } - - // verify the required parameter 'transactionId' is set - if (transactionId == null) { - throw new ApiException("Missing the required parameter 'transactionId' when calling execute(Async)"); - } - - return executeCall(accountId, transactionId, _callback); - - } - - /** - * Get Transaction by Id - * Get a Transaction from API - * @param accountId ID of the account to get transaction from (required) - * @param transactionId ID of the transaction (required) - * @return UnitTransactionResponse - * @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 Successful Response -
- */ - public UnitTransactionResponse execute(String accountId, String transactionId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(accountId, transactionId); - return localVarResp.getData(); - } - - /** - * Get Transaction by Id - * Get a Transaction from API - * @param accountId ID of the account to get transaction from (required) - * @param transactionId ID of the transaction (required) - * @return ApiResponse<UnitTransactionResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String accountId, String transactionId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, transactionId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Transaction by Id (asynchronously) - * Get a Transaction from API - * @param accountId ID of the account to get transaction from (required) - * @param transactionId ID of the transaction (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String accountId, String transactionId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, transactionId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/GetWebhookApi.java b/src/main/java/org/openapitools/client/api/GetWebhookApi.java deleted file mode 100644 index 3ca25c32..00000000 --- a/src/main/java/org/openapitools/client/api/GetWebhookApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitWebhookResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class GetWebhookApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public GetWebhookApi() { - this(Configuration.getDefaultApiClient()); - } - - public GetWebhookApi(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 execute - * @param webhookId ID of the webhook to get (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 Successful Response -
- */ - public okhttp3.Call executeCall(String webhookId, 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 = "/webhooks/{webhookId}" - .replace("{" + "webhookId" + "}", localVarApiClient.escapeString(webhookId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String webhookId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'webhookId' is set - if (webhookId == null) { - throw new ApiException("Missing the required parameter 'webhookId' when calling execute(Async)"); - } - - return executeCall(webhookId, _callback); - - } - - /** - * Get Webhook Id - * Get a Webhook from API - * @param webhookId ID of the webhook to get (required) - * @return UnitWebhookResponse - * @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 Successful Response -
- */ - public UnitWebhookResponse execute(String webhookId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(webhookId); - return localVarResp.getData(); - } - - /** - * Get Webhook Id - * Get a Webhook from API - * @param webhookId ID of the webhook to get (required) - * @return ApiResponse<UnitWebhookResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String webhookId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(webhookId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Webhook Id (asynchronously) - * Get a Webhook from API - * @param webhookId ID of the webhook to get (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String webhookId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(webhookId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/ReopenAnAccountApi.java b/src/main/java/org/openapitools/client/api/ReopenAnAccountApi.java deleted file mode 100644 index fd6e9735..00000000 --- a/src/main/java/org/openapitools/client/api/ReopenAnAccountApi.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitAccountResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ReopenAnAccountApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ReopenAnAccountApi() { - this(Configuration.getDefaultApiClient()); - } - - public ReopenAnAccountApi(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 execute - * @param accountId ID of the account to close (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 Successful Response -
0 -
- */ - public okhttp3.Call executeCall(String accountId, 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 = "/accounts/{accountId}/reopen" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling execute(Async)"); - } - - return executeCall(accountId, _callback); - - } - - /** - * Reopen an Account by Id - * Reopen an Account via API - * @param accountId ID of the account to close (required) - * @return UnitAccountResponse - * @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 Successful Response -
0 -
- */ - public UnitAccountResponse execute(String accountId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(accountId); - return localVarResp.getData(); - } - - /** - * Reopen an Account by Id - * Reopen an Account via API - * @param accountId ID of the account to close (required) - * @return ApiResponse<UnitAccountResponse> - * @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 Successful Response -
0 -
- */ - public ApiResponse executeWithHttpInfo(String accountId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Reopen an Account by Id (asynchronously) - * Reopen an Account via API - * @param accountId ID of the account to close (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 Successful Response -
0 -
- */ - public okhttp3.Call executeAsync(String accountId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/ReportCardAsLostApi.java b/src/main/java/org/openapitools/client/api/ReportCardAsLostApi.java deleted file mode 100644 index df0eb93e..00000000 --- a/src/main/java/org/openapitools/client/api/ReportCardAsLostApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCardResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ReportCardAsLostApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ReportCardAsLostApi() { - this(Configuration.getDefaultApiClient()); - } - - public ReportCardAsLostApi(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 execute - * @param cardId ID of the card (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 Successful Response -
- */ - public okhttp3.Call executeCall(String cardId, 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 = "/cards/{cardId}/report-lost" - .replace("{" + "cardId" + "}", localVarApiClient.escapeString(cardId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String cardId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'cardId' is set - if (cardId == null) { - throw new ApiException("Missing the required parameter 'cardId' when calling execute(Async)"); - } - - return executeCall(cardId, _callback); - - } - - /** - * Report lost as stolen - * Report lost as stolen via API - * @param cardId ID of the card (required) - * @return UnitCardResponse - * @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 Successful Response -
- */ - public UnitCardResponse execute(String cardId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(cardId); - return localVarResp.getData(); - } - - /** - * Report lost as stolen - * Report lost as stolen via API - * @param cardId ID of the card (required) - * @return ApiResponse<UnitCardResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String cardId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(cardId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Report lost as stolen (asynchronously) - * Report lost as stolen via API - * @param cardId ID of the card (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String cardId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(cardId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/ReportCardAsStolenApi.java b/src/main/java/org/openapitools/client/api/ReportCardAsStolenApi.java deleted file mode 100644 index 8e436bca..00000000 --- a/src/main/java/org/openapitools/client/api/ReportCardAsStolenApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCardResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ReportCardAsStolenApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ReportCardAsStolenApi() { - this(Configuration.getDefaultApiClient()); - } - - public ReportCardAsStolenApi(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 execute - * @param cardId ID of the card (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 Successful Response -
- */ - public okhttp3.Call executeCall(String cardId, 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 = "/cards/{cardId}/report-stolen" - .replace("{" + "cardId" + "}", localVarApiClient.escapeString(cardId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String cardId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'cardId' is set - if (cardId == null) { - throw new ApiException("Missing the required parameter 'cardId' when calling execute(Async)"); - } - - return executeCall(cardId, _callback); - - } - - /** - * Report card as stolen - * Report card as stolen via API - * @param cardId ID of the card (required) - * @return UnitCardResponse - * @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 Successful Response -
- */ - public UnitCardResponse execute(String cardId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(cardId); - return localVarResp.getData(); - } - - /** - * Report card as stolen - * Report card as stolen via API - * @param cardId ID of the card (required) - * @return ApiResponse<UnitCardResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String cardId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(cardId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Report card as stolen (asynchronously) - * Report card as stolen via API - * @param cardId ID of the card (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String cardId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(cardId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/ReturnCheckPaymentApi.java b/src/main/java/org/openapitools/client/api/ReturnCheckPaymentApi.java deleted file mode 100644 index 635d09f1..00000000 --- a/src/main/java/org/openapitools/client/api/ReturnCheckPaymentApi.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.ReturnCheckPaymentRequest; -import org.openapitools.client.model.UnitCheckPaymentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ReturnCheckPaymentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ReturnCheckPaymentApi() { - this(Configuration.getDefaultApiClient()); - } - - public ReturnCheckPaymentApi(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 execute - * @param checkPaymentId ID of the check payment to return (required) - * @param returnCheckPaymentRequest Return Check Payment Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(String checkPaymentId, ReturnCheckPaymentRequest returnCheckPaymentRequest, 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 = returnCheckPaymentRequest; - - // create path and map variables - String localVarPath = "/check-payments/{checkPaymentId}/return" - .replace("{" + "checkPaymentId" + "}", localVarApiClient.escapeString(checkPaymentId.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/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String checkPaymentId, ReturnCheckPaymentRequest returnCheckPaymentRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'checkPaymentId' is set - if (checkPaymentId == null) { - throw new ApiException("Missing the required parameter 'checkPaymentId' when calling execute(Async)"); - } - - // verify the required parameter 'returnCheckPaymentRequest' is set - if (returnCheckPaymentRequest == null) { - throw new ApiException("Missing the required parameter 'returnCheckPaymentRequest' when calling execute(Async)"); - } - - return executeCall(checkPaymentId, returnCheckPaymentRequest, _callback); - - } - - /** - * Return Check Payment by Id - * Return a Check Payment via API - * @param checkPaymentId ID of the check payment to return (required) - * @param returnCheckPaymentRequest Return Check Payment Request (required) - * @return UnitCheckPaymentResponse - * @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 Successful Response -
- */ - public UnitCheckPaymentResponse execute(String checkPaymentId, ReturnCheckPaymentRequest returnCheckPaymentRequest) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(checkPaymentId, returnCheckPaymentRequest); - return localVarResp.getData(); - } - - /** - * Return Check Payment by Id - * Return a Check Payment via API - * @param checkPaymentId ID of the check payment to return (required) - * @param returnCheckPaymentRequest Return Check Payment Request (required) - * @return ApiResponse<UnitCheckPaymentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String checkPaymentId, ReturnCheckPaymentRequest returnCheckPaymentRequest) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, returnCheckPaymentRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Return Check Payment by Id (asynchronously) - * Return a Check Payment via API - * @param checkPaymentId ID of the check payment to return (required) - * @param returnCheckPaymentRequest Return Check Payment Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String checkPaymentId, ReturnCheckPaymentRequest returnCheckPaymentRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(checkPaymentId, returnCheckPaymentRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/RevokeOrgApiTokenApi.java b/src/main/java/org/openapitools/client/api/RevokeOrgApiTokenApi.java deleted file mode 100644 index 3b3382cc..00000000 --- a/src/main/java/org/openapitools/client/api/RevokeOrgApiTokenApi.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitApiTokenResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class RevokeOrgApiTokenApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public RevokeOrgApiTokenApi() { - this(Configuration.getDefaultApiClient()); - } - - public RevokeOrgApiTokenApi(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 execute - * @param userId ID of the user to revoke token (required) - * @param tokenId ID of the token to revoke (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 Successful Response -
- */ - public okhttp3.Call executeCall(String userId, String tokenId, 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 = "/users/{userId}/api-tokens/{tokenId}" - .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())) - .replace("{" + "tokenId" + "}", localVarApiClient.escapeString(tokenId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String userId, String tokenId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling execute(Async)"); - } - - // verify the required parameter 'tokenId' is set - if (tokenId == null) { - throw new ApiException("Missing the required parameter 'tokenId' when calling execute(Async)"); - } - - return executeCall(userId, tokenId, _callback); - - } - - /** - * Get Reward by Id - * Get a Reward from API - * @param userId ID of the user to revoke token (required) - * @param tokenId ID of the token to revoke (required) - * @return UnitApiTokenResponse - * @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 Successful Response -
- */ - public UnitApiTokenResponse execute(String userId, String tokenId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(userId, tokenId); - return localVarResp.getData(); - } - - /** - * Get Reward by Id - * Get a Reward from API - * @param userId ID of the user to revoke token (required) - * @param tokenId ID of the token to revoke (required) - * @return ApiResponse<UnitApiTokenResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String userId, String tokenId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(userId, tokenId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Reward by Id (asynchronously) - * Get a Reward from API - * @param userId ID of the user to revoke token (required) - * @param tokenId ID of the token to revoke (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String userId, String tokenId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(userId, tokenId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/UnfreezeACardApi.java b/src/main/java/org/openapitools/client/api/UnfreezeACardApi.java deleted file mode 100644 index 9258ed5b..00000000 --- a/src/main/java/org/openapitools/client/api/UnfreezeACardApi.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCardResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UnfreezeACardApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UnfreezeACardApi() { - this(Configuration.getDefaultApiClient()); - } - - public UnfreezeACardApi(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 execute - * @param cardId ID of the card to unfreeze (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 Successful Response -
- */ - public okhttp3.Call executeCall(String cardId, 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 = "/cards/{cardId}/unfreeze" - .replace("{" + "cardId" + "}", localVarApiClient.escapeString(cardId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String cardId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'cardId' is set - if (cardId == null) { - throw new ApiException("Missing the required parameter 'cardId' when calling execute(Async)"); - } - - return executeCall(cardId, _callback); - - } - - /** - * Unfreeze a Card - * Unfreeze a Card via API - * @param cardId ID of the card to unfreeze (required) - * @return UnitCardResponse - * @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 Successful Response -
- */ - public UnitCardResponse execute(String cardId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(cardId); - return localVarResp.getData(); - } - - /** - * Unfreeze a Card - * Unfreeze a Card via API - * @param cardId ID of the card to unfreeze (required) - * @return ApiResponse<UnitCardResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String cardId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(cardId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Unfreeze a Card (asynchronously) - * Unfreeze a Card via API - * @param cardId ID of the card to unfreeze (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String cardId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(cardId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/UnfreezeAccountApi.java b/src/main/java/org/openapitools/client/api/UnfreezeAccountApi.java deleted file mode 100644 index 617757a7..00000000 --- a/src/main/java/org/openapitools/client/api/UnfreezeAccountApi.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitAccountResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UnfreezeAccountApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UnfreezeAccountApi() { - this(Configuration.getDefaultApiClient()); - } - - public UnfreezeAccountApi(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 execute - * @param accountId ID of the account to get (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 Successful Response -
0 -
- */ - public okhttp3.Call executeCall(String accountId, 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 = "/accounts/{accountId}/unfreeze" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling execute(Async)"); - } - - return executeCall(accountId, _callback); - - } - - /** - * Unfreeze Account by Id - * Unfreeze an Account via API - * @param accountId ID of the account to get (required) - * @return UnitAccountResponse - * @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 Successful Response -
0 -
- */ - public UnitAccountResponse execute(String accountId) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(accountId); - return localVarResp.getData(); - } - - /** - * Unfreeze Account by Id - * Unfreeze an Account via API - * @param accountId ID of the account to get (required) - * @return ApiResponse<UnitAccountResponse> - * @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 Successful Response -
0 -
- */ - public ApiResponse executeWithHttpInfo(String accountId) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Unfreeze Account by Id (asynchronously) - * Unfreeze an Account via API - * @param accountId ID of the account to get (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 Successful Response -
0 -
- */ - public okhttp3.Call executeAsync(String accountId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/UpdateAccountApi.java b/src/main/java/org/openapitools/client/api/UpdateAccountApi.java deleted file mode 100644 index df933c5b..00000000 --- a/src/main/java/org/openapitools/client/api/UpdateAccountApi.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.PatchAccount; -import org.openapitools.client.model.UnitAccountResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UpdateAccountApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UpdateAccountApi() { - this(Configuration.getDefaultApiClient()); - } - - public UpdateAccountApi(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 execute - * @param accountId ID of the account to update (required) - * @param patchAccount Update Account Request (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 Successful Response -
0 -
- */ - public okhttp3.Call executeCall(String accountId, PatchAccount patchAccount, 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 = patchAccount; - - // create path and map variables - String localVarPath = "/accounts/{accountId}" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.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/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String accountId, PatchAccount patchAccount, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling execute(Async)"); - } - - // verify the required parameter 'patchAccount' is set - if (patchAccount == null) { - throw new ApiException("Missing the required parameter 'patchAccount' when calling execute(Async)"); - } - - return executeCall(accountId, patchAccount, _callback); - - } - - /** - * Update Account - * Update an Account via API - * @param accountId ID of the account to update (required) - * @param patchAccount Update Account Request (required) - * @return UnitAccountResponse - * @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 Successful Response -
0 -
- */ - public UnitAccountResponse execute(String accountId, PatchAccount patchAccount) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(accountId, patchAccount); - return localVarResp.getData(); - } - - /** - * Update Account - * Update an Account via API - * @param accountId ID of the account to update (required) - * @param patchAccount Update Account Request (required) - * @return ApiResponse<UnitAccountResponse> - * @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 Successful Response -
0 -
- */ - public ApiResponse executeWithHttpInfo(String accountId, PatchAccount patchAccount) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, patchAccount, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update Account (asynchronously) - * Update an Account via API - * @param accountId ID of the account to update (required) - * @param patchAccount Update Account Request (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 Successful Response -
0 -
- */ - public okhttp3.Call executeAsync(String accountId, PatchAccount patchAccount, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, patchAccount, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/UpdateApplicationApi.java b/src/main/java/org/openapitools/client/api/UpdateApplicationApi.java deleted file mode 100644 index 8a70bb3f..00000000 --- a/src/main/java/org/openapitools/client/api/UpdateApplicationApi.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitApplicationResponseWithIncluded; -import org.openapitools.client.model.UpdateApplication; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UpdateApplicationApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UpdateApplicationApi() { - this(Configuration.getDefaultApiClient()); - } - - public UpdateApplicationApi(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 execute - * @param applicationId ID of the application to update (required) - * @param updateApplication Update Application Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(String applicationId, UpdateApplication updateApplication, 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 = updateApplication; - - // create path and map variables - String localVarPath = "/applications/{applicationId}" - .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.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/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String applicationId, UpdateApplication updateApplication, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'applicationId' is set - if (applicationId == null) { - throw new ApiException("Missing the required parameter 'applicationId' when calling execute(Async)"); - } - - // verify the required parameter 'updateApplication' is set - if (updateApplication == null) { - throw new ApiException("Missing the required parameter 'updateApplication' when calling execute(Async)"); - } - - return executeCall(applicationId, updateApplication, _callback); - - } - - /** - * Update Application - * Update an Application via API - * @param applicationId ID of the application to update (required) - * @param updateApplication Update Application Request (required) - * @return UnitApplicationResponseWithIncluded - * @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 Successful Response -
- */ - public UnitApplicationResponseWithIncluded execute(String applicationId, UpdateApplication updateApplication) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(applicationId, updateApplication); - return localVarResp.getData(); - } - - /** - * Update Application - * Update an Application via API - * @param applicationId ID of the application to update (required) - * @param updateApplication Update Application Request (required) - * @return ApiResponse<UnitApplicationResponseWithIncluded> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String applicationId, UpdateApplication updateApplication) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, updateApplication, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update Application (asynchronously) - * Update an Application via API - * @param applicationId ID of the application to update (required) - * @param updateApplication Update Application Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String applicationId, UpdateApplication updateApplication, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, updateApplication, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/UpdateCardApi.java b/src/main/java/org/openapitools/client/api/UpdateCardApi.java deleted file mode 100644 index b8207018..00000000 --- a/src/main/java/org/openapitools/client/api/UpdateCardApi.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCardResponse; -import org.openapitools.client.model.UpdateCard; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UpdateCardApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UpdateCardApi() { - this(Configuration.getDefaultApiClient()); - } - - public UpdateCardApi(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 execute - * @param cardId ID of the card to update (required) - * @param updateCard Update Card Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(String cardId, UpdateCard updateCard, 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 = updateCard; - - // create path and map variables - String localVarPath = "/cards/{cardId}" - .replace("{" + "cardId" + "}", localVarApiClient.escapeString(cardId.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/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String cardId, UpdateCard updateCard, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'cardId' is set - if (cardId == null) { - throw new ApiException("Missing the required parameter 'cardId' when calling execute(Async)"); - } - - // verify the required parameter 'updateCard' is set - if (updateCard == null) { - throw new ApiException("Missing the required parameter 'updateCard' when calling execute(Async)"); - } - - return executeCall(cardId, updateCard, _callback); - - } - - /** - * Update Card - * Update a Card via API - * @param cardId ID of the card to update (required) - * @param updateCard Update Card Request (required) - * @return UnitCardResponse - * @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 Successful Response -
- */ - public UnitCardResponse execute(String cardId, UpdateCard updateCard) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(cardId, updateCard); - return localVarResp.getData(); - } - - /** - * Update Card - * Update a Card via API - * @param cardId ID of the card to update (required) - * @param updateCard Update Card Request (required) - * @return ApiResponse<UnitCardResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String cardId, UpdateCard updateCard) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(cardId, updateCard, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update Card (asynchronously) - * Update a Card via API - * @param cardId ID of the card to update (required) - * @param updateCard Update Card Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String cardId, UpdateCard updateCard, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(cardId, updateCard, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/UpdateCheckDepositApi.java b/src/main/java/org/openapitools/client/api/UpdateCheckDepositApi.java deleted file mode 100644 index cb5b98a0..00000000 --- a/src/main/java/org/openapitools/client/api/UpdateCheckDepositApi.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCheckDepositResponse; -import org.openapitools.client.model.UpdateCheckDeposit; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UpdateCheckDepositApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UpdateCheckDepositApi() { - this(Configuration.getDefaultApiClient()); - } - - public UpdateCheckDepositApi(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 execute - * @param checkDepositId ID of the check deposit to update (required) - * @param updateCheckDeposit Update Check Deposit Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(String checkDepositId, UpdateCheckDeposit updateCheckDeposit, 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 = updateCheckDeposit; - - // create path and map variables - String localVarPath = "/check-deposits/{checkDepositId}" - .replace("{" + "checkDepositId" + "}", localVarApiClient.escapeString(checkDepositId.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/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String checkDepositId, UpdateCheckDeposit updateCheckDeposit, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'checkDepositId' is set - if (checkDepositId == null) { - throw new ApiException("Missing the required parameter 'checkDepositId' when calling execute(Async)"); - } - - // verify the required parameter 'updateCheckDeposit' is set - if (updateCheckDeposit == null) { - throw new ApiException("Missing the required parameter 'updateCheckDeposit' when calling execute(Async)"); - } - - return executeCall(checkDepositId, updateCheckDeposit, _callback); - - } - - /** - * Update Check Deposit - * Update a Check Deposit via API - * @param checkDepositId ID of the check deposit to update (required) - * @param updateCheckDeposit Update Check Deposit Request (required) - * @return UnitCheckDepositResponse - * @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 Successful Response -
- */ - public UnitCheckDepositResponse execute(String checkDepositId, UpdateCheckDeposit updateCheckDeposit) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(checkDepositId, updateCheckDeposit); - return localVarResp.getData(); - } - - /** - * Update Check Deposit - * Update a Check Deposit via API - * @param checkDepositId ID of the check deposit to update (required) - * @param updateCheckDeposit Update Check Deposit Request (required) - * @return ApiResponse<UnitCheckDepositResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String checkDepositId, UpdateCheckDeposit updateCheckDeposit) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(checkDepositId, updateCheckDeposit, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update Check Deposit (asynchronously) - * Update a Check Deposit via API - * @param checkDepositId ID of the check deposit to update (required) - * @param updateCheckDeposit Update Check Deposit Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String checkDepositId, UpdateCheckDeposit updateCheckDeposit, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(checkDepositId, updateCheckDeposit, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/UpdateCounterpartyApi.java b/src/main/java/org/openapitools/client/api/UpdateCounterpartyApi.java deleted file mode 100644 index 410e9029..00000000 --- a/src/main/java/org/openapitools/client/api/UpdateCounterpartyApi.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCounterpartyResponse; -import org.openapitools.client.model.UpdateCounterparty; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UpdateCounterpartyApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UpdateCounterpartyApi() { - this(Configuration.getDefaultApiClient()); - } - - public UpdateCounterpartyApi(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 execute - * @param counterpartyId ID of the counterparty to update (required) - * @param updateCounterparty Update Counterparty Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(String counterpartyId, UpdateCounterparty updateCounterparty, 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 = updateCounterparty; - - // create path and map variables - String localVarPath = "/counterparties/{counterpartyId}" - .replace("{" + "counterpartyId" + "}", localVarApiClient.escapeString(counterpartyId.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/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String counterpartyId, UpdateCounterparty updateCounterparty, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'counterpartyId' is set - if (counterpartyId == null) { - throw new ApiException("Missing the required parameter 'counterpartyId' when calling execute(Async)"); - } - - // verify the required parameter 'updateCounterparty' is set - if (updateCounterparty == null) { - throw new ApiException("Missing the required parameter 'updateCounterparty' when calling execute(Async)"); - } - - return executeCall(counterpartyId, updateCounterparty, _callback); - - } - - /** - * Update Counterparty - * Update a Counterparty via API - * @param counterpartyId ID of the counterparty to update (required) - * @param updateCounterparty Update Counterparty Request (required) - * @return UnitCounterpartyResponse - * @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 Successful Response -
- */ - public UnitCounterpartyResponse execute(String counterpartyId, UpdateCounterparty updateCounterparty) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(counterpartyId, updateCounterparty); - return localVarResp.getData(); - } - - /** - * Update Counterparty - * Update a Counterparty via API - * @param counterpartyId ID of the counterparty to update (required) - * @param updateCounterparty Update Counterparty Request (required) - * @return ApiResponse<UnitCounterpartyResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String counterpartyId, UpdateCounterparty updateCounterparty) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(counterpartyId, updateCounterparty, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update Counterparty (asynchronously) - * Update a Counterparty via API - * @param counterpartyId ID of the counterparty to update (required) - * @param updateCounterparty Update Counterparty Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String counterpartyId, UpdateCounterparty updateCounterparty, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(counterpartyId, updateCounterparty, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/UpdateCustomerApi.java b/src/main/java/org/openapitools/client/api/UpdateCustomerApi.java deleted file mode 100644 index d01ef26c..00000000 --- a/src/main/java/org/openapitools/client/api/UpdateCustomerApi.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitCustomerResponse; -import org.openapitools.client.model.UpdateCustomer; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UpdateCustomerApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UpdateCustomerApi() { - this(Configuration.getDefaultApiClient()); - } - - public UpdateCustomerApi(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 execute - * @param customerId ID of the customer to update (required) - * @param updateCustomer Update Customer Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(String customerId, UpdateCustomer updateCustomer, 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 = updateCustomer; - - // create path and map variables - String localVarPath = "/customers/{customerId}" - .replace("{" + "customerId" + "}", localVarApiClient.escapeString(customerId.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/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String customerId, UpdateCustomer updateCustomer, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'customerId' is set - if (customerId == null) { - throw new ApiException("Missing the required parameter 'customerId' when calling execute(Async)"); - } - - // verify the required parameter 'updateCustomer' is set - if (updateCustomer == null) { - throw new ApiException("Missing the required parameter 'updateCustomer' when calling execute(Async)"); - } - - return executeCall(customerId, updateCustomer, _callback); - - } - - /** - * Update Customer - * Update an Customer via API - * @param customerId ID of the customer to update (required) - * @param updateCustomer Update Customer Request (required) - * @return UnitCustomerResponse - * @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 Successful Response -
- */ - public UnitCustomerResponse execute(String customerId, UpdateCustomer updateCustomer) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(customerId, updateCustomer); - return localVarResp.getData(); - } - - /** - * Update Customer - * Update an Customer via API - * @param customerId ID of the customer to update (required) - * @param updateCustomer Update Customer Request (required) - * @return ApiResponse<UnitCustomerResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String customerId, UpdateCustomer updateCustomer) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, updateCustomer, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update Customer (asynchronously) - * Update an Customer via API - * @param customerId ID of the customer to update (required) - * @param updateCustomer Update Customer Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String customerId, UpdateCustomer updateCustomer, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(customerId, updateCustomer, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/UpdatePaymentApi.java b/src/main/java/org/openapitools/client/api/UpdatePaymentApi.java deleted file mode 100644 index 4b6e318e..00000000 --- a/src/main/java/org/openapitools/client/api/UpdatePaymentApi.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitPaymentResponse; -import org.openapitools.client.model.UpdatePayment; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UpdatePaymentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UpdatePaymentApi() { - this(Configuration.getDefaultApiClient()); - } - - public UpdatePaymentApi(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 execute - * @param paymentId ID of the payment to update (required) - * @param updatePayment Update Payment Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(String paymentId, UpdatePayment updatePayment, 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 = updatePayment; - - // create path and map variables - String localVarPath = "/payments/{paymentId}" - .replace("{" + "paymentId" + "}", localVarApiClient.escapeString(paymentId.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/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String paymentId, UpdatePayment updatePayment, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'paymentId' is set - if (paymentId == null) { - throw new ApiException("Missing the required parameter 'paymentId' when calling execute(Async)"); - } - - // verify the required parameter 'updatePayment' is set - if (updatePayment == null) { - throw new ApiException("Missing the required parameter 'updatePayment' when calling execute(Async)"); - } - - return executeCall(paymentId, updatePayment, _callback); - - } - - /** - * Update Payment - * Update an Payment via API - * @param paymentId ID of the payment to update (required) - * @param updatePayment Update Payment Request (required) - * @return UnitPaymentResponse - * @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 Successful Response -
- */ - public UnitPaymentResponse execute(String paymentId, UpdatePayment updatePayment) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(paymentId, updatePayment); - return localVarResp.getData(); - } - - /** - * Update Payment - * Update an Payment via API - * @param paymentId ID of the payment to update (required) - * @param updatePayment Update Payment Request (required) - * @return ApiResponse<UnitPaymentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String paymentId, UpdatePayment updatePayment) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(paymentId, updatePayment, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update Payment (asynchronously) - * Update an Payment via API - * @param paymentId ID of the payment to update (required) - * @param updatePayment Update Payment Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String paymentId, UpdatePayment updatePayment, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(paymentId, updatePayment, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/UpdateReceivedPaymentApi.java b/src/main/java/org/openapitools/client/api/UpdateReceivedPaymentApi.java deleted file mode 100644 index 7db5e73b..00000000 --- a/src/main/java/org/openapitools/client/api/UpdateReceivedPaymentApi.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitReceivedPaymentResponse; -import org.openapitools.client.model.UpdateReceivedPayment; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UpdateReceivedPaymentApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UpdateReceivedPaymentApi() { - this(Configuration.getDefaultApiClient()); - } - - public UpdateReceivedPaymentApi(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 execute - * @param paymentId ID of the payment to update (required) - * @param updateReceivedPayment Update Received Payment Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(String paymentId, UpdateReceivedPayment updateReceivedPayment, 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 = updateReceivedPayment; - - // create path and map variables - String localVarPath = "/received-payments/{paymentId}" - .replace("{" + "paymentId" + "}", localVarApiClient.escapeString(paymentId.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/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String paymentId, UpdateReceivedPayment updateReceivedPayment, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'paymentId' is set - if (paymentId == null) { - throw new ApiException("Missing the required parameter 'paymentId' when calling execute(Async)"); - } - - // verify the required parameter 'updateReceivedPayment' is set - if (updateReceivedPayment == null) { - throw new ApiException("Missing the required parameter 'updateReceivedPayment' when calling execute(Async)"); - } - - return executeCall(paymentId, updateReceivedPayment, _callback); - - } - - /** - * Update Received Payment - * Update a Received Payment via API - * @param paymentId ID of the payment to update (required) - * @param updateReceivedPayment Update Received Payment Request (required) - * @return UnitReceivedPaymentResponse - * @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 Successful Response -
- */ - public UnitReceivedPaymentResponse execute(String paymentId, UpdateReceivedPayment updateReceivedPayment) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(paymentId, updateReceivedPayment); - return localVarResp.getData(); - } - - /** - * Update Received Payment - * Update a Received Payment via API - * @param paymentId ID of the payment to update (required) - * @param updateReceivedPayment Update Received Payment Request (required) - * @return ApiResponse<UnitReceivedPaymentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String paymentId, UpdateReceivedPayment updateReceivedPayment) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(paymentId, updateReceivedPayment, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update Received Payment (asynchronously) - * Update a Received Payment via API - * @param paymentId ID of the payment to update (required) - * @param updateReceivedPayment Update Received Payment Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String paymentId, UpdateReceivedPayment updateReceivedPayment, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(paymentId, updateReceivedPayment, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/UpdateTransactionApi.java b/src/main/java/org/openapitools/client/api/UpdateTransactionApi.java deleted file mode 100644 index 72d9065a..00000000 --- a/src/main/java/org/openapitools/client/api/UpdateTransactionApi.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitTransactionResponse1; -import org.openapitools.client.model.UpdateTransaction; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UpdateTransactionApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UpdateTransactionApi() { - this(Configuration.getDefaultApiClient()); - } - - public UpdateTransactionApi(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 execute - * @param accountId ID of the account to update transaction from (required) - * @param transactionId ID of the transaction to update (required) - * @param updateTransaction Update Transaction Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(String accountId, String transactionId, UpdateTransaction updateTransaction, 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 = updateTransaction; - - // create path and map variables - String localVarPath = "/accounts/{accountId}/transactions/{transactionId}" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())) - .replace("{" + "transactionId" + "}", localVarApiClient.escapeString(transactionId.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/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String accountId, String transactionId, UpdateTransaction updateTransaction, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling execute(Async)"); - } - - // verify the required parameter 'transactionId' is set - if (transactionId == null) { - throw new ApiException("Missing the required parameter 'transactionId' when calling execute(Async)"); - } - - // verify the required parameter 'updateTransaction' is set - if (updateTransaction == null) { - throw new ApiException("Missing the required parameter 'updateTransaction' when calling execute(Async)"); - } - - return executeCall(accountId, transactionId, updateTransaction, _callback); - - } - - /** - * Update Transaction - * Update a Transaction via API - * @param accountId ID of the account to update transaction from (required) - * @param transactionId ID of the transaction to update (required) - * @param updateTransaction Update Transaction Request (required) - * @return UnitTransactionResponse1 - * @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 Successful Response -
- */ - public UnitTransactionResponse1 execute(String accountId, String transactionId, UpdateTransaction updateTransaction) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(accountId, transactionId, updateTransaction); - return localVarResp.getData(); - } - - /** - * Update Transaction - * Update a Transaction via API - * @param accountId ID of the account to update transaction from (required) - * @param transactionId ID of the transaction to update (required) - * @param updateTransaction Update Transaction Request (required) - * @return ApiResponse<UnitTransactionResponse1> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String accountId, String transactionId, UpdateTransaction updateTransaction) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, transactionId, updateTransaction, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update Transaction (asynchronously) - * Update a Transaction via API - * @param accountId ID of the account to update transaction from (required) - * @param transactionId ID of the transaction to update (required) - * @param updateTransaction Update Transaction Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String accountId, String transactionId, UpdateTransaction updateTransaction, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(accountId, transactionId, updateTransaction, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/UpdateWebhookApi.java b/src/main/java/org/openapitools/client/api/UpdateWebhookApi.java deleted file mode 100644 index 35f5140b..00000000 --- a/src/main/java/org/openapitools/client/api/UpdateWebhookApi.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitWebhookResponse; -import org.openapitools.client.model.UpdateUnitRequest; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UpdateWebhookApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UpdateWebhookApi() { - this(Configuration.getDefaultApiClient()); - } - - public UpdateWebhookApi(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 execute - * @param webhookId ID of the Webhook to update (required) - * @param updateUnitRequest Update Webhook Request (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 Successful Response -
- */ - public okhttp3.Call executeCall(String webhookId, UpdateUnitRequest updateUnitRequest, 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 = updateUnitRequest; - - // create path and map variables - String localVarPath = "/webhooks/{webhookId}" - .replace("{" + "webhookId" + "}", localVarApiClient.escapeString(webhookId.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/vnd.api+json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/vnd.api+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String webhookId, UpdateUnitRequest updateUnitRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'webhookId' is set - if (webhookId == null) { - throw new ApiException("Missing the required parameter 'webhookId' when calling execute(Async)"); - } - - // verify the required parameter 'updateUnitRequest' is set - if (updateUnitRequest == null) { - throw new ApiException("Missing the required parameter 'updateUnitRequest' when calling execute(Async)"); - } - - return executeCall(webhookId, updateUnitRequest, _callback); - - } - - /** - * Update Webhook - * Update a Webhook via API - * @param webhookId ID of the Webhook to update (required) - * @param updateUnitRequest Update Webhook Request (required) - * @return UnitWebhookResponse - * @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 Successful Response -
- */ - public UnitWebhookResponse execute(String webhookId, UpdateUnitRequest updateUnitRequest) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(webhookId, updateUnitRequest); - return localVarResp.getData(); - } - - /** - * Update Webhook - * Update a Webhook via API - * @param webhookId ID of the Webhook to update (required) - * @param updateUnitRequest Update Webhook Request (required) - * @return ApiResponse<UnitWebhookResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String webhookId, UpdateUnitRequest updateUnitRequest) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(webhookId, updateUnitRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update Webhook (asynchronously) - * Update a Webhook via API - * @param webhookId ID of the Webhook to update (required) - * @param updateUnitRequest Update Webhook Request (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String webhookId, UpdateUnitRequest updateUnitRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(webhookId, updateUnitRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/UploadAJpegDocumentForAnApplicationApi.java b/src/main/java/org/openapitools/client/api/UploadAJpegDocumentForAnApplicationApi.java deleted file mode 100644 index 08675f02..00000000 --- a/src/main/java/org/openapitools/client/api/UploadAJpegDocumentForAnApplicationApi.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitDocumentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UploadAJpegDocumentForAnApplicationApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UploadAJpegDocumentForAnApplicationApi() { - this(Configuration.getDefaultApiClient()); - } - - public UploadAJpegDocumentForAnApplicationApi(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 execute - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload JPEG File (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 Successful Response -
- */ - public okhttp3.Call executeCall(String applicationId, String documentId, Object body, 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 = body; - - // create path and map variables - String localVarPath = "/applications/{applicationId}/documents/{documentId}/?" - .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.toString())) - .replace("{" + "documentId" + "}", localVarApiClient.escapeString(documentId.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/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "image/jpeg" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String applicationId, String documentId, Object body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'applicationId' is set - if (applicationId == null) { - throw new ApiException("Missing the required parameter 'applicationId' when calling execute(Async)"); - } - - // verify the required parameter 'documentId' is set - if (documentId == null) { - throw new ApiException("Missing the required parameter 'documentId' when calling execute(Async)"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling execute(Async)"); - } - - return executeCall(applicationId, documentId, body, _callback); - - } - - /** - * Upload a JPEG document - * Upload a JPEG file via API - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload JPEG File (required) - * @return UnitDocumentResponse - * @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 Successful Response -
- */ - public UnitDocumentResponse execute(String applicationId, String documentId, Object body) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(applicationId, documentId, body); - return localVarResp.getData(); - } - - /** - * Upload a JPEG document - * Upload a JPEG file via API - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload JPEG File (required) - * @return ApiResponse<UnitDocumentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String applicationId, String documentId, Object body) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Upload a JPEG document (asynchronously) - * Upload a JPEG file via API - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload JPEG File (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String applicationId, String documentId, Object body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/UploadAJpegDocumentForAnApplicationBackSideApi.java b/src/main/java/org/openapitools/client/api/UploadAJpegDocumentForAnApplicationBackSideApi.java deleted file mode 100644 index 53765eeb..00000000 --- a/src/main/java/org/openapitools/client/api/UploadAJpegDocumentForAnApplicationBackSideApi.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitDocumentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UploadAJpegDocumentForAnApplicationBackSideApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UploadAJpegDocumentForAnApplicationBackSideApi() { - this(Configuration.getDefaultApiClient()); - } - - public UploadAJpegDocumentForAnApplicationBackSideApi(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 execute - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload JPEG File - Back Side (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 Successful Response -
- */ - public okhttp3.Call executeCall(String applicationId, String documentId, Object body, 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 = body; - - // create path and map variables - String localVarPath = "/applications/{applicationId}/documents/{documentId}/back/?" - .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.toString())) - .replace("{" + "documentId" + "}", localVarApiClient.escapeString(documentId.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/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "image/jpeg" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String applicationId, String documentId, Object body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'applicationId' is set - if (applicationId == null) { - throw new ApiException("Missing the required parameter 'applicationId' when calling execute(Async)"); - } - - // verify the required parameter 'documentId' is set - if (documentId == null) { - throw new ApiException("Missing the required parameter 'documentId' when calling execute(Async)"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling execute(Async)"); - } - - return executeCall(applicationId, documentId, body, _callback); - - } - - /** - * Upload a JPEG document - Back Side - * Upload a JPEG file via API - Back Side - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload JPEG File - Back Side (required) - * @return UnitDocumentResponse - * @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 Successful Response -
- */ - public UnitDocumentResponse execute(String applicationId, String documentId, Object body) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(applicationId, documentId, body); - return localVarResp.getData(); - } - - /** - * Upload a JPEG document - Back Side - * Upload a JPEG file via API - Back Side - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload JPEG File - Back Side (required) - * @return ApiResponse<UnitDocumentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String applicationId, String documentId, Object body) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Upload a JPEG document - Back Side (asynchronously) - * Upload a JPEG file via API - Back Side - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload JPEG File - Back Side (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String applicationId, String documentId, Object body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/UploadAPdfDocumentForAnApplicationApi.java b/src/main/java/org/openapitools/client/api/UploadAPdfDocumentForAnApplicationApi.java deleted file mode 100644 index 22bc2979..00000000 --- a/src/main/java/org/openapitools/client/api/UploadAPdfDocumentForAnApplicationApi.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitDocumentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UploadAPdfDocumentForAnApplicationApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UploadAPdfDocumentForAnApplicationApi() { - this(Configuration.getDefaultApiClient()); - } - - public UploadAPdfDocumentForAnApplicationApi(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 execute - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload PDF File (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 Successful Response -
- */ - public okhttp3.Call executeCall(String applicationId, String documentId, Object body, 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 = body; - - // create path and map variables - String localVarPath = "/applications/{applicationId}/documents/{documentId}" - .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.toString())) - .replace("{" + "documentId" + "}", localVarApiClient.escapeString(documentId.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/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/pdf" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String applicationId, String documentId, Object body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'applicationId' is set - if (applicationId == null) { - throw new ApiException("Missing the required parameter 'applicationId' when calling execute(Async)"); - } - - // verify the required parameter 'documentId' is set - if (documentId == null) { - throw new ApiException("Missing the required parameter 'documentId' when calling execute(Async)"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling execute(Async)"); - } - - return executeCall(applicationId, documentId, body, _callback); - - } - - /** - * Upload a PDF document - * Upload a PDF file via API - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload PDF File (required) - * @return UnitDocumentResponse - * @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 Successful Response -
- */ - public UnitDocumentResponse execute(String applicationId, String documentId, Object body) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(applicationId, documentId, body); - return localVarResp.getData(); - } - - /** - * Upload a PDF document - * Upload a PDF file via API - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload PDF File (required) - * @return ApiResponse<UnitDocumentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String applicationId, String documentId, Object body) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Upload a PDF document (asynchronously) - * Upload a PDF file via API - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload PDF File (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String applicationId, String documentId, Object body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/UploadAPdfDocumentForAnApplicationBackSideApi.java b/src/main/java/org/openapitools/client/api/UploadAPdfDocumentForAnApplicationBackSideApi.java deleted file mode 100644 index d3b70b45..00000000 --- a/src/main/java/org/openapitools/client/api/UploadAPdfDocumentForAnApplicationBackSideApi.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitDocumentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UploadAPdfDocumentForAnApplicationBackSideApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UploadAPdfDocumentForAnApplicationBackSideApi() { - this(Configuration.getDefaultApiClient()); - } - - public UploadAPdfDocumentForAnApplicationBackSideApi(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 execute - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload PDF File - Back Side (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 Successful Response -
- */ - public okhttp3.Call executeCall(String applicationId, String documentId, Object body, 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 = body; - - // create path and map variables - String localVarPath = "/applications/{applicationId}/documents/{documentId}/back" - .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.toString())) - .replace("{" + "documentId" + "}", localVarApiClient.escapeString(documentId.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/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/pdf" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String applicationId, String documentId, Object body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'applicationId' is set - if (applicationId == null) { - throw new ApiException("Missing the required parameter 'applicationId' when calling execute(Async)"); - } - - // verify the required parameter 'documentId' is set - if (documentId == null) { - throw new ApiException("Missing the required parameter 'documentId' when calling execute(Async)"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling execute(Async)"); - } - - return executeCall(applicationId, documentId, body, _callback); - - } - - /** - * Upload a PDF document - Back Side - * Upload a PDF file via API - Back Side - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload PDF File - Back Side (required) - * @return UnitDocumentResponse - * @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 Successful Response -
- */ - public UnitDocumentResponse execute(String applicationId, String documentId, Object body) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(applicationId, documentId, body); - return localVarResp.getData(); - } - - /** - * Upload a PDF document - Back Side - * Upload a PDF file via API - Back Side - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload PDF File - Back Side (required) - * @return ApiResponse<UnitDocumentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String applicationId, String documentId, Object body) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Upload a PDF document - Back Side (asynchronously) - * Upload a PDF file via API - Back Side - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload PDF File - Back Side (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String applicationId, String documentId, Object body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/UploadAPngDocumentForAnApplicationApi.java b/src/main/java/org/openapitools/client/api/UploadAPngDocumentForAnApplicationApi.java deleted file mode 100644 index 6fb44773..00000000 --- a/src/main/java/org/openapitools/client/api/UploadAPngDocumentForAnApplicationApi.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitDocumentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UploadAPngDocumentForAnApplicationApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UploadAPngDocumentForAnApplicationApi() { - this(Configuration.getDefaultApiClient()); - } - - public UploadAPngDocumentForAnApplicationApi(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 execute - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload PNG File (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 Successful Response -
- */ - public okhttp3.Call executeCall(String applicationId, String documentId, Object body, 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 = body; - - // create path and map variables - String localVarPath = "/applications/{applicationId}/documents/{documentId}/" - .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.toString())) - .replace("{" + "documentId" + "}", localVarApiClient.escapeString(documentId.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/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "image/png" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String applicationId, String documentId, Object body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'applicationId' is set - if (applicationId == null) { - throw new ApiException("Missing the required parameter 'applicationId' when calling execute(Async)"); - } - - // verify the required parameter 'documentId' is set - if (documentId == null) { - throw new ApiException("Missing the required parameter 'documentId' when calling execute(Async)"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling execute(Async)"); - } - - return executeCall(applicationId, documentId, body, _callback); - - } - - /** - * Upload a PNG document - * Upload a PNG file via API - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload PNG File (required) - * @return UnitDocumentResponse - * @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 Successful Response -
- */ - public UnitDocumentResponse execute(String applicationId, String documentId, Object body) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(applicationId, documentId, body); - return localVarResp.getData(); - } - - /** - * Upload a PNG document - * Upload a PNG file via API - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload PNG File (required) - * @return ApiResponse<UnitDocumentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String applicationId, String documentId, Object body) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Upload a PNG document (asynchronously) - * Upload a PNG file via API - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload PNG File (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String applicationId, String documentId, Object body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/UploadAPngDocumentForAnApplicationBackSideApi.java b/src/main/java/org/openapitools/client/api/UploadAPngDocumentForAnApplicationBackSideApi.java deleted file mode 100644 index 13b0e3db..00000000 --- a/src/main/java/org/openapitools/client/api/UploadAPngDocumentForAnApplicationBackSideApi.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitDocumentResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UploadAPngDocumentForAnApplicationBackSideApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UploadAPngDocumentForAnApplicationBackSideApi() { - this(Configuration.getDefaultApiClient()); - } - - public UploadAPngDocumentForAnApplicationBackSideApi(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 execute - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload PNG File - Back Side (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 Successful Response -
- */ - public okhttp3.Call executeCall(String applicationId, String documentId, Object body, 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 = body; - - // create path and map variables - String localVarPath = "/applications/{applicationId}/documents/{documentId}/back/" - .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.toString())) - .replace("{" + "documentId" + "}", localVarApiClient.escapeString(documentId.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/vnd.api+json; charset=utf-8" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "image/png" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String applicationId, String documentId, Object body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'applicationId' is set - if (applicationId == null) { - throw new ApiException("Missing the required parameter 'applicationId' when calling execute(Async)"); - } - - // verify the required parameter 'documentId' is set - if (documentId == null) { - throw new ApiException("Missing the required parameter 'documentId' when calling execute(Async)"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling execute(Async)"); - } - - return executeCall(applicationId, documentId, body, _callback); - - } - - /** - * Upload a PNG document - Back Side - * Upload a PNG file via API - Back Side - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload PNG File - Back Side (required) - * @return UnitDocumentResponse - * @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 Successful Response -
- */ - public UnitDocumentResponse execute(String applicationId, String documentId, Object body) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(applicationId, documentId, body); - return localVarResp.getData(); - } - - /** - * Upload a PNG document - Back Side - * Upload a PNG file via API - Back Side - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload PNG File - Back Side (required) - * @return ApiResponse<UnitDocumentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String applicationId, String documentId, Object body) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Upload a PNG document - Back Side (asynchronously) - * Upload a PNG file via API - Back Side - * @param applicationId ID of the application to upload a file to (required) - * @param documentId ID of the document to upload a file for (required) - * @param body Upload PNG File - Back Side (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String applicationId, String documentId, Object body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/api/VerifyADocumentForAnApplicationApi.java b/src/main/java/org/openapitools/client/api/VerifyADocumentForAnApplicationApi.java deleted file mode 100644 index 40fffc3b..00000000 --- a/src/main/java/org/openapitools/client/api/VerifyADocumentForAnApplicationApi.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.UnitDocumentResponse; -import org.openapitools.client.model.VerifyDocument; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class VerifyADocumentForAnApplicationApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public VerifyADocumentForAnApplicationApi() { - this(Configuration.getDefaultApiClient()); - } - - public VerifyADocumentForAnApplicationApi(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 execute - * @param applicationId ID of the application to verify a file for (required) - * @param documentId ID of the document to verify (required) - * @param verifyDocument Verify Document (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 Successful Response -
- */ - public okhttp3.Call executeCall(String applicationId, String documentId, VerifyDocument verifyDocument, 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 = verifyDocument; - - // create path and map variables - String localVarPath = "/applications/{applicationId}/documents/{documentId}/verify" - .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.toString())) - .replace("{" + "documentId" + "}", localVarApiClient.escapeString(documentId.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/vnd.api+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[] { "bearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call executeValidateBeforeCall(String applicationId, String documentId, VerifyDocument verifyDocument, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'applicationId' is set - if (applicationId == null) { - throw new ApiException("Missing the required parameter 'applicationId' when calling execute(Async)"); - } - - // verify the required parameter 'documentId' is set - if (documentId == null) { - throw new ApiException("Missing the required parameter 'documentId' when calling execute(Async)"); - } - - // verify the required parameter 'verifyDocument' is set - if (verifyDocument == null) { - throw new ApiException("Missing the required parameter 'verifyDocument' when calling execute(Async)"); - } - - return executeCall(applicationId, documentId, verifyDocument, _callback); - - } - - /** - * Verify a document - * Verify a document via API - * @param applicationId ID of the application to verify a file for (required) - * @param documentId ID of the document to verify (required) - * @param verifyDocument Verify Document (required) - * @return UnitDocumentResponse - * @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 Successful Response -
- */ - public UnitDocumentResponse execute(String applicationId, String documentId, VerifyDocument verifyDocument) throws ApiException { - ApiResponse localVarResp = executeWithHttpInfo(applicationId, documentId, verifyDocument); - return localVarResp.getData(); - } - - /** - * Verify a document - * Verify a document via API - * @param applicationId ID of the application to verify a file for (required) - * @param documentId ID of the document to verify (required) - * @param verifyDocument Verify Document (required) - * @return ApiResponse<UnitDocumentResponse> - * @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 Successful Response -
- */ - public ApiResponse executeWithHttpInfo(String applicationId, String documentId, VerifyDocument verifyDocument) throws ApiException { - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, verifyDocument, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Verify a document (asynchronously) - * Verify a document via API - * @param applicationId ID of the application to verify a file for (required) - * @param documentId ID of the document to verify (required) - * @param verifyDocument Verify Document (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 Successful Response -
- */ - public okhttp3.Call executeAsync(String applicationId, String documentId, VerifyDocument verifyDocument, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = executeValidateBeforeCall(applicationId, documentId, verifyDocument, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java deleted file mode 100644 index 2662d889..00000000 --- a/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.auth; - -import org.openapitools.client.ApiException; -import org.openapitools.client.Pair; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApiKeyAuth implements Authentication { - private final String location; - private final String paramName; - - private String apiKey; - private String apiKeyPrefix; - - public ApiKeyAuth(String location, String paramName) { - this.location = location; - this.paramName = paramName; - } - - public String getLocation() { - return location; - } - - public String getParamName() { - return paramName; - } - - public String getApiKey() { - return apiKey; - } - - public void setApiKey(String apiKey) { - this.apiKey = apiKey; - } - - public String getApiKeyPrefix() { - return apiKeyPrefix; - } - - public void setApiKeyPrefix(String apiKeyPrefix) { - this.apiKeyPrefix = apiKeyPrefix; - } - - @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { - if (apiKey == null) { - return; - } - String value; - if (apiKeyPrefix != null) { - value = apiKeyPrefix + " " + apiKey; - } else { - value = apiKey; - } - if ("query".equals(location)) { - queryParams.add(new Pair(paramName, value)); - } else if ("header".equals(location)) { - headerParams.put(paramName, value); - } else if ("cookie".equals(location)) { - cookieParams.put(paramName, value); - } - } -} diff --git a/src/main/java/org/openapitools/client/auth/Authentication.java b/src/main/java/org/openapitools/client/auth/Authentication.java deleted file mode 100644 index c4887ab0..00000000 --- a/src/main/java/org/openapitools/client/auth/Authentication.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.auth; - -import org.openapitools.client.Pair; -import org.openapitools.client.ApiException; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -public interface Authentication { - /** - * Apply authentication settings to header and query params. - * - * @param queryParams List of query parameters - * @param headerParams Map of header parameters - * @param cookieParams Map of cookie parameters - * @param payload HTTP request body - * @param method HTTP method - * @param uri URI - * @throws ApiException if failed to update the parameters - */ - void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; -} diff --git a/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java deleted file mode 100644 index 90b4afa7..00000000 --- a/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.auth; - -import org.openapitools.client.Pair; -import org.openapitools.client.ApiException; - -import okhttp3.Credentials; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -import java.io.UnsupportedEncodingException; - -public class HttpBasicAuth implements Authentication { - private String username; - private String password; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { - if (username == null && password == null) { - return; - } - headerParams.put("Authorization", Credentials.basic( - username == null ? "" : username, - password == null ? "" : password)); - } -} diff --git a/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java deleted file mode 100644 index ed7897f8..00000000 --- a/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.auth; - -import org.openapitools.client.ApiException; -import org.openapitools.client.Pair; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class HttpBearerAuth implements Authentication { - private final String scheme; - private String bearerToken; - - public HttpBearerAuth(String scheme) { - this.scheme = scheme; - } - - /** - * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. - * - * @return The bearer token - */ - public String getBearerToken() { - return bearerToken; - } - - /** - * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. - * - * @param bearerToken The bearer token to send in the Authorization header - */ - public void setBearerToken(String bearerToken) { - this.bearerToken = bearerToken; - } - - @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { - if (bearerToken == null) { - return; - } - - headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); - } - - private static String upperCaseBearer(String scheme) { - return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; - } -} diff --git a/src/main/java/org/openapitools/client/model/Account.java b/src/main/java/org/openapitools/client/model/Account.java deleted file mode 100644 index 4d19d4fe..00000000 --- a/src/main/java/org/openapitools/client/model/Account.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Account - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Account { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - protected String type; - - public Account() { - this.type = this.getClass().getSimpleName(); - } - - public Account id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public Account type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Account account = (Account) o; - return Objects.equals(this.id, account.id) && - Objects.equals(this.type, account.type); - } - - @Override - public int hashCode() { - return Objects.hash(id, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Account {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Account - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Account.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Account is not found in the empty JSON string", Account.openapiRequiredFields.toString())); - } - } - - String discriminatorValue = jsonElement.getAsJsonObject().get("type").getAsString(); - switch (discriminatorValue) { - case "creditAccount": - CreditAccount.validateJsonElement(jsonElement); - break; - case "depositAccount": - DepositAccount.validateJsonElement(jsonElement); - break; - default: - throw new IllegalArgumentException(String.format("The value of the `type` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); - } - } - - - /** - * Create an instance of Account given an JSON string - * - * @param jsonString JSON string - * @return An instance of Account - * @throws IOException if the JSON string is invalid with respect to Account - */ - public static Account fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Account.class); - } - - /** - * Convert an instance of Account to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AccountEndOfDay.java b/src/main/java/org/openapitools/client/model/AccountEndOfDay.java deleted file mode 100644 index 8be33a17..00000000 --- a/src/main/java/org/openapitools/client/model/AccountEndOfDay.java +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AccountEndOfDayAttributes; -import org.openapitools.client.model.Relationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AccountEndOfDay - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AccountEndOfDay { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - ACCOUNTENDOFDAY("accountEndOfDay"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private AccountEndOfDayAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private Relationships relationships; - - public AccountEndOfDay() { - } - - public AccountEndOfDay type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public AccountEndOfDay id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public AccountEndOfDay attributes(AccountEndOfDayAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public AccountEndOfDayAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(AccountEndOfDayAttributes attributes) { - this.attributes = attributes; - } - - - public AccountEndOfDay relationships(Relationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public Relationships getRelationships() { - return relationships; - } - - - public void setRelationships(Relationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountEndOfDay accountEndOfDay = (AccountEndOfDay) o; - return Objects.equals(this.type, accountEndOfDay.type) && - Objects.equals(this.id, accountEndOfDay.id) && - Objects.equals(this.attributes, accountEndOfDay.attributes) && - Objects.equals(this.relationships, accountEndOfDay.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountEndOfDay {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AccountEndOfDay - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AccountEndOfDay.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AccountEndOfDay is not found in the empty JSON string", AccountEndOfDay.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AccountEndOfDay.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AccountEndOfDay` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AccountEndOfDay.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - // validate the required field `attributes` - AccountEndOfDayAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - Relationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AccountEndOfDay.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AccountEndOfDay' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AccountEndOfDay.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AccountEndOfDay value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AccountEndOfDay read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AccountEndOfDay given an JSON string - * - * @param jsonString JSON string - * @return An instance of AccountEndOfDay - * @throws IOException if the JSON string is invalid with respect to AccountEndOfDay - */ - public static AccountEndOfDay fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AccountEndOfDay.class); - } - - /** - * Convert an instance of AccountEndOfDay to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AccountEndOfDayAttributes.java b/src/main/java/org/openapitools/client/model/AccountEndOfDayAttributes.java deleted file mode 100644 index ac7c29f7..00000000 --- a/src/main/java/org/openapitools/client/model/AccountEndOfDayAttributes.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AccountEndOfDayAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AccountEndOfDayAttributes { - public static final String SERIALIZED_NAME_DATE = "date"; - @SerializedName(SERIALIZED_NAME_DATE) - private LocalDate date; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_HOLD = "hold"; - @SerializedName(SERIALIZED_NAME_HOLD) - private Integer hold; - - public static final String SERIALIZED_NAME_AVAILABLE = "available"; - @SerializedName(SERIALIZED_NAME_AVAILABLE) - private Integer available; - - public static final String SERIALIZED_NAME_OVERDRAFT_LIMIT = "overdraftLimit"; - @SerializedName(SERIALIZED_NAME_OVERDRAFT_LIMIT) - private Integer overdraftLimit; - - public AccountEndOfDayAttributes() { - } - - public AccountEndOfDayAttributes date(LocalDate date) { - - this.date = date; - return this; - } - - /** - * Get date - * @return date - **/ - @javax.annotation.Nonnull - public LocalDate getDate() { - return date; - } - - - public void setDate(LocalDate date) { - this.date = date; - } - - - public AccountEndOfDayAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public AccountEndOfDayAttributes hold(Integer hold) { - - this.hold = hold; - return this; - } - - /** - * Get hold - * @return hold - **/ - @javax.annotation.Nonnull - public Integer getHold() { - return hold; - } - - - public void setHold(Integer hold) { - this.hold = hold; - } - - - public AccountEndOfDayAttributes available(Integer available) { - - this.available = available; - return this; - } - - /** - * Get available - * @return available - **/ - @javax.annotation.Nonnull - public Integer getAvailable() { - return available; - } - - - public void setAvailable(Integer available) { - this.available = available; - } - - - public AccountEndOfDayAttributes overdraftLimit(Integer overdraftLimit) { - - this.overdraftLimit = overdraftLimit; - return this; - } - - /** - * Get overdraftLimit - * @return overdraftLimit - **/ - @javax.annotation.Nullable - public Integer getOverdraftLimit() { - return overdraftLimit; - } - - - public void setOverdraftLimit(Integer overdraftLimit) { - this.overdraftLimit = overdraftLimit; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountEndOfDayAttributes accountEndOfDayAttributes = (AccountEndOfDayAttributes) o; - return Objects.equals(this.date, accountEndOfDayAttributes.date) && - Objects.equals(this.balance, accountEndOfDayAttributes.balance) && - Objects.equals(this.hold, accountEndOfDayAttributes.hold) && - Objects.equals(this.available, accountEndOfDayAttributes.available) && - Objects.equals(this.overdraftLimit, accountEndOfDayAttributes.overdraftLimit); - } - - @Override - public int hashCode() { - return Objects.hash(date, balance, hold, available, overdraftLimit); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountEndOfDayAttributes {\n"); - sb.append(" date: ").append(toIndentedString(date)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" hold: ").append(toIndentedString(hold)).append("\n"); - sb.append(" available: ").append(toIndentedString(available)).append("\n"); - sb.append(" overdraftLimit: ").append(toIndentedString(overdraftLimit)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("date"); - openapiFields.add("balance"); - openapiFields.add("hold"); - openapiFields.add("available"); - openapiFields.add("overdraftLimit"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("date"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("hold"); - openapiRequiredFields.add("available"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AccountEndOfDayAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AccountEndOfDayAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AccountEndOfDayAttributes is not found in the empty JSON string", AccountEndOfDayAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AccountEndOfDayAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AccountEndOfDayAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AccountEndOfDayAttributes.openapiRequiredFields) { - 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 { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AccountEndOfDayAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AccountEndOfDayAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AccountEndOfDayAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AccountEndOfDayAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AccountEndOfDayAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AccountEndOfDayAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of AccountEndOfDayAttributes - * @throws IOException if the JSON string is invalid with respect to AccountEndOfDayAttributes - */ - public static AccountEndOfDayAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AccountEndOfDayAttributes.class); - } - - /** - * Convert an instance of AccountEndOfDayAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AccountLowBalanceClosureTransaction.java b/src/main/java/org/openapitools/client/model/AccountLowBalanceClosureTransaction.java deleted file mode 100644 index 9503ba0e..00000000 --- a/src/main/java/org/openapitools/client/model/AccountLowBalanceClosureTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AccountLowBalanceClosureTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AccountLowBalanceClosureTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AccountLowBalanceClosureTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private AccountLowBalanceClosureTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public AccountLowBalanceClosureTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public AccountLowBalanceClosureTransaction attributes(AccountLowBalanceClosureTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public AccountLowBalanceClosureTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(AccountLowBalanceClosureTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public AccountLowBalanceClosureTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountLowBalanceClosureTransaction accountLowBalanceClosureTransaction = (AccountLowBalanceClosureTransaction) o; - return Objects.equals(this.attributes, accountLowBalanceClosureTransaction.attributes) && - Objects.equals(this.relationships, accountLowBalanceClosureTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountLowBalanceClosureTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AccountLowBalanceClosureTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AccountLowBalanceClosureTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AccountLowBalanceClosureTransaction is not found in the empty JSON string", AccountLowBalanceClosureTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AccountLowBalanceClosureTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AccountLowBalanceClosureTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AccountLowBalanceClosureTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AccountLowBalanceClosureTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AccountLowBalanceClosureTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AccountLowBalanceClosureTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AccountLowBalanceClosureTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AccountLowBalanceClosureTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AccountLowBalanceClosureTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of AccountLowBalanceClosureTransaction - * @throws IOException if the JSON string is invalid with respect to AccountLowBalanceClosureTransaction - */ - public static AccountLowBalanceClosureTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AccountLowBalanceClosureTransaction.class); - } - - /** - * Convert an instance of AccountLowBalanceClosureTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AccountLowBalanceClosureTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/AccountLowBalanceClosureTransactionAllOfAttributes.java deleted file mode 100644 index 889e514d..00000000 --- a/src/main/java/org/openapitools/client/model/AccountLowBalanceClosureTransactionAllOfAttributes.java +++ /dev/null @@ -1,410 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AccountLowBalanceClosureTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AccountLowBalanceClosureTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public AccountLowBalanceClosureTransactionAllOfAttributes() { - } - - public AccountLowBalanceClosureTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public AccountLowBalanceClosureTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nullable - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public AccountLowBalanceClosureTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public AccountLowBalanceClosureTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public AccountLowBalanceClosureTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public AccountLowBalanceClosureTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountLowBalanceClosureTransactionAllOfAttributes accountLowBalanceClosureTransactionAllOfAttributes = (AccountLowBalanceClosureTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, accountLowBalanceClosureTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, accountLowBalanceClosureTransactionAllOfAttributes.direction) && - Objects.equals(this.amount, accountLowBalanceClosureTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, accountLowBalanceClosureTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, accountLowBalanceClosureTransactionAllOfAttributes.summary) && - Objects.equals(this.tags, accountLowBalanceClosureTransactionAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, amount, balance, summary, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountLowBalanceClosureTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AccountLowBalanceClosureTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AccountLowBalanceClosureTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AccountLowBalanceClosureTransactionAllOfAttributes is not found in the empty JSON string", AccountLowBalanceClosureTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AccountLowBalanceClosureTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AccountLowBalanceClosureTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AccountLowBalanceClosureTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction") != null && !jsonObj.get("direction").isJsonNull()) && !jsonObj.get("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AccountLowBalanceClosureTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AccountLowBalanceClosureTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AccountLowBalanceClosureTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AccountLowBalanceClosureTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AccountLowBalanceClosureTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AccountLowBalanceClosureTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of AccountLowBalanceClosureTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to AccountLowBalanceClosureTransactionAllOfAttributes - */ - public static AccountLowBalanceClosureTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AccountLowBalanceClosureTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of AccountLowBalanceClosureTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AccountRelationship.java b/src/main/java/org/openapitools/client/model/AccountRelationship.java deleted file mode 100644 index 8d748bc4..00000000 --- a/src/main/java/org/openapitools/client/model/AccountRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AccountRelationshipData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AccountRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AccountRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private AccountRelationshipData data; - - public AccountRelationship() { - } - - public AccountRelationship data(AccountRelationshipData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public AccountRelationshipData getData() { - return data; - } - - - public void setData(AccountRelationshipData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountRelationship accountRelationship = (AccountRelationship) o; - return Objects.equals(this.data, accountRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AccountRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AccountRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AccountRelationship is not found in the empty JSON string", AccountRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AccountRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AccountRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AccountRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - AccountRelationshipData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AccountRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AccountRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AccountRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AccountRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AccountRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AccountRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of AccountRelationship - * @throws IOException if the JSON string is invalid with respect to AccountRelationship - */ - public static AccountRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AccountRelationship.class); - } - - /** - * Convert an instance of AccountRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AccountRelationship1.java b/src/main/java/org/openapitools/client/model/AccountRelationship1.java deleted file mode 100644 index 01fe1faf..00000000 --- a/src/main/java/org/openapitools/client/model/AccountRelationship1.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AccountRelationshipData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AccountRelationship1 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AccountRelationship1 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private AccountRelationshipData data; - - public AccountRelationship1() { - } - - public AccountRelationship1 data(AccountRelationshipData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public AccountRelationshipData getData() { - return data; - } - - - public void setData(AccountRelationshipData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountRelationship1 accountRelationship1 = (AccountRelationship1) o; - return Objects.equals(this.data, accountRelationship1.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountRelationship1 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AccountRelationship1 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AccountRelationship1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AccountRelationship1 is not found in the empty JSON string", AccountRelationship1.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AccountRelationship1.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AccountRelationship1` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AccountRelationship1.openapiRequiredFields) { - 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(); - // validate the required field `data` - AccountRelationshipData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AccountRelationship1.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AccountRelationship1' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AccountRelationship1.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AccountRelationship1 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AccountRelationship1 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AccountRelationship1 given an JSON string - * - * @param jsonString JSON string - * @return An instance of AccountRelationship1 - * @throws IOException if the JSON string is invalid with respect to AccountRelationship1 - */ - public static AccountRelationship1 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AccountRelationship1.class); - } - - /** - * Convert an instance of AccountRelationship1 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AccountRelationship2.java b/src/main/java/org/openapitools/client/model/AccountRelationship2.java deleted file mode 100644 index 396aa336..00000000 --- a/src/main/java/org/openapitools/client/model/AccountRelationship2.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AccountRelationship2Data; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AccountRelationship2 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AccountRelationship2 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private AccountRelationship2Data data; - - public AccountRelationship2() { - } - - public AccountRelationship2 data(AccountRelationship2Data data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public AccountRelationship2Data getData() { - return data; - } - - - public void setData(AccountRelationship2Data data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountRelationship2 accountRelationship2 = (AccountRelationship2) o; - return Objects.equals(this.data, accountRelationship2.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountRelationship2 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AccountRelationship2 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AccountRelationship2.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AccountRelationship2 is not found in the empty JSON string", AccountRelationship2.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AccountRelationship2.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AccountRelationship2` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AccountRelationship2.openapiRequiredFields) { - 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(); - // validate the required field `data` - AccountRelationship2Data.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AccountRelationship2.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AccountRelationship2' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AccountRelationship2.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AccountRelationship2 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AccountRelationship2 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AccountRelationship2 given an JSON string - * - * @param jsonString JSON string - * @return An instance of AccountRelationship2 - * @throws IOException if the JSON string is invalid with respect to AccountRelationship2 - */ - public static AccountRelationship2 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AccountRelationship2.class); - } - - /** - * Convert an instance of AccountRelationship2 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AccountRelationship2Data.java b/src/main/java/org/openapitools/client/model/AccountRelationship2Data.java deleted file mode 100644 index ecdec658..00000000 --- a/src/main/java/org/openapitools/client/model/AccountRelationship2Data.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AccountRelationship2Data - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AccountRelationship2Data { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - DEPOSITACCOUNT("depositAccount"), - - GLACCOUNT("glAccount"), - - ACCOUNT("account"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public AccountRelationship2Data() { - } - - public AccountRelationship2Data type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public AccountRelationship2Data id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountRelationship2Data accountRelationship2Data = (AccountRelationship2Data) o; - return Objects.equals(this.type, accountRelationship2Data.type) && - Objects.equals(this.id, accountRelationship2Data.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountRelationship2Data {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AccountRelationship2Data - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AccountRelationship2Data.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AccountRelationship2Data is not found in the empty JSON string", AccountRelationship2Data.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AccountRelationship2Data.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AccountRelationship2Data` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AccountRelationship2Data.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AccountRelationship2Data.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AccountRelationship2Data' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AccountRelationship2Data.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AccountRelationship2Data value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AccountRelationship2Data read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AccountRelationship2Data given an JSON string - * - * @param jsonString JSON string - * @return An instance of AccountRelationship2Data - * @throws IOException if the JSON string is invalid with respect to AccountRelationship2Data - */ - public static AccountRelationship2Data fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AccountRelationship2Data.class); - } - - /** - * Convert an instance of AccountRelationship2Data to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AccountRelationshipData.java b/src/main/java/org/openapitools/client/model/AccountRelationshipData.java deleted file mode 100644 index c3656dc2..00000000 --- a/src/main/java/org/openapitools/client/model/AccountRelationshipData.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AccountRelationshipData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AccountRelationshipData { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - ACCOUNT("account"), - - DEPOSITACCOUNT("depositAccount"), - - CREDITACCOUNT("creditAccount"), - - BATCHACCOUNT("batchAccount"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public AccountRelationshipData() { - } - - public AccountRelationshipData type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public AccountRelationshipData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountRelationshipData accountRelationshipData = (AccountRelationshipData) o; - return Objects.equals(this.type, accountRelationshipData.type) && - Objects.equals(this.id, accountRelationshipData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountRelationshipData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AccountRelationshipData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AccountRelationshipData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AccountRelationshipData is not found in the empty JSON string", AccountRelationshipData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AccountRelationshipData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AccountRelationshipData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AccountRelationshipData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AccountRelationshipData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AccountRelationshipData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AccountRelationshipData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AccountRelationshipData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AccountRelationshipData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AccountRelationshipData given an JSON string - * - * @param jsonString JSON string - * @return An instance of AccountRelationshipData - * @throws IOException if the JSON string is invalid with respect to AccountRelationshipData - */ - public static AccountRelationshipData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AccountRelationshipData.class); - } - - /** - * Convert an instance of AccountRelationshipData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AchPayment.java b/src/main/java/org/openapitools/client/model/AchPayment.java deleted file mode 100644 index 4e99ad15..00000000 --- a/src/main/java/org/openapitools/client/model/AchPayment.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AchPaymentAllOfAttributes; -import org.openapitools.client.model.Payment; -import org.openapitools.client.model.PaymentRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AchPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AchPayment extends Payment { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private AchPaymentAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private PaymentRelationships relationships; - - public AchPayment() { - this.type = this.getClass().getSimpleName(); - } - - public AchPayment attributes(AchPaymentAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public AchPaymentAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(AchPaymentAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public AchPayment relationships(PaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public PaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(PaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AchPayment achPayment = (AchPayment) o; - return Objects.equals(this.attributes, achPayment.attributes) && - Objects.equals(this.relationships, achPayment.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AchPayment {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AchPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AchPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AchPayment is not found in the empty JSON string", AchPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AchPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AchPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AchPayment.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AchPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AchPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AchPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AchPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AchPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AchPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of AchPayment - * @throws IOException if the JSON string is invalid with respect to AchPayment - */ - public static AchPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AchPayment.class); - } - - /** - * Convert an instance of AchPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AchPaymentAllOfAttributes.java b/src/main/java/org/openapitools/client/model/AchPaymentAllOfAttributes.java deleted file mode 100644 index 5ddb160b..00000000 --- a/src/main/java/org/openapitools/client/model/AchPaymentAllOfAttributes.java +++ /dev/null @@ -1,771 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.Counterparty; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AchPaymentAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AchPaymentAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_ADDENDA = "addenda"; - @SerializedName(SERIALIZED_NAME_ADDENDA) - private String addenda; - - public static final String SERIALIZED_NAME_COUNTERPARTY = "counterparty"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY) - private Counterparty counterparty; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - PENDING("Pending"), - - REJECTED("Rejected"), - - CLEARING("Clearing"), - - SENT("Sent"), - - CANCELED("Canceled"), - - RETURNED("Returned"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_SETTLEMENT_DATE = "settlementDate"; - @SerializedName(SERIALIZED_NAME_SETTLEMENT_DATE) - private LocalDate settlementDate; - - public static final String SERIALIZED_NAME_REASON = "reason"; - @SerializedName(SERIALIZED_NAME_REASON) - private String reason; - - public static final String SERIALIZED_NAME_EXPECTED_COMPLETION_DATE = "expectedCompletionDate"; - @SerializedName(SERIALIZED_NAME_EXPECTED_COMPLETION_DATE) - private LocalDate expectedCompletionDate; - - public static final String SERIALIZED_NAME_SEC_CODE = "secCode"; - @SerializedName(SERIALIZED_NAME_SEC_CODE) - private String secCode; - - public static final String SERIALIZED_NAME_TRACE_NUMBER = "traceNumber"; - @SerializedName(SERIALIZED_NAME_TRACE_NUMBER) - private String traceNumber; - - public static final String SERIALIZED_NAME_SAME_DAY = "sameDay"; - @SerializedName(SERIALIZED_NAME_SAME_DAY) - private Boolean sameDay; - - public static final String SERIALIZED_NAME_COUNTERPARTY_VERIFICATION_METHOD = "counterpartyVerificationMethod"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_VERIFICATION_METHOD) - private String counterpartyVerificationMethod; - - public static final String SERIALIZED_NAME_CLEARING_DAYS_OVERRIDE = "clearingDaysOverride"; - @SerializedName(SERIALIZED_NAME_CLEARING_DAYS_OVERRIDE) - private Integer clearingDaysOverride; - - public AchPaymentAllOfAttributes() { - } - - public AchPaymentAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public AchPaymentAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public AchPaymentAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public AchPaymentAllOfAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public AchPaymentAllOfAttributes addenda(String addenda) { - - this.addenda = addenda; - return this; - } - - /** - * Get addenda - * @return addenda - **/ - @javax.annotation.Nullable - public String getAddenda() { - return addenda; - } - - - public void setAddenda(String addenda) { - this.addenda = addenda; - } - - - public AchPaymentAllOfAttributes counterparty(Counterparty counterparty) { - - this.counterparty = counterparty; - return this; - } - - /** - * Get counterparty - * @return counterparty - **/ - @javax.annotation.Nullable - public Counterparty getCounterparty() { - return counterparty; - } - - - public void setCounterparty(Counterparty counterparty) { - this.counterparty = counterparty; - } - - - public AchPaymentAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public AchPaymentAllOfAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public AchPaymentAllOfAttributes settlementDate(LocalDate settlementDate) { - - this.settlementDate = settlementDate; - return this; - } - - /** - * Get settlementDate - * @return settlementDate - **/ - @javax.annotation.Nullable - public LocalDate getSettlementDate() { - return settlementDate; - } - - - public void setSettlementDate(LocalDate settlementDate) { - this.settlementDate = settlementDate; - } - - - public AchPaymentAllOfAttributes reason(String reason) { - - this.reason = reason; - return this; - } - - /** - * Get reason - * @return reason - **/ - @javax.annotation.Nullable - public String getReason() { - return reason; - } - - - public void setReason(String reason) { - this.reason = reason; - } - - - public AchPaymentAllOfAttributes expectedCompletionDate(LocalDate expectedCompletionDate) { - - this.expectedCompletionDate = expectedCompletionDate; - return this; - } - - /** - * Get expectedCompletionDate - * @return expectedCompletionDate - **/ - @javax.annotation.Nullable - public LocalDate getExpectedCompletionDate() { - return expectedCompletionDate; - } - - - public void setExpectedCompletionDate(LocalDate expectedCompletionDate) { - this.expectedCompletionDate = expectedCompletionDate; - } - - - public AchPaymentAllOfAttributes secCode(String secCode) { - - this.secCode = secCode; - return this; - } - - /** - * Get secCode - * @return secCode - **/ - @javax.annotation.Nullable - public String getSecCode() { - return secCode; - } - - - public void setSecCode(String secCode) { - this.secCode = secCode; - } - - - public AchPaymentAllOfAttributes traceNumber(String traceNumber) { - - this.traceNumber = traceNumber; - return this; - } - - /** - * Get traceNumber - * @return traceNumber - **/ - @javax.annotation.Nullable - public String getTraceNumber() { - return traceNumber; - } - - - public void setTraceNumber(String traceNumber) { - this.traceNumber = traceNumber; - } - - - public AchPaymentAllOfAttributes sameDay(Boolean sameDay) { - - this.sameDay = sameDay; - return this; - } - - /** - * Get sameDay - * @return sameDay - **/ - @javax.annotation.Nullable - public Boolean getSameDay() { - return sameDay; - } - - - public void setSameDay(Boolean sameDay) { - this.sameDay = sameDay; - } - - - public AchPaymentAllOfAttributes counterpartyVerificationMethod(String counterpartyVerificationMethod) { - - this.counterpartyVerificationMethod = counterpartyVerificationMethod; - return this; - } - - /** - * Get counterpartyVerificationMethod - * @return counterpartyVerificationMethod - **/ - @javax.annotation.Nullable - public String getCounterpartyVerificationMethod() { - return counterpartyVerificationMethod; - } - - - public void setCounterpartyVerificationMethod(String counterpartyVerificationMethod) { - this.counterpartyVerificationMethod = counterpartyVerificationMethod; - } - - - public AchPaymentAllOfAttributes clearingDaysOverride(Integer clearingDaysOverride) { - - this.clearingDaysOverride = clearingDaysOverride; - return this; - } - - /** - * Get clearingDaysOverride - * @return clearingDaysOverride - **/ - @javax.annotation.Nullable - public Integer getClearingDaysOverride() { - return clearingDaysOverride; - } - - - public void setClearingDaysOverride(Integer clearingDaysOverride) { - this.clearingDaysOverride = clearingDaysOverride; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AchPaymentAllOfAttributes achPaymentAllOfAttributes = (AchPaymentAllOfAttributes) o; - return Objects.equals(this.createdAt, achPaymentAllOfAttributes.createdAt) && - Objects.equals(this.amount, achPaymentAllOfAttributes.amount) && - Objects.equals(this.direction, achPaymentAllOfAttributes.direction) && - Objects.equals(this.description, achPaymentAllOfAttributes.description) && - Objects.equals(this.addenda, achPaymentAllOfAttributes.addenda) && - Objects.equals(this.counterparty, achPaymentAllOfAttributes.counterparty) && - Objects.equals(this.tags, achPaymentAllOfAttributes.tags) && - Objects.equals(this.status, achPaymentAllOfAttributes.status) && - Objects.equals(this.settlementDate, achPaymentAllOfAttributes.settlementDate) && - Objects.equals(this.reason, achPaymentAllOfAttributes.reason) && - Objects.equals(this.expectedCompletionDate, achPaymentAllOfAttributes.expectedCompletionDate) && - Objects.equals(this.secCode, achPaymentAllOfAttributes.secCode) && - Objects.equals(this.traceNumber, achPaymentAllOfAttributes.traceNumber) && - Objects.equals(this.sameDay, achPaymentAllOfAttributes.sameDay) && - Objects.equals(this.counterpartyVerificationMethod, achPaymentAllOfAttributes.counterpartyVerificationMethod) && - Objects.equals(this.clearingDaysOverride, achPaymentAllOfAttributes.clearingDaysOverride); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, amount, direction, description, addenda, counterparty, tags, status, settlementDate, reason, expectedCompletionDate, secCode, traceNumber, sameDay, counterpartyVerificationMethod, clearingDaysOverride); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AchPaymentAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); - sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" settlementDate: ").append(toIndentedString(settlementDate)).append("\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append(" expectedCompletionDate: ").append(toIndentedString(expectedCompletionDate)).append("\n"); - sb.append(" secCode: ").append(toIndentedString(secCode)).append("\n"); - sb.append(" traceNumber: ").append(toIndentedString(traceNumber)).append("\n"); - sb.append(" sameDay: ").append(toIndentedString(sameDay)).append("\n"); - sb.append(" counterpartyVerificationMethod: ").append(toIndentedString(counterpartyVerificationMethod)).append("\n"); - sb.append(" clearingDaysOverride: ").append(toIndentedString(clearingDaysOverride)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("amount"); - openapiFields.add("direction"); - openapiFields.add("description"); - openapiFields.add("addenda"); - openapiFields.add("counterparty"); - openapiFields.add("tags"); - openapiFields.add("status"); - openapiFields.add("settlementDate"); - openapiFields.add("reason"); - openapiFields.add("expectedCompletionDate"); - openapiFields.add("secCode"); - openapiFields.add("traceNumber"); - openapiFields.add("sameDay"); - openapiFields.add("counterpartyVerificationMethod"); - openapiFields.add("clearingDaysOverride"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("status"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AchPaymentAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AchPaymentAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AchPaymentAllOfAttributes is not found in the empty JSON string", AchPaymentAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AchPaymentAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AchPaymentAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AchPaymentAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("addenda") != null && !jsonObj.get("addenda").isJsonNull()) && !jsonObj.get("addenda").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `addenda` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addenda").toString())); - } - // validate the optional field `counterparty` - if (jsonObj.get("counterparty") != null && !jsonObj.get("counterparty").isJsonNull()) { - Counterparty.validateJsonElement(jsonObj.get("counterparty")); - } - if (!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())); - } - if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); - } - if ((jsonObj.get("secCode") != null && !jsonObj.get("secCode").isJsonNull()) && !jsonObj.get("secCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `secCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secCode").toString())); - } - if ((jsonObj.get("traceNumber") != null && !jsonObj.get("traceNumber").isJsonNull()) && !jsonObj.get("traceNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `traceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("traceNumber").toString())); - } - if ((jsonObj.get("counterpartyVerificationMethod") != null && !jsonObj.get("counterpartyVerificationMethod").isJsonNull()) && !jsonObj.get("counterpartyVerificationMethod").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `counterpartyVerificationMethod` to be a primitive type in the JSON string but got `%s`", jsonObj.get("counterpartyVerificationMethod").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AchPaymentAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AchPaymentAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AchPaymentAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AchPaymentAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AchPaymentAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AchPaymentAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of AchPaymentAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to AchPaymentAllOfAttributes - */ - public static AchPaymentAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AchPaymentAllOfAttributes.class); - } - - /** - * Convert an instance of AchPaymentAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AchRepayment.java b/src/main/java/org/openapitools/client/model/AchRepayment.java deleted file mode 100644 index 2ac68189..00000000 --- a/src/main/java/org/openapitools/client/model/AchRepayment.java +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AchRepaymentAllOfAttributes; -import org.openapitools.client.model.AchRepaymentAllOfRelationships; -import org.openapitools.client.model.Repayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AchRepayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AchRepayment extends Repayment { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private AchRepaymentAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private AchRepaymentAllOfRelationships relationships; - - public AchRepayment() { - this.type = this.getClass().getSimpleName(); - } - - public AchRepayment attributes(AchRepaymentAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public AchRepaymentAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(AchRepaymentAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public AchRepayment relationships(AchRepaymentAllOfRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public AchRepaymentAllOfRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(AchRepaymentAllOfRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AchRepayment achRepayment = (AchRepayment) o; - return Objects.equals(this.attributes, achRepayment.attributes) && - Objects.equals(this.relationships, achRepayment.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AchRepayment {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AchRepayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AchRepayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AchRepayment is not found in the empty JSON string", AchRepayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AchRepayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AchRepayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AchRepayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AchRepayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AchRepayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AchRepayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AchRepayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AchRepayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of AchRepayment - * @throws IOException if the JSON string is invalid with respect to AchRepayment - */ - public static AchRepayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AchRepayment.class); - } - - /** - * Convert an instance of AchRepayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfAttributes.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfAttributes.java deleted file mode 100644 index 7e9111a3..00000000 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfAttributes.java +++ /dev/null @@ -1,415 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AchRepaymentAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AchRepaymentAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_SAME_DAY = "sameDay"; - @SerializedName(SERIALIZED_NAME_SAME_DAY) - private Boolean sameDay; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - PENDING("Pending"), - - PENDINGREVIEW("PendingReview"), - - SENT("Sent"), - - RETURNED("Returned"), - - REJECTED("Rejected"), - - CLEARING("Clearing"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public AchRepaymentAllOfAttributes() { - } - - public AchRepaymentAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public AchRepaymentAllOfAttributes updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public AchRepaymentAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public AchRepaymentAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public AchRepaymentAllOfAttributes sameDay(Boolean sameDay) { - - this.sameDay = sameDay; - return this; - } - - /** - * Get sameDay - * @return sameDay - **/ - @javax.annotation.Nullable - public Boolean getSameDay() { - return sameDay; - } - - - public void setSameDay(Boolean sameDay) { - this.sameDay = sameDay; - } - - - public AchRepaymentAllOfAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AchRepaymentAllOfAttributes achRepaymentAllOfAttributes = (AchRepaymentAllOfAttributes) o; - return Objects.equals(this.createdAt, achRepaymentAllOfAttributes.createdAt) && - Objects.equals(this.updatedAt, achRepaymentAllOfAttributes.updatedAt) && - Objects.equals(this.amount, achRepaymentAllOfAttributes.amount) && - Objects.equals(this.tags, achRepaymentAllOfAttributes.tags) && - Objects.equals(this.sameDay, achRepaymentAllOfAttributes.sameDay) && - Objects.equals(this.status, achRepaymentAllOfAttributes.status); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, updatedAt, amount, tags, sameDay, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AchRepaymentAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" sameDay: ").append(toIndentedString(sameDay)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("amount"); - openapiFields.add("tags"); - openapiFields.add("sameDay"); - openapiFields.add("status"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("status"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AchRepaymentAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AchRepaymentAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AchRepaymentAllOfAttributes is not found in the empty JSON string", AchRepaymentAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AchRepaymentAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AchRepaymentAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AchRepaymentAllOfAttributes.openapiRequiredFields) { - 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("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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AchRepaymentAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AchRepaymentAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AchRepaymentAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AchRepaymentAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AchRepaymentAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AchRepaymentAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of AchRepaymentAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to AchRepaymentAllOfAttributes - */ - public static AchRepaymentAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AchRepaymentAllOfAttributes.class); - } - - /** - * Convert an instance of AchRepaymentAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationships.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationships.java deleted file mode 100644 index f288726c..00000000 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationships.java +++ /dev/null @@ -1,342 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AchRepaymentAllOfRelationshipsAccount; -import org.openapitools.client.model.AchRepaymentAllOfRelationshipsCounterparty; -import org.openapitools.client.model.AchRepaymentAllOfRelationshipsCreditAccount; -import org.openapitools.client.model.AchRepaymentAllOfRelationshipsCustomer; -import org.openapitools.client.model.AchRepaymentAllOfRelationshipsPayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AchRepaymentAllOfRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AchRepaymentAllOfRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private AchRepaymentAllOfRelationshipsAccount account; - - public static final String SERIALIZED_NAME_CREDIT_ACCOUNT = "creditAccount"; - @SerializedName(SERIALIZED_NAME_CREDIT_ACCOUNT) - private AchRepaymentAllOfRelationshipsCreditAccount creditAccount; - - public static final String SERIALIZED_NAME_COUNTERPARTY = "counterparty"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY) - private AchRepaymentAllOfRelationshipsCounterparty counterparty; - - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private AchRepaymentAllOfRelationshipsCustomer customer; - - public static final String SERIALIZED_NAME_PAYMENT = "payment"; - @SerializedName(SERIALIZED_NAME_PAYMENT) - private AchRepaymentAllOfRelationshipsPayment payment; - - public AchRepaymentAllOfRelationships() { - } - - public AchRepaymentAllOfRelationships account(AchRepaymentAllOfRelationshipsAccount account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nullable - public AchRepaymentAllOfRelationshipsAccount getAccount() { - return account; - } - - - public void setAccount(AchRepaymentAllOfRelationshipsAccount account) { - this.account = account; - } - - - public AchRepaymentAllOfRelationships creditAccount(AchRepaymentAllOfRelationshipsCreditAccount creditAccount) { - - this.creditAccount = creditAccount; - return this; - } - - /** - * Get creditAccount - * @return creditAccount - **/ - @javax.annotation.Nullable - public AchRepaymentAllOfRelationshipsCreditAccount getCreditAccount() { - return creditAccount; - } - - - public void setCreditAccount(AchRepaymentAllOfRelationshipsCreditAccount creditAccount) { - this.creditAccount = creditAccount; - } - - - public AchRepaymentAllOfRelationships counterparty(AchRepaymentAllOfRelationshipsCounterparty counterparty) { - - this.counterparty = counterparty; - return this; - } - - /** - * Get counterparty - * @return counterparty - **/ - @javax.annotation.Nullable - public AchRepaymentAllOfRelationshipsCounterparty getCounterparty() { - return counterparty; - } - - - public void setCounterparty(AchRepaymentAllOfRelationshipsCounterparty counterparty) { - this.counterparty = counterparty; - } - - - public AchRepaymentAllOfRelationships customer(AchRepaymentAllOfRelationshipsCustomer customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nullable - public AchRepaymentAllOfRelationshipsCustomer getCustomer() { - return customer; - } - - - public void setCustomer(AchRepaymentAllOfRelationshipsCustomer customer) { - this.customer = customer; - } - - - public AchRepaymentAllOfRelationships payment(AchRepaymentAllOfRelationshipsPayment payment) { - - this.payment = payment; - return this; - } - - /** - * Get payment - * @return payment - **/ - @javax.annotation.Nullable - public AchRepaymentAllOfRelationshipsPayment getPayment() { - return payment; - } - - - public void setPayment(AchRepaymentAllOfRelationshipsPayment payment) { - this.payment = payment; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AchRepaymentAllOfRelationships achRepaymentAllOfRelationships = (AchRepaymentAllOfRelationships) o; - return Objects.equals(this.account, achRepaymentAllOfRelationships.account) && - Objects.equals(this.creditAccount, achRepaymentAllOfRelationships.creditAccount) && - Objects.equals(this.counterparty, achRepaymentAllOfRelationships.counterparty) && - Objects.equals(this.customer, achRepaymentAllOfRelationships.customer) && - Objects.equals(this.payment, achRepaymentAllOfRelationships.payment); - } - - @Override - public int hashCode() { - return Objects.hash(account, creditAccount, counterparty, customer, payment); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AchRepaymentAllOfRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" creditAccount: ").append(toIndentedString(creditAccount)).append("\n"); - sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" payment: ").append(toIndentedString(payment)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - openapiFields.add("creditAccount"); - openapiFields.add("counterparty"); - openapiFields.add("customer"); - openapiFields.add("payment"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AchRepaymentAllOfRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AchRepaymentAllOfRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AchRepaymentAllOfRelationships is not found in the empty JSON string", AchRepaymentAllOfRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AchRepaymentAllOfRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AchRepaymentAllOfRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `account` - if (jsonObj.get("account") != null && !jsonObj.get("account").isJsonNull()) { - AchRepaymentAllOfRelationshipsAccount.validateJsonElement(jsonObj.get("account")); - } - // validate the optional field `creditAccount` - if (jsonObj.get("creditAccount") != null && !jsonObj.get("creditAccount").isJsonNull()) { - AchRepaymentAllOfRelationshipsCreditAccount.validateJsonElement(jsonObj.get("creditAccount")); - } - // validate the optional field `counterparty` - if (jsonObj.get("counterparty") != null && !jsonObj.get("counterparty").isJsonNull()) { - AchRepaymentAllOfRelationshipsCounterparty.validateJsonElement(jsonObj.get("counterparty")); - } - // validate the optional field `customer` - if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { - AchRepaymentAllOfRelationshipsCustomer.validateJsonElement(jsonObj.get("customer")); - } - // validate the optional field `payment` - if (jsonObj.get("payment") != null && !jsonObj.get("payment").isJsonNull()) { - AchRepaymentAllOfRelationshipsPayment.validateJsonElement(jsonObj.get("payment")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AchRepaymentAllOfRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AchRepaymentAllOfRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AchRepaymentAllOfRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AchRepaymentAllOfRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AchRepaymentAllOfRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AchRepaymentAllOfRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of AchRepaymentAllOfRelationships - * @throws IOException if the JSON string is invalid with respect to AchRepaymentAllOfRelationships - */ - public static AchRepaymentAllOfRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AchRepaymentAllOfRelationships.class); - } - - /** - * Convert an instance of AchRepaymentAllOfRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsAccount.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsAccount.java deleted file mode 100644 index 706403e7..00000000 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsAccount.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AchRepaymentAllOfRelationshipsAccountData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AchRepaymentAllOfRelationshipsAccount - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AchRepaymentAllOfRelationshipsAccount { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private AchRepaymentAllOfRelationshipsAccountData data; - - public AchRepaymentAllOfRelationshipsAccount() { - } - - public AchRepaymentAllOfRelationshipsAccount data(AchRepaymentAllOfRelationshipsAccountData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public AchRepaymentAllOfRelationshipsAccountData getData() { - return data; - } - - - public void setData(AchRepaymentAllOfRelationshipsAccountData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AchRepaymentAllOfRelationshipsAccount achRepaymentAllOfRelationshipsAccount = (AchRepaymentAllOfRelationshipsAccount) o; - return Objects.equals(this.data, achRepaymentAllOfRelationshipsAccount.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AchRepaymentAllOfRelationshipsAccount {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AchRepaymentAllOfRelationshipsAccount - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AchRepaymentAllOfRelationshipsAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AchRepaymentAllOfRelationshipsAccount is not found in the empty JSON string", AchRepaymentAllOfRelationshipsAccount.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AchRepaymentAllOfRelationshipsAccount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AchRepaymentAllOfRelationshipsAccount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AchRepaymentAllOfRelationshipsAccount.openapiRequiredFields) { - 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(); - // validate the required field `data` - AchRepaymentAllOfRelationshipsAccountData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AchRepaymentAllOfRelationshipsAccount.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AchRepaymentAllOfRelationshipsAccount' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AchRepaymentAllOfRelationshipsAccount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AchRepaymentAllOfRelationshipsAccount value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AchRepaymentAllOfRelationshipsAccount read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AchRepaymentAllOfRelationshipsAccount given an JSON string - * - * @param jsonString JSON string - * @return An instance of AchRepaymentAllOfRelationshipsAccount - * @throws IOException if the JSON string is invalid with respect to AchRepaymentAllOfRelationshipsAccount - */ - public static AchRepaymentAllOfRelationshipsAccount fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AchRepaymentAllOfRelationshipsAccount.class); - } - - /** - * Convert an instance of AchRepaymentAllOfRelationshipsAccount to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsAccountData.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsAccountData.java deleted file mode 100644 index 7563eba4..00000000 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsAccountData.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AchRepaymentAllOfRelationshipsAccountData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AchRepaymentAllOfRelationshipsAccountData { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - DEPOSITACCOUNT("depositAccount"), - - ACCOUNT("account"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public AchRepaymentAllOfRelationshipsAccountData() { - } - - public AchRepaymentAllOfRelationshipsAccountData type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public AchRepaymentAllOfRelationshipsAccountData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AchRepaymentAllOfRelationshipsAccountData achRepaymentAllOfRelationshipsAccountData = (AchRepaymentAllOfRelationshipsAccountData) o; - return Objects.equals(this.type, achRepaymentAllOfRelationshipsAccountData.type) && - Objects.equals(this.id, achRepaymentAllOfRelationshipsAccountData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AchRepaymentAllOfRelationshipsAccountData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AchRepaymentAllOfRelationshipsAccountData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AchRepaymentAllOfRelationshipsAccountData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AchRepaymentAllOfRelationshipsAccountData is not found in the empty JSON string", AchRepaymentAllOfRelationshipsAccountData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AchRepaymentAllOfRelationshipsAccountData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AchRepaymentAllOfRelationshipsAccountData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AchRepaymentAllOfRelationshipsAccountData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AchRepaymentAllOfRelationshipsAccountData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AchRepaymentAllOfRelationshipsAccountData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AchRepaymentAllOfRelationshipsAccountData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AchRepaymentAllOfRelationshipsAccountData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AchRepaymentAllOfRelationshipsAccountData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AchRepaymentAllOfRelationshipsAccountData given an JSON string - * - * @param jsonString JSON string - * @return An instance of AchRepaymentAllOfRelationshipsAccountData - * @throws IOException if the JSON string is invalid with respect to AchRepaymentAllOfRelationshipsAccountData - */ - public static AchRepaymentAllOfRelationshipsAccountData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AchRepaymentAllOfRelationshipsAccountData.class); - } - - /** - * Convert an instance of AchRepaymentAllOfRelationshipsAccountData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCounterparty.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCounterparty.java deleted file mode 100644 index becb563c..00000000 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCounterparty.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AchRepaymentAllOfRelationshipsCounterpartyData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AchRepaymentAllOfRelationshipsCounterparty - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AchRepaymentAllOfRelationshipsCounterparty { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private AchRepaymentAllOfRelationshipsCounterpartyData data; - - public AchRepaymentAllOfRelationshipsCounterparty() { - } - - public AchRepaymentAllOfRelationshipsCounterparty data(AchRepaymentAllOfRelationshipsCounterpartyData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public AchRepaymentAllOfRelationshipsCounterpartyData getData() { - return data; - } - - - public void setData(AchRepaymentAllOfRelationshipsCounterpartyData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AchRepaymentAllOfRelationshipsCounterparty achRepaymentAllOfRelationshipsCounterparty = (AchRepaymentAllOfRelationshipsCounterparty) o; - return Objects.equals(this.data, achRepaymentAllOfRelationshipsCounterparty.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AchRepaymentAllOfRelationshipsCounterparty {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AchRepaymentAllOfRelationshipsCounterparty - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AchRepaymentAllOfRelationshipsCounterparty.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AchRepaymentAllOfRelationshipsCounterparty is not found in the empty JSON string", AchRepaymentAllOfRelationshipsCounterparty.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AchRepaymentAllOfRelationshipsCounterparty.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AchRepaymentAllOfRelationshipsCounterparty` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AchRepaymentAllOfRelationshipsCounterparty.openapiRequiredFields) { - 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(); - // validate the required field `data` - AchRepaymentAllOfRelationshipsCounterpartyData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AchRepaymentAllOfRelationshipsCounterparty.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AchRepaymentAllOfRelationshipsCounterparty' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AchRepaymentAllOfRelationshipsCounterparty.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AchRepaymentAllOfRelationshipsCounterparty value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AchRepaymentAllOfRelationshipsCounterparty read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AchRepaymentAllOfRelationshipsCounterparty given an JSON string - * - * @param jsonString JSON string - * @return An instance of AchRepaymentAllOfRelationshipsCounterparty - * @throws IOException if the JSON string is invalid with respect to AchRepaymentAllOfRelationshipsCounterparty - */ - public static AchRepaymentAllOfRelationshipsCounterparty fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AchRepaymentAllOfRelationshipsCounterparty.class); - } - - /** - * Convert an instance of AchRepaymentAllOfRelationshipsCounterparty to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCounterpartyData.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCounterpartyData.java deleted file mode 100644 index 35767a6a..00000000 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCounterpartyData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AchRepaymentAllOfRelationshipsCounterpartyData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AchRepaymentAllOfRelationshipsCounterpartyData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "counterparty"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public AchRepaymentAllOfRelationshipsCounterpartyData() { - } - - public AchRepaymentAllOfRelationshipsCounterpartyData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public AchRepaymentAllOfRelationshipsCounterpartyData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AchRepaymentAllOfRelationshipsCounterpartyData achRepaymentAllOfRelationshipsCounterpartyData = (AchRepaymentAllOfRelationshipsCounterpartyData) o; - return Objects.equals(this.type, achRepaymentAllOfRelationshipsCounterpartyData.type) && - Objects.equals(this.id, achRepaymentAllOfRelationshipsCounterpartyData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AchRepaymentAllOfRelationshipsCounterpartyData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AchRepaymentAllOfRelationshipsCounterpartyData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AchRepaymentAllOfRelationshipsCounterpartyData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AchRepaymentAllOfRelationshipsCounterpartyData is not found in the empty JSON string", AchRepaymentAllOfRelationshipsCounterpartyData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AchRepaymentAllOfRelationshipsCounterpartyData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AchRepaymentAllOfRelationshipsCounterpartyData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AchRepaymentAllOfRelationshipsCounterpartyData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AchRepaymentAllOfRelationshipsCounterpartyData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AchRepaymentAllOfRelationshipsCounterpartyData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AchRepaymentAllOfRelationshipsCounterpartyData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AchRepaymentAllOfRelationshipsCounterpartyData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AchRepaymentAllOfRelationshipsCounterpartyData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AchRepaymentAllOfRelationshipsCounterpartyData given an JSON string - * - * @param jsonString JSON string - * @return An instance of AchRepaymentAllOfRelationshipsCounterpartyData - * @throws IOException if the JSON string is invalid with respect to AchRepaymentAllOfRelationshipsCounterpartyData - */ - public static AchRepaymentAllOfRelationshipsCounterpartyData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AchRepaymentAllOfRelationshipsCounterpartyData.class); - } - - /** - * Convert an instance of AchRepaymentAllOfRelationshipsCounterpartyData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCreditAccount.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCreditAccount.java deleted file mode 100644 index e0e804cb..00000000 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCreditAccount.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AchRepaymentAllOfRelationshipsCreditAccountData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AchRepaymentAllOfRelationshipsCreditAccount - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AchRepaymentAllOfRelationshipsCreditAccount { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private AchRepaymentAllOfRelationshipsCreditAccountData data; - - public AchRepaymentAllOfRelationshipsCreditAccount() { - } - - public AchRepaymentAllOfRelationshipsCreditAccount data(AchRepaymentAllOfRelationshipsCreditAccountData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public AchRepaymentAllOfRelationshipsCreditAccountData getData() { - return data; - } - - - public void setData(AchRepaymentAllOfRelationshipsCreditAccountData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AchRepaymentAllOfRelationshipsCreditAccount achRepaymentAllOfRelationshipsCreditAccount = (AchRepaymentAllOfRelationshipsCreditAccount) o; - return Objects.equals(this.data, achRepaymentAllOfRelationshipsCreditAccount.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AchRepaymentAllOfRelationshipsCreditAccount {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AchRepaymentAllOfRelationshipsCreditAccount - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AchRepaymentAllOfRelationshipsCreditAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AchRepaymentAllOfRelationshipsCreditAccount is not found in the empty JSON string", AchRepaymentAllOfRelationshipsCreditAccount.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AchRepaymentAllOfRelationshipsCreditAccount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AchRepaymentAllOfRelationshipsCreditAccount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AchRepaymentAllOfRelationshipsCreditAccount.openapiRequiredFields) { - 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(); - // validate the required field `data` - AchRepaymentAllOfRelationshipsCreditAccountData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AchRepaymentAllOfRelationshipsCreditAccount.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AchRepaymentAllOfRelationshipsCreditAccount' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AchRepaymentAllOfRelationshipsCreditAccount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AchRepaymentAllOfRelationshipsCreditAccount value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AchRepaymentAllOfRelationshipsCreditAccount read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AchRepaymentAllOfRelationshipsCreditAccount given an JSON string - * - * @param jsonString JSON string - * @return An instance of AchRepaymentAllOfRelationshipsCreditAccount - * @throws IOException if the JSON string is invalid with respect to AchRepaymentAllOfRelationshipsCreditAccount - */ - public static AchRepaymentAllOfRelationshipsCreditAccount fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AchRepaymentAllOfRelationshipsCreditAccount.class); - } - - /** - * Convert an instance of AchRepaymentAllOfRelationshipsCreditAccount to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCreditAccountData.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCreditAccountData.java deleted file mode 100644 index efaa3e37..00000000 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCreditAccountData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AchRepaymentAllOfRelationshipsCreditAccountData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AchRepaymentAllOfRelationshipsCreditAccountData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "creditAccount"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public AchRepaymentAllOfRelationshipsCreditAccountData() { - } - - public AchRepaymentAllOfRelationshipsCreditAccountData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public AchRepaymentAllOfRelationshipsCreditAccountData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AchRepaymentAllOfRelationshipsCreditAccountData achRepaymentAllOfRelationshipsCreditAccountData = (AchRepaymentAllOfRelationshipsCreditAccountData) o; - return Objects.equals(this.type, achRepaymentAllOfRelationshipsCreditAccountData.type) && - Objects.equals(this.id, achRepaymentAllOfRelationshipsCreditAccountData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AchRepaymentAllOfRelationshipsCreditAccountData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AchRepaymentAllOfRelationshipsCreditAccountData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AchRepaymentAllOfRelationshipsCreditAccountData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AchRepaymentAllOfRelationshipsCreditAccountData is not found in the empty JSON string", AchRepaymentAllOfRelationshipsCreditAccountData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AchRepaymentAllOfRelationshipsCreditAccountData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AchRepaymentAllOfRelationshipsCreditAccountData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AchRepaymentAllOfRelationshipsCreditAccountData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AchRepaymentAllOfRelationshipsCreditAccountData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AchRepaymentAllOfRelationshipsCreditAccountData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AchRepaymentAllOfRelationshipsCreditAccountData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AchRepaymentAllOfRelationshipsCreditAccountData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AchRepaymentAllOfRelationshipsCreditAccountData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AchRepaymentAllOfRelationshipsCreditAccountData given an JSON string - * - * @param jsonString JSON string - * @return An instance of AchRepaymentAllOfRelationshipsCreditAccountData - * @throws IOException if the JSON string is invalid with respect to AchRepaymentAllOfRelationshipsCreditAccountData - */ - public static AchRepaymentAllOfRelationshipsCreditAccountData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AchRepaymentAllOfRelationshipsCreditAccountData.class); - } - - /** - * Convert an instance of AchRepaymentAllOfRelationshipsCreditAccountData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCustomer.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCustomer.java deleted file mode 100644 index e2bb6abb..00000000 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCustomer.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AchRepaymentAllOfRelationshipsCustomerData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AchRepaymentAllOfRelationshipsCustomer - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AchRepaymentAllOfRelationshipsCustomer { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private AchRepaymentAllOfRelationshipsCustomerData data; - - public AchRepaymentAllOfRelationshipsCustomer() { - } - - public AchRepaymentAllOfRelationshipsCustomer data(AchRepaymentAllOfRelationshipsCustomerData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public AchRepaymentAllOfRelationshipsCustomerData getData() { - return data; - } - - - public void setData(AchRepaymentAllOfRelationshipsCustomerData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AchRepaymentAllOfRelationshipsCustomer achRepaymentAllOfRelationshipsCustomer = (AchRepaymentAllOfRelationshipsCustomer) o; - return Objects.equals(this.data, achRepaymentAllOfRelationshipsCustomer.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AchRepaymentAllOfRelationshipsCustomer {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AchRepaymentAllOfRelationshipsCustomer - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AchRepaymentAllOfRelationshipsCustomer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AchRepaymentAllOfRelationshipsCustomer is not found in the empty JSON string", AchRepaymentAllOfRelationshipsCustomer.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AchRepaymentAllOfRelationshipsCustomer.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AchRepaymentAllOfRelationshipsCustomer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AchRepaymentAllOfRelationshipsCustomer.openapiRequiredFields) { - 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(); - // validate the required field `data` - AchRepaymentAllOfRelationshipsCustomerData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AchRepaymentAllOfRelationshipsCustomer.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AchRepaymentAllOfRelationshipsCustomer' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AchRepaymentAllOfRelationshipsCustomer.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AchRepaymentAllOfRelationshipsCustomer value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AchRepaymentAllOfRelationshipsCustomer read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AchRepaymentAllOfRelationshipsCustomer given an JSON string - * - * @param jsonString JSON string - * @return An instance of AchRepaymentAllOfRelationshipsCustomer - * @throws IOException if the JSON string is invalid with respect to AchRepaymentAllOfRelationshipsCustomer - */ - public static AchRepaymentAllOfRelationshipsCustomer fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AchRepaymentAllOfRelationshipsCustomer.class); - } - - /** - * Convert an instance of AchRepaymentAllOfRelationshipsCustomer to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCustomerData.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCustomerData.java deleted file mode 100644 index ada31713..00000000 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsCustomerData.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AchRepaymentAllOfRelationshipsCustomerData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AchRepaymentAllOfRelationshipsCustomerData { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - BUSINESSCUSTOMER("businessCustomer"), - - INDIVIDUALCUSTOMER("individualCustomer"), - - CUSTOMER("customer"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public AchRepaymentAllOfRelationshipsCustomerData() { - } - - public AchRepaymentAllOfRelationshipsCustomerData type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public AchRepaymentAllOfRelationshipsCustomerData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AchRepaymentAllOfRelationshipsCustomerData achRepaymentAllOfRelationshipsCustomerData = (AchRepaymentAllOfRelationshipsCustomerData) o; - return Objects.equals(this.type, achRepaymentAllOfRelationshipsCustomerData.type) && - Objects.equals(this.id, achRepaymentAllOfRelationshipsCustomerData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AchRepaymentAllOfRelationshipsCustomerData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AchRepaymentAllOfRelationshipsCustomerData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AchRepaymentAllOfRelationshipsCustomerData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AchRepaymentAllOfRelationshipsCustomerData is not found in the empty JSON string", AchRepaymentAllOfRelationshipsCustomerData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AchRepaymentAllOfRelationshipsCustomerData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AchRepaymentAllOfRelationshipsCustomerData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AchRepaymentAllOfRelationshipsCustomerData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AchRepaymentAllOfRelationshipsCustomerData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AchRepaymentAllOfRelationshipsCustomerData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AchRepaymentAllOfRelationshipsCustomerData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AchRepaymentAllOfRelationshipsCustomerData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AchRepaymentAllOfRelationshipsCustomerData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AchRepaymentAllOfRelationshipsCustomerData given an JSON string - * - * @param jsonString JSON string - * @return An instance of AchRepaymentAllOfRelationshipsCustomerData - * @throws IOException if the JSON string is invalid with respect to AchRepaymentAllOfRelationshipsCustomerData - */ - public static AchRepaymentAllOfRelationshipsCustomerData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AchRepaymentAllOfRelationshipsCustomerData.class); - } - - /** - * Convert an instance of AchRepaymentAllOfRelationshipsCustomerData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsPayment.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsPayment.java deleted file mode 100644 index 8b2918b5..00000000 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsPayment.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AchRepaymentAllOfRelationshipsPaymentData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AchRepaymentAllOfRelationshipsPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AchRepaymentAllOfRelationshipsPayment { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private AchRepaymentAllOfRelationshipsPaymentData data; - - public AchRepaymentAllOfRelationshipsPayment() { - } - - public AchRepaymentAllOfRelationshipsPayment data(AchRepaymentAllOfRelationshipsPaymentData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public AchRepaymentAllOfRelationshipsPaymentData getData() { - return data; - } - - - public void setData(AchRepaymentAllOfRelationshipsPaymentData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AchRepaymentAllOfRelationshipsPayment achRepaymentAllOfRelationshipsPayment = (AchRepaymentAllOfRelationshipsPayment) o; - return Objects.equals(this.data, achRepaymentAllOfRelationshipsPayment.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AchRepaymentAllOfRelationshipsPayment {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AchRepaymentAllOfRelationshipsPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AchRepaymentAllOfRelationshipsPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AchRepaymentAllOfRelationshipsPayment is not found in the empty JSON string", AchRepaymentAllOfRelationshipsPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AchRepaymentAllOfRelationshipsPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AchRepaymentAllOfRelationshipsPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AchRepaymentAllOfRelationshipsPayment.openapiRequiredFields) { - 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(); - // validate the required field `data` - AchRepaymentAllOfRelationshipsPaymentData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AchRepaymentAllOfRelationshipsPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AchRepaymentAllOfRelationshipsPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AchRepaymentAllOfRelationshipsPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AchRepaymentAllOfRelationshipsPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AchRepaymentAllOfRelationshipsPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AchRepaymentAllOfRelationshipsPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of AchRepaymentAllOfRelationshipsPayment - * @throws IOException if the JSON string is invalid with respect to AchRepaymentAllOfRelationshipsPayment - */ - public static AchRepaymentAllOfRelationshipsPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AchRepaymentAllOfRelationshipsPayment.class); - } - - /** - * Convert an instance of AchRepaymentAllOfRelationshipsPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsPaymentData.java b/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsPaymentData.java deleted file mode 100644 index 834afb65..00000000 --- a/src/main/java/org/openapitools/client/model/AchRepaymentAllOfRelationshipsPaymentData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AchRepaymentAllOfRelationshipsPaymentData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AchRepaymentAllOfRelationshipsPaymentData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "payment"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public AchRepaymentAllOfRelationshipsPaymentData() { - } - - public AchRepaymentAllOfRelationshipsPaymentData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public AchRepaymentAllOfRelationshipsPaymentData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AchRepaymentAllOfRelationshipsPaymentData achRepaymentAllOfRelationshipsPaymentData = (AchRepaymentAllOfRelationshipsPaymentData) o; - return Objects.equals(this.type, achRepaymentAllOfRelationshipsPaymentData.type) && - Objects.equals(this.id, achRepaymentAllOfRelationshipsPaymentData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AchRepaymentAllOfRelationshipsPaymentData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AchRepaymentAllOfRelationshipsPaymentData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AchRepaymentAllOfRelationshipsPaymentData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AchRepaymentAllOfRelationshipsPaymentData is not found in the empty JSON string", AchRepaymentAllOfRelationshipsPaymentData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AchRepaymentAllOfRelationshipsPaymentData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AchRepaymentAllOfRelationshipsPaymentData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AchRepaymentAllOfRelationshipsPaymentData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AchRepaymentAllOfRelationshipsPaymentData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AchRepaymentAllOfRelationshipsPaymentData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AchRepaymentAllOfRelationshipsPaymentData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AchRepaymentAllOfRelationshipsPaymentData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AchRepaymentAllOfRelationshipsPaymentData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AchRepaymentAllOfRelationshipsPaymentData given an JSON string - * - * @param jsonString JSON string - * @return An instance of AchRepaymentAllOfRelationshipsPaymentData - * @throws IOException if the JSON string is invalid with respect to AchRepaymentAllOfRelationshipsPaymentData - */ - public static AchRepaymentAllOfRelationshipsPaymentData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AchRepaymentAllOfRelationshipsPaymentData.class); - } - - /** - * Convert an instance of AchRepaymentAllOfRelationshipsPaymentData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Address.java b/src/main/java/org/openapitools/client/model/Address.java deleted file mode 100644 index 2dc04d23..00000000 --- a/src/main/java/org/openapitools/client/model/Address.java +++ /dev/null @@ -1,387 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Address - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Address { - public static final String SERIALIZED_NAME_STREET = "street"; - @SerializedName(SERIALIZED_NAME_STREET) - private String street; - - public static final String SERIALIZED_NAME_STREET2 = "street2"; - @SerializedName(SERIALIZED_NAME_STREET2) - private String street2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; - @SerializedName(SERIALIZED_NAME_POSTAL_CODE) - private String postalCode; - - public static final String SERIALIZED_NAME_COUNTRY = "country"; - @SerializedName(SERIALIZED_NAME_COUNTRY) - private String country = "US"; - - public Address() { - } - - public Address street(String street) { - - this.street = street; - return this; - } - - /** - * Get street - * @return street - **/ - @javax.annotation.Nonnull - public String getStreet() { - return street; - } - - - public void setStreet(String street) { - this.street = street; - } - - - public Address street2(String street2) { - - this.street2 = street2; - return this; - } - - /** - * Get street2 - * @return street2 - **/ - @javax.annotation.Nullable - public String getStreet2() { - return street2; - } - - - public void setStreet2(String street2) { - this.street2 = street2; - } - - - public Address city(String city) { - - this.city = city; - return this; - } - - /** - * Get city - * @return city - **/ - @javax.annotation.Nonnull - public String getCity() { - return city; - } - - - public void setCity(String city) { - this.city = city; - } - - - public Address state(String state) { - - this.state = state; - return this; - } - - /** - * Get state - * @return state - **/ - @javax.annotation.Nonnull - public String getState() { - return state; - } - - - public void setState(String state) { - this.state = state; - } - - - public Address postalCode(String postalCode) { - - this.postalCode = postalCode; - return this; - } - - /** - * Get postalCode - * @return postalCode - **/ - @javax.annotation.Nonnull - public String getPostalCode() { - return postalCode; - } - - - public void setPostalCode(String postalCode) { - this.postalCode = postalCode; - } - - - public Address country(String country) { - - this.country = country; - return this; - } - - /** - * Get country - * @return country - **/ - @javax.annotation.Nonnull - public String getCountry() { - return country; - } - - - public void setCountry(String country) { - this.country = country; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Address address = (Address) o; - return Objects.equals(this.street, address.street) && - Objects.equals(this.street2, address.street2) && - Objects.equals(this.city, address.city) && - Objects.equals(this.state, address.state) && - Objects.equals(this.postalCode, address.postalCode) && - Objects.equals(this.country, address.country); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(street, street2, city, state, postalCode, country); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Address {\n"); - sb.append(" street: ").append(toIndentedString(street)).append("\n"); - sb.append(" street2: ").append(toIndentedString(street2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("street"); - openapiFields.add("street2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("postalCode"); - openapiFields.add("country"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("street"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("state"); - openapiRequiredFields.add("postalCode"); - openapiRequiredFields.add("country"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Address - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Address.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Address is not found in the empty JSON string", Address.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Address.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Address` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Address.openapiRequiredFields) { - 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("street").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `street` to be a primitive type in the JSON string but got `%s`", jsonObj.get("street").toString())); - } - if ((jsonObj.get("street2") != null && !jsonObj.get("street2").isJsonNull()) && !jsonObj.get("street2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `street2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("street2").toString())); - } - if (!jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if (!jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if (!jsonObj.get("postalCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); - } - if (!jsonObj.get("country").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Address.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Address' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter
thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Address.class)); - - return (TypeAdapter) new TypeAdapter
() { - @Override - public void write(JsonWriter out, Address value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Address read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Address given an JSON string - * - * @param jsonString JSON string - * @return An instance of Address - * @throws IOException if the JSON string is invalid with respect to Address - */ - public static Address fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Address.class); - } - - /** - * Convert an instance of Address to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AdjustmentTransaction.java b/src/main/java/org/openapitools/client/model/AdjustmentTransaction.java deleted file mode 100644 index 0ac9484e..00000000 --- a/src/main/java/org/openapitools/client/model/AdjustmentTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AdjustmentTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AdjustmentTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdjustmentTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private AdjustmentTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public AdjustmentTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public AdjustmentTransaction attributes(AdjustmentTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public AdjustmentTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(AdjustmentTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public AdjustmentTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdjustmentTransaction adjustmentTransaction = (AdjustmentTransaction) o; - return Objects.equals(this.attributes, adjustmentTransaction.attributes) && - Objects.equals(this.relationships, adjustmentTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdjustmentTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AdjustmentTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AdjustmentTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AdjustmentTransaction is not found in the empty JSON string", AdjustmentTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AdjustmentTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdjustmentTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AdjustmentTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AdjustmentTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AdjustmentTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AdjustmentTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AdjustmentTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AdjustmentTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AdjustmentTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of AdjustmentTransaction - * @throws IOException if the JSON string is invalid with respect to AdjustmentTransaction - */ - public static AdjustmentTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AdjustmentTransaction.class); - } - - /** - * Convert an instance of AdjustmentTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AdjustmentTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/AdjustmentTransactionAllOfAttributes.java deleted file mode 100644 index 753348dc..00000000 --- a/src/main/java/org/openapitools/client/model/AdjustmentTransactionAllOfAttributes.java +++ /dev/null @@ -1,442 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AdjustmentTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdjustmentTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public AdjustmentTransactionAllOfAttributes() { - } - - public AdjustmentTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public AdjustmentTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public AdjustmentTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public AdjustmentTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public AdjustmentTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public AdjustmentTransactionAllOfAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public AdjustmentTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdjustmentTransactionAllOfAttributes adjustmentTransactionAllOfAttributes = (AdjustmentTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, adjustmentTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, adjustmentTransactionAllOfAttributes.direction) && - Objects.equals(this.amount, adjustmentTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, adjustmentTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, adjustmentTransactionAllOfAttributes.summary) && - Objects.equals(this.description, adjustmentTransactionAllOfAttributes.description) && - Objects.equals(this.tags, adjustmentTransactionAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, amount, balance, summary, description, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdjustmentTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("description"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AdjustmentTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AdjustmentTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AdjustmentTransactionAllOfAttributes is not found in the empty JSON string", AdjustmentTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AdjustmentTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdjustmentTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AdjustmentTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AdjustmentTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AdjustmentTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AdjustmentTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AdjustmentTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AdjustmentTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AdjustmentTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of AdjustmentTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to AdjustmentTransactionAllOfAttributes - */ - public static AdjustmentTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AdjustmentTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of AdjustmentTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AnnualIncome.java b/src/main/java/org/openapitools/client/model/AnnualIncome.java deleted file mode 100644 index f3d4d911..00000000 --- a/src/main/java/org/openapitools/client/model/AnnualIncome.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets annualIncome - */ -@JsonAdapter(AnnualIncome.Adapter.class) -public enum AnnualIncome { - - UPTO10K("UpTo10k"), - - BETWEEN10KAND25K("Between10kAnd25k"), - - BETWEEN25KAND50K("Between25kAnd50k"), - - BETWEEN50KAND100K("Between50kAnd100k"), - - BETWEEN100KAND250K("Between100kAnd250k"), - - OVER250K("Over250k"); - - private String value; - - AnnualIncome(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AnnualIncome fromValue(String value) { - for (AnnualIncome b : AnnualIncome.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AnnualIncome enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AnnualIncome read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AnnualIncome.fromValue(value); - } - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApiToken.java b/src/main/java/org/openapitools/client/model/ApiToken.java deleted file mode 100644 index 930467c0..00000000 --- a/src/main/java/org/openapitools/client/model/ApiToken.java +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ApiTokenAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApiToken - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApiToken { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "apiToken"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ApiTokenAttributes attributes; - - public ApiToken() { - } - - public ApiToken type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public ApiToken id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public ApiToken attributes(ApiTokenAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public ApiTokenAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(ApiTokenAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApiToken apiToken = (ApiToken) o; - return Objects.equals(this.type, apiToken.type) && - Objects.equals(this.id, apiToken.id) && - Objects.equals(this.attributes, apiToken.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApiToken {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApiToken - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApiToken.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApiToken is not found in the empty JSON string", ApiToken.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApiToken.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiToken` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - 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())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - ApiTokenAttributes.validateJsonElement(jsonObj.get("attributes")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApiToken.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApiToken' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApiToken.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApiToken value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApiToken read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApiToken given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApiToken - * @throws IOException if the JSON string is invalid with respect to ApiToken - */ - public static ApiToken fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApiToken.class); - } - - /** - * Convert an instance of ApiToken to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApiTokenAttributes.java b/src/main/java/org/openapitools/client/model/ApiTokenAttributes.java deleted file mode 100644 index 646658ec..00000000 --- a/src/main/java/org/openapitools/client/model/ApiTokenAttributes.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApiTokenAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApiTokenAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_EXPIRATION = "expiration"; - @SerializedName(SERIALIZED_NAME_EXPIRATION) - private OffsetDateTime expiration; - - public static final String SERIALIZED_NAME_TOKEN = "token"; - @SerializedName(SERIALIZED_NAME_TOKEN) - private String token; - - public static final String SERIALIZED_NAME_SOURCE_IP = "sourceIp"; - @SerializedName(SERIALIZED_NAME_SOURCE_IP) - private String sourceIp; - - public ApiTokenAttributes() { - } - - public ApiTokenAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public ApiTokenAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public ApiTokenAttributes expiration(OffsetDateTime expiration) { - - this.expiration = expiration; - return this; - } - - /** - * Get expiration - * @return expiration - **/ - @javax.annotation.Nullable - public OffsetDateTime getExpiration() { - return expiration; - } - - - public void setExpiration(OffsetDateTime expiration) { - this.expiration = expiration; - } - - - public ApiTokenAttributes token(String token) { - - this.token = token; - return this; - } - - /** - * Get token - * @return token - **/ - @javax.annotation.Nullable - public String getToken() { - return token; - } - - - public void setToken(String token) { - this.token = token; - } - - - public ApiTokenAttributes sourceIp(String sourceIp) { - - this.sourceIp = sourceIp; - return this; - } - - /** - * Get sourceIp - * @return sourceIp - **/ - @javax.annotation.Nullable - public String getSourceIp() { - return sourceIp; - } - - - public void setSourceIp(String sourceIp) { - this.sourceIp = sourceIp; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApiTokenAttributes apiTokenAttributes = (ApiTokenAttributes) o; - return Objects.equals(this.createdAt, apiTokenAttributes.createdAt) && - Objects.equals(this.description, apiTokenAttributes.description) && - Objects.equals(this.expiration, apiTokenAttributes.expiration) && - Objects.equals(this.token, apiTokenAttributes.token) && - Objects.equals(this.sourceIp, apiTokenAttributes.sourceIp); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, description, expiration, token, sourceIp); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApiTokenAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" expiration: ").append(toIndentedString(expiration)).append("\n"); - sb.append(" token: ").append(toIndentedString(token)).append("\n"); - sb.append(" sourceIp: ").append(toIndentedString(sourceIp)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("description"); - openapiFields.add("expiration"); - openapiFields.add("token"); - openapiFields.add("sourceIp"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApiTokenAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApiTokenAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApiTokenAttributes is not found in the empty JSON string", ApiTokenAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApiTokenAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiTokenAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ApiTokenAttributes.openapiRequiredFields) { - 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("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("token") != null && !jsonObj.get("token").isJsonNull()) && !jsonObj.get("token").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); - } - if ((jsonObj.get("sourceIp") != null && !jsonObj.get("sourceIp").isJsonNull()) && !jsonObj.get("sourceIp").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sourceIp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sourceIp").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApiTokenAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApiTokenAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApiTokenAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApiTokenAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApiTokenAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApiTokenAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApiTokenAttributes - * @throws IOException if the JSON string is invalid with respect to ApiTokenAttributes - */ - public static ApiTokenAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApiTokenAttributes.class); - } - - /** - * Convert an instance of ApiTokenAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Application.java b/src/main/java/org/openapitools/client/model/Application.java deleted file mode 100644 index b775bc9a..00000000 --- a/src/main/java/org/openapitools/client/model/Application.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Application - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Application { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - protected String type; - - public Application() { - this.type = this.getClass().getSimpleName(); - } - - public Application id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public Application type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Application application = (Application) o; - return Objects.equals(this.id, application.id) && - Objects.equals(this.type, application.type); - } - - @Override - public int hashCode() { - return Objects.hash(id, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Application {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Application - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Application.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Application is not found in the empty JSON string", Application.openapiRequiredFields.toString())); - } - } - - String discriminatorValue = jsonElement.getAsJsonObject().get("type").getAsString(); - switch (discriminatorValue) { - case "businessApplication": - BusinessApplication.validateJsonElement(jsonElement); - break; - case "individualApplication": - IndividualApplication.validateJsonElement(jsonElement); - break; - case "trustApplication": - TrustApplication.validateJsonElement(jsonElement); - break; - default: - throw new IllegalArgumentException(String.format("The value of the `type` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); - } - } - - - /** - * Create an instance of Application given an JSON string - * - * @param jsonString JSON string - * @return An instance of Application - * @throws IOException if the JSON string is invalid with respect to Application - */ - public static Application fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Application.class); - } - - /** - * Convert an instance of Application to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApplicationForm.java b/src/main/java/org/openapitools/client/model/ApplicationForm.java deleted file mode 100644 index ce95edae..00000000 --- a/src/main/java/org/openapitools/client/model/ApplicationForm.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ApplicationFormAttributes; -import org.openapitools.client.model.ApplicationFormRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApplicationForm - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApplicationForm { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "applicationForm"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ApplicationFormAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private ApplicationFormRelationships relationships; - - public ApplicationForm() { - } - - public ApplicationForm type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public ApplicationForm id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public ApplicationForm attributes(ApplicationFormAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public ApplicationFormAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(ApplicationFormAttributes attributes) { - this.attributes = attributes; - } - - - public ApplicationForm relationships(ApplicationFormRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public ApplicationFormRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(ApplicationFormRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationForm applicationForm = (ApplicationForm) o; - return Objects.equals(this.type, applicationForm.type) && - Objects.equals(this.id, applicationForm.id) && - Objects.equals(this.attributes, applicationForm.attributes) && - Objects.equals(this.relationships, applicationForm.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationForm {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApplicationForm - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApplicationForm.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationForm is not found in the empty JSON string", ApplicationForm.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApplicationForm.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApplicationForm` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ApplicationForm.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - // validate the required field `attributes` - ApplicationFormAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the optional field `relationships` - if (jsonObj.get("relationships") != null && !jsonObj.get("relationships").isJsonNull()) { - ApplicationFormRelationships.validateJsonElement(jsonObj.get("relationships")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApplicationForm.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApplicationForm' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApplicationForm.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApplicationForm value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApplicationForm read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApplicationForm given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApplicationForm - * @throws IOException if the JSON string is invalid with respect to ApplicationForm - */ - public static ApplicationForm fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApplicationForm.class); - } - - /** - * Convert an instance of ApplicationForm to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApplicationFormAdditionalDisclosuresInner.java b/src/main/java/org/openapitools/client/model/ApplicationFormAdditionalDisclosuresInner.java deleted file mode 100644 index 2c5392ba..00000000 --- a/src/main/java/org/openapitools/client/model/ApplicationFormAdditionalDisclosuresInner.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApplicationFormAdditionalDisclosuresInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApplicationFormAdditionalDisclosuresInner { - public static final String SERIALIZED_NAME_TITLE = "title"; - @SerializedName(SERIALIZED_NAME_TITLE) - private String title; - - public static final String SERIALIZED_NAME_URL = "url"; - @SerializedName(SERIALIZED_NAME_URL) - private String url; - - public ApplicationFormAdditionalDisclosuresInner() { - } - - public ApplicationFormAdditionalDisclosuresInner title(String title) { - - this.title = title; - return this; - } - - /** - * Get title - * @return title - **/ - @javax.annotation.Nullable - public String getTitle() { - return title; - } - - - public void setTitle(String title) { - this.title = title; - } - - - public ApplicationFormAdditionalDisclosuresInner url(String url) { - - this.url = url; - return this; - } - - /** - * Get url - * @return url - **/ - @javax.annotation.Nullable - public String getUrl() { - return url; - } - - - public void setUrl(String url) { - this.url = url; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationFormAdditionalDisclosuresInner applicationFormAdditionalDisclosuresInner = (ApplicationFormAdditionalDisclosuresInner) o; - return Objects.equals(this.title, applicationFormAdditionalDisclosuresInner.title) && - Objects.equals(this.url, applicationFormAdditionalDisclosuresInner.url); - } - - @Override - public int hashCode() { - return Objects.hash(title, url); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationFormAdditionalDisclosuresInner {\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" url: ").append(toIndentedString(url)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("title"); - openapiFields.add("url"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApplicationFormAdditionalDisclosuresInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApplicationFormAdditionalDisclosuresInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationFormAdditionalDisclosuresInner is not found in the empty JSON string", ApplicationFormAdditionalDisclosuresInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApplicationFormAdditionalDisclosuresInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApplicationFormAdditionalDisclosuresInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); - } - if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) && !jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApplicationFormAdditionalDisclosuresInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApplicationFormAdditionalDisclosuresInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApplicationFormAdditionalDisclosuresInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApplicationFormAdditionalDisclosuresInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApplicationFormAdditionalDisclosuresInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApplicationFormAdditionalDisclosuresInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApplicationFormAdditionalDisclosuresInner - * @throws IOException if the JSON string is invalid with respect to ApplicationFormAdditionalDisclosuresInner - */ - public static ApplicationFormAdditionalDisclosuresInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApplicationFormAdditionalDisclosuresInner.class); - } - - /** - * Convert an instance of ApplicationFormAdditionalDisclosuresInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApplicationFormAttributes.java b/src/main/java/org/openapitools/client/model/ApplicationFormAttributes.java deleted file mode 100644 index b10f6df3..00000000 --- a/src/main/java/org/openapitools/client/model/ApplicationFormAttributes.java +++ /dev/null @@ -1,534 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ApplicationFormPrefill; -import org.openapitools.client.model.ApplicationFormSettingsOverride; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApplicationFormAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApplicationFormAttributes { - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_URL = "url"; - @SerializedName(SERIALIZED_NAME_URL) - private String url; - - /** - * Gets or Sets stage - */ - @JsonAdapter(StageEnum.Adapter.class) - public enum StageEnum { - CHOOSEBUSINESSORINDIVIDUAL("ChooseBusinessOrIndividual"), - - ENTERINDIVIDUALINFORMATION("EnterIndividualInformation"), - - INDIVIDUALPHONEVERIFICATION("IndividualPhoneVerification"), - - INDIVIDUALAPPLICATIONCREATED("IndividualApplicationCreated"), - - ENTERBUSINESSINFORMATION("EnterBusinessInformation"), - - ENTERBUSINESSADDITIONALINFORMATION("EnterBusinessAdditionalInformation"), - - ENTEROFFICERINFORMATION("EnterOfficerInformation"), - - BUSINESSPHONEVERIFICATION("BusinessPhoneVerification"), - - ENTERBENEFICIALOWNERSINFORMATION("EnterBeneficialOwnersInformation"), - - BUSINESSAPPLICATIONCREATED("BusinessApplicationCreated"), - - ENTERSOLEPROPRIETORSHIPINFORMATION("EnterSoleProprietorshipInformation"), - - ENTERSOLEPROPRIETORSHIPBUSINESSINFORMATION("EnterSoleProprietorshipBusinessInformation"), - - SOLEPROPRIETORSHIPPHONEVERIFICATION("SoleProprietorshipPhoneVerification"), - - SOLEPROPRIETORSHIPAPPLICATIONCREATED("SoleProprietorshipApplicationCreated"); - - private String value; - - StageEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StageEnum fromValue(String value) { - for (StageEnum b : StageEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StageEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StageEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StageEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STAGE = "stage"; - @SerializedName(SERIALIZED_NAME_STAGE) - private StageEnum stage; - - public static final String SERIALIZED_NAME_APPLICANT_DETAILS = "applicantDetails"; - @SerializedName(SERIALIZED_NAME_APPLICANT_DETAILS) - private ApplicationFormPrefill applicantDetails; - - public static final String SERIALIZED_NAME_SETTINGS_OVERRIDE = "settingsOverride"; - @SerializedName(SERIALIZED_NAME_SETTINGS_OVERRIDE) - private ApplicationFormSettingsOverride settingsOverride; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - /** - * Gets or Sets allowedApplicationTypes - */ - @JsonAdapter(AllowedApplicationTypesEnum.Adapter.class) - public enum AllowedApplicationTypesEnum { - INDIVIDUAL("Individual"), - - BUSINESS("Business"), - - SOLEPROPRIETORSHIP("SoleProprietorship"); - - private String value; - - AllowedApplicationTypesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AllowedApplicationTypesEnum fromValue(String value) { - for (AllowedApplicationTypesEnum b : AllowedApplicationTypesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AllowedApplicationTypesEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AllowedApplicationTypesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AllowedApplicationTypesEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_ALLOWED_APPLICATION_TYPES = "allowedApplicationTypes"; - @SerializedName(SERIALIZED_NAME_ALLOWED_APPLICATION_TYPES) - private List allowedApplicationTypes; - - public ApplicationFormAttributes() { - } - - public ApplicationFormAttributes email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public ApplicationFormAttributes url(String url) { - - this.url = url; - return this; - } - - /** - * Get url - * @return url - **/ - @javax.annotation.Nonnull - public String getUrl() { - return url; - } - - - public void setUrl(String url) { - this.url = url; - } - - - public ApplicationFormAttributes stage(StageEnum stage) { - - this.stage = stage; - return this; - } - - /** - * Get stage - * @return stage - **/ - @javax.annotation.Nullable - public StageEnum getStage() { - return stage; - } - - - public void setStage(StageEnum stage) { - this.stage = stage; - } - - - public ApplicationFormAttributes applicantDetails(ApplicationFormPrefill applicantDetails) { - - this.applicantDetails = applicantDetails; - return this; - } - - /** - * Get applicantDetails - * @return applicantDetails - **/ - @javax.annotation.Nullable - public ApplicationFormPrefill getApplicantDetails() { - return applicantDetails; - } - - - public void setApplicantDetails(ApplicationFormPrefill applicantDetails) { - this.applicantDetails = applicantDetails; - } - - - public ApplicationFormAttributes settingsOverride(ApplicationFormSettingsOverride settingsOverride) { - - this.settingsOverride = settingsOverride; - return this; - } - - /** - * Get settingsOverride - * @return settingsOverride - **/ - @javax.annotation.Nullable - public ApplicationFormSettingsOverride getSettingsOverride() { - return settingsOverride; - } - - - public void setSettingsOverride(ApplicationFormSettingsOverride settingsOverride) { - this.settingsOverride = settingsOverride; - } - - - public ApplicationFormAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public ApplicationFormAttributes allowedApplicationTypes(List allowedApplicationTypes) { - - this.allowedApplicationTypes = allowedApplicationTypes; - return this; - } - - public ApplicationFormAttributes addAllowedApplicationTypesItem(AllowedApplicationTypesEnum allowedApplicationTypesItem) { - if (this.allowedApplicationTypes == null) { - this.allowedApplicationTypes = new ArrayList<>(); - } - this.allowedApplicationTypes.add(allowedApplicationTypesItem); - return this; - } - - /** - * Get allowedApplicationTypes - * @return allowedApplicationTypes - **/ - @javax.annotation.Nullable - public List getAllowedApplicationTypes() { - return allowedApplicationTypes; - } - - - public void setAllowedApplicationTypes(List allowedApplicationTypes) { - this.allowedApplicationTypes = allowedApplicationTypes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationFormAttributes applicationFormAttributes = (ApplicationFormAttributes) o; - return Objects.equals(this.email, applicationFormAttributes.email) && - Objects.equals(this.url, applicationFormAttributes.url) && - Objects.equals(this.stage, applicationFormAttributes.stage) && - Objects.equals(this.applicantDetails, applicationFormAttributes.applicantDetails) && - Objects.equals(this.settingsOverride, applicationFormAttributes.settingsOverride) && - Objects.equals(this.tags, applicationFormAttributes.tags) && - Objects.equals(this.allowedApplicationTypes, applicationFormAttributes.allowedApplicationTypes); - } - - @Override - public int hashCode() { - return Objects.hash(email, url, stage, applicantDetails, settingsOverride, tags, allowedApplicationTypes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationFormAttributes {\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" url: ").append(toIndentedString(url)).append("\n"); - sb.append(" stage: ").append(toIndentedString(stage)).append("\n"); - sb.append(" applicantDetails: ").append(toIndentedString(applicantDetails)).append("\n"); - sb.append(" settingsOverride: ").append(toIndentedString(settingsOverride)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" allowedApplicationTypes: ").append(toIndentedString(allowedApplicationTypes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("email"); - openapiFields.add("url"); - openapiFields.add("stage"); - openapiFields.add("applicantDetails"); - openapiFields.add("settingsOverride"); - openapiFields.add("tags"); - openapiFields.add("allowedApplicationTypes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("url"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApplicationFormAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApplicationFormAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationFormAttributes is not found in the empty JSON string", ApplicationFormAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApplicationFormAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApplicationFormAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ApplicationFormAttributes.openapiRequiredFields) { - 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("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if (!jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); - } - if ((jsonObj.get("stage") != null && !jsonObj.get("stage").isJsonNull()) && !jsonObj.get("stage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `stage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stage").toString())); - } - // validate the optional field `applicantDetails` - if (jsonObj.get("applicantDetails") != null && !jsonObj.get("applicantDetails").isJsonNull()) { - ApplicationFormPrefill.validateJsonElement(jsonObj.get("applicantDetails")); - } - // validate the optional field `settingsOverride` - if (jsonObj.get("settingsOverride") != null && !jsonObj.get("settingsOverride").isJsonNull()) { - ApplicationFormSettingsOverride.validateJsonElement(jsonObj.get("settingsOverride")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("allowedApplicationTypes") != null && !jsonObj.get("allowedApplicationTypes").isJsonNull() && !jsonObj.get("allowedApplicationTypes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `allowedApplicationTypes` to be an array in the JSON string but got `%s`", jsonObj.get("allowedApplicationTypes").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApplicationFormAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApplicationFormAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApplicationFormAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApplicationFormAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApplicationFormAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApplicationFormAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApplicationFormAttributes - * @throws IOException if the JSON string is invalid with respect to ApplicationFormAttributes - */ - public static ApplicationFormAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApplicationFormAttributes.class); - } - - /** - * Convert an instance of ApplicationFormAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApplicationFormPrefill.java b/src/main/java/org/openapitools/client/model/ApplicationFormPrefill.java deleted file mode 100644 index fb4d1413..00000000 --- a/src/main/java/org/openapitools/client/model/ApplicationFormPrefill.java +++ /dev/null @@ -1,884 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.Contact; -import org.openapitools.client.model.CreateBeneficialOwner; -import org.openapitools.client.model.CreateOfficer; -import org.openapitools.client.model.EntityType; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Industry; -import org.openapitools.client.model.Phone; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApplicationFormPrefill - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApplicationFormPrefill { - /** - * Gets or Sets applicationType - */ - @JsonAdapter(ApplicationTypeEnum.Adapter.class) - public enum ApplicationTypeEnum { - INDIVIDUAL("Individual"), - - BUSINESS("Business"), - - SOLEPROPRIETORSHIP("SoleProprietorship"); - - private String value; - - ApplicationTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ApplicationTypeEnum fromValue(String value) { - for (ApplicationTypeEnum b : ApplicationTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ApplicationTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ApplicationTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ApplicationTypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_APPLICATION_TYPE = "applicationType"; - @SerializedName(SERIALIZED_NAME_APPLICATION_TYPE) - private ApplicationTypeEnum applicationType; - - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_STATE_OF_INCORPORATION = "stateOfIncorporation"; - @SerializedName(SERIALIZED_NAME_STATE_OF_INCORPORATION) - private String stateOfIncorporation; - - public static final String SERIALIZED_NAME_ENTITY_TYPE = "entityType"; - @SerializedName(SERIALIZED_NAME_ENTITY_TYPE) - private EntityType entityType; - - public static final String SERIALIZED_NAME_CONTACT = "contact"; - @SerializedName(SERIALIZED_NAME_CONTACT) - private Contact contact; - - public static final String SERIALIZED_NAME_OFFICER = "officer"; - @SerializedName(SERIALIZED_NAME_OFFICER) - private CreateOfficer officer; - - public static final String SERIALIZED_NAME_BENEFICIAL_OWNERS = "beneficialOwners"; - @SerializedName(SERIALIZED_NAME_BENEFICIAL_OWNERS) - private List beneficialOwners; - - public static final String SERIALIZED_NAME_WEBSITE = "website"; - @SerializedName(SERIALIZED_NAME_WEBSITE) - private String website; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_DBA = "dba"; - @SerializedName(SERIALIZED_NAME_DBA) - private String dba; - - public static final String SERIALIZED_NAME_EIN = "ein"; - @SerializedName(SERIALIZED_NAME_EIN) - private String ein; - - public static final String SERIALIZED_NAME_JWT_SUBJECT = "jwtSubject"; - @SerializedName(SERIALIZED_NAME_JWT_SUBJECT) - private String jwtSubject; - - public static final String SERIALIZED_NAME_INDUSTRY = "industry"; - @SerializedName(SERIALIZED_NAME_INDUSTRY) - private Industry industry; - - public ApplicationFormPrefill() { - } - - public ApplicationFormPrefill applicationType(ApplicationTypeEnum applicationType) { - - this.applicationType = applicationType; - return this; - } - - /** - * Get applicationType - * @return applicationType - **/ - @javax.annotation.Nullable - public ApplicationTypeEnum getApplicationType() { - return applicationType; - } - - - public void setApplicationType(ApplicationTypeEnum applicationType) { - this.applicationType = applicationType; - } - - - public ApplicationFormPrefill fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nullable - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public ApplicationFormPrefill ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public ApplicationFormPrefill passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public ApplicationFormPrefill nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public ApplicationFormPrefill dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nullable - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public ApplicationFormPrefill email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public ApplicationFormPrefill name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public ApplicationFormPrefill stateOfIncorporation(String stateOfIncorporation) { - - this.stateOfIncorporation = stateOfIncorporation; - return this; - } - - /** - * Get stateOfIncorporation - * @return stateOfIncorporation - **/ - @javax.annotation.Nullable - public String getStateOfIncorporation() { - return stateOfIncorporation; - } - - - public void setStateOfIncorporation(String stateOfIncorporation) { - this.stateOfIncorporation = stateOfIncorporation; - } - - - public ApplicationFormPrefill entityType(EntityType entityType) { - - this.entityType = entityType; - return this; - } - - /** - * Get entityType - * @return entityType - **/ - @javax.annotation.Nullable - public EntityType getEntityType() { - return entityType; - } - - - public void setEntityType(EntityType entityType) { - this.entityType = entityType; - } - - - public ApplicationFormPrefill contact(Contact contact) { - - this.contact = contact; - return this; - } - - /** - * Get contact - * @return contact - **/ - @javax.annotation.Nullable - public Contact getContact() { - return contact; - } - - - public void setContact(Contact contact) { - this.contact = contact; - } - - - public ApplicationFormPrefill officer(CreateOfficer officer) { - - this.officer = officer; - return this; - } - - /** - * Get officer - * @return officer - **/ - @javax.annotation.Nullable - public CreateOfficer getOfficer() { - return officer; - } - - - public void setOfficer(CreateOfficer officer) { - this.officer = officer; - } - - - public ApplicationFormPrefill beneficialOwners(List beneficialOwners) { - - this.beneficialOwners = beneficialOwners; - return this; - } - - public ApplicationFormPrefill addBeneficialOwnersItem(CreateBeneficialOwner beneficialOwnersItem) { - if (this.beneficialOwners == null) { - this.beneficialOwners = new ArrayList<>(); - } - this.beneficialOwners.add(beneficialOwnersItem); - return this; - } - - /** - * Get beneficialOwners - * @return beneficialOwners - **/ - @javax.annotation.Nullable - public List getBeneficialOwners() { - return beneficialOwners; - } - - - public void setBeneficialOwners(List beneficialOwners) { - this.beneficialOwners = beneficialOwners; - } - - - public ApplicationFormPrefill website(String website) { - - this.website = website; - return this; - } - - /** - * Get website - * @return website - **/ - @javax.annotation.Nullable - public String getWebsite() { - return website; - } - - - public void setWebsite(String website) { - this.website = website; - } - - - public ApplicationFormPrefill phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public ApplicationFormPrefill address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public ApplicationFormPrefill dba(String dba) { - - this.dba = dba; - return this; - } - - /** - * Get dba - * @return dba - **/ - @javax.annotation.Nullable - public String getDba() { - return dba; - } - - - public void setDba(String dba) { - this.dba = dba; - } - - - public ApplicationFormPrefill ein(String ein) { - - this.ein = ein; - return this; - } - - /** - * Get ein - * @return ein - **/ - @javax.annotation.Nullable - public String getEin() { - return ein; - } - - - public void setEin(String ein) { - this.ein = ein; - } - - - public ApplicationFormPrefill jwtSubject(String jwtSubject) { - - this.jwtSubject = jwtSubject; - return this; - } - - /** - * Get jwtSubject - * @return jwtSubject - **/ - @javax.annotation.Nullable - public String getJwtSubject() { - return jwtSubject; - } - - - public void setJwtSubject(String jwtSubject) { - this.jwtSubject = jwtSubject; - } - - - public ApplicationFormPrefill industry(Industry industry) { - - this.industry = industry; - return this; - } - - /** - * Get industry - * @return industry - **/ - @javax.annotation.Nullable - public Industry getIndustry() { - return industry; - } - - - public void setIndustry(Industry industry) { - this.industry = industry; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationFormPrefill applicationFormPrefill = (ApplicationFormPrefill) o; - return Objects.equals(this.applicationType, applicationFormPrefill.applicationType) && - Objects.equals(this.fullName, applicationFormPrefill.fullName) && - Objects.equals(this.ssn, applicationFormPrefill.ssn) && - Objects.equals(this.passport, applicationFormPrefill.passport) && - Objects.equals(this.nationality, applicationFormPrefill.nationality) && - Objects.equals(this.dateOfBirth, applicationFormPrefill.dateOfBirth) && - Objects.equals(this.email, applicationFormPrefill.email) && - Objects.equals(this.name, applicationFormPrefill.name) && - Objects.equals(this.stateOfIncorporation, applicationFormPrefill.stateOfIncorporation) && - Objects.equals(this.entityType, applicationFormPrefill.entityType) && - Objects.equals(this.contact, applicationFormPrefill.contact) && - Objects.equals(this.officer, applicationFormPrefill.officer) && - Objects.equals(this.beneficialOwners, applicationFormPrefill.beneficialOwners) && - Objects.equals(this.website, applicationFormPrefill.website) && - Objects.equals(this.phone, applicationFormPrefill.phone) && - Objects.equals(this.address, applicationFormPrefill.address) && - Objects.equals(this.dba, applicationFormPrefill.dba) && - Objects.equals(this.ein, applicationFormPrefill.ein) && - Objects.equals(this.jwtSubject, applicationFormPrefill.jwtSubject) && - Objects.equals(this.industry, applicationFormPrefill.industry); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(applicationType, fullName, ssn, passport, nationality, dateOfBirth, email, name, stateOfIncorporation, entityType, contact, officer, beneficialOwners, website, phone, address, dba, ein, jwtSubject, industry); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationFormPrefill {\n"); - sb.append(" applicationType: ").append(toIndentedString(applicationType)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" stateOfIncorporation: ").append(toIndentedString(stateOfIncorporation)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); - sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); - sb.append(" officer: ").append(toIndentedString(officer)).append("\n"); - sb.append(" beneficialOwners: ").append(toIndentedString(beneficialOwners)).append("\n"); - sb.append(" website: ").append(toIndentedString(website)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" dba: ").append(toIndentedString(dba)).append("\n"); - sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); - sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); - sb.append(" industry: ").append(toIndentedString(industry)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("applicationType"); - openapiFields.add("fullName"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("nationality"); - openapiFields.add("dateOfBirth"); - openapiFields.add("email"); - openapiFields.add("name"); - openapiFields.add("stateOfIncorporation"); - openapiFields.add("entityType"); - openapiFields.add("contact"); - openapiFields.add("officer"); - openapiFields.add("beneficialOwners"); - openapiFields.add("website"); - openapiFields.add("phone"); - openapiFields.add("address"); - openapiFields.add("dba"); - openapiFields.add("ein"); - openapiFields.add("jwtSubject"); - openapiFields.add("industry"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApplicationFormPrefill - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApplicationFormPrefill.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationFormPrefill is not found in the empty JSON string", ApplicationFormPrefill.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApplicationFormPrefill.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApplicationFormPrefill` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("applicationType") != null && !jsonObj.get("applicationType").isJsonNull()) && !jsonObj.get("applicationType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationType").toString())); - } - // validate the optional field `fullName` - if (jsonObj.get("fullName") != null && !jsonObj.get("fullName").isJsonNull()) { - FullName.validateJsonElement(jsonObj.get("fullName")); - } - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("stateOfIncorporation") != null && !jsonObj.get("stateOfIncorporation").isJsonNull()) && !jsonObj.get("stateOfIncorporation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `stateOfIncorporation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stateOfIncorporation").toString())); - } - // validate the optional field `contact` - if (jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) { - Contact.validateJsonElement(jsonObj.get("contact")); - } - // validate the optional field `officer` - if (jsonObj.get("officer") != null && !jsonObj.get("officer").isJsonNull()) { - CreateOfficer.validateJsonElement(jsonObj.get("officer")); - } - if (jsonObj.get("beneficialOwners") != null && !jsonObj.get("beneficialOwners").isJsonNull()) { - JsonArray jsonArraybeneficialOwners = jsonObj.getAsJsonArray("beneficialOwners"); - if (jsonArraybeneficialOwners != null) { - // ensure the json data is an array - if (!jsonObj.get("beneficialOwners").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `beneficialOwners` to be an array in the JSON string but got `%s`", jsonObj.get("beneficialOwners").toString())); - } - - // validate the optional field `beneficialOwners` (array) - for (int i = 0; i < jsonArraybeneficialOwners.size(); i++) { - CreateBeneficialOwner.validateJsonElement(jsonArraybeneficialOwners.get(i)); - }; - } - } - if ((jsonObj.get("website") != null && !jsonObj.get("website").isJsonNull()) && !jsonObj.get("website").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `website` to be a primitive type in the JSON string but got `%s`", jsonObj.get("website").toString())); - } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); - } - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("address")); - } - if ((jsonObj.get("dba") != null && !jsonObj.get("dba").isJsonNull()) && !jsonObj.get("dba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dba").toString())); - } - if ((jsonObj.get("ein") != null && !jsonObj.get("ein").isJsonNull()) && !jsonObj.get("ein").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ein` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ein").toString())); - } - if ((jsonObj.get("jwtSubject") != null && !jsonObj.get("jwtSubject").isJsonNull()) && !jsonObj.get("jwtSubject").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `jwtSubject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jwtSubject").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApplicationFormPrefill.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApplicationFormPrefill' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApplicationFormPrefill.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApplicationFormPrefill value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApplicationFormPrefill read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApplicationFormPrefill given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApplicationFormPrefill - * @throws IOException if the JSON string is invalid with respect to ApplicationFormPrefill - */ - public static ApplicationFormPrefill fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApplicationFormPrefill.class); - } - - /** - * Convert an instance of ApplicationFormPrefill to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApplicationFormRelationships.java b/src/main/java/org/openapitools/client/model/ApplicationFormRelationships.java deleted file mode 100644 index 4e2d5f51..00000000 --- a/src/main/java/org/openapitools/client/model/ApplicationFormRelationships.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ApplicationFormRelationshipsApplication; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApplicationFormRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApplicationFormRelationships { - public static final String SERIALIZED_NAME_APPLICATION = "application"; - @SerializedName(SERIALIZED_NAME_APPLICATION) - private ApplicationFormRelationshipsApplication application; - - public ApplicationFormRelationships() { - } - - public ApplicationFormRelationships application(ApplicationFormRelationshipsApplication application) { - - this.application = application; - return this; - } - - /** - * Get application - * @return application - **/ - @javax.annotation.Nullable - public ApplicationFormRelationshipsApplication getApplication() { - return application; - } - - - public void setApplication(ApplicationFormRelationshipsApplication application) { - this.application = application; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationFormRelationships applicationFormRelationships = (ApplicationFormRelationships) o; - return Objects.equals(this.application, applicationFormRelationships.application); - } - - @Override - public int hashCode() { - return Objects.hash(application); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationFormRelationships {\n"); - sb.append(" application: ").append(toIndentedString(application)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("application"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApplicationFormRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApplicationFormRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationFormRelationships is not found in the empty JSON string", ApplicationFormRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApplicationFormRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApplicationFormRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `application` - if (jsonObj.get("application") != null && !jsonObj.get("application").isJsonNull()) { - ApplicationFormRelationshipsApplication.validateJsonElement(jsonObj.get("application")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApplicationFormRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApplicationFormRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApplicationFormRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApplicationFormRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApplicationFormRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApplicationFormRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApplicationFormRelationships - * @throws IOException if the JSON string is invalid with respect to ApplicationFormRelationships - */ - public static ApplicationFormRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApplicationFormRelationships.class); - } - - /** - * Convert an instance of ApplicationFormRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApplicationFormRelationshipsApplication.java b/src/main/java/org/openapitools/client/model/ApplicationFormRelationshipsApplication.java deleted file mode 100644 index 91e8a2ef..00000000 --- a/src/main/java/org/openapitools/client/model/ApplicationFormRelationshipsApplication.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ApplicationFormRelationshipsApplicationData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApplicationFormRelationshipsApplication - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApplicationFormRelationshipsApplication { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ApplicationFormRelationshipsApplicationData data; - - public ApplicationFormRelationshipsApplication() { - } - - public ApplicationFormRelationshipsApplication data(ApplicationFormRelationshipsApplicationData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public ApplicationFormRelationshipsApplicationData getData() { - return data; - } - - - public void setData(ApplicationFormRelationshipsApplicationData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationFormRelationshipsApplication applicationFormRelationshipsApplication = (ApplicationFormRelationshipsApplication) o; - return Objects.equals(this.data, applicationFormRelationshipsApplication.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationFormRelationshipsApplication {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApplicationFormRelationshipsApplication - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApplicationFormRelationshipsApplication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationFormRelationshipsApplication is not found in the empty JSON string", ApplicationFormRelationshipsApplication.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApplicationFormRelationshipsApplication.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApplicationFormRelationshipsApplication` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - ApplicationFormRelationshipsApplicationData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApplicationFormRelationshipsApplication.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApplicationFormRelationshipsApplication' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApplicationFormRelationshipsApplication.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApplicationFormRelationshipsApplication value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApplicationFormRelationshipsApplication read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApplicationFormRelationshipsApplication given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApplicationFormRelationshipsApplication - * @throws IOException if the JSON string is invalid with respect to ApplicationFormRelationshipsApplication - */ - public static ApplicationFormRelationshipsApplication fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApplicationFormRelationshipsApplication.class); - } - - /** - * Convert an instance of ApplicationFormRelationshipsApplication to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApplicationFormRelationshipsApplicationData.java b/src/main/java/org/openapitools/client/model/ApplicationFormRelationshipsApplicationData.java deleted file mode 100644 index 1156882d..00000000 --- a/src/main/java/org/openapitools/client/model/ApplicationFormRelationshipsApplicationData.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApplicationFormRelationshipsApplicationData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApplicationFormRelationshipsApplicationData { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - APPLICATION("application"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public ApplicationFormRelationshipsApplicationData() { - } - - public ApplicationFormRelationshipsApplicationData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public ApplicationFormRelationshipsApplicationData type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationFormRelationshipsApplicationData applicationFormRelationshipsApplicationData = (ApplicationFormRelationshipsApplicationData) o; - return Objects.equals(this.id, applicationFormRelationshipsApplicationData.id) && - Objects.equals(this.type, applicationFormRelationshipsApplicationData.type); - } - - @Override - public int hashCode() { - return Objects.hash(id, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationFormRelationshipsApplicationData {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApplicationFormRelationshipsApplicationData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApplicationFormRelationshipsApplicationData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationFormRelationshipsApplicationData is not found in the empty JSON string", ApplicationFormRelationshipsApplicationData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApplicationFormRelationshipsApplicationData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApplicationFormRelationshipsApplicationData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - 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())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApplicationFormRelationshipsApplicationData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApplicationFormRelationshipsApplicationData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApplicationFormRelationshipsApplicationData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApplicationFormRelationshipsApplicationData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApplicationFormRelationshipsApplicationData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApplicationFormRelationshipsApplicationData given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApplicationFormRelationshipsApplicationData - * @throws IOException if the JSON string is invalid with respect to ApplicationFormRelationshipsApplicationData - */ - public static ApplicationFormRelationshipsApplicationData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApplicationFormRelationshipsApplicationData.class); - } - - /** - * Convert an instance of ApplicationFormRelationshipsApplicationData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApplicationFormSettingsOverride.java b/src/main/java/org/openapitools/client/model/ApplicationFormSettingsOverride.java deleted file mode 100644 index b9971ff7..00000000 --- a/src/main/java/org/openapitools/client/model/ApplicationFormSettingsOverride.java +++ /dev/null @@ -1,478 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ApplicationFormAdditionalDisclosuresInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApplicationFormSettingsOverride - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApplicationFormSettingsOverride { - public static final String SERIALIZED_NAME_REDIRECT_URL = "redirectUrl"; - @SerializedName(SERIALIZED_NAME_REDIRECT_URL) - private String redirectUrl; - - public static final String SERIALIZED_NAME_PRIVACY_POLICY_URL = "privacyPolicyUrl"; - @SerializedName(SERIALIZED_NAME_PRIVACY_POLICY_URL) - private String privacyPolicyUrl; - - public static final String SERIALIZED_NAME_ELECTRONIC_DISCLOSURES_URL = "electronicDisclosuresUrl"; - @SerializedName(SERIALIZED_NAME_ELECTRONIC_DISCLOSURES_URL) - private String electronicDisclosuresUrl; - - public static final String SERIALIZED_NAME_DEPOSIT_TERMS_URL = "depositTermsUrl"; - @SerializedName(SERIALIZED_NAME_DEPOSIT_TERMS_URL) - private String depositTermsUrl; - - public static final String SERIALIZED_NAME_CLIENT_TERMS_URL = "clientTermsUrl"; - @SerializedName(SERIALIZED_NAME_CLIENT_TERMS_URL) - private String clientTermsUrl; - - public static final String SERIALIZED_NAME_CARDHOLDER_TERMS_URL = "cardholderTermsUrl"; - @SerializedName(SERIALIZED_NAME_CARDHOLDER_TERMS_URL) - private String cardholderTermsUrl; - - public static final String SERIALIZED_NAME_CASH_ADVANCED_TERMS_URL = "cashAdvancedTermsUrl"; - @SerializedName(SERIALIZED_NAME_CASH_ADVANCED_TERMS_URL) - private String cashAdvancedTermsUrl; - - public static final String SERIALIZED_NAME_DEBIT_CARD_DISCLOSURE_URL = "debitCardDisclosureUrl"; - @SerializedName(SERIALIZED_NAME_DEBIT_CARD_DISCLOSURE_URL) - private String debitCardDisclosureUrl; - - public static final String SERIALIZED_NAME_ADDITIONAL_DISCLOSURES = "additionalDisclosures"; - @SerializedName(SERIALIZED_NAME_ADDITIONAL_DISCLOSURES) - private List additionalDisclosures; - - public ApplicationFormSettingsOverride() { - } - - public ApplicationFormSettingsOverride redirectUrl(String redirectUrl) { - - this.redirectUrl = redirectUrl; - return this; - } - - /** - * Get redirectUrl - * @return redirectUrl - **/ - @javax.annotation.Nullable - public String getRedirectUrl() { - return redirectUrl; - } - - - public void setRedirectUrl(String redirectUrl) { - this.redirectUrl = redirectUrl; - } - - - public ApplicationFormSettingsOverride privacyPolicyUrl(String privacyPolicyUrl) { - - this.privacyPolicyUrl = privacyPolicyUrl; - return this; - } - - /** - * Get privacyPolicyUrl - * @return privacyPolicyUrl - **/ - @javax.annotation.Nullable - public String getPrivacyPolicyUrl() { - return privacyPolicyUrl; - } - - - public void setPrivacyPolicyUrl(String privacyPolicyUrl) { - this.privacyPolicyUrl = privacyPolicyUrl; - } - - - public ApplicationFormSettingsOverride electronicDisclosuresUrl(String electronicDisclosuresUrl) { - - this.electronicDisclosuresUrl = electronicDisclosuresUrl; - return this; - } - - /** - * Get electronicDisclosuresUrl - * @return electronicDisclosuresUrl - **/ - @javax.annotation.Nullable - public String getElectronicDisclosuresUrl() { - return electronicDisclosuresUrl; - } - - - public void setElectronicDisclosuresUrl(String electronicDisclosuresUrl) { - this.electronicDisclosuresUrl = electronicDisclosuresUrl; - } - - - public ApplicationFormSettingsOverride depositTermsUrl(String depositTermsUrl) { - - this.depositTermsUrl = depositTermsUrl; - return this; - } - - /** - * Get depositTermsUrl - * @return depositTermsUrl - **/ - @javax.annotation.Nullable - public String getDepositTermsUrl() { - return depositTermsUrl; - } - - - public void setDepositTermsUrl(String depositTermsUrl) { - this.depositTermsUrl = depositTermsUrl; - } - - - public ApplicationFormSettingsOverride clientTermsUrl(String clientTermsUrl) { - - this.clientTermsUrl = clientTermsUrl; - return this; - } - - /** - * Get clientTermsUrl - * @return clientTermsUrl - **/ - @javax.annotation.Nullable - public String getClientTermsUrl() { - return clientTermsUrl; - } - - - public void setClientTermsUrl(String clientTermsUrl) { - this.clientTermsUrl = clientTermsUrl; - } - - - public ApplicationFormSettingsOverride cardholderTermsUrl(String cardholderTermsUrl) { - - this.cardholderTermsUrl = cardholderTermsUrl; - return this; - } - - /** - * Get cardholderTermsUrl - * @return cardholderTermsUrl - **/ - @javax.annotation.Nullable - public String getCardholderTermsUrl() { - return cardholderTermsUrl; - } - - - public void setCardholderTermsUrl(String cardholderTermsUrl) { - this.cardholderTermsUrl = cardholderTermsUrl; - } - - - public ApplicationFormSettingsOverride cashAdvancedTermsUrl(String cashAdvancedTermsUrl) { - - this.cashAdvancedTermsUrl = cashAdvancedTermsUrl; - return this; - } - - /** - * Get cashAdvancedTermsUrl - * @return cashAdvancedTermsUrl - **/ - @javax.annotation.Nullable - public String getCashAdvancedTermsUrl() { - return cashAdvancedTermsUrl; - } - - - public void setCashAdvancedTermsUrl(String cashAdvancedTermsUrl) { - this.cashAdvancedTermsUrl = cashAdvancedTermsUrl; - } - - - public ApplicationFormSettingsOverride debitCardDisclosureUrl(String debitCardDisclosureUrl) { - - this.debitCardDisclosureUrl = debitCardDisclosureUrl; - return this; - } - - /** - * Get debitCardDisclosureUrl - * @return debitCardDisclosureUrl - **/ - @javax.annotation.Nullable - public String getDebitCardDisclosureUrl() { - return debitCardDisclosureUrl; - } - - - public void setDebitCardDisclosureUrl(String debitCardDisclosureUrl) { - this.debitCardDisclosureUrl = debitCardDisclosureUrl; - } - - - public ApplicationFormSettingsOverride additionalDisclosures(List additionalDisclosures) { - - this.additionalDisclosures = additionalDisclosures; - return this; - } - - public ApplicationFormSettingsOverride addAdditionalDisclosuresItem(ApplicationFormAdditionalDisclosuresInner additionalDisclosuresItem) { - if (this.additionalDisclosures == null) { - this.additionalDisclosures = new ArrayList<>(); - } - this.additionalDisclosures.add(additionalDisclosuresItem); - return this; - } - - /** - * Get additionalDisclosures - * @return additionalDisclosures - **/ - @javax.annotation.Nullable - public List getAdditionalDisclosures() { - return additionalDisclosures; - } - - - public void setAdditionalDisclosures(List additionalDisclosures) { - this.additionalDisclosures = additionalDisclosures; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationFormSettingsOverride applicationFormSettingsOverride = (ApplicationFormSettingsOverride) o; - return Objects.equals(this.redirectUrl, applicationFormSettingsOverride.redirectUrl) && - Objects.equals(this.privacyPolicyUrl, applicationFormSettingsOverride.privacyPolicyUrl) && - Objects.equals(this.electronicDisclosuresUrl, applicationFormSettingsOverride.electronicDisclosuresUrl) && - Objects.equals(this.depositTermsUrl, applicationFormSettingsOverride.depositTermsUrl) && - Objects.equals(this.clientTermsUrl, applicationFormSettingsOverride.clientTermsUrl) && - Objects.equals(this.cardholderTermsUrl, applicationFormSettingsOverride.cardholderTermsUrl) && - Objects.equals(this.cashAdvancedTermsUrl, applicationFormSettingsOverride.cashAdvancedTermsUrl) && - Objects.equals(this.debitCardDisclosureUrl, applicationFormSettingsOverride.debitCardDisclosureUrl) && - Objects.equals(this.additionalDisclosures, applicationFormSettingsOverride.additionalDisclosures); - } - - @Override - public int hashCode() { - return Objects.hash(redirectUrl, privacyPolicyUrl, electronicDisclosuresUrl, depositTermsUrl, clientTermsUrl, cardholderTermsUrl, cashAdvancedTermsUrl, debitCardDisclosureUrl, additionalDisclosures); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationFormSettingsOverride {\n"); - sb.append(" redirectUrl: ").append(toIndentedString(redirectUrl)).append("\n"); - sb.append(" privacyPolicyUrl: ").append(toIndentedString(privacyPolicyUrl)).append("\n"); - sb.append(" electronicDisclosuresUrl: ").append(toIndentedString(electronicDisclosuresUrl)).append("\n"); - sb.append(" depositTermsUrl: ").append(toIndentedString(depositTermsUrl)).append("\n"); - sb.append(" clientTermsUrl: ").append(toIndentedString(clientTermsUrl)).append("\n"); - sb.append(" cardholderTermsUrl: ").append(toIndentedString(cardholderTermsUrl)).append("\n"); - sb.append(" cashAdvancedTermsUrl: ").append(toIndentedString(cashAdvancedTermsUrl)).append("\n"); - sb.append(" debitCardDisclosureUrl: ").append(toIndentedString(debitCardDisclosureUrl)).append("\n"); - sb.append(" additionalDisclosures: ").append(toIndentedString(additionalDisclosures)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("redirectUrl"); - openapiFields.add("privacyPolicyUrl"); - openapiFields.add("electronicDisclosuresUrl"); - openapiFields.add("depositTermsUrl"); - openapiFields.add("clientTermsUrl"); - openapiFields.add("cardholderTermsUrl"); - openapiFields.add("cashAdvancedTermsUrl"); - openapiFields.add("debitCardDisclosureUrl"); - openapiFields.add("additionalDisclosures"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApplicationFormSettingsOverride - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApplicationFormSettingsOverride.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationFormSettingsOverride is not found in the empty JSON string", ApplicationFormSettingsOverride.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApplicationFormSettingsOverride.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApplicationFormSettingsOverride` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("redirectUrl") != null && !jsonObj.get("redirectUrl").isJsonNull()) && !jsonObj.get("redirectUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `redirectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectUrl").toString())); - } - if ((jsonObj.get("privacyPolicyUrl") != null && !jsonObj.get("privacyPolicyUrl").isJsonNull()) && !jsonObj.get("privacyPolicyUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); - } - if ((jsonObj.get("electronicDisclosuresUrl") != null && !jsonObj.get("electronicDisclosuresUrl").isJsonNull()) && !jsonObj.get("electronicDisclosuresUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `electronicDisclosuresUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("electronicDisclosuresUrl").toString())); - } - if ((jsonObj.get("depositTermsUrl") != null && !jsonObj.get("depositTermsUrl").isJsonNull()) && !jsonObj.get("depositTermsUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `depositTermsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("depositTermsUrl").toString())); - } - if ((jsonObj.get("clientTermsUrl") != null && !jsonObj.get("clientTermsUrl").isJsonNull()) && !jsonObj.get("clientTermsUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clientTermsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clientTermsUrl").toString())); - } - if ((jsonObj.get("cardholderTermsUrl") != null && !jsonObj.get("cardholderTermsUrl").isJsonNull()) && !jsonObj.get("cardholderTermsUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardholderTermsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardholderTermsUrl").toString())); - } - if ((jsonObj.get("cashAdvancedTermsUrl") != null && !jsonObj.get("cashAdvancedTermsUrl").isJsonNull()) && !jsonObj.get("cashAdvancedTermsUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cashAdvancedTermsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cashAdvancedTermsUrl").toString())); - } - if ((jsonObj.get("debitCardDisclosureUrl") != null && !jsonObj.get("debitCardDisclosureUrl").isJsonNull()) && !jsonObj.get("debitCardDisclosureUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `debitCardDisclosureUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("debitCardDisclosureUrl").toString())); - } - if (jsonObj.get("additionalDisclosures") != null && !jsonObj.get("additionalDisclosures").isJsonNull()) { - JsonArray jsonArrayadditionalDisclosures = jsonObj.getAsJsonArray("additionalDisclosures"); - if (jsonArrayadditionalDisclosures != null) { - // ensure the json data is an array - if (!jsonObj.get("additionalDisclosures").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `additionalDisclosures` to be an array in the JSON string but got `%s`", jsonObj.get("additionalDisclosures").toString())); - } - - // validate the optional field `additionalDisclosures` (array) - for (int i = 0; i < jsonArrayadditionalDisclosures.size(); i++) { - ApplicationFormAdditionalDisclosuresInner.validateJsonElement(jsonArrayadditionalDisclosures.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApplicationFormSettingsOverride.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApplicationFormSettingsOverride' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApplicationFormSettingsOverride.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApplicationFormSettingsOverride value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApplicationFormSettingsOverride read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApplicationFormSettingsOverride given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApplicationFormSettingsOverride - * @throws IOException if the JSON string is invalid with respect to ApplicationFormSettingsOverride - */ - public static ApplicationFormSettingsOverride fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApplicationFormSettingsOverride.class); - } - - /** - * Convert an instance of ApplicationFormSettingsOverride to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApplicationRelationships.java b/src/main/java/org/openapitools/client/model/ApplicationRelationships.java deleted file mode 100644 index ddf8e67d..00000000 --- a/src/main/java/org/openapitools/client/model/ApplicationRelationships.java +++ /dev/null @@ -1,407 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ApplicationRelationshipsBeneficialOwners; -import org.openapitools.client.model.ApplicationRelationshipsBeneficiaries; -import org.openapitools.client.model.ApplicationRelationshipsTrustees; -import org.openapitools.client.model.DocumentsRelationship; -import org.openapitools.client.model.OrgRelationship; -import org.openapitools.client.model.Relationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApplicationRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApplicationRelationships { - public static final String SERIALIZED_NAME_ORG = "org"; - @SerializedName(SERIALIZED_NAME_ORG) - private OrgRelationship org; - - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private Relationship customer; - - public static final String SERIALIZED_NAME_DOCUMENTS = "documents"; - @SerializedName(SERIALIZED_NAME_DOCUMENTS) - private DocumentsRelationship documents; - - public static final String SERIALIZED_NAME_APPLICATION_FORM = "applicationForm"; - @SerializedName(SERIALIZED_NAME_APPLICATION_FORM) - private Relationship applicationForm; - - public static final String SERIALIZED_NAME_TRUSTEES = "trustees"; - @SerializedName(SERIALIZED_NAME_TRUSTEES) - private ApplicationRelationshipsTrustees trustees; - - public static final String SERIALIZED_NAME_BENEFICIARIES = "beneficiaries"; - @SerializedName(SERIALIZED_NAME_BENEFICIARIES) - private ApplicationRelationshipsBeneficiaries beneficiaries; - - public static final String SERIALIZED_NAME_BENEFICIAL_OWNERS = "beneficialOwners"; - @SerializedName(SERIALIZED_NAME_BENEFICIAL_OWNERS) - private ApplicationRelationshipsBeneficialOwners beneficialOwners; - - public ApplicationRelationships() { - } - - public ApplicationRelationships org(OrgRelationship org) { - - this.org = org; - return this; - } - - /** - * Get org - * @return org - **/ - @javax.annotation.Nullable - public OrgRelationship getOrg() { - return org; - } - - - public void setOrg(OrgRelationship org) { - this.org = org; - } - - - public ApplicationRelationships customer(Relationship customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nullable - public Relationship getCustomer() { - return customer; - } - - - public void setCustomer(Relationship customer) { - this.customer = customer; - } - - - public ApplicationRelationships documents(DocumentsRelationship documents) { - - this.documents = documents; - return this; - } - - /** - * Get documents - * @return documents - **/ - @javax.annotation.Nullable - public DocumentsRelationship getDocuments() { - return documents; - } - - - public void setDocuments(DocumentsRelationship documents) { - this.documents = documents; - } - - - public ApplicationRelationships applicationForm(Relationship applicationForm) { - - this.applicationForm = applicationForm; - return this; - } - - /** - * Get applicationForm - * @return applicationForm - **/ - @javax.annotation.Nullable - public Relationship getApplicationForm() { - return applicationForm; - } - - - public void setApplicationForm(Relationship applicationForm) { - this.applicationForm = applicationForm; - } - - - public ApplicationRelationships trustees(ApplicationRelationshipsTrustees trustees) { - - this.trustees = trustees; - return this; - } - - /** - * Get trustees - * @return trustees - **/ - @javax.annotation.Nullable - public ApplicationRelationshipsTrustees getTrustees() { - return trustees; - } - - - public void setTrustees(ApplicationRelationshipsTrustees trustees) { - this.trustees = trustees; - } - - - public ApplicationRelationships beneficiaries(ApplicationRelationshipsBeneficiaries beneficiaries) { - - this.beneficiaries = beneficiaries; - return this; - } - - /** - * Get beneficiaries - * @return beneficiaries - **/ - @javax.annotation.Nullable - public ApplicationRelationshipsBeneficiaries getBeneficiaries() { - return beneficiaries; - } - - - public void setBeneficiaries(ApplicationRelationshipsBeneficiaries beneficiaries) { - this.beneficiaries = beneficiaries; - } - - - public ApplicationRelationships beneficialOwners(ApplicationRelationshipsBeneficialOwners beneficialOwners) { - - this.beneficialOwners = beneficialOwners; - return this; - } - - /** - * Get beneficialOwners - * @return beneficialOwners - **/ - @javax.annotation.Nullable - public ApplicationRelationshipsBeneficialOwners getBeneficialOwners() { - return beneficialOwners; - } - - - public void setBeneficialOwners(ApplicationRelationshipsBeneficialOwners beneficialOwners) { - this.beneficialOwners = beneficialOwners; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationRelationships applicationRelationships = (ApplicationRelationships) o; - return Objects.equals(this.org, applicationRelationships.org) && - Objects.equals(this.customer, applicationRelationships.customer) && - Objects.equals(this.documents, applicationRelationships.documents) && - Objects.equals(this.applicationForm, applicationRelationships.applicationForm) && - Objects.equals(this.trustees, applicationRelationships.trustees) && - Objects.equals(this.beneficiaries, applicationRelationships.beneficiaries) && - Objects.equals(this.beneficialOwners, applicationRelationships.beneficialOwners); - } - - @Override - public int hashCode() { - return Objects.hash(org, customer, documents, applicationForm, trustees, beneficiaries, beneficialOwners); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationRelationships {\n"); - sb.append(" org: ").append(toIndentedString(org)).append("\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" documents: ").append(toIndentedString(documents)).append("\n"); - sb.append(" applicationForm: ").append(toIndentedString(applicationForm)).append("\n"); - sb.append(" trustees: ").append(toIndentedString(trustees)).append("\n"); - sb.append(" beneficiaries: ").append(toIndentedString(beneficiaries)).append("\n"); - sb.append(" beneficialOwners: ").append(toIndentedString(beneficialOwners)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("org"); - openapiFields.add("customer"); - openapiFields.add("documents"); - openapiFields.add("applicationForm"); - openapiFields.add("trustees"); - openapiFields.add("beneficiaries"); - openapiFields.add("beneficialOwners"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApplicationRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApplicationRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationRelationships is not found in the empty JSON string", ApplicationRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApplicationRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApplicationRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `org` - if (jsonObj.get("org") != null && !jsonObj.get("org").isJsonNull()) { - OrgRelationship.validateJsonElement(jsonObj.get("org")); - } - // validate the optional field `customer` - if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { - Relationship.validateJsonElement(jsonObj.get("customer")); - } - // validate the optional field `documents` - if (jsonObj.get("documents") != null && !jsonObj.get("documents").isJsonNull()) { - DocumentsRelationship.validateJsonElement(jsonObj.get("documents")); - } - // validate the optional field `applicationForm` - if (jsonObj.get("applicationForm") != null && !jsonObj.get("applicationForm").isJsonNull()) { - Relationship.validateJsonElement(jsonObj.get("applicationForm")); - } - // validate the optional field `trustees` - if (jsonObj.get("trustees") != null && !jsonObj.get("trustees").isJsonNull()) { - ApplicationRelationshipsTrustees.validateJsonElement(jsonObj.get("trustees")); - } - // validate the optional field `beneficiaries` - if (jsonObj.get("beneficiaries") != null && !jsonObj.get("beneficiaries").isJsonNull()) { - ApplicationRelationshipsBeneficiaries.validateJsonElement(jsonObj.get("beneficiaries")); - } - // validate the optional field `beneficialOwners` - if (jsonObj.get("beneficialOwners") != null && !jsonObj.get("beneficialOwners").isJsonNull()) { - ApplicationRelationshipsBeneficialOwners.validateJsonElement(jsonObj.get("beneficialOwners")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApplicationRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApplicationRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApplicationRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApplicationRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApplicationRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApplicationRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApplicationRelationships - * @throws IOException if the JSON string is invalid with respect to ApplicationRelationships - */ - public static ApplicationRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApplicationRelationships.class); - } - - /** - * Convert an instance of ApplicationRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficialOwners.java b/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficialOwners.java deleted file mode 100644 index 303cc80b..00000000 --- a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficialOwners.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ApplicationRelationshipsBeneficialOwnersDataInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApplicationRelationshipsBeneficialOwners - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApplicationRelationshipsBeneficialOwners { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public ApplicationRelationshipsBeneficialOwners() { - } - - public ApplicationRelationshipsBeneficialOwners data(List data) { - - this.data = data; - return this; - } - - public ApplicationRelationshipsBeneficialOwners addDataItem(ApplicationRelationshipsBeneficialOwnersDataInner dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationRelationshipsBeneficialOwners applicationRelationshipsBeneficialOwners = (ApplicationRelationshipsBeneficialOwners) o; - return Objects.equals(this.data, applicationRelationshipsBeneficialOwners.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationRelationshipsBeneficialOwners {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApplicationRelationshipsBeneficialOwners - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApplicationRelationshipsBeneficialOwners.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationRelationshipsBeneficialOwners is not found in the empty JSON string", ApplicationRelationshipsBeneficialOwners.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApplicationRelationshipsBeneficialOwners.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApplicationRelationshipsBeneficialOwners` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - ApplicationRelationshipsBeneficialOwnersDataInner.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApplicationRelationshipsBeneficialOwners.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApplicationRelationshipsBeneficialOwners' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApplicationRelationshipsBeneficialOwners.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApplicationRelationshipsBeneficialOwners value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApplicationRelationshipsBeneficialOwners read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApplicationRelationshipsBeneficialOwners given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApplicationRelationshipsBeneficialOwners - * @throws IOException if the JSON string is invalid with respect to ApplicationRelationshipsBeneficialOwners - */ - public static ApplicationRelationshipsBeneficialOwners fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApplicationRelationshipsBeneficialOwners.class); - } - - /** - * Convert an instance of ApplicationRelationshipsBeneficialOwners to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficialOwnersDataInner.java b/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficialOwnersDataInner.java deleted file mode 100644 index 572067c8..00000000 --- a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficialOwnersDataInner.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApplicationRelationshipsBeneficialOwnersDataInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApplicationRelationshipsBeneficialOwnersDataInner { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "beneficialOwner"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public ApplicationRelationshipsBeneficialOwnersDataInner() { - } - - public ApplicationRelationshipsBeneficialOwnersDataInner type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public ApplicationRelationshipsBeneficialOwnersDataInner id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationRelationshipsBeneficialOwnersDataInner applicationRelationshipsBeneficialOwnersDataInner = (ApplicationRelationshipsBeneficialOwnersDataInner) o; - return Objects.equals(this.type, applicationRelationshipsBeneficialOwnersDataInner.type) && - Objects.equals(this.id, applicationRelationshipsBeneficialOwnersDataInner.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationRelationshipsBeneficialOwnersDataInner {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApplicationRelationshipsBeneficialOwnersDataInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApplicationRelationshipsBeneficialOwnersDataInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationRelationshipsBeneficialOwnersDataInner is not found in the empty JSON string", ApplicationRelationshipsBeneficialOwnersDataInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApplicationRelationshipsBeneficialOwnersDataInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApplicationRelationshipsBeneficialOwnersDataInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - 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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApplicationRelationshipsBeneficialOwnersDataInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApplicationRelationshipsBeneficialOwnersDataInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApplicationRelationshipsBeneficialOwnersDataInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApplicationRelationshipsBeneficialOwnersDataInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApplicationRelationshipsBeneficialOwnersDataInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApplicationRelationshipsBeneficialOwnersDataInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApplicationRelationshipsBeneficialOwnersDataInner - * @throws IOException if the JSON string is invalid with respect to ApplicationRelationshipsBeneficialOwnersDataInner - */ - public static ApplicationRelationshipsBeneficialOwnersDataInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApplicationRelationshipsBeneficialOwnersDataInner.class); - } - - /** - * Convert an instance of ApplicationRelationshipsBeneficialOwnersDataInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficiaries.java b/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficiaries.java deleted file mode 100644 index 57ef9885..00000000 --- a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficiaries.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ApplicationRelationshipsBeneficiariesDataInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApplicationRelationshipsBeneficiaries - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApplicationRelationshipsBeneficiaries { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public ApplicationRelationshipsBeneficiaries() { - } - - public ApplicationRelationshipsBeneficiaries data(List data) { - - this.data = data; - return this; - } - - public ApplicationRelationshipsBeneficiaries addDataItem(ApplicationRelationshipsBeneficiariesDataInner dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationRelationshipsBeneficiaries applicationRelationshipsBeneficiaries = (ApplicationRelationshipsBeneficiaries) o; - return Objects.equals(this.data, applicationRelationshipsBeneficiaries.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationRelationshipsBeneficiaries {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApplicationRelationshipsBeneficiaries - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApplicationRelationshipsBeneficiaries.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationRelationshipsBeneficiaries is not found in the empty JSON string", ApplicationRelationshipsBeneficiaries.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApplicationRelationshipsBeneficiaries.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApplicationRelationshipsBeneficiaries` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - ApplicationRelationshipsBeneficiariesDataInner.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApplicationRelationshipsBeneficiaries.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApplicationRelationshipsBeneficiaries' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApplicationRelationshipsBeneficiaries.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApplicationRelationshipsBeneficiaries value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApplicationRelationshipsBeneficiaries read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApplicationRelationshipsBeneficiaries given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApplicationRelationshipsBeneficiaries - * @throws IOException if the JSON string is invalid with respect to ApplicationRelationshipsBeneficiaries - */ - public static ApplicationRelationshipsBeneficiaries fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApplicationRelationshipsBeneficiaries.class); - } - - /** - * Convert an instance of ApplicationRelationshipsBeneficiaries to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficiariesDataInner.java b/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficiariesDataInner.java deleted file mode 100644 index 50e5b04a..00000000 --- a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsBeneficiariesDataInner.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApplicationRelationshipsBeneficiariesDataInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApplicationRelationshipsBeneficiariesDataInner { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "beneficiary"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public ApplicationRelationshipsBeneficiariesDataInner() { - } - - public ApplicationRelationshipsBeneficiariesDataInner type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public ApplicationRelationshipsBeneficiariesDataInner id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationRelationshipsBeneficiariesDataInner applicationRelationshipsBeneficiariesDataInner = (ApplicationRelationshipsBeneficiariesDataInner) o; - return Objects.equals(this.type, applicationRelationshipsBeneficiariesDataInner.type) && - Objects.equals(this.id, applicationRelationshipsBeneficiariesDataInner.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationRelationshipsBeneficiariesDataInner {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApplicationRelationshipsBeneficiariesDataInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApplicationRelationshipsBeneficiariesDataInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationRelationshipsBeneficiariesDataInner is not found in the empty JSON string", ApplicationRelationshipsBeneficiariesDataInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApplicationRelationshipsBeneficiariesDataInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApplicationRelationshipsBeneficiariesDataInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - 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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApplicationRelationshipsBeneficiariesDataInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApplicationRelationshipsBeneficiariesDataInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApplicationRelationshipsBeneficiariesDataInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApplicationRelationshipsBeneficiariesDataInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApplicationRelationshipsBeneficiariesDataInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApplicationRelationshipsBeneficiariesDataInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApplicationRelationshipsBeneficiariesDataInner - * @throws IOException if the JSON string is invalid with respect to ApplicationRelationshipsBeneficiariesDataInner - */ - public static ApplicationRelationshipsBeneficiariesDataInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApplicationRelationshipsBeneficiariesDataInner.class); - } - - /** - * Convert an instance of ApplicationRelationshipsBeneficiariesDataInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsTrustees.java b/src/main/java/org/openapitools/client/model/ApplicationRelationshipsTrustees.java deleted file mode 100644 index e8a20a84..00000000 --- a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsTrustees.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ApplicationRelationshipsTrusteesDataInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApplicationRelationshipsTrustees - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApplicationRelationshipsTrustees { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public ApplicationRelationshipsTrustees() { - } - - public ApplicationRelationshipsTrustees data(List data) { - - this.data = data; - return this; - } - - public ApplicationRelationshipsTrustees addDataItem(ApplicationRelationshipsTrusteesDataInner dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationRelationshipsTrustees applicationRelationshipsTrustees = (ApplicationRelationshipsTrustees) o; - return Objects.equals(this.data, applicationRelationshipsTrustees.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationRelationshipsTrustees {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApplicationRelationshipsTrustees - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApplicationRelationshipsTrustees.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationRelationshipsTrustees is not found in the empty JSON string", ApplicationRelationshipsTrustees.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApplicationRelationshipsTrustees.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApplicationRelationshipsTrustees` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - ApplicationRelationshipsTrusteesDataInner.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApplicationRelationshipsTrustees.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApplicationRelationshipsTrustees' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApplicationRelationshipsTrustees.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApplicationRelationshipsTrustees value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApplicationRelationshipsTrustees read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApplicationRelationshipsTrustees given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApplicationRelationshipsTrustees - * @throws IOException if the JSON string is invalid with respect to ApplicationRelationshipsTrustees - */ - public static ApplicationRelationshipsTrustees fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApplicationRelationshipsTrustees.class); - } - - /** - * Convert an instance of ApplicationRelationshipsTrustees to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsTrusteesDataInner.java b/src/main/java/org/openapitools/client/model/ApplicationRelationshipsTrusteesDataInner.java deleted file mode 100644 index f5f8f1fb..00000000 --- a/src/main/java/org/openapitools/client/model/ApplicationRelationshipsTrusteesDataInner.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApplicationRelationshipsTrusteesDataInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApplicationRelationshipsTrusteesDataInner { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "trustee"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public ApplicationRelationshipsTrusteesDataInner() { - } - - public ApplicationRelationshipsTrusteesDataInner type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public ApplicationRelationshipsTrusteesDataInner id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApplicationRelationshipsTrusteesDataInner applicationRelationshipsTrusteesDataInner = (ApplicationRelationshipsTrusteesDataInner) o; - return Objects.equals(this.type, applicationRelationshipsTrusteesDataInner.type) && - Objects.equals(this.id, applicationRelationshipsTrusteesDataInner.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApplicationRelationshipsTrusteesDataInner {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApplicationRelationshipsTrusteesDataInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApplicationRelationshipsTrusteesDataInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationRelationshipsTrusteesDataInner is not found in the empty JSON string", ApplicationRelationshipsTrusteesDataInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApplicationRelationshipsTrusteesDataInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApplicationRelationshipsTrusteesDataInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - 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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApplicationRelationshipsTrusteesDataInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApplicationRelationshipsTrusteesDataInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApplicationRelationshipsTrusteesDataInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApplicationRelationshipsTrusteesDataInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApplicationRelationshipsTrusteesDataInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApplicationRelationshipsTrusteesDataInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApplicationRelationshipsTrusteesDataInner - * @throws IOException if the JSON string is invalid with respect to ApplicationRelationshipsTrusteesDataInner - */ - public static ApplicationRelationshipsTrusteesDataInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApplicationRelationshipsTrusteesDataInner.class); - } - - /** - * Convert an instance of ApplicationRelationshipsTrusteesDataInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApplicationStatus.java b/src/main/java/org/openapitools/client/model/ApplicationStatus.java deleted file mode 100644 index d7d18091..00000000 --- a/src/main/java/org/openapitools/client/model/ApplicationStatus.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets applicationStatus - */ -@JsonAdapter(ApplicationStatus.Adapter.class) -public enum ApplicationStatus { - - AWAITINGDOCUMENTS("AwaitingDocuments"), - - PENDINGREVIEW("PendingReview"), - - APPROVED("Approved"), - - DENIED("Denied"), - - PENDING("Pending"), - - CANCELED("Canceled"); - - private String value; - - ApplicationStatus(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ApplicationStatus fromValue(String value) { - for (ApplicationStatus b : ApplicationStatus.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ApplicationStatus enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ApplicationStatus read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ApplicationStatus.fromValue(value); - } - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApproveAuthorizationRequest.java b/src/main/java/org/openapitools/client/model/ApproveAuthorizationRequest.java deleted file mode 100644 index 6184a7d1..00000000 --- a/src/main/java/org/openapitools/client/model/ApproveAuthorizationRequest.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApproveAuthorizationRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApproveAuthorizationRequest { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ApproveAuthorizationRequest data; - - public ApproveAuthorizationRequest() { - } - - public ApproveAuthorizationRequest data(ApproveAuthorizationRequest data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public ApproveAuthorizationRequest getData() { - return data; - } - - - public void setData(ApproveAuthorizationRequest data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApproveAuthorizationRequest approveAuthorizationRequest = (ApproveAuthorizationRequest) o; - return Objects.equals(this.data, approveAuthorizationRequest.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApproveAuthorizationRequest {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApproveAuthorizationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApproveAuthorizationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApproveAuthorizationRequest is not found in the empty JSON string", ApproveAuthorizationRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApproveAuthorizationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApproveAuthorizationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - ApproveAuthorizationRequest.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApproveAuthorizationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApproveAuthorizationRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApproveAuthorizationRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApproveAuthorizationRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApproveAuthorizationRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApproveAuthorizationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApproveAuthorizationRequest - * @throws IOException if the JSON string is invalid with respect to ApproveAuthorizationRequest - */ - public static ApproveAuthorizationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApproveAuthorizationRequest.class); - } - - /** - * Convert an instance of ApproveAuthorizationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApproveAuthorizationRequestAttributes.java b/src/main/java/org/openapitools/client/model/ApproveAuthorizationRequestAttributes.java deleted file mode 100644 index 51129699..00000000 --- a/src/main/java/org/openapitools/client/model/ApproveAuthorizationRequestAttributes.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApproveAuthorizationRequestAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApproveAuthorizationRequestAttributes { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_FUNDING_ACCOUNT = "fundingAccount"; - @SerializedName(SERIALIZED_NAME_FUNDING_ACCOUNT) - private String fundingAccount; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public ApproveAuthorizationRequestAttributes() { - } - - public ApproveAuthorizationRequestAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nullable - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public ApproveAuthorizationRequestAttributes fundingAccount(String fundingAccount) { - - this.fundingAccount = fundingAccount; - return this; - } - - /** - * Get fundingAccount - * @return fundingAccount - **/ - @javax.annotation.Nullable - public String getFundingAccount() { - return fundingAccount; - } - - - public void setFundingAccount(String fundingAccount) { - this.fundingAccount = fundingAccount; - } - - - public ApproveAuthorizationRequestAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApproveAuthorizationRequestAttributes approveAuthorizationRequestAttributes = (ApproveAuthorizationRequestAttributes) o; - return Objects.equals(this.amount, approveAuthorizationRequestAttributes.amount) && - Objects.equals(this.fundingAccount, approveAuthorizationRequestAttributes.fundingAccount) && - Objects.equals(this.tags, approveAuthorizationRequestAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(amount, fundingAccount, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApproveAuthorizationRequestAttributes {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" fundingAccount: ").append(toIndentedString(fundingAccount)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("fundingAccount"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApproveAuthorizationRequestAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApproveAuthorizationRequestAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApproveAuthorizationRequestAttributes is not found in the empty JSON string", ApproveAuthorizationRequestAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApproveAuthorizationRequestAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApproveAuthorizationRequestAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("fundingAccount") != null && !jsonObj.get("fundingAccount").isJsonNull()) && !jsonObj.get("fundingAccount").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fundingAccount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fundingAccount").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApproveAuthorizationRequestAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApproveAuthorizationRequestAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApproveAuthorizationRequestAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApproveAuthorizationRequestAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApproveAuthorizationRequestAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApproveAuthorizationRequestAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApproveAuthorizationRequestAttributes - * @throws IOException if the JSON string is invalid with respect to ApproveAuthorizationRequestAttributes - */ - public static ApproveAuthorizationRequestAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApproveAuthorizationRequestAttributes.class); - } - - /** - * Convert an instance of ApproveAuthorizationRequestAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApproveCheckPaymentRequest.java b/src/main/java/org/openapitools/client/model/ApproveCheckPaymentRequest.java deleted file mode 100644 index 078eb9d3..00000000 --- a/src/main/java/org/openapitools/client/model/ApproveCheckPaymentRequest.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ApproveCheckPaymentRequestData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApproveCheckPaymentRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApproveCheckPaymentRequest { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ApproveCheckPaymentRequestData data; - - public ApproveCheckPaymentRequest() { - } - - public ApproveCheckPaymentRequest data(ApproveCheckPaymentRequestData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public ApproveCheckPaymentRequestData getData() { - return data; - } - - - public void setData(ApproveCheckPaymentRequestData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApproveCheckPaymentRequest approveCheckPaymentRequest = (ApproveCheckPaymentRequest) o; - return Objects.equals(this.data, approveCheckPaymentRequest.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApproveCheckPaymentRequest {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApproveCheckPaymentRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApproveCheckPaymentRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApproveCheckPaymentRequest is not found in the empty JSON string", ApproveCheckPaymentRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApproveCheckPaymentRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApproveCheckPaymentRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - ApproveCheckPaymentRequestData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApproveCheckPaymentRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApproveCheckPaymentRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApproveCheckPaymentRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApproveCheckPaymentRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApproveCheckPaymentRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApproveCheckPaymentRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApproveCheckPaymentRequest - * @throws IOException if the JSON string is invalid with respect to ApproveCheckPaymentRequest - */ - public static ApproveCheckPaymentRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApproveCheckPaymentRequest.class); - } - - /** - * Convert an instance of ApproveCheckPaymentRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ApproveCheckPaymentRequestData.java b/src/main/java/org/openapitools/client/model/ApproveCheckPaymentRequestData.java deleted file mode 100644 index 0aeedc7b..00000000 --- a/src/main/java/org/openapitools/client/model/ApproveCheckPaymentRequestData.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ApproveCheckPaymentRequestData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApproveCheckPaymentRequestData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "additionalVerification"; - - public ApproveCheckPaymentRequestData() { - } - - public ApproveCheckPaymentRequestData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApproveCheckPaymentRequestData approveCheckPaymentRequestData = (ApproveCheckPaymentRequestData) o; - return Objects.equals(this.type, approveCheckPaymentRequestData.type); - } - - @Override - public int hashCode() { - return Objects.hash(type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApproveCheckPaymentRequestData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ApproveCheckPaymentRequestData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ApproveCheckPaymentRequestData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ApproveCheckPaymentRequestData is not found in the empty JSON string", ApproveCheckPaymentRequestData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ApproveCheckPaymentRequestData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApproveCheckPaymentRequestData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ApproveCheckPaymentRequestData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ApproveCheckPaymentRequestData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ApproveCheckPaymentRequestData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ApproveCheckPaymentRequestData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ApproveCheckPaymentRequestData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ApproveCheckPaymentRequestData given an JSON string - * - * @param jsonString JSON string - * @return An instance of ApproveCheckPaymentRequestData - * @throws IOException if the JSON string is invalid with respect to ApproveCheckPaymentRequestData - */ - public static ApproveCheckPaymentRequestData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ApproveCheckPaymentRequestData.class); - } - - /** - * Convert an instance of ApproveCheckPaymentRequestData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ArchiveCustomerRequest.java b/src/main/java/org/openapitools/client/model/ArchiveCustomerRequest.java deleted file mode 100644 index ea5c35e8..00000000 --- a/src/main/java/org/openapitools/client/model/ArchiveCustomerRequest.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArchiveCustomerRequestAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ArchiveCustomerRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ArchiveCustomerRequest { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - ARCHIVECUSTOMER("archiveCustomer"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ArchiveCustomerRequestAttributes attributes; - - public ArchiveCustomerRequest() { - } - - public ArchiveCustomerRequest type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public ArchiveCustomerRequest attributes(ArchiveCustomerRequestAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public ArchiveCustomerRequestAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(ArchiveCustomerRequestAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArchiveCustomerRequest archiveCustomerRequest = (ArchiveCustomerRequest) o; - return Objects.equals(this.type, archiveCustomerRequest.type) && - Objects.equals(this.attributes, archiveCustomerRequest.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArchiveCustomerRequest {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ArchiveCustomerRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ArchiveCustomerRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ArchiveCustomerRequest is not found in the empty JSON string", ArchiveCustomerRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ArchiveCustomerRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArchiveCustomerRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - ArchiveCustomerRequestAttributes.validateJsonElement(jsonObj.get("attributes")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ArchiveCustomerRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ArchiveCustomerRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ArchiveCustomerRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ArchiveCustomerRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ArchiveCustomerRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ArchiveCustomerRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArchiveCustomerRequest - * @throws IOException if the JSON string is invalid with respect to ArchiveCustomerRequest - */ - public static ArchiveCustomerRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ArchiveCustomerRequest.class); - } - - /** - * Convert an instance of ArchiveCustomerRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ArchiveCustomerRequestAttributes.java b/src/main/java/org/openapitools/client/model/ArchiveCustomerRequestAttributes.java deleted file mode 100644 index 3f3dc244..00000000 --- a/src/main/java/org/openapitools/client/model/ArchiveCustomerRequestAttributes.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ArchiveCustomerRequestAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ArchiveCustomerRequestAttributes { - /** - * Gets or Sets reason - */ - @JsonAdapter(ReasonEnum.Adapter.class) - public enum ReasonEnum { - INACTIVE("Inactive"), - - FRAUDACHACTIVITY("FraudACHActivity"), - - FRAUDCARDACTIVITY("FraudCardActivity"), - - FRAUDCHECKACTIVITY("FraudCheckActivity"), - - FRAUDAPPLICATIONHISTORY("FraudApplicationHistory"), - - FRAUDACCOUNTACTIVITY("FraudAccountActivity"), - - FRAUDCLIENTIDENTIFIED("FraudClientIdentified"), - - FRAUDLINKEDTOFRAUDULENTCUSTOMER("FraudLinkedToFraudulentCustomer"); - - private String value; - - ReasonEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ReasonEnum fromValue(String value) { - for (ReasonEnum b : ReasonEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ReasonEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ReasonEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ReasonEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_REASON = "reason"; - @SerializedName(SERIALIZED_NAME_REASON) - private ReasonEnum reason; - - public ArchiveCustomerRequestAttributes() { - } - - public ArchiveCustomerRequestAttributes reason(ReasonEnum reason) { - - this.reason = reason; - return this; - } - - /** - * Get reason - * @return reason - **/ - @javax.annotation.Nullable - public ReasonEnum getReason() { - return reason; - } - - - public void setReason(ReasonEnum reason) { - this.reason = reason; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArchiveCustomerRequestAttributes archiveCustomerRequestAttributes = (ArchiveCustomerRequestAttributes) o; - return Objects.equals(this.reason, archiveCustomerRequestAttributes.reason); - } - - @Override - public int hashCode() { - return Objects.hash(reason); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArchiveCustomerRequestAttributes {\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("reason"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ArchiveCustomerRequestAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ArchiveCustomerRequestAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ArchiveCustomerRequestAttributes is not found in the empty JSON string", ArchiveCustomerRequestAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ArchiveCustomerRequestAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArchiveCustomerRequestAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ArchiveCustomerRequestAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ArchiveCustomerRequestAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ArchiveCustomerRequestAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ArchiveCustomerRequestAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ArchiveCustomerRequestAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ArchiveCustomerRequestAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArchiveCustomerRequestAttributes - * @throws IOException if the JSON string is invalid with respect to ArchiveCustomerRequestAttributes - */ - public static ArchiveCustomerRequestAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ArchiveCustomerRequestAttributes.class); - } - - /** - * Convert an instance of ArchiveCustomerRequestAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Astra.java b/src/main/java/org/openapitools/client/model/Astra.java deleted file mode 100644 index 4db4dda5..00000000 --- a/src/main/java/org/openapitools/client/model/Astra.java +++ /dev/null @@ -1,436 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.math.BigDecimal; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Astra - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Astra { - public static final String SERIALIZED_NAME_AUTH_TOKEN = "authToken"; - @SerializedName(SERIALIZED_NAME_AUTH_TOKEN) - private String authToken; - - public static final String SERIALIZED_NAME_DEBIT_FEE_PERCENT = "debitFeePercent"; - @SerializedName(SERIALIZED_NAME_DEBIT_FEE_PERCENT) - private BigDecimal debitFeePercent; - - public static final String SERIALIZED_NAME_INSTITUTION_ID = "institutionId"; - @SerializedName(SERIALIZED_NAME_INSTITUTION_ID) - private String institutionId; - - public static final String SERIALIZED_NAME_DESTINATION_CARD_ID = "destinationCardId"; - @SerializedName(SERIALIZED_NAME_DESTINATION_CARD_ID) - private String destinationCardId; - - public static final String SERIALIZED_NAME_ROUTING_NUMBER = "routingNumber"; - @SerializedName(SERIALIZED_NAME_ROUTING_NUMBER) - private String routingNumber; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_ACCOUNT_NAME = "accountName"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NAME) - private String accountName; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public Astra() { - } - - public Astra authToken(String authToken) { - - this.authToken = authToken; - return this; - } - - /** - * Get authToken - * @return authToken - **/ - @javax.annotation.Nullable - public String getAuthToken() { - return authToken; - } - - - public void setAuthToken(String authToken) { - this.authToken = authToken; - } - - - public Astra debitFeePercent(BigDecimal debitFeePercent) { - - this.debitFeePercent = debitFeePercent; - return this; - } - - /** - * Get debitFeePercent - * @return debitFeePercent - **/ - @javax.annotation.Nonnull - public BigDecimal getDebitFeePercent() { - return debitFeePercent; - } - - - public void setDebitFeePercent(BigDecimal debitFeePercent) { - this.debitFeePercent = debitFeePercent; - } - - - public Astra institutionId(String institutionId) { - - this.institutionId = institutionId; - return this; - } - - /** - * Get institutionId - * @return institutionId - **/ - @javax.annotation.Nonnull - public String getInstitutionId() { - return institutionId; - } - - - public void setInstitutionId(String institutionId) { - this.institutionId = institutionId; - } - - - public Astra destinationCardId(String destinationCardId) { - - this.destinationCardId = destinationCardId; - return this; - } - - /** - * Get destinationCardId - * @return destinationCardId - **/ - @javax.annotation.Nonnull - public String getDestinationCardId() { - return destinationCardId; - } - - - public void setDestinationCardId(String destinationCardId) { - this.destinationCardId = destinationCardId; - } - - - public Astra routingNumber(String routingNumber) { - - this.routingNumber = routingNumber; - return this; - } - - /** - * Get routingNumber - * @return routingNumber - **/ - @javax.annotation.Nonnull - public String getRoutingNumber() { - return routingNumber; - } - - - public void setRoutingNumber(String routingNumber) { - this.routingNumber = routingNumber; - } - - - public Astra accountNumber(String accountNumber) { - - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - **/ - @javax.annotation.Nonnull - public String getAccountNumber() { - return accountNumber; - } - - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Astra accountName(String accountName) { - - this.accountName = accountName; - return this; - } - - /** - * Get accountName - * @return accountName - **/ - @javax.annotation.Nullable - public String getAccountName() { - return accountName; - } - - - public void setAccountName(String accountName) { - this.accountName = accountName; - } - - - public Astra referenceId(String referenceId) { - - this.referenceId = referenceId; - return this; - } - - /** - * Get referenceId - * @return referenceId - **/ - @javax.annotation.Nonnull - public String getReferenceId() { - return referenceId; - } - - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Astra astra = (Astra) o; - return Objects.equals(this.authToken, astra.authToken) && - Objects.equals(this.debitFeePercent, astra.debitFeePercent) && - Objects.equals(this.institutionId, astra.institutionId) && - Objects.equals(this.destinationCardId, astra.destinationCardId) && - Objects.equals(this.routingNumber, astra.routingNumber) && - Objects.equals(this.accountNumber, astra.accountNumber) && - Objects.equals(this.accountName, astra.accountName) && - Objects.equals(this.referenceId, astra.referenceId); - } - - @Override - public int hashCode() { - return Objects.hash(authToken, debitFeePercent, institutionId, destinationCardId, routingNumber, accountNumber, accountName, referenceId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Astra {\n"); - sb.append(" authToken: ").append(toIndentedString(authToken)).append("\n"); - sb.append(" debitFeePercent: ").append(toIndentedString(debitFeePercent)).append("\n"); - sb.append(" institutionId: ").append(toIndentedString(institutionId)).append("\n"); - sb.append(" destinationCardId: ").append(toIndentedString(destinationCardId)).append("\n"); - sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" accountName: ").append(toIndentedString(accountName)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("authToken"); - openapiFields.add("debitFeePercent"); - openapiFields.add("institutionId"); - openapiFields.add("destinationCardId"); - openapiFields.add("routingNumber"); - openapiFields.add("accountNumber"); - openapiFields.add("accountName"); - openapiFields.add("referenceId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("debitFeePercent"); - openapiRequiredFields.add("institutionId"); - openapiRequiredFields.add("destinationCardId"); - openapiRequiredFields.add("routingNumber"); - openapiRequiredFields.add("accountNumber"); - openapiRequiredFields.add("referenceId"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Astra - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Astra.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Astra is not found in the empty JSON string", Astra.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Astra.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Astra` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Astra.openapiRequiredFields) { - 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("authToken") != null && !jsonObj.get("authToken").isJsonNull()) && !jsonObj.get("authToken").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authToken").toString())); - } - if (!jsonObj.get("institutionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `institutionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("institutionId").toString())); - } - if (!jsonObj.get("destinationCardId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `destinationCardId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("destinationCardId").toString())); - } - if (!jsonObj.get("routingNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `routingNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("routingNumber").toString())); - } - if (!jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("accountName") != null && !jsonObj.get("accountName").isJsonNull()) && !jsonObj.get("accountName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountName").toString())); - } - if (!jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Astra.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Astra' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Astra.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Astra value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Astra read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Astra given an JSON string - * - * @param jsonString JSON string - * @return An instance of Astra - * @throws IOException if the JSON string is invalid with respect to Astra - */ - public static Astra fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Astra.class); - } - - /** - * Convert an instance of Astra to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AtmAuthorizationRequest.java b/src/main/java/org/openapitools/client/model/AtmAuthorizationRequest.java deleted file mode 100644 index 7e625a34..00000000 --- a/src/main/java/org/openapitools/client/model/AtmAuthorizationRequest.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AtmAuthorizationRequestAllOfAttributes; -import org.openapitools.client.model.AuthorizationRequest; -import org.openapitools.client.model.AuthorizationRequestRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AtmAuthorizationRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AtmAuthorizationRequest extends AuthorizationRequest { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private AtmAuthorizationRequestAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private AuthorizationRequestRelationships relationships; - - public AtmAuthorizationRequest() { - this.type = this.getClass().getSimpleName(); - } - - public AtmAuthorizationRequest attributes(AtmAuthorizationRequestAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public AtmAuthorizationRequestAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(AtmAuthorizationRequestAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public AtmAuthorizationRequest relationships(AuthorizationRequestRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public AuthorizationRequestRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(AuthorizationRequestRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AtmAuthorizationRequest atmAuthorizationRequest = (AtmAuthorizationRequest) o; - return Objects.equals(this.attributes, atmAuthorizationRequest.attributes) && - Objects.equals(this.relationships, atmAuthorizationRequest.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AtmAuthorizationRequest {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AtmAuthorizationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AtmAuthorizationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AtmAuthorizationRequest is not found in the empty JSON string", AtmAuthorizationRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AtmAuthorizationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AtmAuthorizationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AtmAuthorizationRequest.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AtmAuthorizationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AtmAuthorizationRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AtmAuthorizationRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AtmAuthorizationRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AtmAuthorizationRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AtmAuthorizationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of AtmAuthorizationRequest - * @throws IOException if the JSON string is invalid with respect to AtmAuthorizationRequest - */ - public static AtmAuthorizationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AtmAuthorizationRequest.class); - } - - /** - * Convert an instance of AtmAuthorizationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AtmAuthorizationRequestAllOfAttributes.java b/src/main/java/org/openapitools/client/model/AtmAuthorizationRequestAllOfAttributes.java deleted file mode 100644 index 28c02431..00000000 --- a/src/main/java/org/openapitools/client/model/AtmAuthorizationRequestAllOfAttributes.java +++ /dev/null @@ -1,587 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.math.BigDecimal; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AtmAuthorizationRequestAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AtmAuthorizationRequestAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_PARTIAL_APPROVAL_ALLOWED = "partialApprovalAllowed"; - @SerializedName(SERIALIZED_NAME_PARTIAL_APPROVAL_ALLOWED) - private Boolean partialApprovalAllowed; - - public static final String SERIALIZED_NAME_APPROVED_AMOUNT = "approvedAmount"; - @SerializedName(SERIALIZED_NAME_APPROVED_AMOUNT) - private Integer approvedAmount; - - public static final String SERIALIZED_NAME_DECLINE_REASON = "declineReason"; - @SerializedName(SERIALIZED_NAME_DECLINE_REASON) - private String declineReason; - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private String direction; - - public static final String SERIALIZED_NAME_ATM_NAME = "atmName"; - @SerializedName(SERIALIZED_NAME_ATM_NAME) - private String atmName; - - public static final String SERIALIZED_NAME_ATM_LOCATION = "atmLocation"; - @SerializedName(SERIALIZED_NAME_ATM_LOCATION) - private String atmLocation; - - public static final String SERIALIZED_NAME_SURCHARGE = "surcharge"; - @SerializedName(SERIALIZED_NAME_SURCHARGE) - private Integer surcharge; - - public static final String SERIALIZED_NAME_INTERNATIONAL_SERVICE_FEE = "internationalServiceFee"; - @SerializedName(SERIALIZED_NAME_INTERNATIONAL_SERVICE_FEE) - private BigDecimal internationalServiceFee; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_CARD_NETWORK = "cardNetwork"; - @SerializedName(SERIALIZED_NAME_CARD_NETWORK) - private String cardNetwork; - - public AtmAuthorizationRequestAllOfAttributes() { - } - - public AtmAuthorizationRequestAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public AtmAuthorizationRequestAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public AtmAuthorizationRequestAllOfAttributes status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public AtmAuthorizationRequestAllOfAttributes partialApprovalAllowed(Boolean partialApprovalAllowed) { - - this.partialApprovalAllowed = partialApprovalAllowed; - return this; - } - - /** - * Get partialApprovalAllowed - * @return partialApprovalAllowed - **/ - @javax.annotation.Nonnull - public Boolean getPartialApprovalAllowed() { - return partialApprovalAllowed; - } - - - public void setPartialApprovalAllowed(Boolean partialApprovalAllowed) { - this.partialApprovalAllowed = partialApprovalAllowed; - } - - - public AtmAuthorizationRequestAllOfAttributes approvedAmount(Integer approvedAmount) { - - this.approvedAmount = approvedAmount; - return this; - } - - /** - * Get approvedAmount - * @return approvedAmount - **/ - @javax.annotation.Nullable - public Integer getApprovedAmount() { - return approvedAmount; - } - - - public void setApprovedAmount(Integer approvedAmount) { - this.approvedAmount = approvedAmount; - } - - - public AtmAuthorizationRequestAllOfAttributes declineReason(String declineReason) { - - this.declineReason = declineReason; - return this; - } - - /** - * Get declineReason - * @return declineReason - **/ - @javax.annotation.Nullable - public String getDeclineReason() { - return declineReason; - } - - - public void setDeclineReason(String declineReason) { - this.declineReason = declineReason; - } - - - public AtmAuthorizationRequestAllOfAttributes direction(String direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public String getDirection() { - return direction; - } - - - public void setDirection(String direction) { - this.direction = direction; - } - - - public AtmAuthorizationRequestAllOfAttributes atmName(String atmName) { - - this.atmName = atmName; - return this; - } - - /** - * Get atmName - * @return atmName - **/ - @javax.annotation.Nonnull - public String getAtmName() { - return atmName; - } - - - public void setAtmName(String atmName) { - this.atmName = atmName; - } - - - public AtmAuthorizationRequestAllOfAttributes atmLocation(String atmLocation) { - - this.atmLocation = atmLocation; - return this; - } - - /** - * Get atmLocation - * @return atmLocation - **/ - @javax.annotation.Nullable - public String getAtmLocation() { - return atmLocation; - } - - - public void setAtmLocation(String atmLocation) { - this.atmLocation = atmLocation; - } - - - public AtmAuthorizationRequestAllOfAttributes surcharge(Integer surcharge) { - - this.surcharge = surcharge; - return this; - } - - /** - * Get surcharge - * @return surcharge - **/ - @javax.annotation.Nonnull - public Integer getSurcharge() { - return surcharge; - } - - - public void setSurcharge(Integer surcharge) { - this.surcharge = surcharge; - } - - - public AtmAuthorizationRequestAllOfAttributes internationalServiceFee(BigDecimal internationalServiceFee) { - - this.internationalServiceFee = internationalServiceFee; - return this; - } - - /** - * Get internationalServiceFee - * @return internationalServiceFee - **/ - @javax.annotation.Nullable - public BigDecimal getInternationalServiceFee() { - return internationalServiceFee; - } - - - public void setInternationalServiceFee(BigDecimal internationalServiceFee) { - this.internationalServiceFee = internationalServiceFee; - } - - - public AtmAuthorizationRequestAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public AtmAuthorizationRequestAllOfAttributes cardNetwork(String cardNetwork) { - - this.cardNetwork = cardNetwork; - return this; - } - - /** - * Get cardNetwork - * @return cardNetwork - **/ - @javax.annotation.Nullable - public String getCardNetwork() { - return cardNetwork; - } - - - public void setCardNetwork(String cardNetwork) { - this.cardNetwork = cardNetwork; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AtmAuthorizationRequestAllOfAttributes atmAuthorizationRequestAllOfAttributes = (AtmAuthorizationRequestAllOfAttributes) o; - return Objects.equals(this.createdAt, atmAuthorizationRequestAllOfAttributes.createdAt) && - Objects.equals(this.amount, atmAuthorizationRequestAllOfAttributes.amount) && - Objects.equals(this.status, atmAuthorizationRequestAllOfAttributes.status) && - Objects.equals(this.partialApprovalAllowed, atmAuthorizationRequestAllOfAttributes.partialApprovalAllowed) && - Objects.equals(this.approvedAmount, atmAuthorizationRequestAllOfAttributes.approvedAmount) && - Objects.equals(this.declineReason, atmAuthorizationRequestAllOfAttributes.declineReason) && - Objects.equals(this.direction, atmAuthorizationRequestAllOfAttributes.direction) && - Objects.equals(this.atmName, atmAuthorizationRequestAllOfAttributes.atmName) && - Objects.equals(this.atmLocation, atmAuthorizationRequestAllOfAttributes.atmLocation) && - Objects.equals(this.surcharge, atmAuthorizationRequestAllOfAttributes.surcharge) && - Objects.equals(this.internationalServiceFee, atmAuthorizationRequestAllOfAttributes.internationalServiceFee) && - Objects.equals(this.tags, atmAuthorizationRequestAllOfAttributes.tags) && - Objects.equals(this.cardNetwork, atmAuthorizationRequestAllOfAttributes.cardNetwork); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, amount, status, partialApprovalAllowed, approvedAmount, declineReason, direction, atmName, atmLocation, surcharge, internationalServiceFee, tags, cardNetwork); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AtmAuthorizationRequestAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" partialApprovalAllowed: ").append(toIndentedString(partialApprovalAllowed)).append("\n"); - sb.append(" approvedAmount: ").append(toIndentedString(approvedAmount)).append("\n"); - sb.append(" declineReason: ").append(toIndentedString(declineReason)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" atmName: ").append(toIndentedString(atmName)).append("\n"); - sb.append(" atmLocation: ").append(toIndentedString(atmLocation)).append("\n"); - sb.append(" surcharge: ").append(toIndentedString(surcharge)).append("\n"); - sb.append(" internationalServiceFee: ").append(toIndentedString(internationalServiceFee)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" cardNetwork: ").append(toIndentedString(cardNetwork)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("amount"); - openapiFields.add("status"); - openapiFields.add("partialApprovalAllowed"); - openapiFields.add("approvedAmount"); - openapiFields.add("declineReason"); - openapiFields.add("direction"); - openapiFields.add("atmName"); - openapiFields.add("atmLocation"); - openapiFields.add("surcharge"); - openapiFields.add("internationalServiceFee"); - openapiFields.add("tags"); - openapiFields.add("cardNetwork"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("partialApprovalAllowed"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("atmName"); - openapiRequiredFields.add("surcharge"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AtmAuthorizationRequestAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AtmAuthorizationRequestAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AtmAuthorizationRequestAllOfAttributes is not found in the empty JSON string", AtmAuthorizationRequestAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AtmAuthorizationRequestAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AtmAuthorizationRequestAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AtmAuthorizationRequestAllOfAttributes.openapiRequiredFields) { - 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("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())); - } - if ((jsonObj.get("declineReason") != null && !jsonObj.get("declineReason").isJsonNull()) && !jsonObj.get("declineReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `declineReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("declineReason").toString())); - } - if (!jsonObj.get("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("atmName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `atmName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("atmName").toString())); - } - if ((jsonObj.get("atmLocation") != null && !jsonObj.get("atmLocation").isJsonNull()) && !jsonObj.get("atmLocation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `atmLocation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("atmLocation").toString())); - } - if ((jsonObj.get("cardNetwork") != null && !jsonObj.get("cardNetwork").isJsonNull()) && !jsonObj.get("cardNetwork").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardNetwork` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardNetwork").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AtmAuthorizationRequestAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AtmAuthorizationRequestAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AtmAuthorizationRequestAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AtmAuthorizationRequestAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AtmAuthorizationRequestAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AtmAuthorizationRequestAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of AtmAuthorizationRequestAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to AtmAuthorizationRequestAllOfAttributes - */ - public static AtmAuthorizationRequestAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AtmAuthorizationRequestAllOfAttributes.class); - } - - /** - * Convert an instance of AtmAuthorizationRequestAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AtmLocation.java b/src/main/java/org/openapitools/client/model/AtmLocation.java deleted file mode 100644 index c474718a..00000000 --- a/src/main/java/org/openapitools/client/model/AtmLocation.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AtmLocationAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AtmLocation - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AtmLocation { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "atmLocation"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private AtmLocationAttributes attributes; - - public AtmLocation() { - } - - public AtmLocation type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public AtmLocation attributes(AtmLocationAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public AtmLocationAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(AtmLocationAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AtmLocation atmLocation = (AtmLocation) o; - return Objects.equals(this.type, atmLocation.type) && - Objects.equals(this.attributes, atmLocation.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AtmLocation {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AtmLocation - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AtmLocation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AtmLocation is not found in the empty JSON string", AtmLocation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AtmLocation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AtmLocation` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AtmLocation.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - AtmLocationAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AtmLocation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AtmLocation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AtmLocation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AtmLocation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AtmLocation read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AtmLocation given an JSON string - * - * @param jsonString JSON string - * @return An instance of AtmLocation - * @throws IOException if the JSON string is invalid with respect to AtmLocation - */ - public static AtmLocation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AtmLocation.class); - } - - /** - * Convert an instance of AtmLocation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AtmLocationAttributes.java b/src/main/java/org/openapitools/client/model/AtmLocationAttributes.java deleted file mode 100644 index 12f7d9ff..00000000 --- a/src/main/java/org/openapitools/client/model/AtmLocationAttributes.java +++ /dev/null @@ -1,389 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Address; -import org.openapitools.client.model.Coordinates; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AtmLocationAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AtmLocationAttributes { - public static final String SERIALIZED_NAME_NETWORK = "network"; - @SerializedName(SERIALIZED_NAME_NETWORK) - private String network; - - public static final String SERIALIZED_NAME_LOCATION_NAME = "locationName"; - @SerializedName(SERIALIZED_NAME_LOCATION_NAME) - private String locationName; - - public static final String SERIALIZED_NAME_COORDINATES = "coordinates"; - @SerializedName(SERIALIZED_NAME_COORDINATES) - private Coordinates coordinates; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_DISTANCE = "distance"; - @SerializedName(SERIALIZED_NAME_DISTANCE) - private Integer distance; - - public static final String SERIALIZED_NAME_SURCHARGE_FREE = "surchargeFree"; - @SerializedName(SERIALIZED_NAME_SURCHARGE_FREE) - private Boolean surchargeFree; - - public static final String SERIALIZED_NAME_ACCEPT_DEPOSITS = "acceptDeposits"; - @SerializedName(SERIALIZED_NAME_ACCEPT_DEPOSITS) - private Boolean acceptDeposits; - - public AtmLocationAttributes() { - } - - public AtmLocationAttributes network(String network) { - - this.network = network; - return this; - } - - /** - * Get network - * @return network - **/ - @javax.annotation.Nullable - public String getNetwork() { - return network; - } - - - public void setNetwork(String network) { - this.network = network; - } - - - public AtmLocationAttributes locationName(String locationName) { - - this.locationName = locationName; - return this; - } - - /** - * Get locationName - * @return locationName - **/ - @javax.annotation.Nullable - public String getLocationName() { - return locationName; - } - - - public void setLocationName(String locationName) { - this.locationName = locationName; - } - - - public AtmLocationAttributes coordinates(Coordinates coordinates) { - - this.coordinates = coordinates; - return this; - } - - /** - * Get coordinates - * @return coordinates - **/ - @javax.annotation.Nullable - public Coordinates getCoordinates() { - return coordinates; - } - - - public void setCoordinates(Coordinates coordinates) { - this.coordinates = coordinates; - } - - - public AtmLocationAttributes address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public AtmLocationAttributes distance(Integer distance) { - - this.distance = distance; - return this; - } - - /** - * Get distance - * @return distance - **/ - @javax.annotation.Nullable - public Integer getDistance() { - return distance; - } - - - public void setDistance(Integer distance) { - this.distance = distance; - } - - - public AtmLocationAttributes surchargeFree(Boolean surchargeFree) { - - this.surchargeFree = surchargeFree; - return this; - } - - /** - * Get surchargeFree - * @return surchargeFree - **/ - @javax.annotation.Nullable - public Boolean getSurchargeFree() { - return surchargeFree; - } - - - public void setSurchargeFree(Boolean surchargeFree) { - this.surchargeFree = surchargeFree; - } - - - public AtmLocationAttributes acceptDeposits(Boolean acceptDeposits) { - - this.acceptDeposits = acceptDeposits; - return this; - } - - /** - * Get acceptDeposits - * @return acceptDeposits - **/ - @javax.annotation.Nullable - public Boolean getAcceptDeposits() { - return acceptDeposits; - } - - - public void setAcceptDeposits(Boolean acceptDeposits) { - this.acceptDeposits = acceptDeposits; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AtmLocationAttributes atmLocationAttributes = (AtmLocationAttributes) o; - return Objects.equals(this.network, atmLocationAttributes.network) && - Objects.equals(this.locationName, atmLocationAttributes.locationName) && - Objects.equals(this.coordinates, atmLocationAttributes.coordinates) && - Objects.equals(this.address, atmLocationAttributes.address) && - Objects.equals(this.distance, atmLocationAttributes.distance) && - Objects.equals(this.surchargeFree, atmLocationAttributes.surchargeFree) && - Objects.equals(this.acceptDeposits, atmLocationAttributes.acceptDeposits); - } - - @Override - public int hashCode() { - return Objects.hash(network, locationName, coordinates, address, distance, surchargeFree, acceptDeposits); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AtmLocationAttributes {\n"); - sb.append(" network: ").append(toIndentedString(network)).append("\n"); - sb.append(" locationName: ").append(toIndentedString(locationName)).append("\n"); - sb.append(" coordinates: ").append(toIndentedString(coordinates)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" distance: ").append(toIndentedString(distance)).append("\n"); - sb.append(" surchargeFree: ").append(toIndentedString(surchargeFree)).append("\n"); - sb.append(" acceptDeposits: ").append(toIndentedString(acceptDeposits)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("network"); - openapiFields.add("locationName"); - openapiFields.add("coordinates"); - openapiFields.add("address"); - openapiFields.add("distance"); - openapiFields.add("surchargeFree"); - openapiFields.add("acceptDeposits"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AtmLocationAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AtmLocationAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AtmLocationAttributes is not found in the empty JSON string", AtmLocationAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AtmLocationAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AtmLocationAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("network") != null && !jsonObj.get("network").isJsonNull()) && !jsonObj.get("network").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `network` to be a primitive type in the JSON string but got `%s`", jsonObj.get("network").toString())); - } - if ((jsonObj.get("locationName") != null && !jsonObj.get("locationName").isJsonNull()) && !jsonObj.get("locationName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `locationName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("locationName").toString())); - } - // validate the optional field `coordinates` - if (jsonObj.get("coordinates") != null && !jsonObj.get("coordinates").isJsonNull()) { - Coordinates.validateJsonElement(jsonObj.get("coordinates")); - } - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("address")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AtmLocationAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AtmLocationAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AtmLocationAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AtmLocationAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AtmLocationAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AtmLocationAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of AtmLocationAttributes - * @throws IOException if the JSON string is invalid with respect to AtmLocationAttributes - */ - public static AtmLocationAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AtmLocationAttributes.class); - } - - /** - * Convert an instance of AtmLocationAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AtmTransaction.java b/src/main/java/org/openapitools/client/model/AtmTransaction.java deleted file mode 100644 index c1f671d9..00000000 --- a/src/main/java/org/openapitools/client/model/AtmTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AtmTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AtmTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AtmTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private AtmTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public AtmTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public AtmTransaction attributes(AtmTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public AtmTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(AtmTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public AtmTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AtmTransaction atmTransaction = (AtmTransaction) o; - return Objects.equals(this.attributes, atmTransaction.attributes) && - Objects.equals(this.relationships, atmTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AtmTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AtmTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AtmTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AtmTransaction is not found in the empty JSON string", AtmTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AtmTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AtmTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AtmTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AtmTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AtmTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AtmTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AtmTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AtmTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AtmTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of AtmTransaction - * @throws IOException if the JSON string is invalid with respect to AtmTransaction - */ - public static AtmTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AtmTransaction.class); - } - - /** - * Convert an instance of AtmTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AtmTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/AtmTransactionAllOfAttributes.java deleted file mode 100644 index 043f3d9c..00000000 --- a/src/main/java/org/openapitools/client/model/AtmTransactionAllOfAttributes.java +++ /dev/null @@ -1,668 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AtmTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AtmTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_CARD_LAST4_DIGITS = "cardLast4Digits"; - @SerializedName(SERIALIZED_NAME_CARD_LAST4_DIGITS) - private String cardLast4Digits; - - public static final String SERIALIZED_NAME_ATM_NAME = "atmName"; - @SerializedName(SERIALIZED_NAME_ATM_NAME) - private String atmName; - - public static final String SERIALIZED_NAME_ATM_LOCATION = "atmLocation"; - @SerializedName(SERIALIZED_NAME_ATM_LOCATION) - private String atmLocation; - - public static final String SERIALIZED_NAME_SURCHARGE = "surcharge"; - @SerializedName(SERIALIZED_NAME_SURCHARGE) - private Integer surcharge; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_NETWORK_TRANSACTION_ID = "networkTransactionId"; - @SerializedName(SERIALIZED_NAME_NETWORK_TRANSACTION_ID) - private String networkTransactionId; - - public static final String SERIALIZED_NAME_INTERCHANGE = "interchange"; - @SerializedName(SERIALIZED_NAME_INTERCHANGE) - private String interchange; - - public static final String SERIALIZED_NAME_INTERNATIONAL_SERVICE_FEE = "internationalServiceFee"; - @SerializedName(SERIALIZED_NAME_INTERNATIONAL_SERVICE_FEE) - private Integer internationalServiceFee; - - public static final String SERIALIZED_NAME_CARD_NETWORK = "cardNetwork"; - @SerializedName(SERIALIZED_NAME_CARD_NETWORK) - private String cardNetwork; - - public AtmTransactionAllOfAttributes() { - } - - public AtmTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public AtmTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public AtmTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public AtmTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public AtmTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public AtmTransactionAllOfAttributes cardLast4Digits(String cardLast4Digits) { - - this.cardLast4Digits = cardLast4Digits; - return this; - } - - /** - * Get cardLast4Digits - * @return cardLast4Digits - **/ - @javax.annotation.Nonnull - public String getCardLast4Digits() { - return cardLast4Digits; - } - - - public void setCardLast4Digits(String cardLast4Digits) { - this.cardLast4Digits = cardLast4Digits; - } - - - public AtmTransactionAllOfAttributes atmName(String atmName) { - - this.atmName = atmName; - return this; - } - - /** - * Get atmName - * @return atmName - **/ - @javax.annotation.Nonnull - public String getAtmName() { - return atmName; - } - - - public void setAtmName(String atmName) { - this.atmName = atmName; - } - - - public AtmTransactionAllOfAttributes atmLocation(String atmLocation) { - - this.atmLocation = atmLocation; - return this; - } - - /** - * Get atmLocation - * @return atmLocation - **/ - @javax.annotation.Nullable - public String getAtmLocation() { - return atmLocation; - } - - - public void setAtmLocation(String atmLocation) { - this.atmLocation = atmLocation; - } - - - public AtmTransactionAllOfAttributes surcharge(Integer surcharge) { - - this.surcharge = surcharge; - return this; - } - - /** - * Get surcharge - * @return surcharge - **/ - @javax.annotation.Nonnull - public Integer getSurcharge() { - return surcharge; - } - - - public void setSurcharge(Integer surcharge) { - this.surcharge = surcharge; - } - - - public AtmTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public AtmTransactionAllOfAttributes networkTransactionId(String networkTransactionId) { - - this.networkTransactionId = networkTransactionId; - return this; - } - - /** - * Get networkTransactionId - * @return networkTransactionId - **/ - @javax.annotation.Nullable - public String getNetworkTransactionId() { - return networkTransactionId; - } - - - public void setNetworkTransactionId(String networkTransactionId) { - this.networkTransactionId = networkTransactionId; - } - - - public AtmTransactionAllOfAttributes interchange(String interchange) { - - this.interchange = interchange; - return this; - } - - /** - * Get interchange - * @return interchange - **/ - @javax.annotation.Nullable - public String getInterchange() { - return interchange; - } - - - public void setInterchange(String interchange) { - this.interchange = interchange; - } - - - public AtmTransactionAllOfAttributes internationalServiceFee(Integer internationalServiceFee) { - - this.internationalServiceFee = internationalServiceFee; - return this; - } - - /** - * Get internationalServiceFee - * @return internationalServiceFee - **/ - @javax.annotation.Nullable - public Integer getInternationalServiceFee() { - return internationalServiceFee; - } - - - public void setInternationalServiceFee(Integer internationalServiceFee) { - this.internationalServiceFee = internationalServiceFee; - } - - - public AtmTransactionAllOfAttributes cardNetwork(String cardNetwork) { - - this.cardNetwork = cardNetwork; - return this; - } - - /** - * Get cardNetwork - * @return cardNetwork - **/ - @javax.annotation.Nullable - public String getCardNetwork() { - return cardNetwork; - } - - - public void setCardNetwork(String cardNetwork) { - this.cardNetwork = cardNetwork; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AtmTransactionAllOfAttributes atmTransactionAllOfAttributes = (AtmTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, atmTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, atmTransactionAllOfAttributes.direction) && - Objects.equals(this.amount, atmTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, atmTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, atmTransactionAllOfAttributes.summary) && - Objects.equals(this.cardLast4Digits, atmTransactionAllOfAttributes.cardLast4Digits) && - Objects.equals(this.atmName, atmTransactionAllOfAttributes.atmName) && - Objects.equals(this.atmLocation, atmTransactionAllOfAttributes.atmLocation) && - Objects.equals(this.surcharge, atmTransactionAllOfAttributes.surcharge) && - Objects.equals(this.tags, atmTransactionAllOfAttributes.tags) && - Objects.equals(this.networkTransactionId, atmTransactionAllOfAttributes.networkTransactionId) && - Objects.equals(this.interchange, atmTransactionAllOfAttributes.interchange) && - Objects.equals(this.internationalServiceFee, atmTransactionAllOfAttributes.internationalServiceFee) && - Objects.equals(this.cardNetwork, atmTransactionAllOfAttributes.cardNetwork); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, amount, balance, summary, cardLast4Digits, atmName, atmLocation, surcharge, tags, networkTransactionId, interchange, internationalServiceFee, cardNetwork); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AtmTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" cardLast4Digits: ").append(toIndentedString(cardLast4Digits)).append("\n"); - sb.append(" atmName: ").append(toIndentedString(atmName)).append("\n"); - sb.append(" atmLocation: ").append(toIndentedString(atmLocation)).append("\n"); - sb.append(" surcharge: ").append(toIndentedString(surcharge)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" networkTransactionId: ").append(toIndentedString(networkTransactionId)).append("\n"); - sb.append(" interchange: ").append(toIndentedString(interchange)).append("\n"); - sb.append(" internationalServiceFee: ").append(toIndentedString(internationalServiceFee)).append("\n"); - sb.append(" cardNetwork: ").append(toIndentedString(cardNetwork)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("cardLast4Digits"); - openapiFields.add("atmName"); - openapiFields.add("atmLocation"); - openapiFields.add("surcharge"); - openapiFields.add("tags"); - openapiFields.add("networkTransactionId"); - openapiFields.add("interchange"); - openapiFields.add("internationalServiceFee"); - openapiFields.add("cardNetwork"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - openapiRequiredFields.add("cardLast4Digits"); - openapiRequiredFields.add("atmName"); - openapiRequiredFields.add("surcharge"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AtmTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AtmTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AtmTransactionAllOfAttributes is not found in the empty JSON string", AtmTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AtmTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AtmTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AtmTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - if (!jsonObj.get("cardLast4Digits").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardLast4Digits` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardLast4Digits").toString())); - } - if (!jsonObj.get("atmName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `atmName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("atmName").toString())); - } - if ((jsonObj.get("atmLocation") != null && !jsonObj.get("atmLocation").isJsonNull()) && !jsonObj.get("atmLocation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `atmLocation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("atmLocation").toString())); - } - if ((jsonObj.get("networkTransactionId") != null && !jsonObj.get("networkTransactionId").isJsonNull()) && !jsonObj.get("networkTransactionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `networkTransactionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("networkTransactionId").toString())); - } - if ((jsonObj.get("interchange") != null && !jsonObj.get("interchange").isJsonNull()) && !jsonObj.get("interchange").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `interchange` to be a primitive type in the JSON string but got `%s`", jsonObj.get("interchange").toString())); - } - if ((jsonObj.get("cardNetwork") != null && !jsonObj.get("cardNetwork").isJsonNull()) && !jsonObj.get("cardNetwork").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardNetwork` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardNetwork").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AtmTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AtmTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AtmTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AtmTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AtmTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AtmTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of AtmTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to AtmTransactionAllOfAttributes - */ - public static AtmTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AtmTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of AtmTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Authorization.java b/src/main/java/org/openapitools/client/model/Authorization.java deleted file mode 100644 index 2be2fd66..00000000 --- a/src/main/java/org/openapitools/client/model/Authorization.java +++ /dev/null @@ -1,310 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AuthorizationAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Authorization - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Authorization { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "authorization"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private AuthorizationAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private Object relationships; - - public Authorization() { - } - - public Authorization type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public Authorization id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public Authorization attributes(AuthorizationAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public AuthorizationAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(AuthorizationAttributes attributes) { - this.attributes = attributes; - } - - - public Authorization relationships(Object relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public Object getRelationships() { - return relationships; - } - - - public void setRelationships(Object relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Authorization authorization = (Authorization) o; - return Objects.equals(this.type, authorization.type) && - Objects.equals(this.id, authorization.id) && - Objects.equals(this.attributes, authorization.attributes) && - Objects.equals(this.relationships, authorization.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Authorization {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Authorization - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Authorization.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Authorization is not found in the empty JSON string", Authorization.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Authorization.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Authorization` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Authorization.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - AuthorizationAttributes.validateJsonElement(jsonObj.get("attributes")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Authorization.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Authorization' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Authorization.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Authorization value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Authorization read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Authorization given an JSON string - * - * @param jsonString JSON string - * @return An instance of Authorization - * @throws IOException if the JSON string is invalid with respect to Authorization - */ - public static Authorization fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Authorization.class); - } - - /** - * Convert an instance of Authorization to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AuthorizationAttributes.java b/src/main/java/org/openapitools/client/model/AuthorizationAttributes.java deleted file mode 100644 index c008fb14..00000000 --- a/src/main/java/org/openapitools/client/model/AuthorizationAttributes.java +++ /dev/null @@ -1,612 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.CardVerificationData; -import org.openapitools.client.model.Merchant; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AuthorizationAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AuthorizationAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_CARD_LAST4_DIGITS = "cardLast4Digits"; - @SerializedName(SERIALIZED_NAME_CARD_LAST4_DIGITS) - private String cardLast4Digits; - - public static final String SERIALIZED_NAME_MERCHANT = "merchant"; - @SerializedName(SERIALIZED_NAME_MERCHANT) - private Merchant merchant; - - public static final String SERIALIZED_NAME_RECURRING = "recurring"; - @SerializedName(SERIALIZED_NAME_RECURRING) - private Boolean recurring; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_DECLINE_REASON = "declineReason"; - @SerializedName(SERIALIZED_NAME_DECLINE_REASON) - private String declineReason; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_PAYMENT_METHOD = "paymentMethod"; - @SerializedName(SERIALIZED_NAME_PAYMENT_METHOD) - private String paymentMethod; - - public static final String SERIALIZED_NAME_DIGITAL_WALLET = "digitalWallet"; - @SerializedName(SERIALIZED_NAME_DIGITAL_WALLET) - private String digitalWallet; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_CARD_VERIFICATION_DATA = "cardVerificationData"; - @SerializedName(SERIALIZED_NAME_CARD_VERIFICATION_DATA) - private CardVerificationData cardVerificationData; - - public static final String SERIALIZED_NAME_CARD_NETWORK = "cardNetwork"; - @SerializedName(SERIALIZED_NAME_CARD_NETWORK) - private String cardNetwork; - - public static final String SERIALIZED_NAME_CASH_WITHDRAWAL_AMOUNT = "cashWithdrawalAmount"; - @SerializedName(SERIALIZED_NAME_CASH_WITHDRAWAL_AMOUNT) - private Integer cashWithdrawalAmount; - - public AuthorizationAttributes() { - } - - public AuthorizationAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public AuthorizationAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public AuthorizationAttributes cardLast4Digits(String cardLast4Digits) { - - this.cardLast4Digits = cardLast4Digits; - return this; - } - - /** - * Get cardLast4Digits - * @return cardLast4Digits - **/ - @javax.annotation.Nonnull - public String getCardLast4Digits() { - return cardLast4Digits; - } - - - public void setCardLast4Digits(String cardLast4Digits) { - this.cardLast4Digits = cardLast4Digits; - } - - - public AuthorizationAttributes merchant(Merchant merchant) { - - this.merchant = merchant; - return this; - } - - /** - * Get merchant - * @return merchant - **/ - @javax.annotation.Nonnull - public Merchant getMerchant() { - return merchant; - } - - - public void setMerchant(Merchant merchant) { - this.merchant = merchant; - } - - - public AuthorizationAttributes recurring(Boolean recurring) { - - this.recurring = recurring; - return this; - } - - /** - * Get recurring - * @return recurring - **/ - @javax.annotation.Nonnull - public Boolean getRecurring() { - return recurring; - } - - - public void setRecurring(Boolean recurring) { - this.recurring = recurring; - } - - - public AuthorizationAttributes status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public AuthorizationAttributes declineReason(String declineReason) { - - this.declineReason = declineReason; - return this; - } - - /** - * Get declineReason - * @return declineReason - **/ - @javax.annotation.Nullable - public String getDeclineReason() { - return declineReason; - } - - - public void setDeclineReason(String declineReason) { - this.declineReason = declineReason; - } - - - public AuthorizationAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public AuthorizationAttributes paymentMethod(String paymentMethod) { - - this.paymentMethod = paymentMethod; - return this; - } - - /** - * Get paymentMethod - * @return paymentMethod - **/ - @javax.annotation.Nullable - public String getPaymentMethod() { - return paymentMethod; - } - - - public void setPaymentMethod(String paymentMethod) { - this.paymentMethod = paymentMethod; - } - - - public AuthorizationAttributes digitalWallet(String digitalWallet) { - - this.digitalWallet = digitalWallet; - return this; - } - - /** - * Get digitalWallet - * @return digitalWallet - **/ - @javax.annotation.Nullable - public String getDigitalWallet() { - return digitalWallet; - } - - - public void setDigitalWallet(String digitalWallet) { - this.digitalWallet = digitalWallet; - } - - - public AuthorizationAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nullable - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public AuthorizationAttributes cardVerificationData(CardVerificationData cardVerificationData) { - - this.cardVerificationData = cardVerificationData; - return this; - } - - /** - * Get cardVerificationData - * @return cardVerificationData - **/ - @javax.annotation.Nullable - public CardVerificationData getCardVerificationData() { - return cardVerificationData; - } - - - public void setCardVerificationData(CardVerificationData cardVerificationData) { - this.cardVerificationData = cardVerificationData; - } - - - public AuthorizationAttributes cardNetwork(String cardNetwork) { - - this.cardNetwork = cardNetwork; - return this; - } - - /** - * Get cardNetwork - * @return cardNetwork - **/ - @javax.annotation.Nullable - public String getCardNetwork() { - return cardNetwork; - } - - - public void setCardNetwork(String cardNetwork) { - this.cardNetwork = cardNetwork; - } - - - public AuthorizationAttributes cashWithdrawalAmount(Integer cashWithdrawalAmount) { - - this.cashWithdrawalAmount = cashWithdrawalAmount; - return this; - } - - /** - * Get cashWithdrawalAmount - * @return cashWithdrawalAmount - **/ - @javax.annotation.Nullable - public Integer getCashWithdrawalAmount() { - return cashWithdrawalAmount; - } - - - public void setCashWithdrawalAmount(Integer cashWithdrawalAmount) { - this.cashWithdrawalAmount = cashWithdrawalAmount; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AuthorizationAttributes authorizationAttributes = (AuthorizationAttributes) o; - return Objects.equals(this.createdAt, authorizationAttributes.createdAt) && - Objects.equals(this.amount, authorizationAttributes.amount) && - Objects.equals(this.cardLast4Digits, authorizationAttributes.cardLast4Digits) && - Objects.equals(this.merchant, authorizationAttributes.merchant) && - Objects.equals(this.recurring, authorizationAttributes.recurring) && - Objects.equals(this.status, authorizationAttributes.status) && - Objects.equals(this.declineReason, authorizationAttributes.declineReason) && - Objects.equals(this.tags, authorizationAttributes.tags) && - Objects.equals(this.paymentMethod, authorizationAttributes.paymentMethod) && - Objects.equals(this.digitalWallet, authorizationAttributes.digitalWallet) && - Objects.equals(this.summary, authorizationAttributes.summary) && - Objects.equals(this.cardVerificationData, authorizationAttributes.cardVerificationData) && - Objects.equals(this.cardNetwork, authorizationAttributes.cardNetwork) && - Objects.equals(this.cashWithdrawalAmount, authorizationAttributes.cashWithdrawalAmount); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, amount, cardLast4Digits, merchant, recurring, status, declineReason, tags, paymentMethod, digitalWallet, summary, cardVerificationData, cardNetwork, cashWithdrawalAmount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AuthorizationAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" cardLast4Digits: ").append(toIndentedString(cardLast4Digits)).append("\n"); - sb.append(" merchant: ").append(toIndentedString(merchant)).append("\n"); - sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" declineReason: ").append(toIndentedString(declineReason)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n"); - sb.append(" digitalWallet: ").append(toIndentedString(digitalWallet)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" cardVerificationData: ").append(toIndentedString(cardVerificationData)).append("\n"); - sb.append(" cardNetwork: ").append(toIndentedString(cardNetwork)).append("\n"); - sb.append(" cashWithdrawalAmount: ").append(toIndentedString(cashWithdrawalAmount)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("amount"); - openapiFields.add("cardLast4Digits"); - openapiFields.add("merchant"); - openapiFields.add("recurring"); - openapiFields.add("status"); - openapiFields.add("declineReason"); - openapiFields.add("tags"); - openapiFields.add("paymentMethod"); - openapiFields.add("digitalWallet"); - openapiFields.add("summary"); - openapiFields.add("cardVerificationData"); - openapiFields.add("cardNetwork"); - openapiFields.add("cashWithdrawalAmount"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("cardLast4Digits"); - openapiRequiredFields.add("merchant"); - openapiRequiredFields.add("recurring"); - openapiRequiredFields.add("status"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AuthorizationAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AuthorizationAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AuthorizationAttributes is not found in the empty JSON string", AuthorizationAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AuthorizationAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AuthorizationAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AuthorizationAttributes.openapiRequiredFields) { - 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("cardLast4Digits").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardLast4Digits` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardLast4Digits").toString())); - } - // validate the required field `merchant` - Merchant.validateJsonElement(jsonObj.get("merchant")); - if (!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())); - } - if ((jsonObj.get("declineReason") != null && !jsonObj.get("declineReason").isJsonNull()) && !jsonObj.get("declineReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `declineReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("declineReason").toString())); - } - if ((jsonObj.get("paymentMethod") != null && !jsonObj.get("paymentMethod").isJsonNull()) && !jsonObj.get("paymentMethod").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `paymentMethod` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentMethod").toString())); - } - if ((jsonObj.get("digitalWallet") != null && !jsonObj.get("digitalWallet").isJsonNull()) && !jsonObj.get("digitalWallet").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `digitalWallet` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digitalWallet").toString())); - } - if ((jsonObj.get("summary") != null && !jsonObj.get("summary").isJsonNull()) && !jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - // validate the optional field `cardVerificationData` - if (jsonObj.get("cardVerificationData") != null && !jsonObj.get("cardVerificationData").isJsonNull()) { - CardVerificationData.validateJsonElement(jsonObj.get("cardVerificationData")); - } - if ((jsonObj.get("cardNetwork") != null && !jsonObj.get("cardNetwork").isJsonNull()) && !jsonObj.get("cardNetwork").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardNetwork` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardNetwork").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthorizationAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthorizationAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AuthorizationAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthorizationAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AuthorizationAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AuthorizationAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthorizationAttributes - * @throws IOException if the JSON string is invalid with respect to AuthorizationAttributes - */ - public static AuthorizationAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthorizationAttributes.class); - } - - /** - * Convert an instance of AuthorizationAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AuthorizationRelationship.java b/src/main/java/org/openapitools/client/model/AuthorizationRelationship.java deleted file mode 100644 index 388aeaf0..00000000 --- a/src/main/java/org/openapitools/client/model/AuthorizationRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AuthorizationRelationshipData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AuthorizationRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AuthorizationRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private AuthorizationRelationshipData data; - - public AuthorizationRelationship() { - } - - public AuthorizationRelationship data(AuthorizationRelationshipData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public AuthorizationRelationshipData getData() { - return data; - } - - - public void setData(AuthorizationRelationshipData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AuthorizationRelationship authorizationRelationship = (AuthorizationRelationship) o; - return Objects.equals(this.data, authorizationRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AuthorizationRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AuthorizationRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AuthorizationRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AuthorizationRelationship is not found in the empty JSON string", AuthorizationRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AuthorizationRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AuthorizationRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AuthorizationRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - AuthorizationRelationshipData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthorizationRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthorizationRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AuthorizationRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthorizationRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AuthorizationRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AuthorizationRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthorizationRelationship - * @throws IOException if the JSON string is invalid with respect to AuthorizationRelationship - */ - public static AuthorizationRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthorizationRelationship.class); - } - - /** - * Convert an instance of AuthorizationRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AuthorizationRelationshipData.java b/src/main/java/org/openapitools/client/model/AuthorizationRelationshipData.java deleted file mode 100644 index 747dc2cf..00000000 --- a/src/main/java/org/openapitools/client/model/AuthorizationRelationshipData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AuthorizationRelationshipData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AuthorizationRelationshipData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "authorization"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public AuthorizationRelationshipData() { - } - - public AuthorizationRelationshipData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public AuthorizationRelationshipData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AuthorizationRelationshipData authorizationRelationshipData = (AuthorizationRelationshipData) o; - return Objects.equals(this.type, authorizationRelationshipData.type) && - Objects.equals(this.id, authorizationRelationshipData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AuthorizationRelationshipData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AuthorizationRelationshipData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AuthorizationRelationshipData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AuthorizationRelationshipData is not found in the empty JSON string", AuthorizationRelationshipData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AuthorizationRelationshipData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AuthorizationRelationshipData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AuthorizationRelationshipData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthorizationRelationshipData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthorizationRelationshipData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AuthorizationRelationshipData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthorizationRelationshipData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AuthorizationRelationshipData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AuthorizationRelationshipData given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthorizationRelationshipData - * @throws IOException if the JSON string is invalid with respect to AuthorizationRelationshipData - */ - public static AuthorizationRelationshipData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthorizationRelationshipData.class); - } - - /** - * Convert an instance of AuthorizationRelationshipData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AuthorizationRequest.java b/src/main/java/org/openapitools/client/model/AuthorizationRequest.java deleted file mode 100644 index c8a6c5c7..00000000 --- a/src/main/java/org/openapitools/client/model/AuthorizationRequest.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AuthorizationRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AuthorizationRequest { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - protected String type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public AuthorizationRequest() { - this.type = this.getClass().getSimpleName(); - } - - public AuthorizationRequest type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public AuthorizationRequest id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AuthorizationRequest authorizationRequest = (AuthorizationRequest) o; - return Objects.equals(this.type, authorizationRequest.type) && - Objects.equals(this.id, authorizationRequest.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AuthorizationRequest {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AuthorizationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AuthorizationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AuthorizationRequest is not found in the empty JSON string", AuthorizationRequest.openapiRequiredFields.toString())); - } - } - - String discriminatorValue = jsonElement.getAsJsonObject().get("type").getAsString(); - switch (discriminatorValue) { - case "atmAuthorizationRequest": - AtmAuthorizationRequest.validateJsonElement(jsonElement); - break; - case "cardTransactionAuthorizationRequest": - CardTransactionAuthorizationRequest.validateJsonElement(jsonElement); - break; - case "purchaseAuthorizationRequest": - PurchaseAuthorizationRequest.validateJsonElement(jsonElement); - break; - default: - throw new IllegalArgumentException(String.format("The value of the `type` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); - } - } - - - /** - * Create an instance of AuthorizationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthorizationRequest - * @throws IOException if the JSON string is invalid with respect to AuthorizationRequest - */ - public static AuthorizationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthorizationRequest.class); - } - - /** - * Convert an instance of AuthorizationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationship.java b/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationship.java deleted file mode 100644 index e6569b79..00000000 --- a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AuthorizationRequestRelationshipData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AuthorizationRequestRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AuthorizationRequestRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private AuthorizationRequestRelationshipData data; - - public AuthorizationRequestRelationship() { - } - - public AuthorizationRequestRelationship data(AuthorizationRequestRelationshipData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public AuthorizationRequestRelationshipData getData() { - return data; - } - - - public void setData(AuthorizationRequestRelationshipData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AuthorizationRequestRelationship authorizationRequestRelationship = (AuthorizationRequestRelationship) o; - return Objects.equals(this.data, authorizationRequestRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AuthorizationRequestRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AuthorizationRequestRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AuthorizationRequestRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AuthorizationRequestRelationship is not found in the empty JSON string", AuthorizationRequestRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AuthorizationRequestRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AuthorizationRequestRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AuthorizationRequestRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - AuthorizationRequestRelationshipData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthorizationRequestRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthorizationRequestRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AuthorizationRequestRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthorizationRequestRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AuthorizationRequestRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AuthorizationRequestRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthorizationRequestRelationship - * @throws IOException if the JSON string is invalid with respect to AuthorizationRequestRelationship - */ - public static AuthorizationRequestRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthorizationRequestRelationship.class); - } - - /** - * Convert an instance of AuthorizationRequestRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipData.java b/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipData.java deleted file mode 100644 index cd610c8c..00000000 --- a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AuthorizationRequestRelationshipData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AuthorizationRequestRelationshipData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "authorizationRequest"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public AuthorizationRequestRelationshipData() { - } - - public AuthorizationRequestRelationshipData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public AuthorizationRequestRelationshipData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AuthorizationRequestRelationshipData authorizationRequestRelationshipData = (AuthorizationRequestRelationshipData) o; - return Objects.equals(this.type, authorizationRequestRelationshipData.type) && - Objects.equals(this.id, authorizationRequestRelationshipData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AuthorizationRequestRelationshipData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AuthorizationRequestRelationshipData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AuthorizationRequestRelationshipData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AuthorizationRequestRelationshipData is not found in the empty JSON string", AuthorizationRequestRelationshipData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AuthorizationRequestRelationshipData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AuthorizationRequestRelationshipData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AuthorizationRequestRelationshipData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthorizationRequestRelationshipData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthorizationRequestRelationshipData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AuthorizationRequestRelationshipData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthorizationRequestRelationshipData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AuthorizationRequestRelationshipData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AuthorizationRequestRelationshipData given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthorizationRequestRelationshipData - * @throws IOException if the JSON string is invalid with respect to AuthorizationRequestRelationshipData - */ - public static AuthorizationRequestRelationshipData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthorizationRequestRelationshipData.class); - } - - /** - * Convert an instance of AuthorizationRequestRelationshipData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationships.java b/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationships.java deleted file mode 100644 index 8aaae1e9..00000000 --- a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationships.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AuthorizationRequestRelationshipsCard; -import org.openapitools.client.model.RelationshipsAccount; -import org.openapitools.client.model.RelationshipsCustomer; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AuthorizationRequestRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AuthorizationRequestRelationships { - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private RelationshipsCustomer customer; - - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private RelationshipsAccount account; - - public static final String SERIALIZED_NAME_FUNDING_ACCOUNT = "fundingAccount"; - @SerializedName(SERIALIZED_NAME_FUNDING_ACCOUNT) - private RelationshipsAccount fundingAccount; - - public static final String SERIALIZED_NAME_CARD = "card"; - @SerializedName(SERIALIZED_NAME_CARD) - private AuthorizationRequestRelationshipsCard card; - - public AuthorizationRequestRelationships() { - } - - public AuthorizationRequestRelationships customer(RelationshipsCustomer customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nonnull - public RelationshipsCustomer getCustomer() { - return customer; - } - - - public void setCustomer(RelationshipsCustomer customer) { - this.customer = customer; - } - - - public AuthorizationRequestRelationships account(RelationshipsAccount account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public RelationshipsAccount getAccount() { - return account; - } - - - public void setAccount(RelationshipsAccount account) { - this.account = account; - } - - - public AuthorizationRequestRelationships fundingAccount(RelationshipsAccount fundingAccount) { - - this.fundingAccount = fundingAccount; - return this; - } - - /** - * Get fundingAccount - * @return fundingAccount - **/ - @javax.annotation.Nullable - public RelationshipsAccount getFundingAccount() { - return fundingAccount; - } - - - public void setFundingAccount(RelationshipsAccount fundingAccount) { - this.fundingAccount = fundingAccount; - } - - - public AuthorizationRequestRelationships card(AuthorizationRequestRelationshipsCard card) { - - this.card = card; - return this; - } - - /** - * Get card - * @return card - **/ - @javax.annotation.Nonnull - public AuthorizationRequestRelationshipsCard getCard() { - return card; - } - - - public void setCard(AuthorizationRequestRelationshipsCard card) { - this.card = card; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AuthorizationRequestRelationships authorizationRequestRelationships = (AuthorizationRequestRelationships) o; - return Objects.equals(this.customer, authorizationRequestRelationships.customer) && - Objects.equals(this.account, authorizationRequestRelationships.account) && - Objects.equals(this.fundingAccount, authorizationRequestRelationships.fundingAccount) && - Objects.equals(this.card, authorizationRequestRelationships.card); - } - - @Override - public int hashCode() { - return Objects.hash(customer, account, fundingAccount, card); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AuthorizationRequestRelationships {\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" fundingAccount: ").append(toIndentedString(fundingAccount)).append("\n"); - sb.append(" card: ").append(toIndentedString(card)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("customer"); - openapiFields.add("account"); - openapiFields.add("fundingAccount"); - openapiFields.add("card"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("customer"); - openapiRequiredFields.add("account"); - openapiRequiredFields.add("card"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AuthorizationRequestRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AuthorizationRequestRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AuthorizationRequestRelationships is not found in the empty JSON string", AuthorizationRequestRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AuthorizationRequestRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AuthorizationRequestRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AuthorizationRequestRelationships.openapiRequiredFields) { - 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(); - // validate the required field `customer` - RelationshipsCustomer.validateJsonElement(jsonObj.get("customer")); - // validate the required field `account` - RelationshipsAccount.validateJsonElement(jsonObj.get("account")); - // validate the optional field `fundingAccount` - if (jsonObj.get("fundingAccount") != null && !jsonObj.get("fundingAccount").isJsonNull()) { - RelationshipsAccount.validateJsonElement(jsonObj.get("fundingAccount")); - } - // validate the required field `card` - AuthorizationRequestRelationshipsCard.validateJsonElement(jsonObj.get("card")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthorizationRequestRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthorizationRequestRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AuthorizationRequestRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthorizationRequestRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AuthorizationRequestRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AuthorizationRequestRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthorizationRequestRelationships - * @throws IOException if the JSON string is invalid with respect to AuthorizationRequestRelationships - */ - public static AuthorizationRequestRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthorizationRequestRelationships.class); - } - - /** - * Convert an instance of AuthorizationRequestRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipsCard.java b/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipsCard.java deleted file mode 100644 index 7fb13348..00000000 --- a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipsCard.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AuthorizationRequestRelationshipsCardData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AuthorizationRequestRelationshipsCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AuthorizationRequestRelationshipsCard { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private AuthorizationRequestRelationshipsCardData data; - - public AuthorizationRequestRelationshipsCard() { - } - - public AuthorizationRequestRelationshipsCard data(AuthorizationRequestRelationshipsCardData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public AuthorizationRequestRelationshipsCardData getData() { - return data; - } - - - public void setData(AuthorizationRequestRelationshipsCardData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AuthorizationRequestRelationshipsCard authorizationRequestRelationshipsCard = (AuthorizationRequestRelationshipsCard) o; - return Objects.equals(this.data, authorizationRequestRelationshipsCard.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AuthorizationRequestRelationshipsCard {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AuthorizationRequestRelationshipsCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AuthorizationRequestRelationshipsCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AuthorizationRequestRelationshipsCard is not found in the empty JSON string", AuthorizationRequestRelationshipsCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AuthorizationRequestRelationshipsCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AuthorizationRequestRelationshipsCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AuthorizationRequestRelationshipsCard.openapiRequiredFields) { - 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(); - // validate the required field `data` - AuthorizationRequestRelationshipsCardData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthorizationRequestRelationshipsCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthorizationRequestRelationshipsCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AuthorizationRequestRelationshipsCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthorizationRequestRelationshipsCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AuthorizationRequestRelationshipsCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AuthorizationRequestRelationshipsCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthorizationRequestRelationshipsCard - * @throws IOException if the JSON string is invalid with respect to AuthorizationRequestRelationshipsCard - */ - public static AuthorizationRequestRelationshipsCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthorizationRequestRelationshipsCard.class); - } - - /** - * Convert an instance of AuthorizationRequestRelationshipsCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipsCardData.java b/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipsCardData.java deleted file mode 100644 index db936235..00000000 --- a/src/main/java/org/openapitools/client/model/AuthorizationRequestRelationshipsCardData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AuthorizationRequestRelationshipsCardData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AuthorizationRequestRelationshipsCardData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "card"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public AuthorizationRequestRelationshipsCardData() { - } - - public AuthorizationRequestRelationshipsCardData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public AuthorizationRequestRelationshipsCardData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AuthorizationRequestRelationshipsCardData authorizationRequestRelationshipsCardData = (AuthorizationRequestRelationshipsCardData) o; - return Objects.equals(this.type, authorizationRequestRelationshipsCardData.type) && - Objects.equals(this.id, authorizationRequestRelationshipsCardData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AuthorizationRequestRelationshipsCardData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AuthorizationRequestRelationshipsCardData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AuthorizationRequestRelationshipsCardData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AuthorizationRequestRelationshipsCardData is not found in the empty JSON string", AuthorizationRequestRelationshipsCardData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AuthorizationRequestRelationshipsCardData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AuthorizationRequestRelationshipsCardData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AuthorizationRequestRelationshipsCardData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthorizationRequestRelationshipsCardData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthorizationRequestRelationshipsCardData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AuthorizationRequestRelationshipsCardData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthorizationRequestRelationshipsCardData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AuthorizationRequestRelationshipsCardData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AuthorizationRequestRelationshipsCardData given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthorizationRequestRelationshipsCardData - * @throws IOException if the JSON string is invalid with respect to AuthorizationRequestRelationshipsCardData - */ - public static AuthorizationRequestRelationshipsCardData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthorizationRequestRelationshipsCardData.class); - } - - /** - * Convert an instance of AuthorizationRequestRelationshipsCardData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/AuthorizedUser.java b/src/main/java/org/openapitools/client/model/AuthorizedUser.java deleted file mode 100644 index eee33bbc..00000000 --- a/src/main/java/org/openapitools/client/model/AuthorizedUser.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.FullName; -import org.openapitools.client.model.Phone; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * AuthorizedUser - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AuthorizedUser { - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_JWT_SUBJECT = "jwtSubject"; - @SerializedName(SERIALIZED_NAME_JWT_SUBJECT) - private String jwtSubject; - - public AuthorizedUser() { - } - - public AuthorizedUser fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nonnull - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public AuthorizedUser email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nonnull - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public AuthorizedUser phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nonnull - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public AuthorizedUser jwtSubject(String jwtSubject) { - - this.jwtSubject = jwtSubject; - return this; - } - - /** - * Get jwtSubject - * @return jwtSubject - **/ - @javax.annotation.Nullable - public String getJwtSubject() { - return jwtSubject; - } - - - public void setJwtSubject(String jwtSubject) { - this.jwtSubject = jwtSubject; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AuthorizedUser authorizedUser = (AuthorizedUser) o; - return Objects.equals(this.fullName, authorizedUser.fullName) && - Objects.equals(this.email, authorizedUser.email) && - Objects.equals(this.phone, authorizedUser.phone) && - Objects.equals(this.jwtSubject, authorizedUser.jwtSubject); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(fullName, email, phone, jwtSubject); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AuthorizedUser {\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fullName"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("jwtSubject"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("fullName"); - openapiRequiredFields.add("email"); - openapiRequiredFields.add("phone"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AuthorizedUser - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AuthorizedUser.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AuthorizedUser is not found in the empty JSON string", AuthorizedUser.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AuthorizedUser.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AuthorizedUser` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AuthorizedUser.openapiRequiredFields) { - 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(); - // validate the required field `fullName` - FullName.validateJsonElement(jsonObj.get("fullName")); - if (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the required field `phone` - Phone.validateJsonElement(jsonObj.get("phone")); - if ((jsonObj.get("jwtSubject") != null && !jsonObj.get("jwtSubject").isJsonNull()) && !jsonObj.get("jwtSubject").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `jwtSubject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jwtSubject").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthorizedUser.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthorizedUser' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AuthorizedUser.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthorizedUser value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AuthorizedUser read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AuthorizedUser given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthorizedUser - * @throws IOException if the JSON string is invalid with respect to AuthorizedUser - */ - public static AuthorizedUser fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthorizedUser.class); - } - - /** - * Convert an instance of AuthorizedUser to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BIN.java b/src/main/java/org/openapitools/client/model/BIN.java deleted file mode 100644 index 7522097e..00000000 --- a/src/main/java/org/openapitools/client/model/BIN.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BIN - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BIN { - public static final String SERIALIZED_NAME_BIN = "bin"; - @SerializedName(SERIALIZED_NAME_BIN) - private String bin; - - public static final String SERIALIZED_NAME_INSTITUTION_ID = "institutionId"; - @SerializedName(SERIALIZED_NAME_INSTITUTION_ID) - private String institutionId; - - public BIN() { - } - - public BIN bin(String bin) { - - this.bin = bin; - return this; - } - - /** - * Get bin - * @return bin - **/ - @javax.annotation.Nonnull - public String getBin() { - return bin; - } - - - public void setBin(String bin) { - this.bin = bin; - } - - - public BIN institutionId(String institutionId) { - - this.institutionId = institutionId; - return this; - } - - /** - * Get institutionId - * @return institutionId - **/ - @javax.annotation.Nonnull - public String getInstitutionId() { - return institutionId; - } - - - public void setInstitutionId(String institutionId) { - this.institutionId = institutionId; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BIN BIN = (BIN) o; - return Objects.equals(this.bin, BIN.bin) && - Objects.equals(this.institutionId, BIN.institutionId); - } - - @Override - public int hashCode() { - return Objects.hash(bin, institutionId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BIN {\n"); - sb.append(" bin: ").append(toIndentedString(bin)).append("\n"); - sb.append(" institutionId: ").append(toIndentedString(institutionId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bin"); - openapiFields.add("institutionId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("bin"); - openapiRequiredFields.add("institutionId"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BIN - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BIN.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BIN is not found in the empty JSON string", BIN.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BIN.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BIN` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BIN.openapiRequiredFields) { - 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("bin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bin").toString())); - } - if (!jsonObj.get("institutionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `institutionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("institutionId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BIN.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BIN' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BIN.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BIN value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BIN read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BIN given an JSON string - * - * @param jsonString JSON string - * @return An instance of BIN - * @throws IOException if the JSON string is invalid with respect to BIN - */ - public static BIN fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BIN.class); - } - - /** - * Convert an instance of BIN to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BankRepaymentTransaction.java b/src/main/java/org/openapitools/client/model/BankRepaymentTransaction.java deleted file mode 100644 index ebdc1f76..00000000 --- a/src/main/java/org/openapitools/client/model/BankRepaymentTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.BankRepaymentTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BankRepaymentTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BankRepaymentTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private BankRepaymentTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public BankRepaymentTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public BankRepaymentTransaction attributes(BankRepaymentTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public BankRepaymentTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(BankRepaymentTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public BankRepaymentTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BankRepaymentTransaction bankRepaymentTransaction = (BankRepaymentTransaction) o; - return Objects.equals(this.attributes, bankRepaymentTransaction.attributes) && - Objects.equals(this.relationships, bankRepaymentTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BankRepaymentTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BankRepaymentTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BankRepaymentTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BankRepaymentTransaction is not found in the empty JSON string", BankRepaymentTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BankRepaymentTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BankRepaymentTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BankRepaymentTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BankRepaymentTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BankRepaymentTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BankRepaymentTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BankRepaymentTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BankRepaymentTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BankRepaymentTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of BankRepaymentTransaction - * @throws IOException if the JSON string is invalid with respect to BankRepaymentTransaction - */ - public static BankRepaymentTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BankRepaymentTransaction.class); - } - - /** - * Convert an instance of BankRepaymentTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BankRepaymentTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/BankRepaymentTransactionAllOfAttributes.java deleted file mode 100644 index b7effe57..00000000 --- a/src/main/java/org/openapitools/client/model/BankRepaymentTransactionAllOfAttributes.java +++ /dev/null @@ -1,443 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BankRepaymentTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BankRepaymentTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_PAID_FOR_DATE = "paidForDate"; - @SerializedName(SERIALIZED_NAME_PAID_FOR_DATE) - private String paidForDate; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public BankRepaymentTransactionAllOfAttributes() { - } - - public BankRepaymentTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public BankRepaymentTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public BankRepaymentTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public BankRepaymentTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public BankRepaymentTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public BankRepaymentTransactionAllOfAttributes paidForDate(String paidForDate) { - - this.paidForDate = paidForDate; - return this; - } - - /** - * Get paidForDate - * @return paidForDate - **/ - @javax.annotation.Nonnull - public String getPaidForDate() { - return paidForDate; - } - - - public void setPaidForDate(String paidForDate) { - this.paidForDate = paidForDate; - } - - - public BankRepaymentTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BankRepaymentTransactionAllOfAttributes bankRepaymentTransactionAllOfAttributes = (BankRepaymentTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, bankRepaymentTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, bankRepaymentTransactionAllOfAttributes.direction) && - Objects.equals(this.amount, bankRepaymentTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, bankRepaymentTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, bankRepaymentTransactionAllOfAttributes.summary) && - Objects.equals(this.paidForDate, bankRepaymentTransactionAllOfAttributes.paidForDate) && - Objects.equals(this.tags, bankRepaymentTransactionAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, amount, balance, summary, paidForDate, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BankRepaymentTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" paidForDate: ").append(toIndentedString(paidForDate)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("paidForDate"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - openapiRequiredFields.add("paidForDate"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BankRepaymentTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BankRepaymentTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BankRepaymentTransactionAllOfAttributes is not found in the empty JSON string", BankRepaymentTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BankRepaymentTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BankRepaymentTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BankRepaymentTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - if (!jsonObj.get("paidForDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `paidForDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paidForDate").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BankRepaymentTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BankRepaymentTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BankRepaymentTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BankRepaymentTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BankRepaymentTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BankRepaymentTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of BankRepaymentTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to BankRepaymentTransactionAllOfAttributes - */ - public static BankRepaymentTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BankRepaymentTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of BankRepaymentTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BeneficialOwner.java b/src/main/java/org/openapitools/client/model/BeneficialOwner.java deleted file mode 100644 index 04581920..00000000 --- a/src/main/java/org/openapitools/client/model/BeneficialOwner.java +++ /dev/null @@ -1,837 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.AnnualIncome; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Occupation; -import org.openapitools.client.model.Phone; -import org.openapitools.client.model.SourceOfIncome; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BeneficialOwner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BeneficialOwner { - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_MATRICULA_CONSULAR = "matriculaConsular"; - @SerializedName(SERIALIZED_NAME_MATRICULA_CONSULAR) - private String matriculaConsular; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Object address; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public static final String SERIALIZED_NAME_EVALUATION_ID = "evaluationId"; - @SerializedName(SERIALIZED_NAME_EVALUATION_ID) - private String evaluationId; - - public static final String SERIALIZED_NAME_PERCENTAGE = "percentage"; - @SerializedName(SERIALIZED_NAME_PERCENTAGE) - private Integer percentage; - - public static final String SERIALIZED_NAME_EVALUATION_FLAGS = "evaluationFlags"; - @SerializedName(SERIALIZED_NAME_EVALUATION_FLAGS) - private List evaluationFlags; - - public static final String SERIALIZED_NAME_MASKED_S_S_N = "maskedSSN"; - @SerializedName(SERIALIZED_NAME_MASKED_S_S_N) - private String maskedSSN; - - public static final String SERIALIZED_NAME_MASKED_PASSPORT = "maskedPassport"; - @SerializedName(SERIALIZED_NAME_MASKED_PASSPORT) - private String maskedPassport; - - public static final String SERIALIZED_NAME_MASKED_MATRICULA_CONSULAR = "maskedMatriculaConsular"; - @SerializedName(SERIALIZED_NAME_MASKED_MATRICULA_CONSULAR) - private String maskedMatriculaConsular; - - public static final String SERIALIZED_NAME_ID_THEFT_SCORE = "idTheftScore"; - @SerializedName(SERIALIZED_NAME_ID_THEFT_SCORE) - private Integer idTheftScore; - - public static final String SERIALIZED_NAME_EVALUATION_CODES = "evaluationCodes"; - @SerializedName(SERIALIZED_NAME_EVALUATION_CODES) - private List evaluationCodes; - - public static final String SERIALIZED_NAME_OCCUPATION = "occupation"; - @SerializedName(SERIALIZED_NAME_OCCUPATION) - private Occupation occupation; - - public static final String SERIALIZED_NAME_ANNUAL_INCOME = "annualIncome"; - @SerializedName(SERIALIZED_NAME_ANNUAL_INCOME) - private AnnualIncome annualIncome; - - public static final String SERIALIZED_NAME_SOURCE_OF_INCOME = "sourceOfIncome"; - @SerializedName(SERIALIZED_NAME_SOURCE_OF_INCOME) - private SourceOfIncome sourceOfIncome; - - public BeneficialOwner() { - } - - public BeneficialOwner status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public BeneficialOwner fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nullable - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public BeneficialOwner email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public BeneficialOwner phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public BeneficialOwner ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public BeneficialOwner passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public BeneficialOwner nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public BeneficialOwner matriculaConsular(String matriculaConsular) { - - this.matriculaConsular = matriculaConsular; - return this; - } - - /** - * Get matriculaConsular - * @return matriculaConsular - **/ - @javax.annotation.Nullable - public String getMatriculaConsular() { - return matriculaConsular; - } - - - public void setMatriculaConsular(String matriculaConsular) { - this.matriculaConsular = matriculaConsular; - } - - - public BeneficialOwner address(Object address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Object getAddress() { - return address; - } - - - public void setAddress(Object address) { - this.address = address; - } - - - public BeneficialOwner dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nullable - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public BeneficialOwner evaluationId(String evaluationId) { - - this.evaluationId = evaluationId; - return this; - } - - /** - * Get evaluationId - * @return evaluationId - **/ - @javax.annotation.Nullable - public String getEvaluationId() { - return evaluationId; - } - - - public void setEvaluationId(String evaluationId) { - this.evaluationId = evaluationId; - } - - - public BeneficialOwner percentage(Integer percentage) { - - this.percentage = percentage; - return this; - } - - /** - * Get percentage - * minimum: 0 - * maximum: 100 - * @return percentage - **/ - @javax.annotation.Nullable - public Integer getPercentage() { - return percentage; - } - - - public void setPercentage(Integer percentage) { - this.percentage = percentage; - } - - - public BeneficialOwner evaluationFlags(List evaluationFlags) { - - this.evaluationFlags = evaluationFlags; - return this; - } - - public BeneficialOwner addEvaluationFlagsItem(String evaluationFlagsItem) { - if (this.evaluationFlags == null) { - this.evaluationFlags = new ArrayList<>(); - } - this.evaluationFlags.add(evaluationFlagsItem); - return this; - } - - /** - * Get evaluationFlags - * @return evaluationFlags - **/ - @javax.annotation.Nullable - public List getEvaluationFlags() { - return evaluationFlags; - } - - - public void setEvaluationFlags(List evaluationFlags) { - this.evaluationFlags = evaluationFlags; - } - - - public BeneficialOwner maskedSSN(String maskedSSN) { - - this.maskedSSN = maskedSSN; - return this; - } - - /** - * Get maskedSSN - * @return maskedSSN - **/ - @javax.annotation.Nullable - public String getMaskedSSN() { - return maskedSSN; - } - - - public void setMaskedSSN(String maskedSSN) { - this.maskedSSN = maskedSSN; - } - - - public BeneficialOwner maskedPassport(String maskedPassport) { - - this.maskedPassport = maskedPassport; - return this; - } - - /** - * Get maskedPassport - * @return maskedPassport - **/ - @javax.annotation.Nullable - public String getMaskedPassport() { - return maskedPassport; - } - - - public void setMaskedPassport(String maskedPassport) { - this.maskedPassport = maskedPassport; - } - - - public BeneficialOwner maskedMatriculaConsular(String maskedMatriculaConsular) { - - this.maskedMatriculaConsular = maskedMatriculaConsular; - return this; - } - - /** - * Get maskedMatriculaConsular - * @return maskedMatriculaConsular - **/ - @javax.annotation.Nullable - public String getMaskedMatriculaConsular() { - return maskedMatriculaConsular; - } - - - public void setMaskedMatriculaConsular(String maskedMatriculaConsular) { - this.maskedMatriculaConsular = maskedMatriculaConsular; - } - - - public BeneficialOwner idTheftScore(Integer idTheftScore) { - - this.idTheftScore = idTheftScore; - return this; - } - - /** - * Get idTheftScore - * @return idTheftScore - **/ - @javax.annotation.Nullable - public Integer getIdTheftScore() { - return idTheftScore; - } - - - public void setIdTheftScore(Integer idTheftScore) { - this.idTheftScore = idTheftScore; - } - - - public BeneficialOwner evaluationCodes(List evaluationCodes) { - - this.evaluationCodes = evaluationCodes; - return this; - } - - public BeneficialOwner addEvaluationCodesItem(String evaluationCodesItem) { - if (this.evaluationCodes == null) { - this.evaluationCodes = new ArrayList<>(); - } - this.evaluationCodes.add(evaluationCodesItem); - return this; - } - - /** - * Get evaluationCodes - * @return evaluationCodes - **/ - @javax.annotation.Nullable - public List getEvaluationCodes() { - return evaluationCodes; - } - - - public void setEvaluationCodes(List evaluationCodes) { - this.evaluationCodes = evaluationCodes; - } - - - public BeneficialOwner occupation(Occupation occupation) { - - this.occupation = occupation; - return this; - } - - /** - * Get occupation - * @return occupation - **/ - @javax.annotation.Nullable - public Occupation getOccupation() { - return occupation; - } - - - public void setOccupation(Occupation occupation) { - this.occupation = occupation; - } - - - public BeneficialOwner annualIncome(AnnualIncome annualIncome) { - - this.annualIncome = annualIncome; - return this; - } - - /** - * Get annualIncome - * @return annualIncome - **/ - @javax.annotation.Nullable - public AnnualIncome getAnnualIncome() { - return annualIncome; - } - - - public void setAnnualIncome(AnnualIncome annualIncome) { - this.annualIncome = annualIncome; - } - - - public BeneficialOwner sourceOfIncome(SourceOfIncome sourceOfIncome) { - - this.sourceOfIncome = sourceOfIncome; - return this; - } - - /** - * Get sourceOfIncome - * @return sourceOfIncome - **/ - @javax.annotation.Nullable - public SourceOfIncome getSourceOfIncome() { - return sourceOfIncome; - } - - - public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { - this.sourceOfIncome = sourceOfIncome; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BeneficialOwner beneficialOwner = (BeneficialOwner) o; - return Objects.equals(this.status, beneficialOwner.status) && - Objects.equals(this.fullName, beneficialOwner.fullName) && - Objects.equals(this.email, beneficialOwner.email) && - Objects.equals(this.phone, beneficialOwner.phone) && - Objects.equals(this.ssn, beneficialOwner.ssn) && - Objects.equals(this.passport, beneficialOwner.passport) && - Objects.equals(this.nationality, beneficialOwner.nationality) && - Objects.equals(this.matriculaConsular, beneficialOwner.matriculaConsular) && - Objects.equals(this.address, beneficialOwner.address) && - Objects.equals(this.dateOfBirth, beneficialOwner.dateOfBirth) && - Objects.equals(this.evaluationId, beneficialOwner.evaluationId) && - Objects.equals(this.percentage, beneficialOwner.percentage) && - Objects.equals(this.evaluationFlags, beneficialOwner.evaluationFlags) && - Objects.equals(this.maskedSSN, beneficialOwner.maskedSSN) && - Objects.equals(this.maskedPassport, beneficialOwner.maskedPassport) && - Objects.equals(this.maskedMatriculaConsular, beneficialOwner.maskedMatriculaConsular) && - Objects.equals(this.idTheftScore, beneficialOwner.idTheftScore) && - Objects.equals(this.evaluationCodes, beneficialOwner.evaluationCodes) && - Objects.equals(this.occupation, beneficialOwner.occupation) && - Objects.equals(this.annualIncome, beneficialOwner.annualIncome) && - Objects.equals(this.sourceOfIncome, beneficialOwner.sourceOfIncome); - } - - @Override - public int hashCode() { - return Objects.hash(status, fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, evaluationId, percentage, evaluationFlags, maskedSSN, maskedPassport, maskedMatriculaConsular, idTheftScore, evaluationCodes, occupation, annualIncome, sourceOfIncome); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BeneficialOwner {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); - sb.append(" percentage: ").append(toIndentedString(percentage)).append("\n"); - sb.append(" evaluationFlags: ").append(toIndentedString(evaluationFlags)).append("\n"); - sb.append(" maskedSSN: ").append(toIndentedString(maskedSSN)).append("\n"); - sb.append(" maskedPassport: ").append(toIndentedString(maskedPassport)).append("\n"); - sb.append(" maskedMatriculaConsular: ").append(toIndentedString(maskedMatriculaConsular)).append("\n"); - sb.append(" idTheftScore: ").append(toIndentedString(idTheftScore)).append("\n"); - sb.append(" evaluationCodes: ").append(toIndentedString(evaluationCodes)).append("\n"); - sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); - sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); - sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("status"); - openapiFields.add("fullName"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("nationality"); - openapiFields.add("matriculaConsular"); - openapiFields.add("address"); - openapiFields.add("dateOfBirth"); - openapiFields.add("evaluationId"); - openapiFields.add("percentage"); - openapiFields.add("evaluationFlags"); - openapiFields.add("maskedSSN"); - openapiFields.add("maskedPassport"); - openapiFields.add("maskedMatriculaConsular"); - openapiFields.add("idTheftScore"); - openapiFields.add("evaluationCodes"); - openapiFields.add("occupation"); - openapiFields.add("annualIncome"); - openapiFields.add("sourceOfIncome"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BeneficialOwner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BeneficialOwner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BeneficialOwner is not found in the empty JSON string", BeneficialOwner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BeneficialOwner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BeneficialOwner` 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())); - } - // validate the optional field `fullName` - if (jsonObj.get("fullName") != null && !jsonObj.get("fullName").isJsonNull()) { - FullName.validateJsonElement(jsonObj.get("fullName")); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); - } - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - if ((jsonObj.get("matriculaConsular") != null && !jsonObj.get("matriculaConsular").isJsonNull()) && !jsonObj.get("matriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `matriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("matriculaConsular").toString())); - } - if ((jsonObj.get("evaluationId") != null && !jsonObj.get("evaluationId").isJsonNull()) && !jsonObj.get("evaluationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("evaluationFlags") != null && !jsonObj.get("evaluationFlags").isJsonNull() && !jsonObj.get("evaluationFlags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationFlags` to be an array in the JSON string but got `%s`", jsonObj.get("evaluationFlags").toString())); - } - if ((jsonObj.get("maskedSSN") != null && !jsonObj.get("maskedSSN").isJsonNull()) && !jsonObj.get("maskedSSN").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedSSN` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedSSN").toString())); - } - if ((jsonObj.get("maskedPassport") != null && !jsonObj.get("maskedPassport").isJsonNull()) && !jsonObj.get("maskedPassport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedPassport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedPassport").toString())); - } - if ((jsonObj.get("maskedMatriculaConsular") != null && !jsonObj.get("maskedMatriculaConsular").isJsonNull()) && !jsonObj.get("maskedMatriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedMatriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedMatriculaConsular").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("evaluationCodes") != null && !jsonObj.get("evaluationCodes").isJsonNull() && !jsonObj.get("evaluationCodes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationCodes` to be an array in the JSON string but got `%s`", jsonObj.get("evaluationCodes").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BeneficialOwner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BeneficialOwner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BeneficialOwner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BeneficialOwner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BeneficialOwner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BeneficialOwner given an JSON string - * - * @param jsonString JSON string - * @return An instance of BeneficialOwner - * @throws IOException if the JSON string is invalid with respect to BeneficialOwner - */ - public static BeneficialOwner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BeneficialOwner.class); - } - - /** - * Convert an instance of BeneficialOwner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Beneficiary.java b/src/main/java/org/openapitools/client/model/Beneficiary.java deleted file mode 100644 index b3f30683..00000000 --- a/src/main/java/org/openapitools/client/model/Beneficiary.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.Arrays; -import org.openapitools.client.model.FullName; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Beneficiary - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Beneficiary { - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public Beneficiary() { - } - - public Beneficiary fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nonnull - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public Beneficiary dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nonnull - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Beneficiary beneficiary = (Beneficiary) o; - return Objects.equals(this.fullName, beneficiary.fullName) && - Objects.equals(this.dateOfBirth, beneficiary.dateOfBirth); - } - - @Override - public int hashCode() { - return Objects.hash(fullName, dateOfBirth); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Beneficiary {\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fullName"); - openapiFields.add("dateOfBirth"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("fullName"); - openapiRequiredFields.add("dateOfBirth"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Beneficiary - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Beneficiary.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Beneficiary is not found in the empty JSON string", Beneficiary.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Beneficiary.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Beneficiary` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Beneficiary.openapiRequiredFields) { - 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(); - // validate the required field `fullName` - FullName.validateJsonElement(jsonObj.get("fullName")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Beneficiary.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Beneficiary' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Beneficiary.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Beneficiary value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Beneficiary read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Beneficiary given an JSON string - * - * @param jsonString JSON string - * @return An instance of Beneficiary - * @throws IOException if the JSON string is invalid with respect to Beneficiary - */ - public static Beneficiary fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Beneficiary.class); - } - - /** - * Convert an instance of Beneficiary to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BillPayTransaction.java b/src/main/java/org/openapitools/client/model/BillPayTransaction.java deleted file mode 100644 index 43c35c6e..00000000 --- a/src/main/java/org/openapitools/client/model/BillPayTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CheckDepositTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BillPayTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BillPayTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CheckDepositTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public BillPayTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public BillPayTransaction attributes(CheckDepositTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CheckDepositTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CheckDepositTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public BillPayTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BillPayTransaction billPayTransaction = (BillPayTransaction) o; - return Objects.equals(this.attributes, billPayTransaction.attributes) && - Objects.equals(this.relationships, billPayTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BillPayTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BillPayTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BillPayTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BillPayTransaction is not found in the empty JSON string", BillPayTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BillPayTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BillPayTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BillPayTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BillPayTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BillPayTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BillPayTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BillPayTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BillPayTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BillPayTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of BillPayTransaction - * @throws IOException if the JSON string is invalid with respect to BillPayTransaction - */ - public static BillPayTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BillPayTransaction.class); - } - - /** - * Convert an instance of BillPayTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BillPayment.java b/src/main/java/org/openapitools/client/model/BillPayment.java deleted file mode 100644 index b3428629..00000000 --- a/src/main/java/org/openapitools/client/model/BillPayment.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.BillPaymentAllOfAttributes; -import org.openapitools.client.model.Payment; -import org.openapitools.client.model.PaymentRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BillPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BillPayment extends Payment { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private BillPaymentAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private PaymentRelationships relationships; - - public BillPayment() { - this.type = this.getClass().getSimpleName(); - } - - public BillPayment attributes(BillPaymentAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public BillPaymentAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(BillPaymentAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public BillPayment relationships(PaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public PaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(PaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BillPayment billPayment = (BillPayment) o; - return Objects.equals(this.attributes, billPayment.attributes) && - Objects.equals(this.relationships, billPayment.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BillPayment {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BillPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BillPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BillPayment is not found in the empty JSON string", BillPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BillPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BillPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BillPayment.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BillPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BillPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BillPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BillPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BillPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BillPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of BillPayment - * @throws IOException if the JSON string is invalid with respect to BillPayment - */ - public static BillPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BillPayment.class); - } - - /** - * Convert an instance of BillPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BillPaymentAllOfAttributes.java b/src/main/java/org/openapitools/client/model/BillPaymentAllOfAttributes.java deleted file mode 100644 index b1bb60c3..00000000 --- a/src/main/java/org/openapitools/client/model/BillPaymentAllOfAttributes.java +++ /dev/null @@ -1,475 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BillPaymentAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BillPaymentAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - INITIALIZED("Initialized"), - - PENDING("Pending"), - - REJECTED("Rejected"), - - CLEARING("Clearing"), - - SENT("Sent"), - - CANCELED("Canceled"), - - RETURNED("Returned"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_REASON = "reason"; - @SerializedName(SERIALIZED_NAME_REASON) - private String reason; - - public BillPaymentAllOfAttributes() { - } - - public BillPaymentAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public BillPaymentAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public BillPaymentAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public BillPaymentAllOfAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public BillPaymentAllOfAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public BillPaymentAllOfAttributes reason(String reason) { - - this.reason = reason; - return this; - } - - /** - * Get reason - * @return reason - **/ - @javax.annotation.Nullable - public String getReason() { - return reason; - } - - - public void setReason(String reason) { - this.reason = reason; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BillPaymentAllOfAttributes billPaymentAllOfAttributes = (BillPaymentAllOfAttributes) o; - return Objects.equals(this.createdAt, billPaymentAllOfAttributes.createdAt) && - Objects.equals(this.amount, billPaymentAllOfAttributes.amount) && - Objects.equals(this.direction, billPaymentAllOfAttributes.direction) && - Objects.equals(this.description, billPaymentAllOfAttributes.description) && - Objects.equals(this.status, billPaymentAllOfAttributes.status) && - Objects.equals(this.reason, billPaymentAllOfAttributes.reason); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, amount, direction, description, status, reason); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BillPaymentAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("amount"); - openapiFields.add("direction"); - openapiFields.add("description"); - openapiFields.add("status"); - openapiFields.add("reason"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("status"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BillPaymentAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BillPaymentAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BillPaymentAllOfAttributes is not found in the empty JSON string", BillPaymentAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BillPaymentAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BillPaymentAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BillPaymentAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if (!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())); - } - if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BillPaymentAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BillPaymentAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BillPaymentAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BillPaymentAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BillPaymentAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BillPaymentAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of BillPaymentAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to BillPaymentAllOfAttributes - */ - public static BillPaymentAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BillPaymentAllOfAttributes.class); - } - - /** - * Convert an instance of BillPaymentAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BookPayment.java b/src/main/java/org/openapitools/client/model/BookPayment.java deleted file mode 100644 index 43db8d26..00000000 --- a/src/main/java/org/openapitools/client/model/BookPayment.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.BookPaymentAllOfAttributes; -import org.openapitools.client.model.Payment; -import org.openapitools.client.model.PaymentRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BookPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BookPayment extends Payment { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private BookPaymentAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private PaymentRelationships relationships; - - public BookPayment() { - this.type = this.getClass().getSimpleName(); - } - - public BookPayment attributes(BookPaymentAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public BookPaymentAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(BookPaymentAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public BookPayment relationships(PaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public PaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(PaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BookPayment bookPayment = (BookPayment) o; - return Objects.equals(this.attributes, bookPayment.attributes) && - Objects.equals(this.relationships, bookPayment.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BookPayment {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BookPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BookPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BookPayment is not found in the empty JSON string", BookPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BookPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BookPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BookPayment.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BookPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BookPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BookPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BookPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BookPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BookPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of BookPayment - * @throws IOException if the JSON string is invalid with respect to BookPayment - */ - public static BookPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BookPayment.class); - } - - /** - * Convert an instance of BookPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BookPaymentAllOfAttributes.java b/src/main/java/org/openapitools/client/model/BookPaymentAllOfAttributes.java deleted file mode 100644 index feb8722c..00000000 --- a/src/main/java/org/openapitools/client/model/BookPaymentAllOfAttributes.java +++ /dev/null @@ -1,532 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BookPaymentAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BookPaymentAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - PENDING("Pending"), - - REJECTED("Rejected"), - - CLEARING("Clearing"), - - SENT("Sent"), - - CANCELED("Canceled"), - - RETURNED("Returned"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_TRANSACTION_SUMMARY_OVERRIDE = "transactionSummaryOverride"; - @SerializedName(SERIALIZED_NAME_TRANSACTION_SUMMARY_OVERRIDE) - private String transactionSummaryOverride; - - public static final String SERIALIZED_NAME_REASON = "reason"; - @SerializedName(SERIALIZED_NAME_REASON) - private String reason; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public BookPaymentAllOfAttributes() { - } - - public BookPaymentAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public BookPaymentAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public BookPaymentAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public BookPaymentAllOfAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public BookPaymentAllOfAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public BookPaymentAllOfAttributes transactionSummaryOverride(String transactionSummaryOverride) { - - this.transactionSummaryOverride = transactionSummaryOverride; - return this; - } - - /** - * Get transactionSummaryOverride - * @return transactionSummaryOverride - **/ - @javax.annotation.Nullable - public String getTransactionSummaryOverride() { - return transactionSummaryOverride; - } - - - public void setTransactionSummaryOverride(String transactionSummaryOverride) { - this.transactionSummaryOverride = transactionSummaryOverride; - } - - - public BookPaymentAllOfAttributes reason(String reason) { - - this.reason = reason; - return this; - } - - /** - * Get reason - * @return reason - **/ - @javax.annotation.Nullable - public String getReason() { - return reason; - } - - - public void setReason(String reason) { - this.reason = reason; - } - - - public BookPaymentAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BookPaymentAllOfAttributes bookPaymentAllOfAttributes = (BookPaymentAllOfAttributes) o; - return Objects.equals(this.createdAt, bookPaymentAllOfAttributes.createdAt) && - Objects.equals(this.amount, bookPaymentAllOfAttributes.amount) && - Objects.equals(this.direction, bookPaymentAllOfAttributes.direction) && - Objects.equals(this.description, bookPaymentAllOfAttributes.description) && - Objects.equals(this.status, bookPaymentAllOfAttributes.status) && - Objects.equals(this.transactionSummaryOverride, bookPaymentAllOfAttributes.transactionSummaryOverride) && - Objects.equals(this.reason, bookPaymentAllOfAttributes.reason) && - Objects.equals(this.tags, bookPaymentAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, amount, direction, description, status, transactionSummaryOverride, reason, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BookPaymentAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" transactionSummaryOverride: ").append(toIndentedString(transactionSummaryOverride)).append("\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("amount"); - openapiFields.add("direction"); - openapiFields.add("description"); - openapiFields.add("status"); - openapiFields.add("transactionSummaryOverride"); - openapiFields.add("reason"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("status"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BookPaymentAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BookPaymentAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BookPaymentAllOfAttributes is not found in the empty JSON string", BookPaymentAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BookPaymentAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BookPaymentAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BookPaymentAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if (!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())); - } - if ((jsonObj.get("transactionSummaryOverride") != null && !jsonObj.get("transactionSummaryOverride").isJsonNull()) && !jsonObj.get("transactionSummaryOverride").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transactionSummaryOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transactionSummaryOverride").toString())); - } - if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BookPaymentAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BookPaymentAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BookPaymentAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BookPaymentAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BookPaymentAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BookPaymentAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of BookPaymentAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to BookPaymentAllOfAttributes - */ - public static BookPaymentAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BookPaymentAllOfAttributes.class); - } - - /** - * Convert an instance of BookPaymentAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BookRepayment.java b/src/main/java/org/openapitools/client/model/BookRepayment.java deleted file mode 100644 index efc4415c..00000000 --- a/src/main/java/org/openapitools/client/model/BookRepayment.java +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.BookRepaymentAllOfAttributes; -import org.openapitools.client.model.BookRepaymentAllOfRelationships; -import org.openapitools.client.model.Repayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BookRepayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BookRepayment extends Repayment { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private BookRepaymentAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private BookRepaymentAllOfRelationships relationships; - - public BookRepayment() { - this.type = this.getClass().getSimpleName(); - } - - public BookRepayment attributes(BookRepaymentAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public BookRepaymentAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(BookRepaymentAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public BookRepayment relationships(BookRepaymentAllOfRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public BookRepaymentAllOfRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(BookRepaymentAllOfRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BookRepayment bookRepayment = (BookRepayment) o; - return Objects.equals(this.attributes, bookRepayment.attributes) && - Objects.equals(this.relationships, bookRepayment.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BookRepayment {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BookRepayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BookRepayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BookRepayment is not found in the empty JSON string", BookRepayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BookRepayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BookRepayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BookRepayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BookRepayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BookRepayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BookRepayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BookRepayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BookRepayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of BookRepayment - * @throws IOException if the JSON string is invalid with respect to BookRepayment - */ - public static BookRepayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BookRepayment.class); - } - - /** - * Convert an instance of BookRepayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BookRepaymentAllOfAttributes.java b/src/main/java/org/openapitools/client/model/BookRepaymentAllOfAttributes.java deleted file mode 100644 index 5e0dd079..00000000 --- a/src/main/java/org/openapitools/client/model/BookRepaymentAllOfAttributes.java +++ /dev/null @@ -1,385 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BookRepaymentAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BookRepaymentAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - PENDING("Pending"), - - PENDINGREVIEW("PendingReview"), - - SENT("Sent"), - - RETURNED("Returned"), - - REJECTED("Rejected"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public BookRepaymentAllOfAttributes() { - } - - public BookRepaymentAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public BookRepaymentAllOfAttributes updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public BookRepaymentAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public BookRepaymentAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public BookRepaymentAllOfAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BookRepaymentAllOfAttributes bookRepaymentAllOfAttributes = (BookRepaymentAllOfAttributes) o; - return Objects.equals(this.createdAt, bookRepaymentAllOfAttributes.createdAt) && - Objects.equals(this.updatedAt, bookRepaymentAllOfAttributes.updatedAt) && - Objects.equals(this.amount, bookRepaymentAllOfAttributes.amount) && - Objects.equals(this.tags, bookRepaymentAllOfAttributes.tags) && - Objects.equals(this.status, bookRepaymentAllOfAttributes.status); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, updatedAt, amount, tags, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BookRepaymentAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("amount"); - openapiFields.add("tags"); - openapiFields.add("status"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("status"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BookRepaymentAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BookRepaymentAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BookRepaymentAllOfAttributes is not found in the empty JSON string", BookRepaymentAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BookRepaymentAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BookRepaymentAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BookRepaymentAllOfAttributes.openapiRequiredFields) { - 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("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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BookRepaymentAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BookRepaymentAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BookRepaymentAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BookRepaymentAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BookRepaymentAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BookRepaymentAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of BookRepaymentAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to BookRepaymentAllOfAttributes - */ - public static BookRepaymentAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BookRepaymentAllOfAttributes.class); - } - - /** - * Convert an instance of BookRepaymentAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationships.java b/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationships.java deleted file mode 100644 index 7f1b8606..00000000 --- a/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationships.java +++ /dev/null @@ -1,342 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AchRepaymentAllOfRelationshipsAccount; -import org.openapitools.client.model.AchRepaymentAllOfRelationshipsCreditAccount; -import org.openapitools.client.model.AchRepaymentAllOfRelationshipsCustomer; -import org.openapitools.client.model.AchRepaymentAllOfRelationshipsPayment; -import org.openapitools.client.model.BookRepaymentAllOfRelationshipsCounterpartyAccount; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BookRepaymentAllOfRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BookRepaymentAllOfRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private AchRepaymentAllOfRelationshipsAccount account; - - public static final String SERIALIZED_NAME_CREDIT_ACCOUNT = "creditAccount"; - @SerializedName(SERIALIZED_NAME_CREDIT_ACCOUNT) - private AchRepaymentAllOfRelationshipsCreditAccount creditAccount; - - public static final String SERIALIZED_NAME_COUNTERPARTY_ACCOUNT = "counterpartyAccount"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_ACCOUNT) - private BookRepaymentAllOfRelationshipsCounterpartyAccount counterpartyAccount; - - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private AchRepaymentAllOfRelationshipsCustomer customer; - - public static final String SERIALIZED_NAME_PAYMENT = "payment"; - @SerializedName(SERIALIZED_NAME_PAYMENT) - private AchRepaymentAllOfRelationshipsPayment payment; - - public BookRepaymentAllOfRelationships() { - } - - public BookRepaymentAllOfRelationships account(AchRepaymentAllOfRelationshipsAccount account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nullable - public AchRepaymentAllOfRelationshipsAccount getAccount() { - return account; - } - - - public void setAccount(AchRepaymentAllOfRelationshipsAccount account) { - this.account = account; - } - - - public BookRepaymentAllOfRelationships creditAccount(AchRepaymentAllOfRelationshipsCreditAccount creditAccount) { - - this.creditAccount = creditAccount; - return this; - } - - /** - * Get creditAccount - * @return creditAccount - **/ - @javax.annotation.Nullable - public AchRepaymentAllOfRelationshipsCreditAccount getCreditAccount() { - return creditAccount; - } - - - public void setCreditAccount(AchRepaymentAllOfRelationshipsCreditAccount creditAccount) { - this.creditAccount = creditAccount; - } - - - public BookRepaymentAllOfRelationships counterpartyAccount(BookRepaymentAllOfRelationshipsCounterpartyAccount counterpartyAccount) { - - this.counterpartyAccount = counterpartyAccount; - return this; - } - - /** - * Get counterpartyAccount - * @return counterpartyAccount - **/ - @javax.annotation.Nullable - public BookRepaymentAllOfRelationshipsCounterpartyAccount getCounterpartyAccount() { - return counterpartyAccount; - } - - - public void setCounterpartyAccount(BookRepaymentAllOfRelationshipsCounterpartyAccount counterpartyAccount) { - this.counterpartyAccount = counterpartyAccount; - } - - - public BookRepaymentAllOfRelationships customer(AchRepaymentAllOfRelationshipsCustomer customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nullable - public AchRepaymentAllOfRelationshipsCustomer getCustomer() { - return customer; - } - - - public void setCustomer(AchRepaymentAllOfRelationshipsCustomer customer) { - this.customer = customer; - } - - - public BookRepaymentAllOfRelationships payment(AchRepaymentAllOfRelationshipsPayment payment) { - - this.payment = payment; - return this; - } - - /** - * Get payment - * @return payment - **/ - @javax.annotation.Nullable - public AchRepaymentAllOfRelationshipsPayment getPayment() { - return payment; - } - - - public void setPayment(AchRepaymentAllOfRelationshipsPayment payment) { - this.payment = payment; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BookRepaymentAllOfRelationships bookRepaymentAllOfRelationships = (BookRepaymentAllOfRelationships) o; - return Objects.equals(this.account, bookRepaymentAllOfRelationships.account) && - Objects.equals(this.creditAccount, bookRepaymentAllOfRelationships.creditAccount) && - Objects.equals(this.counterpartyAccount, bookRepaymentAllOfRelationships.counterpartyAccount) && - Objects.equals(this.customer, bookRepaymentAllOfRelationships.customer) && - Objects.equals(this.payment, bookRepaymentAllOfRelationships.payment); - } - - @Override - public int hashCode() { - return Objects.hash(account, creditAccount, counterpartyAccount, customer, payment); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BookRepaymentAllOfRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" creditAccount: ").append(toIndentedString(creditAccount)).append("\n"); - sb.append(" counterpartyAccount: ").append(toIndentedString(counterpartyAccount)).append("\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" payment: ").append(toIndentedString(payment)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - openapiFields.add("creditAccount"); - openapiFields.add("counterpartyAccount"); - openapiFields.add("customer"); - openapiFields.add("payment"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BookRepaymentAllOfRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BookRepaymentAllOfRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BookRepaymentAllOfRelationships is not found in the empty JSON string", BookRepaymentAllOfRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BookRepaymentAllOfRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BookRepaymentAllOfRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `account` - if (jsonObj.get("account") != null && !jsonObj.get("account").isJsonNull()) { - AchRepaymentAllOfRelationshipsAccount.validateJsonElement(jsonObj.get("account")); - } - // validate the optional field `creditAccount` - if (jsonObj.get("creditAccount") != null && !jsonObj.get("creditAccount").isJsonNull()) { - AchRepaymentAllOfRelationshipsCreditAccount.validateJsonElement(jsonObj.get("creditAccount")); - } - // validate the optional field `counterpartyAccount` - if (jsonObj.get("counterpartyAccount") != null && !jsonObj.get("counterpartyAccount").isJsonNull()) { - BookRepaymentAllOfRelationshipsCounterpartyAccount.validateJsonElement(jsonObj.get("counterpartyAccount")); - } - // validate the optional field `customer` - if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { - AchRepaymentAllOfRelationshipsCustomer.validateJsonElement(jsonObj.get("customer")); - } - // validate the optional field `payment` - if (jsonObj.get("payment") != null && !jsonObj.get("payment").isJsonNull()) { - AchRepaymentAllOfRelationshipsPayment.validateJsonElement(jsonObj.get("payment")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BookRepaymentAllOfRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BookRepaymentAllOfRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BookRepaymentAllOfRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BookRepaymentAllOfRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BookRepaymentAllOfRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BookRepaymentAllOfRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of BookRepaymentAllOfRelationships - * @throws IOException if the JSON string is invalid with respect to BookRepaymentAllOfRelationships - */ - public static BookRepaymentAllOfRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BookRepaymentAllOfRelationships.class); - } - - /** - * Convert an instance of BookRepaymentAllOfRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationshipsCounterpartyAccount.java b/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationshipsCounterpartyAccount.java deleted file mode 100644 index 620a9106..00000000 --- a/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationshipsCounterpartyAccount.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.BookRepaymentAllOfRelationshipsCounterpartyAccountData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BookRepaymentAllOfRelationshipsCounterpartyAccount - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BookRepaymentAllOfRelationshipsCounterpartyAccount { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private BookRepaymentAllOfRelationshipsCounterpartyAccountData data; - - public BookRepaymentAllOfRelationshipsCounterpartyAccount() { - } - - public BookRepaymentAllOfRelationshipsCounterpartyAccount data(BookRepaymentAllOfRelationshipsCounterpartyAccountData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public BookRepaymentAllOfRelationshipsCounterpartyAccountData getData() { - return data; - } - - - public void setData(BookRepaymentAllOfRelationshipsCounterpartyAccountData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BookRepaymentAllOfRelationshipsCounterpartyAccount bookRepaymentAllOfRelationshipsCounterpartyAccount = (BookRepaymentAllOfRelationshipsCounterpartyAccount) o; - return Objects.equals(this.data, bookRepaymentAllOfRelationshipsCounterpartyAccount.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BookRepaymentAllOfRelationshipsCounterpartyAccount {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BookRepaymentAllOfRelationshipsCounterpartyAccount - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BookRepaymentAllOfRelationshipsCounterpartyAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BookRepaymentAllOfRelationshipsCounterpartyAccount is not found in the empty JSON string", BookRepaymentAllOfRelationshipsCounterpartyAccount.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BookRepaymentAllOfRelationshipsCounterpartyAccount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BookRepaymentAllOfRelationshipsCounterpartyAccount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BookRepaymentAllOfRelationshipsCounterpartyAccount.openapiRequiredFields) { - 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(); - // validate the required field `data` - BookRepaymentAllOfRelationshipsCounterpartyAccountData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BookRepaymentAllOfRelationshipsCounterpartyAccount.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BookRepaymentAllOfRelationshipsCounterpartyAccount' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BookRepaymentAllOfRelationshipsCounterpartyAccount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BookRepaymentAllOfRelationshipsCounterpartyAccount value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BookRepaymentAllOfRelationshipsCounterpartyAccount read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BookRepaymentAllOfRelationshipsCounterpartyAccount given an JSON string - * - * @param jsonString JSON string - * @return An instance of BookRepaymentAllOfRelationshipsCounterpartyAccount - * @throws IOException if the JSON string is invalid with respect to BookRepaymentAllOfRelationshipsCounterpartyAccount - */ - public static BookRepaymentAllOfRelationshipsCounterpartyAccount fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BookRepaymentAllOfRelationshipsCounterpartyAccount.class); - } - - /** - * Convert an instance of BookRepaymentAllOfRelationshipsCounterpartyAccount to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationshipsCounterpartyAccountData.java b/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationshipsCounterpartyAccountData.java deleted file mode 100644 index 20cb54a5..00000000 --- a/src/main/java/org/openapitools/client/model/BookRepaymentAllOfRelationshipsCounterpartyAccountData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BookRepaymentAllOfRelationshipsCounterpartyAccountData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BookRepaymentAllOfRelationshipsCounterpartyAccountData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "account"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public BookRepaymentAllOfRelationshipsCounterpartyAccountData() { - } - - public BookRepaymentAllOfRelationshipsCounterpartyAccountData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public BookRepaymentAllOfRelationshipsCounterpartyAccountData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BookRepaymentAllOfRelationshipsCounterpartyAccountData bookRepaymentAllOfRelationshipsCounterpartyAccountData = (BookRepaymentAllOfRelationshipsCounterpartyAccountData) o; - return Objects.equals(this.type, bookRepaymentAllOfRelationshipsCounterpartyAccountData.type) && - Objects.equals(this.id, bookRepaymentAllOfRelationshipsCounterpartyAccountData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BookRepaymentAllOfRelationshipsCounterpartyAccountData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BookRepaymentAllOfRelationshipsCounterpartyAccountData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BookRepaymentAllOfRelationshipsCounterpartyAccountData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BookRepaymentAllOfRelationshipsCounterpartyAccountData is not found in the empty JSON string", BookRepaymentAllOfRelationshipsCounterpartyAccountData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BookRepaymentAllOfRelationshipsCounterpartyAccountData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BookRepaymentAllOfRelationshipsCounterpartyAccountData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BookRepaymentAllOfRelationshipsCounterpartyAccountData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BookRepaymentAllOfRelationshipsCounterpartyAccountData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BookRepaymentAllOfRelationshipsCounterpartyAccountData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BookRepaymentAllOfRelationshipsCounterpartyAccountData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BookRepaymentAllOfRelationshipsCounterpartyAccountData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BookRepaymentAllOfRelationshipsCounterpartyAccountData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BookRepaymentAllOfRelationshipsCounterpartyAccountData given an JSON string - * - * @param jsonString JSON string - * @return An instance of BookRepaymentAllOfRelationshipsCounterpartyAccountData - * @throws IOException if the JSON string is invalid with respect to BookRepaymentAllOfRelationshipsCounterpartyAccountData - */ - public static BookRepaymentAllOfRelationshipsCounterpartyAccountData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BookRepaymentAllOfRelationshipsCounterpartyAccountData.class); - } - - /** - * Convert an instance of BookRepaymentAllOfRelationshipsCounterpartyAccountData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BookTransaction.java b/src/main/java/org/openapitools/client/model/BookTransaction.java deleted file mode 100644 index 96ddb707..00000000 --- a/src/main/java/org/openapitools/client/model/BookTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.BookTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BookTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BookTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private BookTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public BookTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public BookTransaction attributes(BookTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public BookTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(BookTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public BookTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BookTransaction bookTransaction = (BookTransaction) o; - return Objects.equals(this.attributes, bookTransaction.attributes) && - Objects.equals(this.relationships, bookTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BookTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BookTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BookTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BookTransaction is not found in the empty JSON string", BookTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BookTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BookTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BookTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BookTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BookTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BookTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BookTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BookTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BookTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of BookTransaction - * @throws IOException if the JSON string is invalid with respect to BookTransaction - */ - public static BookTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BookTransaction.class); - } - - /** - * Convert an instance of BookTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BookTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/BookTransactionAllOfAttributes.java deleted file mode 100644 index 3f161c58..00000000 --- a/src/main/java/org/openapitools/client/model/BookTransactionAllOfAttributes.java +++ /dev/null @@ -1,443 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.Counterparty; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BookTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BookTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_COUNTERPARTY = "counterparty"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY) - private Counterparty counterparty; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public BookTransactionAllOfAttributes() { - } - - public BookTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public BookTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public BookTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public BookTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public BookTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public BookTransactionAllOfAttributes counterparty(Counterparty counterparty) { - - this.counterparty = counterparty; - return this; - } - - /** - * Get counterparty - * @return counterparty - **/ - @javax.annotation.Nonnull - public Counterparty getCounterparty() { - return counterparty; - } - - - public void setCounterparty(Counterparty counterparty) { - this.counterparty = counterparty; - } - - - public BookTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BookTransactionAllOfAttributes bookTransactionAllOfAttributes = (BookTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, bookTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, bookTransactionAllOfAttributes.direction) && - Objects.equals(this.amount, bookTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, bookTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, bookTransactionAllOfAttributes.summary) && - Objects.equals(this.counterparty, bookTransactionAllOfAttributes.counterparty) && - Objects.equals(this.tags, bookTransactionAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, amount, balance, summary, counterparty, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BookTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("counterparty"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - openapiRequiredFields.add("counterparty"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BookTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BookTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BookTransactionAllOfAttributes is not found in the empty JSON string", BookTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BookTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BookTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BookTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - // validate the required field `counterparty` - Counterparty.validateJsonElement(jsonObj.get("counterparty")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BookTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BookTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BookTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BookTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BookTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BookTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of BookTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to BookTransactionAllOfAttributes - */ - public static BookTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BookTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of BookTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BusinessAnnualRevenue.java b/src/main/java/org/openapitools/client/model/BusinessAnnualRevenue.java deleted file mode 100644 index 196225d8..00000000 --- a/src/main/java/org/openapitools/client/model/BusinessAnnualRevenue.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets businessAnnualRevenue - */ -@JsonAdapter(BusinessAnnualRevenue.Adapter.class) -public enum BusinessAnnualRevenue { - - UPTO250K("UpTo250k"), - - BETWEEN250KAND500K("Between250kAnd500k"), - - BETWEEN500KAND1M("Between500kAnd1m"), - - BETWEEN1MAND5M("Between1mAnd5m"), - - OVER5M("Over5m"); - - private String value; - - BusinessAnnualRevenue(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static BusinessAnnualRevenue fromValue(String value) { - for (BusinessAnnualRevenue b : BusinessAnnualRevenue.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final BusinessAnnualRevenue enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public BusinessAnnualRevenue read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return BusinessAnnualRevenue.fromValue(value); - } - } -} - diff --git a/src/main/java/org/openapitools/client/model/BusinessApplication.java b/src/main/java/org/openapitools/client/model/BusinessApplication.java deleted file mode 100644 index a1305e58..00000000 --- a/src/main/java/org/openapitools/client/model/BusinessApplication.java +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Application; -import org.openapitools.client.model.ApplicationRelationships; -import org.openapitools.client.model.BusinessApplicationAllOfAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BusinessApplication - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BusinessApplication extends Application { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private BusinessApplicationAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private ApplicationRelationships relationships; - - public BusinessApplication() { - this.type = this.getClass().getSimpleName(); - } - - public BusinessApplication attributes(BusinessApplicationAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public BusinessApplicationAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(BusinessApplicationAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public BusinessApplication relationships(ApplicationRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public ApplicationRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(ApplicationRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BusinessApplication businessApplication = (BusinessApplication) o; - return Objects.equals(this.attributes, businessApplication.attributes) && - Objects.equals(this.relationships, businessApplication.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BusinessApplication {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BusinessApplication - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BusinessApplication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BusinessApplication is not found in the empty JSON string", BusinessApplication.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BusinessApplication.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BusinessApplication` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BusinessApplication.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BusinessApplication.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BusinessApplication' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BusinessApplication.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BusinessApplication value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BusinessApplication read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BusinessApplication given an JSON string - * - * @param jsonString JSON string - * @return An instance of BusinessApplication - * @throws IOException if the JSON string is invalid with respect to BusinessApplication - */ - public static BusinessApplication fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BusinessApplication.class); - } - - /** - * Convert an instance of BusinessApplication to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BusinessApplicationAllOfAttributes.java b/src/main/java/org/openapitools/client/model/BusinessApplicationAllOfAttributes.java deleted file mode 100644 index 3c3c3f84..00000000 --- a/src/main/java/org/openapitools/client/model/BusinessApplicationAllOfAttributes.java +++ /dev/null @@ -1,1513 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.ApplicationStatus; -import org.openapitools.client.model.BeneficialOwner; -import org.openapitools.client.model.BusinessAnnualRevenue; -import org.openapitools.client.model.BusinessNumberOfEmployees; -import org.openapitools.client.model.BusinessVertical; -import org.openapitools.client.model.CashFlow; -import org.openapitools.client.model.Contact; -import org.openapitools.client.model.EntityType; -import org.openapitools.client.model.Industry; -import org.openapitools.client.model.Officer; -import org.openapitools.client.model.Phone; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BusinessApplicationAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BusinessApplicationAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private ApplicationStatus status; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - private String message; - - public static final String SERIALIZED_NAME_EVALUATION_OUTCOME = "evaluationOutcome"; - @SerializedName(SERIALIZED_NAME_EVALUATION_OUTCOME) - private String evaluationOutcome; - - public static final String SERIALIZED_NAME_EVALUATION_ID = "evaluationId"; - @SerializedName(SERIALIZED_NAME_EVALUATION_ID) - private String evaluationId; - - public static final String SERIALIZED_NAME_EVALUATION_ENTITY_ID = "evaluationEntityId"; - @SerializedName(SERIALIZED_NAME_EVALUATION_ENTITY_ID) - private String evaluationEntityId; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_DBA = "dba"; - @SerializedName(SERIALIZED_NAME_DBA) - private String dba; - - public static final String SERIALIZED_NAME_EIN = "ein"; - @SerializedName(SERIALIZED_NAME_EIN) - private String ein; - - public static final String SERIALIZED_NAME_ENTITY_TYPE = "entityType"; - @SerializedName(SERIALIZED_NAME_ENTITY_TYPE) - private EntityType entityType; - - public static final String SERIALIZED_NAME_DATE_OF_INCORPORATION = "dateOfIncorporation"; - @SerializedName(SERIALIZED_NAME_DATE_OF_INCORPORATION) - private LocalDate dateOfIncorporation; - - public static final String SERIALIZED_NAME_STATE_OF_INCORPORATION = "stateOfIncorporation"; - @SerializedName(SERIALIZED_NAME_STATE_OF_INCORPORATION) - private String stateOfIncorporation; - - public static final String SERIALIZED_NAME_PURPOSE = "purpose"; - @SerializedName(SERIALIZED_NAME_PURPOSE) - private String purpose; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_CONTACT = "contact"; - @SerializedName(SERIALIZED_NAME_CONTACT) - private Contact contact; - - public static final String SERIALIZED_NAME_OFFICER = "officer"; - @SerializedName(SERIALIZED_NAME_OFFICER) - private Officer officer; - - public static final String SERIALIZED_NAME_IP = "ip"; - @SerializedName(SERIALIZED_NAME_IP) - private String ip; - - public static final String SERIALIZED_NAME_WEBSITE = "website"; - @SerializedName(SERIALIZED_NAME_WEBSITE) - private String website; - - public static final String SERIALIZED_NAME_BENEFICIAL_OWNERS = "beneficialOwners"; - @SerializedName(SERIALIZED_NAME_BENEFICIAL_OWNERS) - private List beneficialOwners = new ArrayList<>(); - - /** - * Gets or Sets decisionMethod - */ - @JsonAdapter(DecisionMethodEnum.Adapter.class) - public enum DecisionMethodEnum { - MANUALLY("Manually"), - - AUTOMATICALLY("Automatically"); - - private String value; - - DecisionMethodEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DecisionMethodEnum fromValue(String value) { - for (DecisionMethodEnum b : DecisionMethodEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DecisionMethodEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DecisionMethodEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DecisionMethodEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DECISION_METHOD = "decisionMethod"; - @SerializedName(SERIALIZED_NAME_DECISION_METHOD) - private DecisionMethodEnum decisionMethod; - - public static final String SERIALIZED_NAME_DECISION_USER_ID = "decisionUserId"; - @SerializedName(SERIALIZED_NAME_DECISION_USER_ID) - private String decisionUserId; - - public static final String SERIALIZED_NAME_DECISION_REASON = "decisionReason"; - @SerializedName(SERIALIZED_NAME_DECISION_REASON) - private String decisionReason; - - public static final String SERIALIZED_NAME_DECISION_DATE_TIME = "decisionDateTime"; - @SerializedName(SERIALIZED_NAME_DECISION_DATE_TIME) - private OffsetDateTime decisionDateTime; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - /** - * Gets or Sets riskRate - */ - @JsonAdapter(RiskRateEnum.Adapter.class) - public enum RiskRateEnum { - LOW("low"), - - MEDIUM("medium"), - - HIGH("high"); - - private String value; - - RiskRateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static RiskRateEnum fromValue(String value) { - for (RiskRateEnum b : RiskRateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final RiskRateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public RiskRateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return RiskRateEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_RISK_RATE = "riskRate"; - @SerializedName(SERIALIZED_NAME_RISK_RATE) - private RiskRateEnum riskRate; - - public static final String SERIALIZED_NAME_EVALUATION_FLAGS = "evaluationFlags"; - @SerializedName(SERIALIZED_NAME_EVALUATION_FLAGS) - private List evaluationFlags; - - public static final String SERIALIZED_NAME_IP_LOCATION_DETAILS = "ipLocationDetails"; - @SerializedName(SERIALIZED_NAME_IP_LOCATION_DETAILS) - private Object ipLocationDetails; - - public static final String SERIALIZED_NAME_PHONE_LOCATION_DETAILS = "phoneLocationDetails"; - @SerializedName(SERIALIZED_NAME_PHONE_LOCATION_DETAILS) - private Object phoneLocationDetails; - - public static final String SERIALIZED_NAME_ARCHIVED = "archived"; - @SerializedName(SERIALIZED_NAME_ARCHIVED) - private Boolean archived; - - public static final String SERIALIZED_NAME_INDUSTRY = "industry"; - @SerializedName(SERIALIZED_NAME_INDUSTRY) - private Industry industry; - - public static final String SERIALIZED_NAME_ANNUAL_REVENUE = "annualRevenue"; - @SerializedName(SERIALIZED_NAME_ANNUAL_REVENUE) - private BusinessAnnualRevenue annualRevenue; - - public static final String SERIALIZED_NAME_NUMBER_OF_EMPLOYEES = "numberOfEmployees"; - @SerializedName(SERIALIZED_NAME_NUMBER_OF_EMPLOYEES) - private BusinessNumberOfEmployees numberOfEmployees; - - public static final String SERIALIZED_NAME_CASH_FLOW = "cashFlow"; - @SerializedName(SERIALIZED_NAME_CASH_FLOW) - private CashFlow cashFlow; - - public static final String SERIALIZED_NAME_YEAR_OF_INCORPORATION = "yearOfIncorporation"; - @SerializedName(SERIALIZED_NAME_YEAR_OF_INCORPORATION) - private String yearOfIncorporation; - - public static final String SERIALIZED_NAME_COUNTRIES_OF_OPERATION = "countriesOfOperation"; - @SerializedName(SERIALIZED_NAME_COUNTRIES_OF_OPERATION) - private List countriesOfOperation; - - public static final String SERIALIZED_NAME_STOCK_SYMBOL = "stockSymbol"; - @SerializedName(SERIALIZED_NAME_STOCK_SYMBOL) - private String stockSymbol; - - public static final String SERIALIZED_NAME_BUSINESS_VERTICAL = "businessVertical"; - @SerializedName(SERIALIZED_NAME_BUSINESS_VERTICAL) - private BusinessVertical businessVertical; - - public BusinessApplicationAllOfAttributes() { - } - - public BusinessApplicationAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public BusinessApplicationAllOfAttributes updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public BusinessApplicationAllOfAttributes status(ApplicationStatus status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public ApplicationStatus getStatus() { - return status; - } - - - public void setStatus(ApplicationStatus status) { - this.status = status; - } - - - public BusinessApplicationAllOfAttributes message(String message) { - - this.message = message; - return this; - } - - /** - * Get message - * @return message - **/ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - - public void setMessage(String message) { - this.message = message; - } - - - public BusinessApplicationAllOfAttributes evaluationOutcome(String evaluationOutcome) { - - this.evaluationOutcome = evaluationOutcome; - return this; - } - - /** - * Get evaluationOutcome - * @return evaluationOutcome - **/ - @javax.annotation.Nullable - public String getEvaluationOutcome() { - return evaluationOutcome; - } - - - public void setEvaluationOutcome(String evaluationOutcome) { - this.evaluationOutcome = evaluationOutcome; - } - - - public BusinessApplicationAllOfAttributes evaluationId(String evaluationId) { - - this.evaluationId = evaluationId; - return this; - } - - /** - * Get evaluationId - * @return evaluationId - **/ - @javax.annotation.Nullable - public String getEvaluationId() { - return evaluationId; - } - - - public void setEvaluationId(String evaluationId) { - this.evaluationId = evaluationId; - } - - - public BusinessApplicationAllOfAttributes evaluationEntityId(String evaluationEntityId) { - - this.evaluationEntityId = evaluationEntityId; - return this; - } - - /** - * Get evaluationEntityId - * @return evaluationEntityId - **/ - @javax.annotation.Nullable - public String getEvaluationEntityId() { - return evaluationEntityId; - } - - - public void setEvaluationEntityId(String evaluationEntityId) { - this.evaluationEntityId = evaluationEntityId; - } - - - public BusinessApplicationAllOfAttributes name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public BusinessApplicationAllOfAttributes dba(String dba) { - - this.dba = dba; - return this; - } - - /** - * Get dba - * @return dba - **/ - @javax.annotation.Nullable - public String getDba() { - return dba; - } - - - public void setDba(String dba) { - this.dba = dba; - } - - - public BusinessApplicationAllOfAttributes ein(String ein) { - - this.ein = ein; - return this; - } - - /** - * Get ein - * @return ein - **/ - @javax.annotation.Nullable - public String getEin() { - return ein; - } - - - public void setEin(String ein) { - this.ein = ein; - } - - - public BusinessApplicationAllOfAttributes entityType(EntityType entityType) { - - this.entityType = entityType; - return this; - } - - /** - * Get entityType - * @return entityType - **/ - @javax.annotation.Nonnull - public EntityType getEntityType() { - return entityType; - } - - - public void setEntityType(EntityType entityType) { - this.entityType = entityType; - } - - - public BusinessApplicationAllOfAttributes dateOfIncorporation(LocalDate dateOfIncorporation) { - - this.dateOfIncorporation = dateOfIncorporation; - return this; - } - - /** - * Get dateOfIncorporation - * @return dateOfIncorporation - **/ - @javax.annotation.Nullable - public LocalDate getDateOfIncorporation() { - return dateOfIncorporation; - } - - - public void setDateOfIncorporation(LocalDate dateOfIncorporation) { - this.dateOfIncorporation = dateOfIncorporation; - } - - - public BusinessApplicationAllOfAttributes stateOfIncorporation(String stateOfIncorporation) { - - this.stateOfIncorporation = stateOfIncorporation; - return this; - } - - /** - * Get stateOfIncorporation - * @return stateOfIncorporation - **/ - @javax.annotation.Nonnull - public String getStateOfIncorporation() { - return stateOfIncorporation; - } - - - public void setStateOfIncorporation(String stateOfIncorporation) { - this.stateOfIncorporation = stateOfIncorporation; - } - - - public BusinessApplicationAllOfAttributes purpose(String purpose) { - - this.purpose = purpose; - return this; - } - - /** - * Get purpose - * @return purpose - **/ - @javax.annotation.Nullable - public String getPurpose() { - return purpose; - } - - - public void setPurpose(String purpose) { - this.purpose = purpose; - } - - - public BusinessApplicationAllOfAttributes phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public BusinessApplicationAllOfAttributes address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public BusinessApplicationAllOfAttributes contact(Contact contact) { - - this.contact = contact; - return this; - } - - /** - * Get contact - * @return contact - **/ - @javax.annotation.Nonnull - public Contact getContact() { - return contact; - } - - - public void setContact(Contact contact) { - this.contact = contact; - } - - - public BusinessApplicationAllOfAttributes officer(Officer officer) { - - this.officer = officer; - return this; - } - - /** - * Get officer - * @return officer - **/ - @javax.annotation.Nonnull - public Officer getOfficer() { - return officer; - } - - - public void setOfficer(Officer officer) { - this.officer = officer; - } - - - public BusinessApplicationAllOfAttributes ip(String ip) { - - this.ip = ip; - return this; - } - - /** - * Get ip - * @return ip - **/ - @javax.annotation.Nullable - public String getIp() { - return ip; - } - - - public void setIp(String ip) { - this.ip = ip; - } - - - public BusinessApplicationAllOfAttributes website(String website) { - - this.website = website; - return this; - } - - /** - * Get website - * @return website - **/ - @javax.annotation.Nullable - public String getWebsite() { - return website; - } - - - public void setWebsite(String website) { - this.website = website; - } - - - public BusinessApplicationAllOfAttributes beneficialOwners(List beneficialOwners) { - - this.beneficialOwners = beneficialOwners; - return this; - } - - public BusinessApplicationAllOfAttributes addBeneficialOwnersItem(BeneficialOwner beneficialOwnersItem) { - if (this.beneficialOwners == null) { - this.beneficialOwners = new ArrayList<>(); - } - this.beneficialOwners.add(beneficialOwnersItem); - return this; - } - - /** - * Get beneficialOwners - * @return beneficialOwners - **/ - @javax.annotation.Nonnull - public List getBeneficialOwners() { - return beneficialOwners; - } - - - public void setBeneficialOwners(List beneficialOwners) { - this.beneficialOwners = beneficialOwners; - } - - - public BusinessApplicationAllOfAttributes decisionMethod(DecisionMethodEnum decisionMethod) { - - this.decisionMethod = decisionMethod; - return this; - } - - /** - * Get decisionMethod - * @return decisionMethod - **/ - @javax.annotation.Nullable - public DecisionMethodEnum getDecisionMethod() { - return decisionMethod; - } - - - public void setDecisionMethod(DecisionMethodEnum decisionMethod) { - this.decisionMethod = decisionMethod; - } - - - public BusinessApplicationAllOfAttributes decisionUserId(String decisionUserId) { - - this.decisionUserId = decisionUserId; - return this; - } - - /** - * Get decisionUserId - * @return decisionUserId - **/ - @javax.annotation.Nullable - public String getDecisionUserId() { - return decisionUserId; - } - - - public void setDecisionUserId(String decisionUserId) { - this.decisionUserId = decisionUserId; - } - - - public BusinessApplicationAllOfAttributes decisionReason(String decisionReason) { - - this.decisionReason = decisionReason; - return this; - } - - /** - * Get decisionReason - * @return decisionReason - **/ - @javax.annotation.Nullable - public String getDecisionReason() { - return decisionReason; - } - - - public void setDecisionReason(String decisionReason) { - this.decisionReason = decisionReason; - } - - - public BusinessApplicationAllOfAttributes decisionDateTime(OffsetDateTime decisionDateTime) { - - this.decisionDateTime = decisionDateTime; - return this; - } - - /** - * Get decisionDateTime - * @return decisionDateTime - **/ - @javax.annotation.Nullable - public OffsetDateTime getDecisionDateTime() { - return decisionDateTime; - } - - - public void setDecisionDateTime(OffsetDateTime decisionDateTime) { - this.decisionDateTime = decisionDateTime; - } - - - public BusinessApplicationAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public BusinessApplicationAllOfAttributes riskRate(RiskRateEnum riskRate) { - - this.riskRate = riskRate; - return this; - } - - /** - * Get riskRate - * @return riskRate - **/ - @javax.annotation.Nullable - public RiskRateEnum getRiskRate() { - return riskRate; - } - - - public void setRiskRate(RiskRateEnum riskRate) { - this.riskRate = riskRate; - } - - - public BusinessApplicationAllOfAttributes evaluationFlags(List evaluationFlags) { - - this.evaluationFlags = evaluationFlags; - return this; - } - - public BusinessApplicationAllOfAttributes addEvaluationFlagsItem(String evaluationFlagsItem) { - if (this.evaluationFlags == null) { - this.evaluationFlags = new ArrayList<>(); - } - this.evaluationFlags.add(evaluationFlagsItem); - return this; - } - - /** - * Get evaluationFlags - * @return evaluationFlags - **/ - @javax.annotation.Nullable - public List getEvaluationFlags() { - return evaluationFlags; - } - - - public void setEvaluationFlags(List evaluationFlags) { - this.evaluationFlags = evaluationFlags; - } - - - public BusinessApplicationAllOfAttributes ipLocationDetails(Object ipLocationDetails) { - - this.ipLocationDetails = ipLocationDetails; - return this; - } - - /** - * Get ipLocationDetails - * @return ipLocationDetails - **/ - @javax.annotation.Nullable - public Object getIpLocationDetails() { - return ipLocationDetails; - } - - - public void setIpLocationDetails(Object ipLocationDetails) { - this.ipLocationDetails = ipLocationDetails; - } - - - public BusinessApplicationAllOfAttributes phoneLocationDetails(Object phoneLocationDetails) { - - this.phoneLocationDetails = phoneLocationDetails; - return this; - } - - /** - * Get phoneLocationDetails - * @return phoneLocationDetails - **/ - @javax.annotation.Nullable - public Object getPhoneLocationDetails() { - return phoneLocationDetails; - } - - - public void setPhoneLocationDetails(Object phoneLocationDetails) { - this.phoneLocationDetails = phoneLocationDetails; - } - - - public BusinessApplicationAllOfAttributes archived(Boolean archived) { - - this.archived = archived; - return this; - } - - /** - * Get archived - * @return archived - **/ - @javax.annotation.Nullable - public Boolean getArchived() { - return archived; - } - - - public void setArchived(Boolean archived) { - this.archived = archived; - } - - - public BusinessApplicationAllOfAttributes industry(Industry industry) { - - this.industry = industry; - return this; - } - - /** - * Get industry - * @return industry - **/ - @javax.annotation.Nullable - public Industry getIndustry() { - return industry; - } - - - public void setIndustry(Industry industry) { - this.industry = industry; - } - - - public BusinessApplicationAllOfAttributes annualRevenue(BusinessAnnualRevenue annualRevenue) { - - this.annualRevenue = annualRevenue; - return this; - } - - /** - * Get annualRevenue - * @return annualRevenue - **/ - @javax.annotation.Nullable - public BusinessAnnualRevenue getAnnualRevenue() { - return annualRevenue; - } - - - public void setAnnualRevenue(BusinessAnnualRevenue annualRevenue) { - this.annualRevenue = annualRevenue; - } - - - public BusinessApplicationAllOfAttributes numberOfEmployees(BusinessNumberOfEmployees numberOfEmployees) { - - this.numberOfEmployees = numberOfEmployees; - return this; - } - - /** - * Get numberOfEmployees - * @return numberOfEmployees - **/ - @javax.annotation.Nullable - public BusinessNumberOfEmployees getNumberOfEmployees() { - return numberOfEmployees; - } - - - public void setNumberOfEmployees(BusinessNumberOfEmployees numberOfEmployees) { - this.numberOfEmployees = numberOfEmployees; - } - - - public BusinessApplicationAllOfAttributes cashFlow(CashFlow cashFlow) { - - this.cashFlow = cashFlow; - return this; - } - - /** - * Get cashFlow - * @return cashFlow - **/ - @javax.annotation.Nullable - public CashFlow getCashFlow() { - return cashFlow; - } - - - public void setCashFlow(CashFlow cashFlow) { - this.cashFlow = cashFlow; - } - - - public BusinessApplicationAllOfAttributes yearOfIncorporation(String yearOfIncorporation) { - - this.yearOfIncorporation = yearOfIncorporation; - return this; - } - - /** - * Get yearOfIncorporation - * @return yearOfIncorporation - **/ - @javax.annotation.Nullable - public String getYearOfIncorporation() { - return yearOfIncorporation; - } - - - public void setYearOfIncorporation(String yearOfIncorporation) { - this.yearOfIncorporation = yearOfIncorporation; - } - - - public BusinessApplicationAllOfAttributes countriesOfOperation(List countriesOfOperation) { - - this.countriesOfOperation = countriesOfOperation; - return this; - } - - public BusinessApplicationAllOfAttributes addCountriesOfOperationItem(String countriesOfOperationItem) { - if (this.countriesOfOperation == null) { - this.countriesOfOperation = new ArrayList<>(); - } - this.countriesOfOperation.add(countriesOfOperationItem); - return this; - } - - /** - * Get countriesOfOperation - * @return countriesOfOperation - **/ - @javax.annotation.Nullable - public List getCountriesOfOperation() { - return countriesOfOperation; - } - - - public void setCountriesOfOperation(List countriesOfOperation) { - this.countriesOfOperation = countriesOfOperation; - } - - - public BusinessApplicationAllOfAttributes stockSymbol(String stockSymbol) { - - this.stockSymbol = stockSymbol; - return this; - } - - /** - * Get stockSymbol - * @return stockSymbol - **/ - @javax.annotation.Nullable - public String getStockSymbol() { - return stockSymbol; - } - - - public void setStockSymbol(String stockSymbol) { - this.stockSymbol = stockSymbol; - } - - - public BusinessApplicationAllOfAttributes businessVertical(BusinessVertical businessVertical) { - - this.businessVertical = businessVertical; - return this; - } - - /** - * Get businessVertical - * @return businessVertical - **/ - @javax.annotation.Nullable - public BusinessVertical getBusinessVertical() { - return businessVertical; - } - - - public void setBusinessVertical(BusinessVertical businessVertical) { - this.businessVertical = businessVertical; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BusinessApplicationAllOfAttributes businessApplicationAllOfAttributes = (BusinessApplicationAllOfAttributes) o; - return Objects.equals(this.createdAt, businessApplicationAllOfAttributes.createdAt) && - Objects.equals(this.updatedAt, businessApplicationAllOfAttributes.updatedAt) && - Objects.equals(this.status, businessApplicationAllOfAttributes.status) && - Objects.equals(this.message, businessApplicationAllOfAttributes.message) && - Objects.equals(this.evaluationOutcome, businessApplicationAllOfAttributes.evaluationOutcome) && - Objects.equals(this.evaluationId, businessApplicationAllOfAttributes.evaluationId) && - Objects.equals(this.evaluationEntityId, businessApplicationAllOfAttributes.evaluationEntityId) && - Objects.equals(this.name, businessApplicationAllOfAttributes.name) && - Objects.equals(this.dba, businessApplicationAllOfAttributes.dba) && - Objects.equals(this.ein, businessApplicationAllOfAttributes.ein) && - Objects.equals(this.entityType, businessApplicationAllOfAttributes.entityType) && - Objects.equals(this.dateOfIncorporation, businessApplicationAllOfAttributes.dateOfIncorporation) && - Objects.equals(this.stateOfIncorporation, businessApplicationAllOfAttributes.stateOfIncorporation) && - Objects.equals(this.purpose, businessApplicationAllOfAttributes.purpose) && - Objects.equals(this.phone, businessApplicationAllOfAttributes.phone) && - Objects.equals(this.address, businessApplicationAllOfAttributes.address) && - Objects.equals(this.contact, businessApplicationAllOfAttributes.contact) && - Objects.equals(this.officer, businessApplicationAllOfAttributes.officer) && - Objects.equals(this.ip, businessApplicationAllOfAttributes.ip) && - Objects.equals(this.website, businessApplicationAllOfAttributes.website) && - Objects.equals(this.beneficialOwners, businessApplicationAllOfAttributes.beneficialOwners) && - Objects.equals(this.decisionMethod, businessApplicationAllOfAttributes.decisionMethod) && - Objects.equals(this.decisionUserId, businessApplicationAllOfAttributes.decisionUserId) && - Objects.equals(this.decisionReason, businessApplicationAllOfAttributes.decisionReason) && - Objects.equals(this.decisionDateTime, businessApplicationAllOfAttributes.decisionDateTime) && - Objects.equals(this.tags, businessApplicationAllOfAttributes.tags) && - Objects.equals(this.riskRate, businessApplicationAllOfAttributes.riskRate) && - Objects.equals(this.evaluationFlags, businessApplicationAllOfAttributes.evaluationFlags) && - Objects.equals(this.ipLocationDetails, businessApplicationAllOfAttributes.ipLocationDetails) && - Objects.equals(this.phoneLocationDetails, businessApplicationAllOfAttributes.phoneLocationDetails) && - Objects.equals(this.archived, businessApplicationAllOfAttributes.archived) && - Objects.equals(this.industry, businessApplicationAllOfAttributes.industry) && - Objects.equals(this.annualRevenue, businessApplicationAllOfAttributes.annualRevenue) && - Objects.equals(this.numberOfEmployees, businessApplicationAllOfAttributes.numberOfEmployees) && - Objects.equals(this.cashFlow, businessApplicationAllOfAttributes.cashFlow) && - Objects.equals(this.yearOfIncorporation, businessApplicationAllOfAttributes.yearOfIncorporation) && - Objects.equals(this.countriesOfOperation, businessApplicationAllOfAttributes.countriesOfOperation) && - Objects.equals(this.stockSymbol, businessApplicationAllOfAttributes.stockSymbol) && - Objects.equals(this.businessVertical, businessApplicationAllOfAttributes.businessVertical); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, updatedAt, status, message, evaluationOutcome, evaluationId, evaluationEntityId, name, dba, ein, entityType, dateOfIncorporation, stateOfIncorporation, purpose, phone, address, contact, officer, ip, website, beneficialOwners, decisionMethod, decisionUserId, decisionReason, decisionDateTime, tags, riskRate, evaluationFlags, ipLocationDetails, phoneLocationDetails, archived, industry, annualRevenue, numberOfEmployees, cashFlow, yearOfIncorporation, countriesOfOperation, stockSymbol, businessVertical); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BusinessApplicationAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" evaluationOutcome: ").append(toIndentedString(evaluationOutcome)).append("\n"); - sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); - sb.append(" evaluationEntityId: ").append(toIndentedString(evaluationEntityId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" dba: ").append(toIndentedString(dba)).append("\n"); - sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); - sb.append(" dateOfIncorporation: ").append(toIndentedString(dateOfIncorporation)).append("\n"); - sb.append(" stateOfIncorporation: ").append(toIndentedString(stateOfIncorporation)).append("\n"); - sb.append(" purpose: ").append(toIndentedString(purpose)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); - sb.append(" officer: ").append(toIndentedString(officer)).append("\n"); - sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); - sb.append(" website: ").append(toIndentedString(website)).append("\n"); - sb.append(" beneficialOwners: ").append(toIndentedString(beneficialOwners)).append("\n"); - sb.append(" decisionMethod: ").append(toIndentedString(decisionMethod)).append("\n"); - sb.append(" decisionUserId: ").append(toIndentedString(decisionUserId)).append("\n"); - sb.append(" decisionReason: ").append(toIndentedString(decisionReason)).append("\n"); - sb.append(" decisionDateTime: ").append(toIndentedString(decisionDateTime)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" riskRate: ").append(toIndentedString(riskRate)).append("\n"); - sb.append(" evaluationFlags: ").append(toIndentedString(evaluationFlags)).append("\n"); - sb.append(" ipLocationDetails: ").append(toIndentedString(ipLocationDetails)).append("\n"); - sb.append(" phoneLocationDetails: ").append(toIndentedString(phoneLocationDetails)).append("\n"); - sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); - sb.append(" industry: ").append(toIndentedString(industry)).append("\n"); - sb.append(" annualRevenue: ").append(toIndentedString(annualRevenue)).append("\n"); - sb.append(" numberOfEmployees: ").append(toIndentedString(numberOfEmployees)).append("\n"); - sb.append(" cashFlow: ").append(toIndentedString(cashFlow)).append("\n"); - sb.append(" yearOfIncorporation: ").append(toIndentedString(yearOfIncorporation)).append("\n"); - sb.append(" countriesOfOperation: ").append(toIndentedString(countriesOfOperation)).append("\n"); - sb.append(" stockSymbol: ").append(toIndentedString(stockSymbol)).append("\n"); - sb.append(" businessVertical: ").append(toIndentedString(businessVertical)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("status"); - openapiFields.add("message"); - openapiFields.add("evaluationOutcome"); - openapiFields.add("evaluationId"); - openapiFields.add("evaluationEntityId"); - openapiFields.add("name"); - openapiFields.add("dba"); - openapiFields.add("ein"); - openapiFields.add("entityType"); - openapiFields.add("dateOfIncorporation"); - openapiFields.add("stateOfIncorporation"); - openapiFields.add("purpose"); - openapiFields.add("phone"); - openapiFields.add("address"); - openapiFields.add("contact"); - openapiFields.add("officer"); - openapiFields.add("ip"); - openapiFields.add("website"); - openapiFields.add("beneficialOwners"); - openapiFields.add("decisionMethod"); - openapiFields.add("decisionUserId"); - openapiFields.add("decisionReason"); - openapiFields.add("decisionDateTime"); - openapiFields.add("tags"); - openapiFields.add("riskRate"); - openapiFields.add("evaluationFlags"); - openapiFields.add("ipLocationDetails"); - openapiFields.add("phoneLocationDetails"); - openapiFields.add("archived"); - openapiFields.add("industry"); - openapiFields.add("annualRevenue"); - openapiFields.add("numberOfEmployees"); - openapiFields.add("cashFlow"); - openapiFields.add("yearOfIncorporation"); - openapiFields.add("countriesOfOperation"); - openapiFields.add("stockSymbol"); - openapiFields.add("businessVertical"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("entityType"); - openapiRequiredFields.add("stateOfIncorporation"); - openapiRequiredFields.add("contact"); - openapiRequiredFields.add("officer"); - openapiRequiredFields.add("beneficialOwners"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BusinessApplicationAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BusinessApplicationAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BusinessApplicationAllOfAttributes is not found in the empty JSON string", BusinessApplicationAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BusinessApplicationAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BusinessApplicationAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BusinessApplicationAllOfAttributes.openapiRequiredFields) { - 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") != null && !jsonObj.get("message").isJsonNull()) && !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())); - } - if ((jsonObj.get("evaluationOutcome") != null && !jsonObj.get("evaluationOutcome").isJsonNull()) && !jsonObj.get("evaluationOutcome").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationOutcome` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationOutcome").toString())); - } - if ((jsonObj.get("evaluationId") != null && !jsonObj.get("evaluationId").isJsonNull()) && !jsonObj.get("evaluationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationId").toString())); - } - if ((jsonObj.get("evaluationEntityId") != null && !jsonObj.get("evaluationEntityId").isJsonNull()) && !jsonObj.get("evaluationEntityId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationEntityId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationEntityId").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("dba") != null && !jsonObj.get("dba").isJsonNull()) && !jsonObj.get("dba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dba").toString())); - } - if ((jsonObj.get("ein") != null && !jsonObj.get("ein").isJsonNull()) && !jsonObj.get("ein").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ein` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ein").toString())); - } - if (!jsonObj.get("stateOfIncorporation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `stateOfIncorporation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stateOfIncorporation").toString())); - } - if ((jsonObj.get("purpose") != null && !jsonObj.get("purpose").isJsonNull()) && !jsonObj.get("purpose").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `purpose` to be a primitive type in the JSON string but got `%s`", jsonObj.get("purpose").toString())); - } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); - } - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("address")); - } - // validate the required field `contact` - Contact.validateJsonElement(jsonObj.get("contact")); - // validate the required field `officer` - Officer.validateJsonElement(jsonObj.get("officer")); - if ((jsonObj.get("ip") != null && !jsonObj.get("ip").isJsonNull()) && !jsonObj.get("ip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip").toString())); - } - if ((jsonObj.get("website") != null && !jsonObj.get("website").isJsonNull()) && !jsonObj.get("website").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `website` to be a primitive type in the JSON string but got `%s`", jsonObj.get("website").toString())); - } - // ensure the json data is an array - if (!jsonObj.get("beneficialOwners").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `beneficialOwners` to be an array in the JSON string but got `%s`", jsonObj.get("beneficialOwners").toString())); - } - - JsonArray jsonArraybeneficialOwners = jsonObj.getAsJsonArray("beneficialOwners"); - // validate the required field `beneficialOwners` (array) - for (int i = 0; i < jsonArraybeneficialOwners.size(); i++) { - BeneficialOwner.validateJsonElement(jsonArraybeneficialOwners.get(i)); - }; - if ((jsonObj.get("decisionMethod") != null && !jsonObj.get("decisionMethod").isJsonNull()) && !jsonObj.get("decisionMethod").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `decisionMethod` to be a primitive type in the JSON string but got `%s`", jsonObj.get("decisionMethod").toString())); - } - if ((jsonObj.get("decisionUserId") != null && !jsonObj.get("decisionUserId").isJsonNull()) && !jsonObj.get("decisionUserId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `decisionUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("decisionUserId").toString())); - } - if ((jsonObj.get("decisionReason") != null && !jsonObj.get("decisionReason").isJsonNull()) && !jsonObj.get("decisionReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `decisionReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("decisionReason").toString())); - } - if ((jsonObj.get("riskRate") != null && !jsonObj.get("riskRate").isJsonNull()) && !jsonObj.get("riskRate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `riskRate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("riskRate").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("evaluationFlags") != null && !jsonObj.get("evaluationFlags").isJsonNull() && !jsonObj.get("evaluationFlags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationFlags` to be an array in the JSON string but got `%s`", jsonObj.get("evaluationFlags").toString())); - } - if ((jsonObj.get("yearOfIncorporation") != null && !jsonObj.get("yearOfIncorporation").isJsonNull()) && !jsonObj.get("yearOfIncorporation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `yearOfIncorporation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("yearOfIncorporation").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("countriesOfOperation") != null && !jsonObj.get("countriesOfOperation").isJsonNull() && !jsonObj.get("countriesOfOperation").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `countriesOfOperation` to be an array in the JSON string but got `%s`", jsonObj.get("countriesOfOperation").toString())); - } - if ((jsonObj.get("stockSymbol") != null && !jsonObj.get("stockSymbol").isJsonNull()) && !jsonObj.get("stockSymbol").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `stockSymbol` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stockSymbol").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BusinessApplicationAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BusinessApplicationAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BusinessApplicationAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BusinessApplicationAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BusinessApplicationAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BusinessApplicationAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of BusinessApplicationAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to BusinessApplicationAllOfAttributes - */ - public static BusinessApplicationAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BusinessApplicationAllOfAttributes.class); - } - - /** - * Convert an instance of BusinessApplicationAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BusinessCreditCard.java b/src/main/java/org/openapitools/client/model/BusinessCreditCard.java deleted file mode 100644 index 1453e530..00000000 --- a/src/main/java/org/openapitools/client/model/BusinessCreditCard.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.BusinessDebitCardAllOfAttributes; -import org.openapitools.client.model.Card; -import org.openapitools.client.model.CardRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BusinessCreditCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BusinessCreditCard extends Card { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private BusinessDebitCardAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CardRelationships relationships; - - public BusinessCreditCard() { - this.type = this.getClass().getSimpleName(); - } - - public BusinessCreditCard attributes(BusinessDebitCardAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public BusinessDebitCardAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(BusinessDebitCardAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public BusinessCreditCard relationships(CardRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CardRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CardRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BusinessCreditCard businessCreditCard = (BusinessCreditCard) o; - return Objects.equals(this.attributes, businessCreditCard.attributes) && - Objects.equals(this.relationships, businessCreditCard.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BusinessCreditCard {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BusinessCreditCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BusinessCreditCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BusinessCreditCard is not found in the empty JSON string", BusinessCreditCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BusinessCreditCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BusinessCreditCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BusinessCreditCard.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BusinessCreditCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BusinessCreditCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BusinessCreditCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BusinessCreditCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BusinessCreditCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BusinessCreditCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of BusinessCreditCard - * @throws IOException if the JSON string is invalid with respect to BusinessCreditCard - */ - public static BusinessCreditCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BusinessCreditCard.class); - } - - /** - * Convert an instance of BusinessCreditCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BusinessCustomer.java b/src/main/java/org/openapitools/client/model/BusinessCustomer.java deleted file mode 100644 index fb6fa732..00000000 --- a/src/main/java/org/openapitools/client/model/BusinessCustomer.java +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.BusinessCustomerAllOfAttributes; -import org.openapitools.client.model.Customer; -import org.openapitools.client.model.CustomerRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BusinessCustomer - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BusinessCustomer extends Customer { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private BusinessCustomerAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CustomerRelationships relationships; - - public BusinessCustomer() { - this.type = this.getClass().getSimpleName(); - } - - public BusinessCustomer attributes(BusinessCustomerAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public BusinessCustomerAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(BusinessCustomerAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public BusinessCustomer relationships(CustomerRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public CustomerRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CustomerRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BusinessCustomer businessCustomer = (BusinessCustomer) o; - return Objects.equals(this.attributes, businessCustomer.attributes) && - Objects.equals(this.relationships, businessCustomer.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BusinessCustomer {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BusinessCustomer - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BusinessCustomer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BusinessCustomer is not found in the empty JSON string", BusinessCustomer.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BusinessCustomer.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BusinessCustomer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BusinessCustomer.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BusinessCustomer' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BusinessCustomer.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BusinessCustomer value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BusinessCustomer read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BusinessCustomer given an JSON string - * - * @param jsonString JSON string - * @return An instance of BusinessCustomer - * @throws IOException if the JSON string is invalid with respect to BusinessCustomer - */ - public static BusinessCustomer fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BusinessCustomer.class); - } - - /** - * Convert an instance of BusinessCustomer to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BusinessCustomerAllOfAttributes.java b/src/main/java/org/openapitools/client/model/BusinessCustomerAllOfAttributes.java deleted file mode 100644 index 04a5e08e..00000000 --- a/src/main/java/org/openapitools/client/model/BusinessCustomerAllOfAttributes.java +++ /dev/null @@ -1,857 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.AuthorizedUser; -import org.openapitools.client.model.Contact; -import org.openapitools.client.model.EntityType; -import org.openapitools.client.model.Phone; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BusinessCustomerAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BusinessCustomerAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_DBA = "dba"; - @SerializedName(SERIALIZED_NAME_DBA) - private String dba; - - public static final String SERIALIZED_NAME_EIN = "ein"; - @SerializedName(SERIALIZED_NAME_EIN) - private String ein; - - public static final String SERIALIZED_NAME_ENTITY_TYPE = "entityType"; - @SerializedName(SERIALIZED_NAME_ENTITY_TYPE) - private EntityType entityType; - - public static final String SERIALIZED_NAME_DATE_OF_INCORPORATION = "dateOfIncorporation"; - @SerializedName(SERIALIZED_NAME_DATE_OF_INCORPORATION) - private LocalDate dateOfIncorporation; - - public static final String SERIALIZED_NAME_STATE_OF_INCORPORATION = "stateOfIncorporation"; - @SerializedName(SERIALIZED_NAME_STATE_OF_INCORPORATION) - private String stateOfIncorporation; - - public static final String SERIALIZED_NAME_PURPOSE = "purpose"; - @SerializedName(SERIALIZED_NAME_PURPOSE) - private String purpose; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_CONTACT = "contact"; - @SerializedName(SERIALIZED_NAME_CONTACT) - private Contact contact; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - /** - * Gets or Sets riskRate - */ - @JsonAdapter(RiskRateEnum.Adapter.class) - public enum RiskRateEnum { - LOW("low"), - - MEDIUM("medium"), - - HIGH("high"); - - private String value; - - RiskRateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static RiskRateEnum fromValue(String value) { - for (RiskRateEnum b : RiskRateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final RiskRateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public RiskRateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return RiskRateEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_RISK_RATE = "riskRate"; - @SerializedName(SERIALIZED_NAME_RISK_RATE) - private RiskRateEnum riskRate; - - public static final String SERIALIZED_NAME_AUTHORIZED_USERS = "authorizedUsers"; - @SerializedName(SERIALIZED_NAME_AUTHORIZED_USERS) - private List authorizedUsers; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - ACTIVE("Active"), - - ARCHIVED("Archived"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - /** - * Gets or Sets archiveReason - */ - @JsonAdapter(ArchiveReasonEnum.Adapter.class) - public enum ArchiveReasonEnum { - INACTIVE("Inactive"), - - FRAUDACHACTIVITY("FraudACHActivity"), - - FRAUDCARDACTIVITY("FraudCardActivity"), - - FRAUDCHECKACTIVITY("FraudCheckActivity"), - - FRAUDAPPLICATIONHISTORY("FraudApplicationHistory"), - - FRAUDACCOUNTACTIVITY("FraudAccountActivity"), - - FRAUDCLIENTIDENTIFIED("FraudClientIdentified"), - - FRAUDLINKEDTOFRAUDULENTCUSTOMER("FraudLinkedToFraudulentCustomer"); - - private String value; - - ArchiveReasonEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ArchiveReasonEnum fromValue(String value) { - for (ArchiveReasonEnum b : ArchiveReasonEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ArchiveReasonEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ArchiveReasonEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ArchiveReasonEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_ARCHIVE_REASON = "archiveReason"; - @SerializedName(SERIALIZED_NAME_ARCHIVE_REASON) - private ArchiveReasonEnum archiveReason; - - public BusinessCustomerAllOfAttributes() { - } - - public BusinessCustomerAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public BusinessCustomerAllOfAttributes name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public BusinessCustomerAllOfAttributes dba(String dba) { - - this.dba = dba; - return this; - } - - /** - * Get dba - * @return dba - **/ - @javax.annotation.Nullable - public String getDba() { - return dba; - } - - - public void setDba(String dba) { - this.dba = dba; - } - - - public BusinessCustomerAllOfAttributes ein(String ein) { - - this.ein = ein; - return this; - } - - /** - * Get ein - * @return ein - **/ - @javax.annotation.Nullable - public String getEin() { - return ein; - } - - - public void setEin(String ein) { - this.ein = ein; - } - - - public BusinessCustomerAllOfAttributes entityType(EntityType entityType) { - - this.entityType = entityType; - return this; - } - - /** - * Get entityType - * @return entityType - **/ - @javax.annotation.Nonnull - public EntityType getEntityType() { - return entityType; - } - - - public void setEntityType(EntityType entityType) { - this.entityType = entityType; - } - - - public BusinessCustomerAllOfAttributes dateOfIncorporation(LocalDate dateOfIncorporation) { - - this.dateOfIncorporation = dateOfIncorporation; - return this; - } - - /** - * Get dateOfIncorporation - * @return dateOfIncorporation - **/ - @javax.annotation.Nullable - public LocalDate getDateOfIncorporation() { - return dateOfIncorporation; - } - - - public void setDateOfIncorporation(LocalDate dateOfIncorporation) { - this.dateOfIncorporation = dateOfIncorporation; - } - - - public BusinessCustomerAllOfAttributes stateOfIncorporation(String stateOfIncorporation) { - - this.stateOfIncorporation = stateOfIncorporation; - return this; - } - - /** - * Get stateOfIncorporation - * @return stateOfIncorporation - **/ - @javax.annotation.Nonnull - public String getStateOfIncorporation() { - return stateOfIncorporation; - } - - - public void setStateOfIncorporation(String stateOfIncorporation) { - this.stateOfIncorporation = stateOfIncorporation; - } - - - public BusinessCustomerAllOfAttributes purpose(String purpose) { - - this.purpose = purpose; - return this; - } - - /** - * Get purpose - * @return purpose - **/ - @javax.annotation.Nullable - public String getPurpose() { - return purpose; - } - - - public void setPurpose(String purpose) { - this.purpose = purpose; - } - - - public BusinessCustomerAllOfAttributes phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public BusinessCustomerAllOfAttributes address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public BusinessCustomerAllOfAttributes contact(Contact contact) { - - this.contact = contact; - return this; - } - - /** - * Get contact - * @return contact - **/ - @javax.annotation.Nonnull - public Contact getContact() { - return contact; - } - - - public void setContact(Contact contact) { - this.contact = contact; - } - - - public BusinessCustomerAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public BusinessCustomerAllOfAttributes riskRate(RiskRateEnum riskRate) { - - this.riskRate = riskRate; - return this; - } - - /** - * Get riskRate - * @return riskRate - **/ - @javax.annotation.Nullable - public RiskRateEnum getRiskRate() { - return riskRate; - } - - - public void setRiskRate(RiskRateEnum riskRate) { - this.riskRate = riskRate; - } - - - public BusinessCustomerAllOfAttributes authorizedUsers(List authorizedUsers) { - - this.authorizedUsers = authorizedUsers; - return this; - } - - public BusinessCustomerAllOfAttributes addAuthorizedUsersItem(AuthorizedUser authorizedUsersItem) { - if (this.authorizedUsers == null) { - this.authorizedUsers = new ArrayList<>(); - } - this.authorizedUsers.add(authorizedUsersItem); - return this; - } - - /** - * Get authorizedUsers - * @return authorizedUsers - **/ - @javax.annotation.Nullable - public List getAuthorizedUsers() { - return authorizedUsers; - } - - - public void setAuthorizedUsers(List authorizedUsers) { - this.authorizedUsers = authorizedUsers; - } - - - public BusinessCustomerAllOfAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public BusinessCustomerAllOfAttributes archiveReason(ArchiveReasonEnum archiveReason) { - - this.archiveReason = archiveReason; - return this; - } - - /** - * Get archiveReason - * @return archiveReason - **/ - @javax.annotation.Nullable - public ArchiveReasonEnum getArchiveReason() { - return archiveReason; - } - - - public void setArchiveReason(ArchiveReasonEnum archiveReason) { - this.archiveReason = archiveReason; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BusinessCustomerAllOfAttributes businessCustomerAllOfAttributes = (BusinessCustomerAllOfAttributes) o; - return Objects.equals(this.createdAt, businessCustomerAllOfAttributes.createdAt) && - Objects.equals(this.name, businessCustomerAllOfAttributes.name) && - Objects.equals(this.dba, businessCustomerAllOfAttributes.dba) && - Objects.equals(this.ein, businessCustomerAllOfAttributes.ein) && - Objects.equals(this.entityType, businessCustomerAllOfAttributes.entityType) && - Objects.equals(this.dateOfIncorporation, businessCustomerAllOfAttributes.dateOfIncorporation) && - Objects.equals(this.stateOfIncorporation, businessCustomerAllOfAttributes.stateOfIncorporation) && - Objects.equals(this.purpose, businessCustomerAllOfAttributes.purpose) && - Objects.equals(this.phone, businessCustomerAllOfAttributes.phone) && - Objects.equals(this.address, businessCustomerAllOfAttributes.address) && - Objects.equals(this.contact, businessCustomerAllOfAttributes.contact) && - Objects.equals(this.tags, businessCustomerAllOfAttributes.tags) && - Objects.equals(this.riskRate, businessCustomerAllOfAttributes.riskRate) && - Objects.equals(this.authorizedUsers, businessCustomerAllOfAttributes.authorizedUsers) && - Objects.equals(this.status, businessCustomerAllOfAttributes.status) && - Objects.equals(this.archiveReason, businessCustomerAllOfAttributes.archiveReason); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, name, dba, ein, entityType, dateOfIncorporation, stateOfIncorporation, purpose, phone, address, contact, tags, riskRate, authorizedUsers, status, archiveReason); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BusinessCustomerAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" dba: ").append(toIndentedString(dba)).append("\n"); - sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); - sb.append(" dateOfIncorporation: ").append(toIndentedString(dateOfIncorporation)).append("\n"); - sb.append(" stateOfIncorporation: ").append(toIndentedString(stateOfIncorporation)).append("\n"); - sb.append(" purpose: ").append(toIndentedString(purpose)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" riskRate: ").append(toIndentedString(riskRate)).append("\n"); - sb.append(" authorizedUsers: ").append(toIndentedString(authorizedUsers)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" archiveReason: ").append(toIndentedString(archiveReason)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("name"); - openapiFields.add("dba"); - openapiFields.add("ein"); - openapiFields.add("entityType"); - openapiFields.add("dateOfIncorporation"); - openapiFields.add("stateOfIncorporation"); - openapiFields.add("purpose"); - openapiFields.add("phone"); - openapiFields.add("address"); - openapiFields.add("contact"); - openapiFields.add("tags"); - openapiFields.add("riskRate"); - openapiFields.add("authorizedUsers"); - openapiFields.add("status"); - openapiFields.add("archiveReason"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("entityType"); - openapiRequiredFields.add("stateOfIncorporation"); - openapiRequiredFields.add("contact"); - openapiRequiredFields.add("status"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BusinessCustomerAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BusinessCustomerAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BusinessCustomerAllOfAttributes is not found in the empty JSON string", BusinessCustomerAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BusinessCustomerAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BusinessCustomerAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BusinessCustomerAllOfAttributes.openapiRequiredFields) { - 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("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("dba") != null && !jsonObj.get("dba").isJsonNull()) && !jsonObj.get("dba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dba").toString())); - } - if ((jsonObj.get("ein") != null && !jsonObj.get("ein").isJsonNull()) && !jsonObj.get("ein").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ein` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ein").toString())); - } - if (!jsonObj.get("stateOfIncorporation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `stateOfIncorporation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stateOfIncorporation").toString())); - } - if ((jsonObj.get("purpose") != null && !jsonObj.get("purpose").isJsonNull()) && !jsonObj.get("purpose").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `purpose` to be a primitive type in the JSON string but got `%s`", jsonObj.get("purpose").toString())); - } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); - } - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("address")); - } - // validate the required field `contact` - Contact.validateJsonElement(jsonObj.get("contact")); - if ((jsonObj.get("riskRate") != null && !jsonObj.get("riskRate").isJsonNull()) && !jsonObj.get("riskRate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `riskRate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("riskRate").toString())); - } - if (jsonObj.get("authorizedUsers") != null && !jsonObj.get("authorizedUsers").isJsonNull()) { - JsonArray jsonArrayauthorizedUsers = jsonObj.getAsJsonArray("authorizedUsers"); - if (jsonArrayauthorizedUsers != null) { - // ensure the json data is an array - if (!jsonObj.get("authorizedUsers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `authorizedUsers` to be an array in the JSON string but got `%s`", jsonObj.get("authorizedUsers").toString())); - } - - // validate the optional field `authorizedUsers` (array) - for (int i = 0; i < jsonArrayauthorizedUsers.size(); i++) { - AuthorizedUser.validateJsonElement(jsonArrayauthorizedUsers.get(i)); - }; - } - } - if (!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())); - } - if ((jsonObj.get("archiveReason") != null && !jsonObj.get("archiveReason").isJsonNull()) && !jsonObj.get("archiveReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `archiveReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("archiveReason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BusinessCustomerAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BusinessCustomerAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BusinessCustomerAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BusinessCustomerAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BusinessCustomerAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BusinessCustomerAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of BusinessCustomerAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to BusinessCustomerAllOfAttributes - */ - public static BusinessCustomerAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BusinessCustomerAllOfAttributes.class); - } - - /** - * Convert an instance of BusinessCustomerAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BusinessDebitCard.java b/src/main/java/org/openapitools/client/model/BusinessDebitCard.java deleted file mode 100644 index 2fb23dc2..00000000 --- a/src/main/java/org/openapitools/client/model/BusinessDebitCard.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.BusinessDebitCardAllOfAttributes; -import org.openapitools.client.model.Card; -import org.openapitools.client.model.CardRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BusinessDebitCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BusinessDebitCard extends Card { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private BusinessDebitCardAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CardRelationships relationships; - - public BusinessDebitCard() { - this.type = this.getClass().getSimpleName(); - } - - public BusinessDebitCard attributes(BusinessDebitCardAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public BusinessDebitCardAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(BusinessDebitCardAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public BusinessDebitCard relationships(CardRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CardRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CardRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BusinessDebitCard businessDebitCard = (BusinessDebitCard) o; - return Objects.equals(this.attributes, businessDebitCard.attributes) && - Objects.equals(this.relationships, businessDebitCard.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BusinessDebitCard {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BusinessDebitCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BusinessDebitCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BusinessDebitCard is not found in the empty JSON string", BusinessDebitCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BusinessDebitCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BusinessDebitCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BusinessDebitCard.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BusinessDebitCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BusinessDebitCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BusinessDebitCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BusinessDebitCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BusinessDebitCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BusinessDebitCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of BusinessDebitCard - * @throws IOException if the JSON string is invalid with respect to BusinessDebitCard - */ - public static BusinessDebitCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BusinessDebitCard.class); - } - - /** - * Convert an instance of BusinessDebitCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BusinessDebitCardAllOfAttributes.java b/src/main/java/org/openapitools/client/model/BusinessDebitCardAllOfAttributes.java deleted file mode 100644 index 377a9982..00000000 --- a/src/main/java/org/openapitools/client/model/BusinessDebitCardAllOfAttributes.java +++ /dev/null @@ -1,739 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Phone; -import org.openapitools.client.model.PhysicalCardStatus; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BusinessDebitCardAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BusinessDebitCardAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_LAST4_DIGITS = "last4Digits"; - @SerializedName(SERIALIZED_NAME_LAST4_DIGITS) - private String last4Digits; - - public static final String SERIALIZED_NAME_EXPIRATION_DATE = "expirationDate"; - @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE) - private String expirationDate; - - public static final String SERIALIZED_NAME_SHIPPING_ADDRESS = "shippingAddress"; - @SerializedName(SERIALIZED_NAME_SHIPPING_ADDRESS) - private Address shippingAddress; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_BIN = "bin"; - @SerializedName(SERIALIZED_NAME_BIN) - private String bin; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private PhysicalCardStatus status; - - public static final String SERIALIZED_NAME_DESIGN = "design"; - @SerializedName(SERIALIZED_NAME_DESIGN) - private String design; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_FREEZE_REASON = "freezeReason"; - @SerializedName(SERIALIZED_NAME_FREEZE_REASON) - private String freezeReason; - - public BusinessDebitCardAllOfAttributes() { - } - - public BusinessDebitCardAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public BusinessDebitCardAllOfAttributes updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public BusinessDebitCardAllOfAttributes last4Digits(String last4Digits) { - - this.last4Digits = last4Digits; - return this; - } - - /** - * Get last4Digits - * @return last4Digits - **/ - @javax.annotation.Nonnull - public String getLast4Digits() { - return last4Digits; - } - - - public void setLast4Digits(String last4Digits) { - this.last4Digits = last4Digits; - } - - - public BusinessDebitCardAllOfAttributes expirationDate(String expirationDate) { - - this.expirationDate = expirationDate; - return this; - } - - /** - * Get expirationDate - * @return expirationDate - **/ - @javax.annotation.Nonnull - public String getExpirationDate() { - return expirationDate; - } - - - public void setExpirationDate(String expirationDate) { - this.expirationDate = expirationDate; - } - - - public BusinessDebitCardAllOfAttributes shippingAddress(Address shippingAddress) { - - this.shippingAddress = shippingAddress; - return this; - } - - /** - * Get shippingAddress - * @return shippingAddress - **/ - @javax.annotation.Nullable - public Address getShippingAddress() { - return shippingAddress; - } - - - public void setShippingAddress(Address shippingAddress) { - this.shippingAddress = shippingAddress; - } - - - public BusinessDebitCardAllOfAttributes address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nonnull - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public BusinessDebitCardAllOfAttributes fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nonnull - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public BusinessDebitCardAllOfAttributes phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nonnull - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public BusinessDebitCardAllOfAttributes email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nonnull - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public BusinessDebitCardAllOfAttributes dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nonnull - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public BusinessDebitCardAllOfAttributes nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public BusinessDebitCardAllOfAttributes ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public BusinessDebitCardAllOfAttributes passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public BusinessDebitCardAllOfAttributes bin(String bin) { - - this.bin = bin; - return this; - } - - /** - * Get bin - * @return bin - **/ - @javax.annotation.Nullable - public String getBin() { - return bin; - } - - - public void setBin(String bin) { - this.bin = bin; - } - - - public BusinessDebitCardAllOfAttributes status(PhysicalCardStatus status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public PhysicalCardStatus getStatus() { - return status; - } - - - public void setStatus(PhysicalCardStatus status) { - this.status = status; - } - - - public BusinessDebitCardAllOfAttributes design(String design) { - - this.design = design; - return this; - } - - /** - * Get design - * @return design - **/ - @javax.annotation.Nullable - public String getDesign() { - return design; - } - - - public void setDesign(String design) { - this.design = design; - } - - - public BusinessDebitCardAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public BusinessDebitCardAllOfAttributes freezeReason(String freezeReason) { - - this.freezeReason = freezeReason; - return this; - } - - /** - * Get freezeReason - * @return freezeReason - **/ - @javax.annotation.Nullable - public String getFreezeReason() { - return freezeReason; - } - - - public void setFreezeReason(String freezeReason) { - this.freezeReason = freezeReason; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BusinessDebitCardAllOfAttributes businessDebitCardAllOfAttributes = (BusinessDebitCardAllOfAttributes) o; - return Objects.equals(this.createdAt, businessDebitCardAllOfAttributes.createdAt) && - Objects.equals(this.updatedAt, businessDebitCardAllOfAttributes.updatedAt) && - Objects.equals(this.last4Digits, businessDebitCardAllOfAttributes.last4Digits) && - Objects.equals(this.expirationDate, businessDebitCardAllOfAttributes.expirationDate) && - Objects.equals(this.shippingAddress, businessDebitCardAllOfAttributes.shippingAddress) && - Objects.equals(this.address, businessDebitCardAllOfAttributes.address) && - Objects.equals(this.fullName, businessDebitCardAllOfAttributes.fullName) && - Objects.equals(this.phone, businessDebitCardAllOfAttributes.phone) && - Objects.equals(this.email, businessDebitCardAllOfAttributes.email) && - Objects.equals(this.dateOfBirth, businessDebitCardAllOfAttributes.dateOfBirth) && - Objects.equals(this.nationality, businessDebitCardAllOfAttributes.nationality) && - Objects.equals(this.ssn, businessDebitCardAllOfAttributes.ssn) && - Objects.equals(this.passport, businessDebitCardAllOfAttributes.passport) && - Objects.equals(this.bin, businessDebitCardAllOfAttributes.bin) && - Objects.equals(this.status, businessDebitCardAllOfAttributes.status) && - Objects.equals(this.design, businessDebitCardAllOfAttributes.design) && - Objects.equals(this.tags, businessDebitCardAllOfAttributes.tags) && - Objects.equals(this.freezeReason, businessDebitCardAllOfAttributes.freezeReason); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, updatedAt, last4Digits, expirationDate, shippingAddress, address, fullName, phone, email, dateOfBirth, nationality, ssn, passport, bin, status, design, tags, freezeReason); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BusinessDebitCardAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" last4Digits: ").append(toIndentedString(last4Digits)).append("\n"); - sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); - sb.append(" shippingAddress: ").append(toIndentedString(shippingAddress)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" bin: ").append(toIndentedString(bin)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" design: ").append(toIndentedString(design)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" freezeReason: ").append(toIndentedString(freezeReason)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("last4Digits"); - openapiFields.add("expirationDate"); - openapiFields.add("shippingAddress"); - openapiFields.add("address"); - openapiFields.add("fullName"); - openapiFields.add("phone"); - openapiFields.add("email"); - openapiFields.add("dateOfBirth"); - openapiFields.add("nationality"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("bin"); - openapiFields.add("status"); - openapiFields.add("design"); - openapiFields.add("tags"); - openapiFields.add("freezeReason"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("last4Digits"); - openapiRequiredFields.add("expirationDate"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("fullName"); - openapiRequiredFields.add("phone"); - openapiRequiredFields.add("email"); - openapiRequiredFields.add("dateOfBirth"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BusinessDebitCardAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BusinessDebitCardAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BusinessDebitCardAllOfAttributes is not found in the empty JSON string", BusinessDebitCardAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BusinessDebitCardAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BusinessDebitCardAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BusinessDebitCardAllOfAttributes.openapiRequiredFields) { - 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("last4Digits").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last4Digits` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last4Digits").toString())); - } - if (!jsonObj.get("expirationDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `expirationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expirationDate").toString())); - } - // validate the optional field `shippingAddress` - if (jsonObj.get("shippingAddress") != null && !jsonObj.get("shippingAddress").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("shippingAddress")); - } - // validate the required field `address` - Address.validateJsonElement(jsonObj.get("address")); - // validate the required field `fullName` - FullName.validateJsonElement(jsonObj.get("fullName")); - // validate the required field `phone` - Phone.validateJsonElement(jsonObj.get("phone")); - if (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("bin") != null && !jsonObj.get("bin").isJsonNull()) && !jsonObj.get("bin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bin").toString())); - } - if ((jsonObj.get("design") != null && !jsonObj.get("design").isJsonNull()) && !jsonObj.get("design").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `design` to be a primitive type in the JSON string but got `%s`", jsonObj.get("design").toString())); - } - if ((jsonObj.get("freezeReason") != null && !jsonObj.get("freezeReason").isJsonNull()) && !jsonObj.get("freezeReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `freezeReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("freezeReason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BusinessDebitCardAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BusinessDebitCardAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BusinessDebitCardAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BusinessDebitCardAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BusinessDebitCardAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BusinessDebitCardAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of BusinessDebitCardAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to BusinessDebitCardAllOfAttributes - */ - public static BusinessDebitCardAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BusinessDebitCardAllOfAttributes.class); - } - - /** - * Convert an instance of BusinessDebitCardAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BusinessNumberOfEmployees.java b/src/main/java/org/openapitools/client/model/BusinessNumberOfEmployees.java deleted file mode 100644 index 40f96cbd..00000000 --- a/src/main/java/org/openapitools/client/model/BusinessNumberOfEmployees.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets businessNumberOfEmployees - */ -@JsonAdapter(BusinessNumberOfEmployees.Adapter.class) -public enum BusinessNumberOfEmployees { - - UPTO10("UpTo10"), - - BETWEEN10AND50("Between10And50"), - - BETWEEN50AND100("Between50And100"), - - BETWEEN100AND500("Between100And500"), - - OVER500("Over500"); - - private String value; - - BusinessNumberOfEmployees(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static BusinessNumberOfEmployees fromValue(String value) { - for (BusinessNumberOfEmployees b : BusinessNumberOfEmployees.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final BusinessNumberOfEmployees enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public BusinessNumberOfEmployees read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return BusinessNumberOfEmployees.fromValue(value); - } - } -} - diff --git a/src/main/java/org/openapitools/client/model/BusinessVirtualCreditCard.java b/src/main/java/org/openapitools/client/model/BusinessVirtualCreditCard.java deleted file mode 100644 index 07f98a57..00000000 --- a/src/main/java/org/openapitools/client/model/BusinessVirtualCreditCard.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.BusinessVirtualDebitCardAllOfAttributes; -import org.openapitools.client.model.Card; -import org.openapitools.client.model.CardRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BusinessVirtualCreditCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BusinessVirtualCreditCard extends Card { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private BusinessVirtualDebitCardAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CardRelationships relationships; - - public BusinessVirtualCreditCard() { - this.type = this.getClass().getSimpleName(); - } - - public BusinessVirtualCreditCard attributes(BusinessVirtualDebitCardAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public BusinessVirtualDebitCardAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(BusinessVirtualDebitCardAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public BusinessVirtualCreditCard relationships(CardRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CardRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CardRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BusinessVirtualCreditCard businessVirtualCreditCard = (BusinessVirtualCreditCard) o; - return Objects.equals(this.attributes, businessVirtualCreditCard.attributes) && - Objects.equals(this.relationships, businessVirtualCreditCard.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BusinessVirtualCreditCard {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BusinessVirtualCreditCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BusinessVirtualCreditCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BusinessVirtualCreditCard is not found in the empty JSON string", BusinessVirtualCreditCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BusinessVirtualCreditCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BusinessVirtualCreditCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BusinessVirtualCreditCard.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BusinessVirtualCreditCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BusinessVirtualCreditCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BusinessVirtualCreditCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BusinessVirtualCreditCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BusinessVirtualCreditCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BusinessVirtualCreditCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of BusinessVirtualCreditCard - * @throws IOException if the JSON string is invalid with respect to BusinessVirtualCreditCard - */ - public static BusinessVirtualCreditCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BusinessVirtualCreditCard.class); - } - - /** - * Convert an instance of BusinessVirtualCreditCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BusinessVirtualDebitCard.java b/src/main/java/org/openapitools/client/model/BusinessVirtualDebitCard.java deleted file mode 100644 index 1cc19491..00000000 --- a/src/main/java/org/openapitools/client/model/BusinessVirtualDebitCard.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.BusinessVirtualDebitCardAllOfAttributes; -import org.openapitools.client.model.Card; -import org.openapitools.client.model.CardRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BusinessVirtualDebitCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BusinessVirtualDebitCard extends Card { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private BusinessVirtualDebitCardAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CardRelationships relationships; - - public BusinessVirtualDebitCard() { - this.type = this.getClass().getSimpleName(); - } - - public BusinessVirtualDebitCard attributes(BusinessVirtualDebitCardAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public BusinessVirtualDebitCardAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(BusinessVirtualDebitCardAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public BusinessVirtualDebitCard relationships(CardRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CardRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CardRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BusinessVirtualDebitCard businessVirtualDebitCard = (BusinessVirtualDebitCard) o; - return Objects.equals(this.attributes, businessVirtualDebitCard.attributes) && - Objects.equals(this.relationships, businessVirtualDebitCard.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BusinessVirtualDebitCard {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BusinessVirtualDebitCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BusinessVirtualDebitCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BusinessVirtualDebitCard is not found in the empty JSON string", BusinessVirtualDebitCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BusinessVirtualDebitCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BusinessVirtualDebitCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BusinessVirtualDebitCard.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BusinessVirtualDebitCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BusinessVirtualDebitCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BusinessVirtualDebitCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BusinessVirtualDebitCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BusinessVirtualDebitCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BusinessVirtualDebitCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of BusinessVirtualDebitCard - * @throws IOException if the JSON string is invalid with respect to BusinessVirtualDebitCard - */ - public static BusinessVirtualDebitCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BusinessVirtualDebitCard.class); - } - - /** - * Convert an instance of BusinessVirtualDebitCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/BusinessVirtualDebitCardAllOfAttributes.java b/src/main/java/org/openapitools/client/model/BusinessVirtualDebitCardAllOfAttributes.java deleted file mode 100644 index 76760e19..00000000 --- a/src/main/java/org/openapitools/client/model/BusinessVirtualDebitCardAllOfAttributes.java +++ /dev/null @@ -1,676 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Phone; -import org.openapitools.client.model.VirtualCardStatus; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BusinessVirtualDebitCardAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BusinessVirtualDebitCardAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_LAST4_DIGITS = "last4Digits"; - @SerializedName(SERIALIZED_NAME_LAST4_DIGITS) - private String last4Digits; - - public static final String SERIALIZED_NAME_EXPIRATION_DATE = "expirationDate"; - @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE) - private String expirationDate; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_BIN = "bin"; - @SerializedName(SERIALIZED_NAME_BIN) - private String bin; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private VirtualCardStatus status; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_FREEZE_REASON = "freezeReason"; - @SerializedName(SERIALIZED_NAME_FREEZE_REASON) - private String freezeReason; - - public BusinessVirtualDebitCardAllOfAttributes() { - } - - public BusinessVirtualDebitCardAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public BusinessVirtualDebitCardAllOfAttributes updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public BusinessVirtualDebitCardAllOfAttributes last4Digits(String last4Digits) { - - this.last4Digits = last4Digits; - return this; - } - - /** - * Get last4Digits - * @return last4Digits - **/ - @javax.annotation.Nonnull - public String getLast4Digits() { - return last4Digits; - } - - - public void setLast4Digits(String last4Digits) { - this.last4Digits = last4Digits; - } - - - public BusinessVirtualDebitCardAllOfAttributes expirationDate(String expirationDate) { - - this.expirationDate = expirationDate; - return this; - } - - /** - * Get expirationDate - * @return expirationDate - **/ - @javax.annotation.Nonnull - public String getExpirationDate() { - return expirationDate; - } - - - public void setExpirationDate(String expirationDate) { - this.expirationDate = expirationDate; - } - - - public BusinessVirtualDebitCardAllOfAttributes address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nonnull - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public BusinessVirtualDebitCardAllOfAttributes fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nonnull - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public BusinessVirtualDebitCardAllOfAttributes phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nonnull - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public BusinessVirtualDebitCardAllOfAttributes email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nonnull - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public BusinessVirtualDebitCardAllOfAttributes dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nonnull - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public BusinessVirtualDebitCardAllOfAttributes nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public BusinessVirtualDebitCardAllOfAttributes ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public BusinessVirtualDebitCardAllOfAttributes passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public BusinessVirtualDebitCardAllOfAttributes bin(String bin) { - - this.bin = bin; - return this; - } - - /** - * Get bin - * @return bin - **/ - @javax.annotation.Nullable - public String getBin() { - return bin; - } - - - public void setBin(String bin) { - this.bin = bin; - } - - - public BusinessVirtualDebitCardAllOfAttributes status(VirtualCardStatus status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public VirtualCardStatus getStatus() { - return status; - } - - - public void setStatus(VirtualCardStatus status) { - this.status = status; - } - - - public BusinessVirtualDebitCardAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public BusinessVirtualDebitCardAllOfAttributes freezeReason(String freezeReason) { - - this.freezeReason = freezeReason; - return this; - } - - /** - * Get freezeReason - * @return freezeReason - **/ - @javax.annotation.Nullable - public String getFreezeReason() { - return freezeReason; - } - - - public void setFreezeReason(String freezeReason) { - this.freezeReason = freezeReason; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BusinessVirtualDebitCardAllOfAttributes businessVirtualDebitCardAllOfAttributes = (BusinessVirtualDebitCardAllOfAttributes) o; - return Objects.equals(this.createdAt, businessVirtualDebitCardAllOfAttributes.createdAt) && - Objects.equals(this.updatedAt, businessVirtualDebitCardAllOfAttributes.updatedAt) && - Objects.equals(this.last4Digits, businessVirtualDebitCardAllOfAttributes.last4Digits) && - Objects.equals(this.expirationDate, businessVirtualDebitCardAllOfAttributes.expirationDate) && - Objects.equals(this.address, businessVirtualDebitCardAllOfAttributes.address) && - Objects.equals(this.fullName, businessVirtualDebitCardAllOfAttributes.fullName) && - Objects.equals(this.phone, businessVirtualDebitCardAllOfAttributes.phone) && - Objects.equals(this.email, businessVirtualDebitCardAllOfAttributes.email) && - Objects.equals(this.dateOfBirth, businessVirtualDebitCardAllOfAttributes.dateOfBirth) && - Objects.equals(this.nationality, businessVirtualDebitCardAllOfAttributes.nationality) && - Objects.equals(this.ssn, businessVirtualDebitCardAllOfAttributes.ssn) && - Objects.equals(this.passport, businessVirtualDebitCardAllOfAttributes.passport) && - Objects.equals(this.bin, businessVirtualDebitCardAllOfAttributes.bin) && - Objects.equals(this.status, businessVirtualDebitCardAllOfAttributes.status) && - Objects.equals(this.tags, businessVirtualDebitCardAllOfAttributes.tags) && - Objects.equals(this.freezeReason, businessVirtualDebitCardAllOfAttributes.freezeReason); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, updatedAt, last4Digits, expirationDate, address, fullName, phone, email, dateOfBirth, nationality, ssn, passport, bin, status, tags, freezeReason); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BusinessVirtualDebitCardAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" last4Digits: ").append(toIndentedString(last4Digits)).append("\n"); - sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" bin: ").append(toIndentedString(bin)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" freezeReason: ").append(toIndentedString(freezeReason)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("last4Digits"); - openapiFields.add("expirationDate"); - openapiFields.add("address"); - openapiFields.add("fullName"); - openapiFields.add("phone"); - openapiFields.add("email"); - openapiFields.add("dateOfBirth"); - openapiFields.add("nationality"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("bin"); - openapiFields.add("status"); - openapiFields.add("tags"); - openapiFields.add("freezeReason"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("last4Digits"); - openapiRequiredFields.add("expirationDate"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("fullName"); - openapiRequiredFields.add("phone"); - openapiRequiredFields.add("email"); - openapiRequiredFields.add("dateOfBirth"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BusinessVirtualDebitCardAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BusinessVirtualDebitCardAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BusinessVirtualDebitCardAllOfAttributes is not found in the empty JSON string", BusinessVirtualDebitCardAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BusinessVirtualDebitCardAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BusinessVirtualDebitCardAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BusinessVirtualDebitCardAllOfAttributes.openapiRequiredFields) { - 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("last4Digits").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last4Digits` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last4Digits").toString())); - } - if (!jsonObj.get("expirationDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `expirationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expirationDate").toString())); - } - // validate the required field `address` - Address.validateJsonElement(jsonObj.get("address")); - // validate the required field `fullName` - FullName.validateJsonElement(jsonObj.get("fullName")); - // validate the required field `phone` - Phone.validateJsonElement(jsonObj.get("phone")); - if (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("bin") != null && !jsonObj.get("bin").isJsonNull()) && !jsonObj.get("bin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bin").toString())); - } - if ((jsonObj.get("freezeReason") != null && !jsonObj.get("freezeReason").isJsonNull()) && !jsonObj.get("freezeReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `freezeReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("freezeReason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BusinessVirtualDebitCardAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BusinessVirtualDebitCardAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BusinessVirtualDebitCardAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BusinessVirtualDebitCardAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BusinessVirtualDebitCardAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BusinessVirtualDebitCardAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of BusinessVirtualDebitCardAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to BusinessVirtualDebitCardAllOfAttributes - */ - public static BusinessVirtualDebitCardAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BusinessVirtualDebitCardAllOfAttributes.class); - } - - /** - * Convert an instance of BusinessVirtualDebitCardAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CancelApplicationRequest.java b/src/main/java/org/openapitools/client/model/CancelApplicationRequest.java deleted file mode 100644 index cb384bea..00000000 --- a/src/main/java/org/openapitools/client/model/CancelApplicationRequest.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CancelApplicationRequestData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CancelApplicationRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CancelApplicationRequest { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CancelApplicationRequestData data; - - public CancelApplicationRequest() { - } - - public CancelApplicationRequest data(CancelApplicationRequestData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CancelApplicationRequestData getData() { - return data; - } - - - public void setData(CancelApplicationRequestData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CancelApplicationRequest cancelApplicationRequest = (CancelApplicationRequest) o; - return Objects.equals(this.data, cancelApplicationRequest.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CancelApplicationRequest {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CancelApplicationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CancelApplicationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CancelApplicationRequest is not found in the empty JSON string", CancelApplicationRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CancelApplicationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CancelApplicationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CancelApplicationRequestData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CancelApplicationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CancelApplicationRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CancelApplicationRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CancelApplicationRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CancelApplicationRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CancelApplicationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CancelApplicationRequest - * @throws IOException if the JSON string is invalid with respect to CancelApplicationRequest - */ - public static CancelApplicationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CancelApplicationRequest.class); - } - - /** - * Convert an instance of CancelApplicationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CancelApplicationRequestData.java b/src/main/java/org/openapitools/client/model/CancelApplicationRequestData.java deleted file mode 100644 index 65368201..00000000 --- a/src/main/java/org/openapitools/client/model/CancelApplicationRequestData.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CancelApplicationRequestDataAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CancelApplicationRequestData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CancelApplicationRequestData { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - CANCELAPPLICATION("cancelApplication"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CancelApplicationRequestDataAttributes attributes; - - public CancelApplicationRequestData() { - } - - public CancelApplicationRequestData type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CancelApplicationRequestData attributes(CancelApplicationRequestDataAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public CancelApplicationRequestDataAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CancelApplicationRequestDataAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CancelApplicationRequestData cancelApplicationRequestData = (CancelApplicationRequestData) o; - return Objects.equals(this.type, cancelApplicationRequestData.type) && - Objects.equals(this.attributes, cancelApplicationRequestData.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CancelApplicationRequestData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CancelApplicationRequestData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CancelApplicationRequestData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CancelApplicationRequestData is not found in the empty JSON string", CancelApplicationRequestData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CancelApplicationRequestData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CancelApplicationRequestData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - CancelApplicationRequestDataAttributes.validateJsonElement(jsonObj.get("attributes")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CancelApplicationRequestData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CancelApplicationRequestData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CancelApplicationRequestData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CancelApplicationRequestData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CancelApplicationRequestData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CancelApplicationRequestData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CancelApplicationRequestData - * @throws IOException if the JSON string is invalid with respect to CancelApplicationRequestData - */ - public static CancelApplicationRequestData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CancelApplicationRequestData.class); - } - - /** - * Convert an instance of CancelApplicationRequestData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CancelApplicationRequestDataAttributes.java b/src/main/java/org/openapitools/client/model/CancelApplicationRequestDataAttributes.java deleted file mode 100644 index d5c74e72..00000000 --- a/src/main/java/org/openapitools/client/model/CancelApplicationRequestDataAttributes.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CancelApplicationRequestDataAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CancelApplicationRequestDataAttributes { - public static final String SERIALIZED_NAME_REASON = "reason"; - @SerializedName(SERIALIZED_NAME_REASON) - private String reason; - - public CancelApplicationRequestDataAttributes() { - } - - public CancelApplicationRequestDataAttributes reason(String reason) { - - this.reason = reason; - return this; - } - - /** - * Get reason - * @return reason - **/ - @javax.annotation.Nullable - public String getReason() { - return reason; - } - - - public void setReason(String reason) { - this.reason = reason; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CancelApplicationRequestDataAttributes cancelApplicationRequestDataAttributes = (CancelApplicationRequestDataAttributes) o; - return Objects.equals(this.reason, cancelApplicationRequestDataAttributes.reason); - } - - @Override - public int hashCode() { - return Objects.hash(reason); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CancelApplicationRequestDataAttributes {\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("reason"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CancelApplicationRequestDataAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CancelApplicationRequestDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CancelApplicationRequestDataAttributes is not found in the empty JSON string", CancelApplicationRequestDataAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CancelApplicationRequestDataAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CancelApplicationRequestDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CancelApplicationRequestDataAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CancelApplicationRequestDataAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CancelApplicationRequestDataAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CancelApplicationRequestDataAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CancelApplicationRequestDataAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CancelApplicationRequestDataAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CancelApplicationRequestDataAttributes - * @throws IOException if the JSON string is invalid with respect to CancelApplicationRequestDataAttributes - */ - public static CancelApplicationRequestDataAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CancelApplicationRequestDataAttributes.class); - } - - /** - * Convert an instance of CancelApplicationRequestDataAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Card.java b/src/main/java/org/openapitools/client/model/Card.java deleted file mode 100644 index c0a3858a..00000000 --- a/src/main/java/org/openapitools/client/model/Card.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Card - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Card { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - protected String type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public Card() { - this.type = this.getClass().getSimpleName(); - } - - public Card type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public Card id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Card card = (Card) o; - return Objects.equals(this.type, card.type) && - Objects.equals(this.id, card.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Card {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Card - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Card.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Card is not found in the empty JSON string", Card.openapiRequiredFields.toString())); - } - } - - String discriminatorValue = jsonElement.getAsJsonObject().get("type").getAsString(); - switch (discriminatorValue) { - case "businessCreditCard": - BusinessCreditCard.validateJsonElement(jsonElement); - break; - case "businessDebitCard": - BusinessDebitCard.validateJsonElement(jsonElement); - break; - case "businessVirtualCreditCard": - BusinessVirtualCreditCard.validateJsonElement(jsonElement); - break; - case "businessVirtualDebitCard": - BusinessVirtualDebitCard.validateJsonElement(jsonElement); - break; - case "individualDebitCard": - IndividualDebitCard.validateJsonElement(jsonElement); - break; - case "individualVirtualDebitCard": - IndividualVirtualDebitCard.validateJsonElement(jsonElement); - break; - default: - throw new IllegalArgumentException(String.format("The value of the `type` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); - } - } - - - /** - * Create an instance of Card given an JSON string - * - * @param jsonString JSON string - * @return An instance of Card - * @throws IOException if the JSON string is invalid with respect to Card - */ - public static Card fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Card.class); - } - - /** - * Convert an instance of Card to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CardLevelLimits.java b/src/main/java/org/openapitools/client/model/CardLevelLimits.java deleted file mode 100644 index 2608a992..00000000 --- a/src/main/java/org/openapitools/client/model/CardLevelLimits.java +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CardLevelLimits - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CardLevelLimits { - public static final String SERIALIZED_NAME_DAILY_WITHDRAWAL = "dailyWithdrawal"; - @SerializedName(SERIALIZED_NAME_DAILY_WITHDRAWAL) - private Integer dailyWithdrawal; - - public static final String SERIALIZED_NAME_DAILY_PURCHASE = "dailyPurchase"; - @SerializedName(SERIALIZED_NAME_DAILY_PURCHASE) - private Integer dailyPurchase; - - public static final String SERIALIZED_NAME_MONTHLY_WITHDRAWAL = "monthlyWithdrawal"; - @SerializedName(SERIALIZED_NAME_MONTHLY_WITHDRAWAL) - private Integer monthlyWithdrawal; - - public static final String SERIALIZED_NAME_MONTHLY_PURCHASE = "monthlyPurchase"; - @SerializedName(SERIALIZED_NAME_MONTHLY_PURCHASE) - private Integer monthlyPurchase; - - public CardLevelLimits() { - } - - public CardLevelLimits dailyWithdrawal(Integer dailyWithdrawal) { - - this.dailyWithdrawal = dailyWithdrawal; - return this; - } - - /** - * Get dailyWithdrawal - * @return dailyWithdrawal - **/ - @javax.annotation.Nullable - public Integer getDailyWithdrawal() { - return dailyWithdrawal; - } - - - public void setDailyWithdrawal(Integer dailyWithdrawal) { - this.dailyWithdrawal = dailyWithdrawal; - } - - - public CardLevelLimits dailyPurchase(Integer dailyPurchase) { - - this.dailyPurchase = dailyPurchase; - return this; - } - - /** - * Get dailyPurchase - * @return dailyPurchase - **/ - @javax.annotation.Nullable - public Integer getDailyPurchase() { - return dailyPurchase; - } - - - public void setDailyPurchase(Integer dailyPurchase) { - this.dailyPurchase = dailyPurchase; - } - - - public CardLevelLimits monthlyWithdrawal(Integer monthlyWithdrawal) { - - this.monthlyWithdrawal = monthlyWithdrawal; - return this; - } - - /** - * Get monthlyWithdrawal - * @return monthlyWithdrawal - **/ - @javax.annotation.Nullable - public Integer getMonthlyWithdrawal() { - return monthlyWithdrawal; - } - - - public void setMonthlyWithdrawal(Integer monthlyWithdrawal) { - this.monthlyWithdrawal = monthlyWithdrawal; - } - - - public CardLevelLimits monthlyPurchase(Integer monthlyPurchase) { - - this.monthlyPurchase = monthlyPurchase; - return this; - } - - /** - * Get monthlyPurchase - * @return monthlyPurchase - **/ - @javax.annotation.Nullable - public Integer getMonthlyPurchase() { - return monthlyPurchase; - } - - - public void setMonthlyPurchase(Integer monthlyPurchase) { - this.monthlyPurchase = monthlyPurchase; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CardLevelLimits cardLevelLimits = (CardLevelLimits) o; - return Objects.equals(this.dailyWithdrawal, cardLevelLimits.dailyWithdrawal) && - Objects.equals(this.dailyPurchase, cardLevelLimits.dailyPurchase) && - Objects.equals(this.monthlyWithdrawal, cardLevelLimits.monthlyWithdrawal) && - Objects.equals(this.monthlyPurchase, cardLevelLimits.monthlyPurchase); - } - - @Override - public int hashCode() { - return Objects.hash(dailyWithdrawal, dailyPurchase, monthlyWithdrawal, monthlyPurchase); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CardLevelLimits {\n"); - sb.append(" dailyWithdrawal: ").append(toIndentedString(dailyWithdrawal)).append("\n"); - sb.append(" dailyPurchase: ").append(toIndentedString(dailyPurchase)).append("\n"); - sb.append(" monthlyWithdrawal: ").append(toIndentedString(monthlyWithdrawal)).append("\n"); - sb.append(" monthlyPurchase: ").append(toIndentedString(monthlyPurchase)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("dailyWithdrawal"); - openapiFields.add("dailyPurchase"); - openapiFields.add("monthlyWithdrawal"); - openapiFields.add("monthlyPurchase"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CardLevelLimits - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CardLevelLimits.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CardLevelLimits is not found in the empty JSON string", CardLevelLimits.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CardLevelLimits.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CardLevelLimits` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CardLevelLimits.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CardLevelLimits' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CardLevelLimits.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CardLevelLimits value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CardLevelLimits read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CardLevelLimits given an JSON string - * - * @param jsonString JSON string - * @return An instance of CardLevelLimits - * @throws IOException if the JSON string is invalid with respect to CardLevelLimits - */ - public static CardLevelLimits fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CardLevelLimits.class); - } - - /** - * Convert an instance of CardLevelLimits to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CardRelationship.java b/src/main/java/org/openapitools/client/model/CardRelationship.java deleted file mode 100644 index 080305b2..00000000 --- a/src/main/java/org/openapitools/client/model/CardRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AuthorizationRequestRelationshipsCardData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CardRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CardRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private AuthorizationRequestRelationshipsCardData data; - - public CardRelationship() { - } - - public CardRelationship data(AuthorizationRequestRelationshipsCardData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public AuthorizationRequestRelationshipsCardData getData() { - return data; - } - - - public void setData(AuthorizationRequestRelationshipsCardData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CardRelationship cardRelationship = (CardRelationship) o; - return Objects.equals(this.data, cardRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CardRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CardRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CardRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CardRelationship is not found in the empty JSON string", CardRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CardRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CardRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CardRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - AuthorizationRequestRelationshipsCardData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CardRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CardRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CardRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CardRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CardRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CardRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of CardRelationship - * @throws IOException if the JSON string is invalid with respect to CardRelationship - */ - public static CardRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CardRelationship.class); - } - - /** - * Convert an instance of CardRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CardRelationships.java b/src/main/java/org/openapitools/client/model/CardRelationships.java deleted file mode 100644 index 77f71220..00000000 --- a/src/main/java/org/openapitools/client/model/CardRelationships.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CardRelationshipsAccount; -import org.openapitools.client.model.ReceivedPaymentRelationshipsCustomer; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CardRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CardRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private CardRelationshipsAccount account; - - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private ReceivedPaymentRelationshipsCustomer customer; - - public CardRelationships() { - } - - public CardRelationships account(CardRelationshipsAccount account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public CardRelationshipsAccount getAccount() { - return account; - } - - - public void setAccount(CardRelationshipsAccount account) { - this.account = account; - } - - - public CardRelationships customer(ReceivedPaymentRelationshipsCustomer customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nullable - public ReceivedPaymentRelationshipsCustomer getCustomer() { - return customer; - } - - - public void setCustomer(ReceivedPaymentRelationshipsCustomer customer) { - this.customer = customer; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CardRelationships cardRelationships = (CardRelationships) o; - return Objects.equals(this.account, cardRelationships.account) && - Objects.equals(this.customer, cardRelationships.customer); - } - - @Override - public int hashCode() { - return Objects.hash(account, customer); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CardRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - openapiFields.add("customer"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CardRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CardRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CardRelationships is not found in the empty JSON string", CardRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CardRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CardRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CardRelationships.openapiRequiredFields) { - 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(); - // validate the required field `account` - CardRelationshipsAccount.validateJsonElement(jsonObj.get("account")); - // validate the optional field `customer` - if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { - ReceivedPaymentRelationshipsCustomer.validateJsonElement(jsonObj.get("customer")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CardRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CardRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CardRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CardRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CardRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CardRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CardRelationships - * @throws IOException if the JSON string is invalid with respect to CardRelationships - */ - public static CardRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CardRelationships.class); - } - - /** - * Convert an instance of CardRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CardRelationshipsAccount.java b/src/main/java/org/openapitools/client/model/CardRelationshipsAccount.java deleted file mode 100644 index 90bde76c..00000000 --- a/src/main/java/org/openapitools/client/model/CardRelationshipsAccount.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CounterpartyAccountRelationshipData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CardRelationshipsAccount - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CardRelationshipsAccount { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CounterpartyAccountRelationshipData data; - - public CardRelationshipsAccount() { - } - - public CardRelationshipsAccount data(CounterpartyAccountRelationshipData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public CounterpartyAccountRelationshipData getData() { - return data; - } - - - public void setData(CounterpartyAccountRelationshipData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CardRelationshipsAccount cardRelationshipsAccount = (CardRelationshipsAccount) o; - return Objects.equals(this.data, cardRelationshipsAccount.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CardRelationshipsAccount {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CardRelationshipsAccount - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CardRelationshipsAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CardRelationshipsAccount is not found in the empty JSON string", CardRelationshipsAccount.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CardRelationshipsAccount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CardRelationshipsAccount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CardRelationshipsAccount.openapiRequiredFields) { - 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(); - // validate the required field `data` - CounterpartyAccountRelationshipData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CardRelationshipsAccount.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CardRelationshipsAccount' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CardRelationshipsAccount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CardRelationshipsAccount value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CardRelationshipsAccount read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CardRelationshipsAccount given an JSON string - * - * @param jsonString JSON string - * @return An instance of CardRelationshipsAccount - * @throws IOException if the JSON string is invalid with respect to CardRelationshipsAccount - */ - public static CardRelationshipsAccount fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CardRelationshipsAccount.class); - } - - /** - * Convert an instance of CardRelationshipsAccount to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CardTransaction.java b/src/main/java/org/openapitools/client/model/CardTransaction.java deleted file mode 100644 index db0d7029..00000000 --- a/src/main/java/org/openapitools/client/model/CardTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CardTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CardTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CardTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CardTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public CardTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public CardTransaction attributes(CardTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CardTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CardTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public CardTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CardTransaction cardTransaction = (CardTransaction) o; - return Objects.equals(this.attributes, cardTransaction.attributes) && - Objects.equals(this.relationships, cardTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CardTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CardTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CardTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CardTransaction is not found in the empty JSON string", CardTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CardTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CardTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CardTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CardTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CardTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CardTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CardTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CardTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CardTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of CardTransaction - * @throws IOException if the JSON string is invalid with respect to CardTransaction - */ - public static CardTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CardTransaction.class); - } - - /** - * Convert an instance of CardTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CardTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/CardTransactionAllOfAttributes.java deleted file mode 100644 index cf2402ea..00000000 --- a/src/main/java/org/openapitools/client/model/CardTransactionAllOfAttributes.java +++ /dev/null @@ -1,732 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.CardVerificationData; -import org.openapitools.client.model.Merchant; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CardTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CardTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_CARD_LAST4_DIGITS = "cardLast4Digits"; - @SerializedName(SERIALIZED_NAME_CARD_LAST4_DIGITS) - private String cardLast4Digits; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_NETWORK_TRANSACTION_ID = "networkTransactionId"; - @SerializedName(SERIALIZED_NAME_NETWORK_TRANSACTION_ID) - private String networkTransactionId; - - public static final String SERIALIZED_NAME_INTERCHANGE = "interchange"; - @SerializedName(SERIALIZED_NAME_INTERCHANGE) - private String interchange; - - public static final String SERIALIZED_NAME_INTERNATIONAL_SERVICE_FEE = "internationalServiceFee"; - @SerializedName(SERIALIZED_NAME_INTERNATIONAL_SERVICE_FEE) - private Integer internationalServiceFee; - - public static final String SERIALIZED_NAME_MERCHANT = "merchant"; - @SerializedName(SERIALIZED_NAME_MERCHANT) - private Merchant merchant; - - public static final String SERIALIZED_NAME_RECURRING = "recurring"; - @SerializedName(SERIALIZED_NAME_RECURRING) - private Boolean recurring; - - public static final String SERIALIZED_NAME_PAYMENT_METHOD = "paymentMethod"; - @SerializedName(SERIALIZED_NAME_PAYMENT_METHOD) - private String paymentMethod; - - public static final String SERIALIZED_NAME_DIGITAL_WALLET = "digitalWallet"; - @SerializedName(SERIALIZED_NAME_DIGITAL_WALLET) - private String digitalWallet; - - public static final String SERIALIZED_NAME_CARD_VERIFICATION_DATA = "cardVerificationData"; - @SerializedName(SERIALIZED_NAME_CARD_VERIFICATION_DATA) - private CardVerificationData cardVerificationData; - - public static final String SERIALIZED_NAME_CARD_NETWORK = "cardNetwork"; - @SerializedName(SERIALIZED_NAME_CARD_NETWORK) - private String cardNetwork; - - public CardTransactionAllOfAttributes() { - } - - public CardTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public CardTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public CardTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CardTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public CardTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public CardTransactionAllOfAttributes cardLast4Digits(String cardLast4Digits) { - - this.cardLast4Digits = cardLast4Digits; - return this; - } - - /** - * Get cardLast4Digits - * @return cardLast4Digits - **/ - @javax.annotation.Nonnull - public String getCardLast4Digits() { - return cardLast4Digits; - } - - - public void setCardLast4Digits(String cardLast4Digits) { - this.cardLast4Digits = cardLast4Digits; - } - - - public CardTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CardTransactionAllOfAttributes networkTransactionId(String networkTransactionId) { - - this.networkTransactionId = networkTransactionId; - return this; - } - - /** - * Get networkTransactionId - * @return networkTransactionId - **/ - @javax.annotation.Nullable - public String getNetworkTransactionId() { - return networkTransactionId; - } - - - public void setNetworkTransactionId(String networkTransactionId) { - this.networkTransactionId = networkTransactionId; - } - - - public CardTransactionAllOfAttributes interchange(String interchange) { - - this.interchange = interchange; - return this; - } - - /** - * Get interchange - * @return interchange - **/ - @javax.annotation.Nullable - public String getInterchange() { - return interchange; - } - - - public void setInterchange(String interchange) { - this.interchange = interchange; - } - - - public CardTransactionAllOfAttributes internationalServiceFee(Integer internationalServiceFee) { - - this.internationalServiceFee = internationalServiceFee; - return this; - } - - /** - * Get internationalServiceFee - * @return internationalServiceFee - **/ - @javax.annotation.Nullable - public Integer getInternationalServiceFee() { - return internationalServiceFee; - } - - - public void setInternationalServiceFee(Integer internationalServiceFee) { - this.internationalServiceFee = internationalServiceFee; - } - - - public CardTransactionAllOfAttributes merchant(Merchant merchant) { - - this.merchant = merchant; - return this; - } - - /** - * Get merchant - * @return merchant - **/ - @javax.annotation.Nonnull - public Merchant getMerchant() { - return merchant; - } - - - public void setMerchant(Merchant merchant) { - this.merchant = merchant; - } - - - public CardTransactionAllOfAttributes recurring(Boolean recurring) { - - this.recurring = recurring; - return this; - } - - /** - * Get recurring - * @return recurring - **/ - @javax.annotation.Nonnull - public Boolean getRecurring() { - return recurring; - } - - - public void setRecurring(Boolean recurring) { - this.recurring = recurring; - } - - - public CardTransactionAllOfAttributes paymentMethod(String paymentMethod) { - - this.paymentMethod = paymentMethod; - return this; - } - - /** - * Get paymentMethod - * @return paymentMethod - **/ - @javax.annotation.Nullable - public String getPaymentMethod() { - return paymentMethod; - } - - - public void setPaymentMethod(String paymentMethod) { - this.paymentMethod = paymentMethod; - } - - - public CardTransactionAllOfAttributes digitalWallet(String digitalWallet) { - - this.digitalWallet = digitalWallet; - return this; - } - - /** - * Get digitalWallet - * @return digitalWallet - **/ - @javax.annotation.Nullable - public String getDigitalWallet() { - return digitalWallet; - } - - - public void setDigitalWallet(String digitalWallet) { - this.digitalWallet = digitalWallet; - } - - - public CardTransactionAllOfAttributes cardVerificationData(CardVerificationData cardVerificationData) { - - this.cardVerificationData = cardVerificationData; - return this; - } - - /** - * Get cardVerificationData - * @return cardVerificationData - **/ - @javax.annotation.Nullable - public CardVerificationData getCardVerificationData() { - return cardVerificationData; - } - - - public void setCardVerificationData(CardVerificationData cardVerificationData) { - this.cardVerificationData = cardVerificationData; - } - - - public CardTransactionAllOfAttributes cardNetwork(String cardNetwork) { - - this.cardNetwork = cardNetwork; - return this; - } - - /** - * Get cardNetwork - * @return cardNetwork - **/ - @javax.annotation.Nullable - public String getCardNetwork() { - return cardNetwork; - } - - - public void setCardNetwork(String cardNetwork) { - this.cardNetwork = cardNetwork; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CardTransactionAllOfAttributes cardTransactionAllOfAttributes = (CardTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, cardTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, cardTransactionAllOfAttributes.direction) && - Objects.equals(this.amount, cardTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, cardTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, cardTransactionAllOfAttributes.summary) && - Objects.equals(this.cardLast4Digits, cardTransactionAllOfAttributes.cardLast4Digits) && - Objects.equals(this.tags, cardTransactionAllOfAttributes.tags) && - Objects.equals(this.networkTransactionId, cardTransactionAllOfAttributes.networkTransactionId) && - Objects.equals(this.interchange, cardTransactionAllOfAttributes.interchange) && - Objects.equals(this.internationalServiceFee, cardTransactionAllOfAttributes.internationalServiceFee) && - Objects.equals(this.merchant, cardTransactionAllOfAttributes.merchant) && - Objects.equals(this.recurring, cardTransactionAllOfAttributes.recurring) && - Objects.equals(this.paymentMethod, cardTransactionAllOfAttributes.paymentMethod) && - Objects.equals(this.digitalWallet, cardTransactionAllOfAttributes.digitalWallet) && - Objects.equals(this.cardVerificationData, cardTransactionAllOfAttributes.cardVerificationData) && - Objects.equals(this.cardNetwork, cardTransactionAllOfAttributes.cardNetwork); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, amount, balance, summary, cardLast4Digits, tags, networkTransactionId, interchange, internationalServiceFee, merchant, recurring, paymentMethod, digitalWallet, cardVerificationData, cardNetwork); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CardTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" cardLast4Digits: ").append(toIndentedString(cardLast4Digits)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" networkTransactionId: ").append(toIndentedString(networkTransactionId)).append("\n"); - sb.append(" interchange: ").append(toIndentedString(interchange)).append("\n"); - sb.append(" internationalServiceFee: ").append(toIndentedString(internationalServiceFee)).append("\n"); - sb.append(" merchant: ").append(toIndentedString(merchant)).append("\n"); - sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n"); - sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n"); - sb.append(" digitalWallet: ").append(toIndentedString(digitalWallet)).append("\n"); - sb.append(" cardVerificationData: ").append(toIndentedString(cardVerificationData)).append("\n"); - sb.append(" cardNetwork: ").append(toIndentedString(cardNetwork)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("cardLast4Digits"); - openapiFields.add("tags"); - openapiFields.add("networkTransactionId"); - openapiFields.add("interchange"); - openapiFields.add("internationalServiceFee"); - openapiFields.add("merchant"); - openapiFields.add("recurring"); - openapiFields.add("paymentMethod"); - openapiFields.add("digitalWallet"); - openapiFields.add("cardVerificationData"); - openapiFields.add("cardNetwork"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - openapiRequiredFields.add("cardLast4Digits"); - openapiRequiredFields.add("merchant"); - openapiRequiredFields.add("recurring"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CardTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CardTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CardTransactionAllOfAttributes is not found in the empty JSON string", CardTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CardTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CardTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CardTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - if (!jsonObj.get("cardLast4Digits").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardLast4Digits` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardLast4Digits").toString())); - } - if ((jsonObj.get("networkTransactionId") != null && !jsonObj.get("networkTransactionId").isJsonNull()) && !jsonObj.get("networkTransactionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `networkTransactionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("networkTransactionId").toString())); - } - if ((jsonObj.get("interchange") != null && !jsonObj.get("interchange").isJsonNull()) && !jsonObj.get("interchange").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `interchange` to be a primitive type in the JSON string but got `%s`", jsonObj.get("interchange").toString())); - } - // validate the required field `merchant` - Merchant.validateJsonElement(jsonObj.get("merchant")); - if ((jsonObj.get("paymentMethod") != null && !jsonObj.get("paymentMethod").isJsonNull()) && !jsonObj.get("paymentMethod").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `paymentMethod` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentMethod").toString())); - } - if ((jsonObj.get("digitalWallet") != null && !jsonObj.get("digitalWallet").isJsonNull()) && !jsonObj.get("digitalWallet").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `digitalWallet` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digitalWallet").toString())); - } - // validate the optional field `cardVerificationData` - if (jsonObj.get("cardVerificationData") != null && !jsonObj.get("cardVerificationData").isJsonNull()) { - CardVerificationData.validateJsonElement(jsonObj.get("cardVerificationData")); - } - if ((jsonObj.get("cardNetwork") != null && !jsonObj.get("cardNetwork").isJsonNull()) && !jsonObj.get("cardNetwork").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardNetwork` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardNetwork").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CardTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CardTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CardTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CardTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CardTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CardTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CardTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to CardTransactionAllOfAttributes - */ - public static CardTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CardTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of CardTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CardTransactionAuthorizationRequest.java b/src/main/java/org/openapitools/client/model/CardTransactionAuthorizationRequest.java deleted file mode 100644 index 87d5ae9d..00000000 --- a/src/main/java/org/openapitools/client/model/CardTransactionAuthorizationRequest.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AuthorizationRequest; -import org.openapitools.client.model.AuthorizationRequestRelationships; -import org.openapitools.client.model.CardTransactionAuthorizationRequestAllOfAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CardTransactionAuthorizationRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CardTransactionAuthorizationRequest extends AuthorizationRequest { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CardTransactionAuthorizationRequestAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private AuthorizationRequestRelationships relationships; - - public CardTransactionAuthorizationRequest() { - this.type = this.getClass().getSimpleName(); - } - - public CardTransactionAuthorizationRequest attributes(CardTransactionAuthorizationRequestAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public CardTransactionAuthorizationRequestAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CardTransactionAuthorizationRequestAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public CardTransactionAuthorizationRequest relationships(AuthorizationRequestRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public AuthorizationRequestRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(AuthorizationRequestRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CardTransactionAuthorizationRequest cardTransactionAuthorizationRequest = (CardTransactionAuthorizationRequest) o; - return Objects.equals(this.attributes, cardTransactionAuthorizationRequest.attributes) && - Objects.equals(this.relationships, cardTransactionAuthorizationRequest.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CardTransactionAuthorizationRequest {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CardTransactionAuthorizationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CardTransactionAuthorizationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CardTransactionAuthorizationRequest is not found in the empty JSON string", CardTransactionAuthorizationRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CardTransactionAuthorizationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CardTransactionAuthorizationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CardTransactionAuthorizationRequest.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CardTransactionAuthorizationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CardTransactionAuthorizationRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CardTransactionAuthorizationRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CardTransactionAuthorizationRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CardTransactionAuthorizationRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CardTransactionAuthorizationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CardTransactionAuthorizationRequest - * @throws IOException if the JSON string is invalid with respect to CardTransactionAuthorizationRequest - */ - public static CardTransactionAuthorizationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CardTransactionAuthorizationRequest.class); - } - - /** - * Convert an instance of CardTransactionAuthorizationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CardTransactionAuthorizationRequestAllOfAttributes.java b/src/main/java/org/openapitools/client/model/CardTransactionAuthorizationRequestAllOfAttributes.java deleted file mode 100644 index fa6fcc23..00000000 --- a/src/main/java/org/openapitools/client/model/CardTransactionAuthorizationRequestAllOfAttributes.java +++ /dev/null @@ -1,578 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.CardVerificationData; -import org.openapitools.client.model.Merchant; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CardTransactionAuthorizationRequestAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CardTransactionAuthorizationRequestAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_PARTIAL_APPROVAL_ALLOWED = "partialApprovalAllowed"; - @SerializedName(SERIALIZED_NAME_PARTIAL_APPROVAL_ALLOWED) - private Boolean partialApprovalAllowed; - - public static final String SERIALIZED_NAME_APPROVED_AMOUNT = "approvedAmount"; - @SerializedName(SERIALIZED_NAME_APPROVED_AMOUNT) - private Integer approvedAmount; - - public static final String SERIALIZED_NAME_DECLINE_REASON = "declineReason"; - @SerializedName(SERIALIZED_NAME_DECLINE_REASON) - private String declineReason; - - public static final String SERIALIZED_NAME_MERCHANT = "merchant"; - @SerializedName(SERIALIZED_NAME_MERCHANT) - private Merchant merchant; - - public static final String SERIALIZED_NAME_RECURRING = "recurring"; - @SerializedName(SERIALIZED_NAME_RECURRING) - private Boolean recurring; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_PAYMENT_METHOD = "paymentMethod"; - @SerializedName(SERIALIZED_NAME_PAYMENT_METHOD) - private String paymentMethod; - - public static final String SERIALIZED_NAME_DIGITAL_WALLET = "digitalWallet"; - @SerializedName(SERIALIZED_NAME_DIGITAL_WALLET) - private String digitalWallet; - - public static final String SERIALIZED_NAME_CARD_VERIFICATION_DATA = "cardVerificationData"; - @SerializedName(SERIALIZED_NAME_CARD_VERIFICATION_DATA) - private CardVerificationData cardVerificationData; - - public static final String SERIALIZED_NAME_CARD_NETWORK = "cardNetwork"; - @SerializedName(SERIALIZED_NAME_CARD_NETWORK) - private String cardNetwork; - - public CardTransactionAuthorizationRequestAllOfAttributes() { - } - - public CardTransactionAuthorizationRequestAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public CardTransactionAuthorizationRequestAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CardTransactionAuthorizationRequestAllOfAttributes status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public CardTransactionAuthorizationRequestAllOfAttributes partialApprovalAllowed(Boolean partialApprovalAllowed) { - - this.partialApprovalAllowed = partialApprovalAllowed; - return this; - } - - /** - * Get partialApprovalAllowed - * @return partialApprovalAllowed - **/ - @javax.annotation.Nonnull - public Boolean getPartialApprovalAllowed() { - return partialApprovalAllowed; - } - - - public void setPartialApprovalAllowed(Boolean partialApprovalAllowed) { - this.partialApprovalAllowed = partialApprovalAllowed; - } - - - public CardTransactionAuthorizationRequestAllOfAttributes approvedAmount(Integer approvedAmount) { - - this.approvedAmount = approvedAmount; - return this; - } - - /** - * Get approvedAmount - * @return approvedAmount - **/ - @javax.annotation.Nullable - public Integer getApprovedAmount() { - return approvedAmount; - } - - - public void setApprovedAmount(Integer approvedAmount) { - this.approvedAmount = approvedAmount; - } - - - public CardTransactionAuthorizationRequestAllOfAttributes declineReason(String declineReason) { - - this.declineReason = declineReason; - return this; - } - - /** - * Get declineReason - * @return declineReason - **/ - @javax.annotation.Nullable - public String getDeclineReason() { - return declineReason; - } - - - public void setDeclineReason(String declineReason) { - this.declineReason = declineReason; - } - - - public CardTransactionAuthorizationRequestAllOfAttributes merchant(Merchant merchant) { - - this.merchant = merchant; - return this; - } - - /** - * Get merchant - * @return merchant - **/ - @javax.annotation.Nonnull - public Merchant getMerchant() { - return merchant; - } - - - public void setMerchant(Merchant merchant) { - this.merchant = merchant; - } - - - public CardTransactionAuthorizationRequestAllOfAttributes recurring(Boolean recurring) { - - this.recurring = recurring; - return this; - } - - /** - * Get recurring - * @return recurring - **/ - @javax.annotation.Nonnull - public Boolean getRecurring() { - return recurring; - } - - - public void setRecurring(Boolean recurring) { - this.recurring = recurring; - } - - - public CardTransactionAuthorizationRequestAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CardTransactionAuthorizationRequestAllOfAttributes paymentMethod(String paymentMethod) { - - this.paymentMethod = paymentMethod; - return this; - } - - /** - * Get paymentMethod - * @return paymentMethod - **/ - @javax.annotation.Nullable - public String getPaymentMethod() { - return paymentMethod; - } - - - public void setPaymentMethod(String paymentMethod) { - this.paymentMethod = paymentMethod; - } - - - public CardTransactionAuthorizationRequestAllOfAttributes digitalWallet(String digitalWallet) { - - this.digitalWallet = digitalWallet; - return this; - } - - /** - * Get digitalWallet - * @return digitalWallet - **/ - @javax.annotation.Nullable - public String getDigitalWallet() { - return digitalWallet; - } - - - public void setDigitalWallet(String digitalWallet) { - this.digitalWallet = digitalWallet; - } - - - public CardTransactionAuthorizationRequestAllOfAttributes cardVerificationData(CardVerificationData cardVerificationData) { - - this.cardVerificationData = cardVerificationData; - return this; - } - - /** - * Get cardVerificationData - * @return cardVerificationData - **/ - @javax.annotation.Nullable - public CardVerificationData getCardVerificationData() { - return cardVerificationData; - } - - - public void setCardVerificationData(CardVerificationData cardVerificationData) { - this.cardVerificationData = cardVerificationData; - } - - - public CardTransactionAuthorizationRequestAllOfAttributes cardNetwork(String cardNetwork) { - - this.cardNetwork = cardNetwork; - return this; - } - - /** - * Get cardNetwork - * @return cardNetwork - **/ - @javax.annotation.Nullable - public String getCardNetwork() { - return cardNetwork; - } - - - public void setCardNetwork(String cardNetwork) { - this.cardNetwork = cardNetwork; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CardTransactionAuthorizationRequestAllOfAttributes cardTransactionAuthorizationRequestAllOfAttributes = (CardTransactionAuthorizationRequestAllOfAttributes) o; - return Objects.equals(this.createdAt, cardTransactionAuthorizationRequestAllOfAttributes.createdAt) && - Objects.equals(this.amount, cardTransactionAuthorizationRequestAllOfAttributes.amount) && - Objects.equals(this.status, cardTransactionAuthorizationRequestAllOfAttributes.status) && - Objects.equals(this.partialApprovalAllowed, cardTransactionAuthorizationRequestAllOfAttributes.partialApprovalAllowed) && - Objects.equals(this.approvedAmount, cardTransactionAuthorizationRequestAllOfAttributes.approvedAmount) && - Objects.equals(this.declineReason, cardTransactionAuthorizationRequestAllOfAttributes.declineReason) && - Objects.equals(this.merchant, cardTransactionAuthorizationRequestAllOfAttributes.merchant) && - Objects.equals(this.recurring, cardTransactionAuthorizationRequestAllOfAttributes.recurring) && - Objects.equals(this.tags, cardTransactionAuthorizationRequestAllOfAttributes.tags) && - Objects.equals(this.paymentMethod, cardTransactionAuthorizationRequestAllOfAttributes.paymentMethod) && - Objects.equals(this.digitalWallet, cardTransactionAuthorizationRequestAllOfAttributes.digitalWallet) && - Objects.equals(this.cardVerificationData, cardTransactionAuthorizationRequestAllOfAttributes.cardVerificationData) && - Objects.equals(this.cardNetwork, cardTransactionAuthorizationRequestAllOfAttributes.cardNetwork); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, amount, status, partialApprovalAllowed, approvedAmount, declineReason, merchant, recurring, tags, paymentMethod, digitalWallet, cardVerificationData, cardNetwork); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CardTransactionAuthorizationRequestAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" partialApprovalAllowed: ").append(toIndentedString(partialApprovalAllowed)).append("\n"); - sb.append(" approvedAmount: ").append(toIndentedString(approvedAmount)).append("\n"); - sb.append(" declineReason: ").append(toIndentedString(declineReason)).append("\n"); - sb.append(" merchant: ").append(toIndentedString(merchant)).append("\n"); - sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n"); - sb.append(" digitalWallet: ").append(toIndentedString(digitalWallet)).append("\n"); - sb.append(" cardVerificationData: ").append(toIndentedString(cardVerificationData)).append("\n"); - sb.append(" cardNetwork: ").append(toIndentedString(cardNetwork)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("amount"); - openapiFields.add("status"); - openapiFields.add("partialApprovalAllowed"); - openapiFields.add("approvedAmount"); - openapiFields.add("declineReason"); - openapiFields.add("merchant"); - openapiFields.add("recurring"); - openapiFields.add("tags"); - openapiFields.add("paymentMethod"); - openapiFields.add("digitalWallet"); - openapiFields.add("cardVerificationData"); - openapiFields.add("cardNetwork"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("partialApprovalAllowed"); - openapiRequiredFields.add("merchant"); - openapiRequiredFields.add("recurring"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CardTransactionAuthorizationRequestAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CardTransactionAuthorizationRequestAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CardTransactionAuthorizationRequestAllOfAttributes is not found in the empty JSON string", CardTransactionAuthorizationRequestAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CardTransactionAuthorizationRequestAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CardTransactionAuthorizationRequestAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CardTransactionAuthorizationRequestAllOfAttributes.openapiRequiredFields) { - 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("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())); - } - if ((jsonObj.get("declineReason") != null && !jsonObj.get("declineReason").isJsonNull()) && !jsonObj.get("declineReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `declineReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("declineReason").toString())); - } - // validate the required field `merchant` - Merchant.validateJsonElement(jsonObj.get("merchant")); - if ((jsonObj.get("paymentMethod") != null && !jsonObj.get("paymentMethod").isJsonNull()) && !jsonObj.get("paymentMethod").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `paymentMethod` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentMethod").toString())); - } - if ((jsonObj.get("digitalWallet") != null && !jsonObj.get("digitalWallet").isJsonNull()) && !jsonObj.get("digitalWallet").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `digitalWallet` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digitalWallet").toString())); - } - // validate the optional field `cardVerificationData` - if (jsonObj.get("cardVerificationData") != null && !jsonObj.get("cardVerificationData").isJsonNull()) { - CardVerificationData.validateJsonElement(jsonObj.get("cardVerificationData")); - } - if ((jsonObj.get("cardNetwork") != null && !jsonObj.get("cardNetwork").isJsonNull()) && !jsonObj.get("cardNetwork").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardNetwork` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardNetwork").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CardTransactionAuthorizationRequestAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CardTransactionAuthorizationRequestAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CardTransactionAuthorizationRequestAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CardTransactionAuthorizationRequestAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CardTransactionAuthorizationRequestAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CardTransactionAuthorizationRequestAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CardTransactionAuthorizationRequestAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to CardTransactionAuthorizationRequestAllOfAttributes - */ - public static CardTransactionAuthorizationRequestAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CardTransactionAuthorizationRequestAllOfAttributes.class); - } - - /** - * Convert an instance of CardTransactionAuthorizationRequestAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CardVerificationData.java b/src/main/java/org/openapitools/client/model/CardVerificationData.java deleted file mode 100644 index 22214f6e..00000000 --- a/src/main/java/org/openapitools/client/model/CardVerificationData.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CardVerificationData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CardVerificationData { - public static final String SERIALIZED_NAME_VERIFICATION_METHOD = "verificationMethod"; - @SerializedName(SERIALIZED_NAME_VERIFICATION_METHOD) - private String verificationMethod; - - public CardVerificationData() { - } - - public CardVerificationData verificationMethod(String verificationMethod) { - - this.verificationMethod = verificationMethod; - return this; - } - - /** - * Get verificationMethod - * @return verificationMethod - **/ - @javax.annotation.Nonnull - public String getVerificationMethod() { - return verificationMethod; - } - - - public void setVerificationMethod(String verificationMethod) { - this.verificationMethod = verificationMethod; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CardVerificationData cardVerificationData = (CardVerificationData) o; - return Objects.equals(this.verificationMethod, cardVerificationData.verificationMethod); - } - - @Override - public int hashCode() { - return Objects.hash(verificationMethod); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CardVerificationData {\n"); - sb.append(" verificationMethod: ").append(toIndentedString(verificationMethod)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("verificationMethod"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("verificationMethod"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CardVerificationData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CardVerificationData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CardVerificationData is not found in the empty JSON string", CardVerificationData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CardVerificationData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CardVerificationData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CardVerificationData.openapiRequiredFields) { - 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("verificationMethod").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `verificationMethod` to be a primitive type in the JSON string but got `%s`", jsonObj.get("verificationMethod").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CardVerificationData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CardVerificationData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CardVerificationData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CardVerificationData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CardVerificationData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CardVerificationData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CardVerificationData - * @throws IOException if the JSON string is invalid with respect to CardVerificationData - */ - public static CardVerificationData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CardVerificationData.class); - } - - /** - * Convert an instance of CardVerificationData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CashDepositTransaction.java b/src/main/java/org/openapitools/client/model/CashDepositTransaction.java deleted file mode 100644 index 3728a418..00000000 --- a/src/main/java/org/openapitools/client/model/CashDepositTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CashDepositTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CashDepositTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CashDepositTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CashDepositTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public CashDepositTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public CashDepositTransaction attributes(CashDepositTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CashDepositTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CashDepositTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public CashDepositTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CashDepositTransaction cashDepositTransaction = (CashDepositTransaction) o; - return Objects.equals(this.attributes, cashDepositTransaction.attributes) && - Objects.equals(this.relationships, cashDepositTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CashDepositTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CashDepositTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CashDepositTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CashDepositTransaction is not found in the empty JSON string", CashDepositTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CashDepositTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CashDepositTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CashDepositTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CashDepositTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CashDepositTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CashDepositTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CashDepositTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CashDepositTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CashDepositTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of CashDepositTransaction - * @throws IOException if the JSON string is invalid with respect to CashDepositTransaction - */ - public static CashDepositTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CashDepositTransaction.class); - } - - /** - * Convert an instance of CashDepositTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CashDepositTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/CashDepositTransactionAllOfAttributes.java deleted file mode 100644 index 3838be55..00000000 --- a/src/main/java/org/openapitools/client/model/CashDepositTransactionAllOfAttributes.java +++ /dev/null @@ -1,440 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CashDepositTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CashDepositTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_RECURRING = "recurring"; - @SerializedName(SERIALIZED_NAME_RECURRING) - private Boolean recurring; - - public CashDepositTransactionAllOfAttributes() { - } - - public CashDepositTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public CashDepositTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public CashDepositTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CashDepositTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public CashDepositTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public CashDepositTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CashDepositTransactionAllOfAttributes recurring(Boolean recurring) { - - this.recurring = recurring; - return this; - } - - /** - * Get recurring - * @return recurring - **/ - @javax.annotation.Nonnull - public Boolean getRecurring() { - return recurring; - } - - - public void setRecurring(Boolean recurring) { - this.recurring = recurring; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CashDepositTransactionAllOfAttributes cashDepositTransactionAllOfAttributes = (CashDepositTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, cashDepositTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, cashDepositTransactionAllOfAttributes.direction) && - Objects.equals(this.amount, cashDepositTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, cashDepositTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, cashDepositTransactionAllOfAttributes.summary) && - Objects.equals(this.tags, cashDepositTransactionAllOfAttributes.tags) && - Objects.equals(this.recurring, cashDepositTransactionAllOfAttributes.recurring); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, amount, balance, summary, tags, recurring); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CashDepositTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("tags"); - openapiFields.add("recurring"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - openapiRequiredFields.add("recurring"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CashDepositTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CashDepositTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CashDepositTransactionAllOfAttributes is not found in the empty JSON string", CashDepositTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CashDepositTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CashDepositTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CashDepositTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CashDepositTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CashDepositTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CashDepositTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CashDepositTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CashDepositTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CashDepositTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CashDepositTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to CashDepositTransactionAllOfAttributes - */ - public static CashDepositTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CashDepositTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of CashDepositTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CashFlow.java b/src/main/java/org/openapitools/client/model/CashFlow.java deleted file mode 100644 index 35ed607e..00000000 --- a/src/main/java/org/openapitools/client/model/CashFlow.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets cashFlow - */ -@JsonAdapter(CashFlow.Adapter.class) -public enum CashFlow { - - UNPREDICTABLE("Unpredictable"), - - PREDICTABLE("Predictable"); - - private String value; - - CashFlow(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static CashFlow fromValue(String value) { - for (CashFlow b : CashFlow.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final CashFlow enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public CashFlow read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return CashFlow.fromValue(value); - } - } -} - diff --git a/src/main/java/org/openapitools/client/model/ChargebackRelationship.java b/src/main/java/org/openapitools/client/model/ChargebackRelationship.java deleted file mode 100644 index b13da9d3..00000000 --- a/src/main/java/org/openapitools/client/model/ChargebackRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ChargebackRelationshipData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ChargebackRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ChargebackRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ChargebackRelationshipData data; - - public ChargebackRelationship() { - } - - public ChargebackRelationship data(ChargebackRelationshipData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public ChargebackRelationshipData getData() { - return data; - } - - - public void setData(ChargebackRelationshipData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChargebackRelationship chargebackRelationship = (ChargebackRelationship) o; - return Objects.equals(this.data, chargebackRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChargebackRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ChargebackRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ChargebackRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ChargebackRelationship is not found in the empty JSON string", ChargebackRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ChargebackRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ChargebackRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ChargebackRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - ChargebackRelationshipData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ChargebackRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ChargebackRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ChargebackRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ChargebackRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ChargebackRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ChargebackRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of ChargebackRelationship - * @throws IOException if the JSON string is invalid with respect to ChargebackRelationship - */ - public static ChargebackRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ChargebackRelationship.class); - } - - /** - * Convert an instance of ChargebackRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ChargebackRelationshipData.java b/src/main/java/org/openapitools/client/model/ChargebackRelationshipData.java deleted file mode 100644 index 8f4974c1..00000000 --- a/src/main/java/org/openapitools/client/model/ChargebackRelationshipData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ChargebackRelationshipData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ChargebackRelationshipData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "chargeback"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public ChargebackRelationshipData() { - } - - public ChargebackRelationshipData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public ChargebackRelationshipData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChargebackRelationshipData chargebackRelationshipData = (ChargebackRelationshipData) o; - return Objects.equals(this.type, chargebackRelationshipData.type) && - Objects.equals(this.id, chargebackRelationshipData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChargebackRelationshipData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ChargebackRelationshipData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ChargebackRelationshipData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ChargebackRelationshipData is not found in the empty JSON string", ChargebackRelationshipData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ChargebackRelationshipData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ChargebackRelationshipData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ChargebackRelationshipData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ChargebackRelationshipData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ChargebackRelationshipData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ChargebackRelationshipData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ChargebackRelationshipData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ChargebackRelationshipData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ChargebackRelationshipData given an JSON string - * - * @param jsonString JSON string - * @return An instance of ChargebackRelationshipData - * @throws IOException if the JSON string is invalid with respect to ChargebackRelationshipData - */ - public static ChargebackRelationshipData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ChargebackRelationshipData.class); - } - - /** - * Convert an instance of ChargebackRelationshipData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ChargebackTransaction.java b/src/main/java/org/openapitools/client/model/ChargebackTransaction.java deleted file mode 100644 index 904b06f1..00000000 --- a/src/main/java/org/openapitools/client/model/ChargebackTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ChargebackTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ChargebackTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ChargebackTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ChargebackTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public ChargebackTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public ChargebackTransaction attributes(ChargebackTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public ChargebackTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(ChargebackTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public ChargebackTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChargebackTransaction chargebackTransaction = (ChargebackTransaction) o; - return Objects.equals(this.attributes, chargebackTransaction.attributes) && - Objects.equals(this.relationships, chargebackTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChargebackTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ChargebackTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ChargebackTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ChargebackTransaction is not found in the empty JSON string", ChargebackTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ChargebackTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ChargebackTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ChargebackTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ChargebackTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ChargebackTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ChargebackTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ChargebackTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ChargebackTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ChargebackTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of ChargebackTransaction - * @throws IOException if the JSON string is invalid with respect to ChargebackTransaction - */ - public static ChargebackTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ChargebackTransaction.class); - } - - /** - * Convert an instance of ChargebackTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ChargebackTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/ChargebackTransactionAllOfAttributes.java deleted file mode 100644 index 9382d1f3..00000000 --- a/src/main/java/org/openapitools/client/model/ChargebackTransactionAllOfAttributes.java +++ /dev/null @@ -1,444 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.Counterparty; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ChargebackTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ChargebackTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_COUNTERPARTY = "counterparty"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY) - private Counterparty counterparty; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public ChargebackTransactionAllOfAttributes() { - } - - public ChargebackTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public ChargebackTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public ChargebackTransactionAllOfAttributes counterparty(Counterparty counterparty) { - - this.counterparty = counterparty; - return this; - } - - /** - * Get counterparty - * @return counterparty - **/ - @javax.annotation.Nullable - public Counterparty getCounterparty() { - return counterparty; - } - - - public void setCounterparty(Counterparty counterparty) { - this.counterparty = counterparty; - } - - - public ChargebackTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public ChargebackTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public ChargebackTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public ChargebackTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChargebackTransactionAllOfAttributes chargebackTransactionAllOfAttributes = (ChargebackTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, chargebackTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, chargebackTransactionAllOfAttributes.direction) && - Objects.equals(this.counterparty, chargebackTransactionAllOfAttributes.counterparty) && - Objects.equals(this.amount, chargebackTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, chargebackTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, chargebackTransactionAllOfAttributes.summary) && - Objects.equals(this.tags, chargebackTransactionAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, counterparty, amount, balance, summary, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChargebackTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("counterparty"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ChargebackTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ChargebackTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ChargebackTransactionAllOfAttributes is not found in the empty JSON string", ChargebackTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ChargebackTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ChargebackTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ChargebackTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - // validate the optional field `counterparty` - if (jsonObj.get("counterparty") != null && !jsonObj.get("counterparty").isJsonNull()) { - Counterparty.validateJsonElement(jsonObj.get("counterparty")); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ChargebackTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ChargebackTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ChargebackTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ChargebackTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ChargebackTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ChargebackTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of ChargebackTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to ChargebackTransactionAllOfAttributes - */ - public static ChargebackTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ChargebackTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of ChargebackTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CheckDeposit.java b/src/main/java/org/openapitools/client/model/CheckDeposit.java deleted file mode 100644 index b5a8ac14..00000000 --- a/src/main/java/org/openapitools/client/model/CheckDeposit.java +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CheckDepositAttributes; -import org.openapitools.client.model.CheckDepositRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CheckDeposit - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CheckDeposit { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - CHECKDEPOSIT("checkDeposit"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CheckDepositAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CheckDepositRelationships relationships; - - public CheckDeposit() { - } - - public CheckDeposit type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CheckDeposit id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public CheckDeposit attributes(CheckDepositAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CheckDepositAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CheckDepositAttributes attributes) { - this.attributes = attributes; - } - - - public CheckDeposit relationships(CheckDepositRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CheckDepositRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CheckDepositRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckDeposit checkDeposit = (CheckDeposit) o; - return Objects.equals(this.type, checkDeposit.type) && - Objects.equals(this.id, checkDeposit.id) && - Objects.equals(this.attributes, checkDeposit.attributes) && - Objects.equals(this.relationships, checkDeposit.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckDeposit {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CheckDeposit - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CheckDeposit.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CheckDeposit is not found in the empty JSON string", CheckDeposit.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CheckDeposit.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CheckDeposit` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CheckDeposit.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - // validate the required field `attributes` - CheckDepositAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CheckDepositRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CheckDeposit.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CheckDeposit' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CheckDeposit.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CheckDeposit value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CheckDeposit read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CheckDeposit given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckDeposit - * @throws IOException if the JSON string is invalid with respect to CheckDeposit - */ - public static CheckDeposit fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CheckDeposit.class); - } - - /** - * Convert an instance of CheckDeposit to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CheckDepositAttributes.java b/src/main/java/org/openapitools/client/model/CheckDepositAttributes.java deleted file mode 100644 index f582fa7d..00000000 --- a/src/main/java/org/openapitools/client/model/CheckDepositAttributes.java +++ /dev/null @@ -1,711 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Counterparty2; -import org.openapitools.client.model.StatusEvent; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CheckDepositAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CheckDepositAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_SETTLEMENT_DATE = "settlementDate"; - @SerializedName(SERIALIZED_NAME_SETTLEMENT_DATE) - private LocalDate settlementDate; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - AWAITINGIMAGES("AwaitingImages"), - - AWAITINGFRONTIMAGE("AwaitingFrontImage"), - - AWAITINGBACKIMAGE("AwaitingBackImage"), - - PENDING("Pending"), - - PENDINGREVIEW("PendingReview"), - - AWAITINGCUSTOMERCONFIRMATION("AwaitingCustomerConfirmation"), - - REJECTED("Rejected"), - - CLEARING("Clearing"), - - SENT("Sent"), - - CANCELED("Canceled"), - - RETURNED("Returned"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_REASON = "reason"; - @SerializedName(SERIALIZED_NAME_REASON) - private String reason; - - public static final String SERIALIZED_NAME_STATUS_CREATED_AT = "statusCreatedAt"; - @SerializedName(SERIALIZED_NAME_STATUS_CREATED_AT) - private OffsetDateTime statusCreatedAt; - - public static final String SERIALIZED_NAME_STATUS_SET_BY = "statusSetBy"; - @SerializedName(SERIALIZED_NAME_STATUS_SET_BY) - private String statusSetBy; - - public static final String SERIALIZED_NAME_STATUS_HISTORY = "statusHistory"; - @SerializedName(SERIALIZED_NAME_STATUS_HISTORY) - private List statusHistory; - - public static final String SERIALIZED_NAME_REASON_TEXT = "reasonText"; - @SerializedName(SERIALIZED_NAME_REASON_TEXT) - private String reasonText; - - public static final String SERIALIZED_NAME_CHECK_NUMBER = "checkNumber"; - @SerializedName(SERIALIZED_NAME_CHECK_NUMBER) - private String checkNumber; - - public static final String SERIALIZED_NAME_VENDOR = "vendor"; - @SerializedName(SERIALIZED_NAME_VENDOR) - private String vendor; - - public static final String SERIALIZED_NAME_COUNTERPARTY = "counterparty"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY) - private Counterparty2 counterparty; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public CheckDepositAttributes() { - } - - public CheckDepositAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public CheckDepositAttributes settlementDate(LocalDate settlementDate) { - - this.settlementDate = settlementDate; - return this; - } - - /** - * Get settlementDate - * @return settlementDate - **/ - @javax.annotation.Nullable - public LocalDate getSettlementDate() { - return settlementDate; - } - - - public void setSettlementDate(LocalDate settlementDate) { - this.settlementDate = settlementDate; - } - - - public CheckDepositAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CheckDepositAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public CheckDepositAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public CheckDepositAttributes reason(String reason) { - - this.reason = reason; - return this; - } - - /** - * Get reason - * @return reason - **/ - @javax.annotation.Nullable - public String getReason() { - return reason; - } - - - public void setReason(String reason) { - this.reason = reason; - } - - - public CheckDepositAttributes statusCreatedAt(OffsetDateTime statusCreatedAt) { - - this.statusCreatedAt = statusCreatedAt; - return this; - } - - /** - * Get statusCreatedAt - * @return statusCreatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getStatusCreatedAt() { - return statusCreatedAt; - } - - - public void setStatusCreatedAt(OffsetDateTime statusCreatedAt) { - this.statusCreatedAt = statusCreatedAt; - } - - - public CheckDepositAttributes statusSetBy(String statusSetBy) { - - this.statusSetBy = statusSetBy; - return this; - } - - /** - * Get statusSetBy - * @return statusSetBy - **/ - @javax.annotation.Nullable - public String getStatusSetBy() { - return statusSetBy; - } - - - public void setStatusSetBy(String statusSetBy) { - this.statusSetBy = statusSetBy; - } - - - public CheckDepositAttributes statusHistory(List statusHistory) { - - this.statusHistory = statusHistory; - return this; - } - - public CheckDepositAttributes addStatusHistoryItem(StatusEvent statusHistoryItem) { - if (this.statusHistory == null) { - this.statusHistory = new ArrayList<>(); - } - this.statusHistory.add(statusHistoryItem); - return this; - } - - /** - * Get statusHistory - * @return statusHistory - **/ - @javax.annotation.Nullable - public List getStatusHistory() { - return statusHistory; - } - - - public void setStatusHistory(List statusHistory) { - this.statusHistory = statusHistory; - } - - - public CheckDepositAttributes reasonText(String reasonText) { - - this.reasonText = reasonText; - return this; - } - - /** - * Get reasonText - * @return reasonText - **/ - @javax.annotation.Nullable - public String getReasonText() { - return reasonText; - } - - - public void setReasonText(String reasonText) { - this.reasonText = reasonText; - } - - - public CheckDepositAttributes checkNumber(String checkNumber) { - - this.checkNumber = checkNumber; - return this; - } - - /** - * Get checkNumber - * @return checkNumber - **/ - @javax.annotation.Nullable - public String getCheckNumber() { - return checkNumber; - } - - - public void setCheckNumber(String checkNumber) { - this.checkNumber = checkNumber; - } - - - public CheckDepositAttributes vendor(String vendor) { - - this.vendor = vendor; - return this; - } - - /** - * Get vendor - * @return vendor - **/ - @javax.annotation.Nullable - public String getVendor() { - return vendor; - } - - - public void setVendor(String vendor) { - this.vendor = vendor; - } - - - public CheckDepositAttributes counterparty(Counterparty2 counterparty) { - - this.counterparty = counterparty; - return this; - } - - /** - * Get counterparty - * @return counterparty - **/ - @javax.annotation.Nullable - public Counterparty2 getCounterparty() { - return counterparty; - } - - - public void setCounterparty(Counterparty2 counterparty) { - this.counterparty = counterparty; - } - - - public CheckDepositAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckDepositAttributes checkDepositAttributes = (CheckDepositAttributes) o; - return Objects.equals(this.createdAt, checkDepositAttributes.createdAt) && - Objects.equals(this.settlementDate, checkDepositAttributes.settlementDate) && - Objects.equals(this.amount, checkDepositAttributes.amount) && - Objects.equals(this.description, checkDepositAttributes.description) && - Objects.equals(this.status, checkDepositAttributes.status) && - Objects.equals(this.reason, checkDepositAttributes.reason) && - Objects.equals(this.statusCreatedAt, checkDepositAttributes.statusCreatedAt) && - Objects.equals(this.statusSetBy, checkDepositAttributes.statusSetBy) && - Objects.equals(this.statusHistory, checkDepositAttributes.statusHistory) && - Objects.equals(this.reasonText, checkDepositAttributes.reasonText) && - Objects.equals(this.checkNumber, checkDepositAttributes.checkNumber) && - Objects.equals(this.vendor, checkDepositAttributes.vendor) && - Objects.equals(this.counterparty, checkDepositAttributes.counterparty) && - Objects.equals(this.tags, checkDepositAttributes.tags); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, settlementDate, amount, description, status, reason, statusCreatedAt, statusSetBy, statusHistory, reasonText, checkNumber, vendor, counterparty, tags); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckDepositAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" settlementDate: ").append(toIndentedString(settlementDate)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append(" statusCreatedAt: ").append(toIndentedString(statusCreatedAt)).append("\n"); - sb.append(" statusSetBy: ").append(toIndentedString(statusSetBy)).append("\n"); - sb.append(" statusHistory: ").append(toIndentedString(statusHistory)).append("\n"); - sb.append(" reasonText: ").append(toIndentedString(reasonText)).append("\n"); - sb.append(" checkNumber: ").append(toIndentedString(checkNumber)).append("\n"); - sb.append(" vendor: ").append(toIndentedString(vendor)).append("\n"); - sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("settlementDate"); - openapiFields.add("amount"); - openapiFields.add("description"); - openapiFields.add("status"); - openapiFields.add("reason"); - openapiFields.add("statusCreatedAt"); - openapiFields.add("statusSetBy"); - openapiFields.add("statusHistory"); - openapiFields.add("reasonText"); - openapiFields.add("checkNumber"); - openapiFields.add("vendor"); - openapiFields.add("counterparty"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("status"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CheckDepositAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CheckDepositAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CheckDepositAttributes is not found in the empty JSON string", CheckDepositAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CheckDepositAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CheckDepositAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CheckDepositAttributes.openapiRequiredFields) { - 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("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if (!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())); - } - if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); - } - if ((jsonObj.get("statusSetBy") != null && !jsonObj.get("statusSetBy").isJsonNull()) && !jsonObj.get("statusSetBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `statusSetBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusSetBy").toString())); - } - if (jsonObj.get("statusHistory") != null && !jsonObj.get("statusHistory").isJsonNull()) { - JsonArray jsonArraystatusHistory = jsonObj.getAsJsonArray("statusHistory"); - if (jsonArraystatusHistory != null) { - // ensure the json data is an array - if (!jsonObj.get("statusHistory").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `statusHistory` to be an array in the JSON string but got `%s`", jsonObj.get("statusHistory").toString())); - } - - // validate the optional field `statusHistory` (array) - for (int i = 0; i < jsonArraystatusHistory.size(); i++) { - StatusEvent.validateJsonElement(jsonArraystatusHistory.get(i)); - }; - } - } - if ((jsonObj.get("reasonText") != null && !jsonObj.get("reasonText").isJsonNull()) && !jsonObj.get("reasonText").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reasonText` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reasonText").toString())); - } - if ((jsonObj.get("checkNumber") != null && !jsonObj.get("checkNumber").isJsonNull()) && !jsonObj.get("checkNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `checkNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("checkNumber").toString())); - } - if ((jsonObj.get("vendor") != null && !jsonObj.get("vendor").isJsonNull()) && !jsonObj.get("vendor").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `vendor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendor").toString())); - } - // validate the optional field `counterparty` - if (jsonObj.get("counterparty") != null && !jsonObj.get("counterparty").isJsonNull()) { - Counterparty2.validateJsonElement(jsonObj.get("counterparty")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CheckDepositAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CheckDepositAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CheckDepositAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CheckDepositAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CheckDepositAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CheckDepositAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckDepositAttributes - * @throws IOException if the JSON string is invalid with respect to CheckDepositAttributes - */ - public static CheckDepositAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CheckDepositAttributes.class); - } - - /** - * Convert an instance of CheckDepositAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CheckDepositRelationship.java b/src/main/java/org/openapitools/client/model/CheckDepositRelationship.java deleted file mode 100644 index fa4bf9ca..00000000 --- a/src/main/java/org/openapitools/client/model/CheckDepositRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CheckDepositRelationshipData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CheckDepositRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CheckDepositRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CheckDepositRelationshipData data; - - public CheckDepositRelationship() { - } - - public CheckDepositRelationship data(CheckDepositRelationshipData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public CheckDepositRelationshipData getData() { - return data; - } - - - public void setData(CheckDepositRelationshipData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckDepositRelationship checkDepositRelationship = (CheckDepositRelationship) o; - return Objects.equals(this.data, checkDepositRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckDepositRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CheckDepositRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CheckDepositRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CheckDepositRelationship is not found in the empty JSON string", CheckDepositRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CheckDepositRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CheckDepositRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CheckDepositRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - CheckDepositRelationshipData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CheckDepositRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CheckDepositRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CheckDepositRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CheckDepositRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CheckDepositRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CheckDepositRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckDepositRelationship - * @throws IOException if the JSON string is invalid with respect to CheckDepositRelationship - */ - public static CheckDepositRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CheckDepositRelationship.class); - } - - /** - * Convert an instance of CheckDepositRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CheckDepositRelationshipData.java b/src/main/java/org/openapitools/client/model/CheckDepositRelationshipData.java deleted file mode 100644 index 136d4855..00000000 --- a/src/main/java/org/openapitools/client/model/CheckDepositRelationshipData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CheckDepositRelationshipData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CheckDepositRelationshipData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "checkDeposit"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public CheckDepositRelationshipData() { - } - - public CheckDepositRelationshipData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CheckDepositRelationshipData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckDepositRelationshipData checkDepositRelationshipData = (CheckDepositRelationshipData) o; - return Objects.equals(this.type, checkDepositRelationshipData.type) && - Objects.equals(this.id, checkDepositRelationshipData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckDepositRelationshipData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CheckDepositRelationshipData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CheckDepositRelationshipData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CheckDepositRelationshipData is not found in the empty JSON string", CheckDepositRelationshipData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CheckDepositRelationshipData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CheckDepositRelationshipData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CheckDepositRelationshipData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CheckDepositRelationshipData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CheckDepositRelationshipData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CheckDepositRelationshipData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CheckDepositRelationshipData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CheckDepositRelationshipData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CheckDepositRelationshipData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckDepositRelationshipData - * @throws IOException if the JSON string is invalid with respect to CheckDepositRelationshipData - */ - public static CheckDepositRelationshipData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CheckDepositRelationshipData.class); - } - - /** - * Convert an instance of CheckDepositRelationshipData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CheckDepositRelationships.java b/src/main/java/org/openapitools/client/model/CheckDepositRelationships.java deleted file mode 100644 index b4784bd0..00000000 --- a/src/main/java/org/openapitools/client/model/CheckDepositRelationships.java +++ /dev/null @@ -1,315 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CheckDepositRelationshipsAccount; -import org.openapitools.client.model.OrgRelationship; -import org.openapitools.client.model.ReceivedPaymentRelationshipsCustomer; -import org.openapitools.client.model.ReceivedPaymentRelationshipsReceivePaymentTransaction; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CheckDepositRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CheckDepositRelationships { - public static final String SERIALIZED_NAME_ORG = "org"; - @SerializedName(SERIALIZED_NAME_ORG) - private OrgRelationship org; - - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private CheckDepositRelationshipsAccount account; - - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private ReceivedPaymentRelationshipsCustomer customer; - - public static final String SERIALIZED_NAME_TRANSACTION = "transaction"; - @SerializedName(SERIALIZED_NAME_TRANSACTION) - private ReceivedPaymentRelationshipsReceivePaymentTransaction transaction; - - public CheckDepositRelationships() { - } - - public CheckDepositRelationships org(OrgRelationship org) { - - this.org = org; - return this; - } - - /** - * Get org - * @return org - **/ - @javax.annotation.Nullable - public OrgRelationship getOrg() { - return org; - } - - - public void setOrg(OrgRelationship org) { - this.org = org; - } - - - public CheckDepositRelationships account(CheckDepositRelationshipsAccount account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public CheckDepositRelationshipsAccount getAccount() { - return account; - } - - - public void setAccount(CheckDepositRelationshipsAccount account) { - this.account = account; - } - - - public CheckDepositRelationships customer(ReceivedPaymentRelationshipsCustomer customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nullable - public ReceivedPaymentRelationshipsCustomer getCustomer() { - return customer; - } - - - public void setCustomer(ReceivedPaymentRelationshipsCustomer customer) { - this.customer = customer; - } - - - public CheckDepositRelationships transaction(ReceivedPaymentRelationshipsReceivePaymentTransaction transaction) { - - this.transaction = transaction; - return this; - } - - /** - * Get transaction - * @return transaction - **/ - @javax.annotation.Nullable - public ReceivedPaymentRelationshipsReceivePaymentTransaction getTransaction() { - return transaction; - } - - - public void setTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction transaction) { - this.transaction = transaction; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckDepositRelationships checkDepositRelationships = (CheckDepositRelationships) o; - return Objects.equals(this.org, checkDepositRelationships.org) && - Objects.equals(this.account, checkDepositRelationships.account) && - Objects.equals(this.customer, checkDepositRelationships.customer) && - Objects.equals(this.transaction, checkDepositRelationships.transaction); - } - - @Override - public int hashCode() { - return Objects.hash(org, account, customer, transaction); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckDepositRelationships {\n"); - sb.append(" org: ").append(toIndentedString(org)).append("\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" transaction: ").append(toIndentedString(transaction)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("org"); - openapiFields.add("account"); - openapiFields.add("customer"); - openapiFields.add("transaction"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CheckDepositRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CheckDepositRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CheckDepositRelationships is not found in the empty JSON string", CheckDepositRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CheckDepositRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CheckDepositRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CheckDepositRelationships.openapiRequiredFields) { - 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(); - // validate the optional field `org` - if (jsonObj.get("org") != null && !jsonObj.get("org").isJsonNull()) { - OrgRelationship.validateJsonElement(jsonObj.get("org")); - } - // validate the required field `account` - CheckDepositRelationshipsAccount.validateJsonElement(jsonObj.get("account")); - // validate the optional field `customer` - if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { - ReceivedPaymentRelationshipsCustomer.validateJsonElement(jsonObj.get("customer")); - } - // validate the optional field `transaction` - if (jsonObj.get("transaction") != null && !jsonObj.get("transaction").isJsonNull()) { - ReceivedPaymentRelationshipsReceivePaymentTransaction.validateJsonElement(jsonObj.get("transaction")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CheckDepositRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CheckDepositRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CheckDepositRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CheckDepositRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CheckDepositRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CheckDepositRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckDepositRelationships - * @throws IOException if the JSON string is invalid with respect to CheckDepositRelationships - */ - public static CheckDepositRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CheckDepositRelationships.class); - } - - /** - * Convert an instance of CheckDepositRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CheckDepositRelationshipsAccount.java b/src/main/java/org/openapitools/client/model/CheckDepositRelationshipsAccount.java deleted file mode 100644 index 145c1c5f..00000000 --- a/src/main/java/org/openapitools/client/model/CheckDepositRelationshipsAccount.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CheckDepositRelationshipsAccountData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CheckDepositRelationshipsAccount - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CheckDepositRelationshipsAccount { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CheckDepositRelationshipsAccountData data; - - public CheckDepositRelationshipsAccount() { - } - - public CheckDepositRelationshipsAccount data(CheckDepositRelationshipsAccountData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public CheckDepositRelationshipsAccountData getData() { - return data; - } - - - public void setData(CheckDepositRelationshipsAccountData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckDepositRelationshipsAccount checkDepositRelationshipsAccount = (CheckDepositRelationshipsAccount) o; - return Objects.equals(this.data, checkDepositRelationshipsAccount.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckDepositRelationshipsAccount {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CheckDepositRelationshipsAccount - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CheckDepositRelationshipsAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CheckDepositRelationshipsAccount is not found in the empty JSON string", CheckDepositRelationshipsAccount.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CheckDepositRelationshipsAccount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CheckDepositRelationshipsAccount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CheckDepositRelationshipsAccount.openapiRequiredFields) { - 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(); - // validate the required field `data` - CheckDepositRelationshipsAccountData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CheckDepositRelationshipsAccount.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CheckDepositRelationshipsAccount' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CheckDepositRelationshipsAccount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CheckDepositRelationshipsAccount value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CheckDepositRelationshipsAccount read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CheckDepositRelationshipsAccount given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckDepositRelationshipsAccount - * @throws IOException if the JSON string is invalid with respect to CheckDepositRelationshipsAccount - */ - public static CheckDepositRelationshipsAccount fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CheckDepositRelationshipsAccount.class); - } - - /** - * Convert an instance of CheckDepositRelationshipsAccount to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CheckDepositRelationshipsAccountData.java b/src/main/java/org/openapitools/client/model/CheckDepositRelationshipsAccountData.java deleted file mode 100644 index 67d1077d..00000000 --- a/src/main/java/org/openapitools/client/model/CheckDepositRelationshipsAccountData.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CheckDepositRelationshipsAccountData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CheckDepositRelationshipsAccountData { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - ACCOUNT("account"), - - DEPOSITACCOUNT("depositAccount"), - - BATCHACCOUNT("batchAccount"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public CheckDepositRelationshipsAccountData() { - } - - public CheckDepositRelationshipsAccountData type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CheckDepositRelationshipsAccountData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckDepositRelationshipsAccountData checkDepositRelationshipsAccountData = (CheckDepositRelationshipsAccountData) o; - return Objects.equals(this.type, checkDepositRelationshipsAccountData.type) && - Objects.equals(this.id, checkDepositRelationshipsAccountData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckDepositRelationshipsAccountData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CheckDepositRelationshipsAccountData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CheckDepositRelationshipsAccountData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CheckDepositRelationshipsAccountData is not found in the empty JSON string", CheckDepositRelationshipsAccountData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CheckDepositRelationshipsAccountData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CheckDepositRelationshipsAccountData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CheckDepositRelationshipsAccountData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CheckDepositRelationshipsAccountData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CheckDepositRelationshipsAccountData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CheckDepositRelationshipsAccountData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CheckDepositRelationshipsAccountData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CheckDepositRelationshipsAccountData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CheckDepositRelationshipsAccountData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckDepositRelationshipsAccountData - * @throws IOException if the JSON string is invalid with respect to CheckDepositRelationshipsAccountData - */ - public static CheckDepositRelationshipsAccountData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CheckDepositRelationshipsAccountData.class); - } - - /** - * Convert an instance of CheckDepositRelationshipsAccountData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CheckDepositStatus.java b/src/main/java/org/openapitools/client/model/CheckDepositStatus.java deleted file mode 100644 index ddb67383..00000000 --- a/src/main/java/org/openapitools/client/model/CheckDepositStatus.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets checkDepositStatus - */ -@JsonAdapter(CheckDepositStatus.Adapter.class) -public enum CheckDepositStatus { - - AWAITINGIMAGES("AwaitingImages"), - - AWAITINGFRONTIMAGE("AwaitingFrontImage"), - - AWAITINGBACKIMAGE("AwaitingBackImage"), - - AWAITINGCUSTOMERCONFIRMATION("AwaitingCustomerConfirmation"), - - PENDING("Pending"), - - PENDINGREVIEW("PendingReview"), - - REJECTED("Rejected"), - - CLEARING("Clearing"), - - SENT("Sent"), - - CANCELED("Canceled"), - - RETURNED("Returned"); - - private String value; - - CheckDepositStatus(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static CheckDepositStatus fromValue(String value) { - for (CheckDepositStatus b : CheckDepositStatus.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final CheckDepositStatus enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public CheckDepositStatus read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return CheckDepositStatus.fromValue(value); - } - } -} - diff --git a/src/main/java/org/openapitools/client/model/CheckDepositTransaction.java b/src/main/java/org/openapitools/client/model/CheckDepositTransaction.java deleted file mode 100644 index ba2da6c9..00000000 --- a/src/main/java/org/openapitools/client/model/CheckDepositTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CheckDepositTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CheckDepositTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CheckDepositTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CheckDepositTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public CheckDepositTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public CheckDepositTransaction attributes(CheckDepositTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CheckDepositTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CheckDepositTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public CheckDepositTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckDepositTransaction checkDepositTransaction = (CheckDepositTransaction) o; - return Objects.equals(this.attributes, checkDepositTransaction.attributes) && - Objects.equals(this.relationships, checkDepositTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckDepositTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CheckDepositTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CheckDepositTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CheckDepositTransaction is not found in the empty JSON string", CheckDepositTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CheckDepositTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CheckDepositTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CheckDepositTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CheckDepositTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CheckDepositTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CheckDepositTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CheckDepositTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CheckDepositTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CheckDepositTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckDepositTransaction - * @throws IOException if the JSON string is invalid with respect to CheckDepositTransaction - */ - public static CheckDepositTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CheckDepositTransaction.class); - } - - /** - * Convert an instance of CheckDepositTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CheckDepositTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/CheckDepositTransactionAllOfAttributes.java deleted file mode 100644 index efa80b10..00000000 --- a/src/main/java/org/openapitools/client/model/CheckDepositTransactionAllOfAttributes.java +++ /dev/null @@ -1,411 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CheckDepositTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CheckDepositTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public CheckDepositTransactionAllOfAttributes() { - } - - public CheckDepositTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public CheckDepositTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CheckDepositTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public CheckDepositTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public CheckDepositTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public CheckDepositTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckDepositTransactionAllOfAttributes checkDepositTransactionAllOfAttributes = (CheckDepositTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, checkDepositTransactionAllOfAttributes.createdAt) && - Objects.equals(this.amount, checkDepositTransactionAllOfAttributes.amount) && - Objects.equals(this.direction, checkDepositTransactionAllOfAttributes.direction) && - Objects.equals(this.balance, checkDepositTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, checkDepositTransactionAllOfAttributes.summary) && - Objects.equals(this.tags, checkDepositTransactionAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, amount, direction, balance, summary, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckDepositTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("amount"); - openapiFields.add("direction"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CheckDepositTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CheckDepositTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CheckDepositTransactionAllOfAttributes is not found in the empty JSON string", CheckDepositTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CheckDepositTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CheckDepositTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CheckDepositTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CheckDepositTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CheckDepositTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CheckDepositTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CheckDepositTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CheckDepositTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CheckDepositTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckDepositTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to CheckDepositTransactionAllOfAttributes - */ - public static CheckDepositTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CheckDepositTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of CheckDepositTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CheckPayment.java b/src/main/java/org/openapitools/client/model/CheckPayment.java deleted file mode 100644 index 51f80c2e..00000000 --- a/src/main/java/org/openapitools/client/model/CheckPayment.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CheckPaymentAttributes; -import org.openapitools.client.model.CheckPaymentRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CheckPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CheckPayment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "checkPayment"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CheckPaymentAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CheckPaymentRelationships relationships; - - public CheckPayment() { - } - - public CheckPayment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CheckPayment id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public CheckPayment attributes(CheckPaymentAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CheckPaymentAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CheckPaymentAttributes attributes) { - this.attributes = attributes; - } - - - public CheckPayment relationships(CheckPaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CheckPaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CheckPaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckPayment checkPayment = (CheckPayment) o; - return Objects.equals(this.type, checkPayment.type) && - Objects.equals(this.id, checkPayment.id) && - Objects.equals(this.attributes, checkPayment.attributes) && - Objects.equals(this.relationships, checkPayment.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckPayment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CheckPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CheckPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CheckPayment is not found in the empty JSON string", CheckPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CheckPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CheckPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CheckPayment.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - // validate the required field `attributes` - CheckPaymentAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CheckPaymentRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CheckPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CheckPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CheckPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CheckPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CheckPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CheckPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckPayment - * @throws IOException if the JSON string is invalid with respect to CheckPayment - */ - public static CheckPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CheckPayment.class); - } - - /** - * Convert an instance of CheckPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CheckPaymentAttributes.java b/src/main/java/org/openapitools/client/model/CheckPaymentAttributes.java deleted file mode 100644 index bc8d0fcf..00000000 --- a/src/main/java/org/openapitools/client/model/CheckPaymentAttributes.java +++ /dev/null @@ -1,1117 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.CheckPaymentAttributesCounterparty; -import org.openapitools.client.model.ReturnReason; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CheckPaymentAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CheckPaymentAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_RETURN_CUTOFF_TIME = "returnCutoffTime"; - @SerializedName(SERIALIZED_NAME_RETURN_CUTOFF_TIME) - private OffsetDateTime returnCutoffTime; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - MARKEDFORRETURN("MarkedForReturn"), - - RETURNED("Returned"), - - PROCESSED("Processed"), - - PENDINGREVIEW("PendingReview"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_MEMO = "memo"; - @SerializedName(SERIALIZED_NAME_MEMO) - private String memo; - - /** - * Gets or Sets deliveryStatus - */ - @JsonAdapter(DeliveryStatusEnum.Adapter.class) - public enum DeliveryStatusEnum { - MAILED("Mailed"), - - INLOCALAREA("InLocalArea"), - - DELIVERED("Delivered"), - - REROUTED("Rerouted"), - - RETURNEDTOSENDER("ReturnedToSender"); - - private String value; - - DeliveryStatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DeliveryStatusEnum fromValue(String value) { - for (DeliveryStatusEnum b : DeliveryStatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DeliveryStatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DeliveryStatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DeliveryStatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DELIVERY_STATUS = "deliveryStatus"; - @SerializedName(SERIALIZED_NAME_DELIVERY_STATUS) - private DeliveryStatusEnum deliveryStatus; - - public static final String SERIALIZED_NAME_SEND_AT = "sendAt"; - @SerializedName(SERIALIZED_NAME_SEND_AT) - private OffsetDateTime sendAt; - - public static final String SERIALIZED_NAME_COUNTERPARTY = "counterparty"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY) - private CheckPaymentAttributesCounterparty counterparty; - - public static final String SERIALIZED_NAME_TRACKED_AT = "trackedAt"; - @SerializedName(SERIALIZED_NAME_TRACKED_AT) - private OffsetDateTime trackedAt; - - public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; - @SerializedName(SERIALIZED_NAME_POSTAL_CODE) - private String postalCode; - - public static final String SERIALIZED_NAME_EXPECTED_DELIVERY = "expectedDelivery"; - @SerializedName(SERIALIZED_NAME_EXPECTED_DELIVERY) - private LocalDate expectedDelivery; - - public static final String SERIALIZED_NAME_ORIGINATED = "originated"; - @SerializedName(SERIALIZED_NAME_ORIGINATED) - private Boolean originated; - - public static final String SERIALIZED_NAME_EXPIRATION_DATE = "expirationDate"; - @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE) - private LocalDate expirationDate; - - public static final String SERIALIZED_NAME_REJECT_REASON = "rejectReason"; - @SerializedName(SERIALIZED_NAME_REJECT_REASON) - private String rejectReason; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_RETURN_REASON = "returnReason"; - @SerializedName(SERIALIZED_NAME_RETURN_REASON) - private ReturnReason returnReason; - - /** - * Gets or Sets pendingReviewReasons - */ - @JsonAdapter(PendingReviewReasonsEnum.Adapter.class) - public enum PendingReviewReasonsEnum { - NAMEMISSMATCH("NameMissMatch"), - - SOFTLIMIT("SoftLimit"); - - private String value; - - PendingReviewReasonsEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PendingReviewReasonsEnum fromValue(String value) { - for (PendingReviewReasonsEnum b : PendingReviewReasonsEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PendingReviewReasonsEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PendingReviewReasonsEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PendingReviewReasonsEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_PENDING_REVIEW_REASONS = "pendingReviewReasons"; - @SerializedName(SERIALIZED_NAME_PENDING_REVIEW_REASONS) - private List pendingReviewReasons; - - public static final String SERIALIZED_NAME_CHECK_NUMBER = "checkNumber"; - @SerializedName(SERIALIZED_NAME_CHECK_NUMBER) - private String checkNumber; - - public static final String SERIALIZED_NAME_ON_US_AUXILIARY = "onUsAuxiliary"; - @SerializedName(SERIALIZED_NAME_ON_US_AUXILIARY) - private String onUsAuxiliary; - - public static final String SERIALIZED_NAME_ON_US = "onUs"; - @SerializedName(SERIALIZED_NAME_ON_US) - private String onUs; - - public static final String SERIALIZED_NAME_COUNTERPARTY_ROUTING_NUMBER = "counterpartyRoutingNumber"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_ROUTING_NUMBER) - private String counterpartyRoutingNumber; - - /** - * Gets or Sets additionalVerificationStatus - */ - @JsonAdapter(AdditionalVerificationStatusEnum.Adapter.class) - public enum AdditionalVerificationStatusEnum { - REQUIRED("Required"), - - NOTREQUIRED("NotRequired"), - - APPROVED("Approved"); - - private String value; - - AdditionalVerificationStatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AdditionalVerificationStatusEnum fromValue(String value) { - for (AdditionalVerificationStatusEnum b : AdditionalVerificationStatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AdditionalVerificationStatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AdditionalVerificationStatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AdditionalVerificationStatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_ADDITIONAL_VERIFICATION_STATUS = "additionalVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDITIONAL_VERIFICATION_STATUS) - private AdditionalVerificationStatusEnum additionalVerificationStatus; - - public CheckPaymentAttributes() { - } - - public CheckPaymentAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public CheckPaymentAttributes updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public CheckPaymentAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CheckPaymentAttributes returnCutoffTime(OffsetDateTime returnCutoffTime) { - - this.returnCutoffTime = returnCutoffTime; - return this; - } - - /** - * Get returnCutoffTime - * @return returnCutoffTime - **/ - @javax.annotation.Nullable - public OffsetDateTime getReturnCutoffTime() { - return returnCutoffTime; - } - - - public void setReturnCutoffTime(OffsetDateTime returnCutoffTime) { - this.returnCutoffTime = returnCutoffTime; - } - - - public CheckPaymentAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public CheckPaymentAttributes memo(String memo) { - - this.memo = memo; - return this; - } - - /** - * Get memo - * @return memo - **/ - @javax.annotation.Nullable - public String getMemo() { - return memo; - } - - - public void setMemo(String memo) { - this.memo = memo; - } - - - public CheckPaymentAttributes deliveryStatus(DeliveryStatusEnum deliveryStatus) { - - this.deliveryStatus = deliveryStatus; - return this; - } - - /** - * Get deliveryStatus - * @return deliveryStatus - **/ - @javax.annotation.Nullable - public DeliveryStatusEnum getDeliveryStatus() { - return deliveryStatus; - } - - - public void setDeliveryStatus(DeliveryStatusEnum deliveryStatus) { - this.deliveryStatus = deliveryStatus; - } - - - public CheckPaymentAttributes sendAt(OffsetDateTime sendAt) { - - this.sendAt = sendAt; - return this; - } - - /** - * Get sendAt - * @return sendAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getSendAt() { - return sendAt; - } - - - public void setSendAt(OffsetDateTime sendAt) { - this.sendAt = sendAt; - } - - - public CheckPaymentAttributes counterparty(CheckPaymentAttributesCounterparty counterparty) { - - this.counterparty = counterparty; - return this; - } - - /** - * Get counterparty - * @return counterparty - **/ - @javax.annotation.Nullable - public CheckPaymentAttributesCounterparty getCounterparty() { - return counterparty; - } - - - public void setCounterparty(CheckPaymentAttributesCounterparty counterparty) { - this.counterparty = counterparty; - } - - - public CheckPaymentAttributes trackedAt(OffsetDateTime trackedAt) { - - this.trackedAt = trackedAt; - return this; - } - - /** - * Get trackedAt - * @return trackedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getTrackedAt() { - return trackedAt; - } - - - public void setTrackedAt(OffsetDateTime trackedAt) { - this.trackedAt = trackedAt; - } - - - public CheckPaymentAttributes postalCode(String postalCode) { - - this.postalCode = postalCode; - return this; - } - - /** - * Get postalCode - * @return postalCode - **/ - @javax.annotation.Nullable - public String getPostalCode() { - return postalCode; - } - - - public void setPostalCode(String postalCode) { - this.postalCode = postalCode; - } - - - public CheckPaymentAttributes expectedDelivery(LocalDate expectedDelivery) { - - this.expectedDelivery = expectedDelivery; - return this; - } - - /** - * Get expectedDelivery - * @return expectedDelivery - **/ - @javax.annotation.Nullable - public LocalDate getExpectedDelivery() { - return expectedDelivery; - } - - - public void setExpectedDelivery(LocalDate expectedDelivery) { - this.expectedDelivery = expectedDelivery; - } - - - public CheckPaymentAttributes originated(Boolean originated) { - - this.originated = originated; - return this; - } - - /** - * Get originated - * @return originated - **/ - @javax.annotation.Nonnull - public Boolean getOriginated() { - return originated; - } - - - public void setOriginated(Boolean originated) { - this.originated = originated; - } - - - public CheckPaymentAttributes expirationDate(LocalDate expirationDate) { - - this.expirationDate = expirationDate; - return this; - } - - /** - * Get expirationDate - * @return expirationDate - **/ - @javax.annotation.Nullable - public LocalDate getExpirationDate() { - return expirationDate; - } - - - public void setExpirationDate(LocalDate expirationDate) { - this.expirationDate = expirationDate; - } - - - public CheckPaymentAttributes rejectReason(String rejectReason) { - - this.rejectReason = rejectReason; - return this; - } - - /** - * Get rejectReason - * @return rejectReason - **/ - @javax.annotation.Nullable - public String getRejectReason() { - return rejectReason; - } - - - public void setRejectReason(String rejectReason) { - this.rejectReason = rejectReason; - } - - - public CheckPaymentAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CheckPaymentAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public CheckPaymentAttributes returnReason(ReturnReason returnReason) { - - this.returnReason = returnReason; - return this; - } - - /** - * Get returnReason - * @return returnReason - **/ - @javax.annotation.Nullable - public ReturnReason getReturnReason() { - return returnReason; - } - - - public void setReturnReason(ReturnReason returnReason) { - this.returnReason = returnReason; - } - - - public CheckPaymentAttributes pendingReviewReasons(List pendingReviewReasons) { - - this.pendingReviewReasons = pendingReviewReasons; - return this; - } - - public CheckPaymentAttributes addPendingReviewReasonsItem(PendingReviewReasonsEnum pendingReviewReasonsItem) { - if (this.pendingReviewReasons == null) { - this.pendingReviewReasons = new ArrayList<>(); - } - this.pendingReviewReasons.add(pendingReviewReasonsItem); - return this; - } - - /** - * Get pendingReviewReasons - * @return pendingReviewReasons - **/ - @javax.annotation.Nullable - public List getPendingReviewReasons() { - return pendingReviewReasons; - } - - - public void setPendingReviewReasons(List pendingReviewReasons) { - this.pendingReviewReasons = pendingReviewReasons; - } - - - public CheckPaymentAttributes checkNumber(String checkNumber) { - - this.checkNumber = checkNumber; - return this; - } - - /** - * Get checkNumber - * @return checkNumber - **/ - @javax.annotation.Nullable - public String getCheckNumber() { - return checkNumber; - } - - - public void setCheckNumber(String checkNumber) { - this.checkNumber = checkNumber; - } - - - public CheckPaymentAttributes onUsAuxiliary(String onUsAuxiliary) { - - this.onUsAuxiliary = onUsAuxiliary; - return this; - } - - /** - * Get onUsAuxiliary - * @return onUsAuxiliary - **/ - @javax.annotation.Nullable - public String getOnUsAuxiliary() { - return onUsAuxiliary; - } - - - public void setOnUsAuxiliary(String onUsAuxiliary) { - this.onUsAuxiliary = onUsAuxiliary; - } - - - public CheckPaymentAttributes onUs(String onUs) { - - this.onUs = onUs; - return this; - } - - /** - * Get onUs - * @return onUs - **/ - @javax.annotation.Nullable - public String getOnUs() { - return onUs; - } - - - public void setOnUs(String onUs) { - this.onUs = onUs; - } - - - public CheckPaymentAttributes counterpartyRoutingNumber(String counterpartyRoutingNumber) { - - this.counterpartyRoutingNumber = counterpartyRoutingNumber; - return this; - } - - /** - * Get counterpartyRoutingNumber - * @return counterpartyRoutingNumber - **/ - @javax.annotation.Nullable - public String getCounterpartyRoutingNumber() { - return counterpartyRoutingNumber; - } - - - public void setCounterpartyRoutingNumber(String counterpartyRoutingNumber) { - this.counterpartyRoutingNumber = counterpartyRoutingNumber; - } - - - public CheckPaymentAttributes additionalVerificationStatus(AdditionalVerificationStatusEnum additionalVerificationStatus) { - - this.additionalVerificationStatus = additionalVerificationStatus; - return this; - } - - /** - * Get additionalVerificationStatus - * @return additionalVerificationStatus - **/ - @javax.annotation.Nullable - public AdditionalVerificationStatusEnum getAdditionalVerificationStatus() { - return additionalVerificationStatus; - } - - - public void setAdditionalVerificationStatus(AdditionalVerificationStatusEnum additionalVerificationStatus) { - this.additionalVerificationStatus = additionalVerificationStatus; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckPaymentAttributes checkPaymentAttributes = (CheckPaymentAttributes) o; - return Objects.equals(this.createdAt, checkPaymentAttributes.createdAt) && - Objects.equals(this.updatedAt, checkPaymentAttributes.updatedAt) && - Objects.equals(this.amount, checkPaymentAttributes.amount) && - Objects.equals(this.returnCutoffTime, checkPaymentAttributes.returnCutoffTime) && - Objects.equals(this.status, checkPaymentAttributes.status) && - Objects.equals(this.memo, checkPaymentAttributes.memo) && - Objects.equals(this.deliveryStatus, checkPaymentAttributes.deliveryStatus) && - Objects.equals(this.sendAt, checkPaymentAttributes.sendAt) && - Objects.equals(this.counterparty, checkPaymentAttributes.counterparty) && - Objects.equals(this.trackedAt, checkPaymentAttributes.trackedAt) && - Objects.equals(this.postalCode, checkPaymentAttributes.postalCode) && - Objects.equals(this.expectedDelivery, checkPaymentAttributes.expectedDelivery) && - Objects.equals(this.originated, checkPaymentAttributes.originated) && - Objects.equals(this.expirationDate, checkPaymentAttributes.expirationDate) && - Objects.equals(this.rejectReason, checkPaymentAttributes.rejectReason) && - Objects.equals(this.tags, checkPaymentAttributes.tags) && - Objects.equals(this.description, checkPaymentAttributes.description) && - Objects.equals(this.returnReason, checkPaymentAttributes.returnReason) && - Objects.equals(this.pendingReviewReasons, checkPaymentAttributes.pendingReviewReasons) && - Objects.equals(this.checkNumber, checkPaymentAttributes.checkNumber) && - Objects.equals(this.onUsAuxiliary, checkPaymentAttributes.onUsAuxiliary) && - Objects.equals(this.onUs, checkPaymentAttributes.onUs) && - Objects.equals(this.counterpartyRoutingNumber, checkPaymentAttributes.counterpartyRoutingNumber) && - Objects.equals(this.additionalVerificationStatus, checkPaymentAttributes.additionalVerificationStatus); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, updatedAt, amount, returnCutoffTime, status, memo, deliveryStatus, sendAt, counterparty, trackedAt, postalCode, expectedDelivery, originated, expirationDate, rejectReason, tags, description, returnReason, pendingReviewReasons, checkNumber, onUsAuxiliary, onUs, counterpartyRoutingNumber, additionalVerificationStatus); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckPaymentAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" returnCutoffTime: ").append(toIndentedString(returnCutoffTime)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" memo: ").append(toIndentedString(memo)).append("\n"); - sb.append(" deliveryStatus: ").append(toIndentedString(deliveryStatus)).append("\n"); - sb.append(" sendAt: ").append(toIndentedString(sendAt)).append("\n"); - sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); - sb.append(" trackedAt: ").append(toIndentedString(trackedAt)).append("\n"); - sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); - sb.append(" expectedDelivery: ").append(toIndentedString(expectedDelivery)).append("\n"); - sb.append(" originated: ").append(toIndentedString(originated)).append("\n"); - sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); - sb.append(" rejectReason: ").append(toIndentedString(rejectReason)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" returnReason: ").append(toIndentedString(returnReason)).append("\n"); - sb.append(" pendingReviewReasons: ").append(toIndentedString(pendingReviewReasons)).append("\n"); - sb.append(" checkNumber: ").append(toIndentedString(checkNumber)).append("\n"); - sb.append(" onUsAuxiliary: ").append(toIndentedString(onUsAuxiliary)).append("\n"); - sb.append(" onUs: ").append(toIndentedString(onUs)).append("\n"); - sb.append(" counterpartyRoutingNumber: ").append(toIndentedString(counterpartyRoutingNumber)).append("\n"); - sb.append(" additionalVerificationStatus: ").append(toIndentedString(additionalVerificationStatus)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("amount"); - openapiFields.add("returnCutoffTime"); - openapiFields.add("status"); - openapiFields.add("memo"); - openapiFields.add("deliveryStatus"); - openapiFields.add("sendAt"); - openapiFields.add("counterparty"); - openapiFields.add("trackedAt"); - openapiFields.add("postalCode"); - openapiFields.add("expectedDelivery"); - openapiFields.add("originated"); - openapiFields.add("expirationDate"); - openapiFields.add("rejectReason"); - openapiFields.add("tags"); - openapiFields.add("description"); - openapiFields.add("returnReason"); - openapiFields.add("pendingReviewReasons"); - openapiFields.add("checkNumber"); - openapiFields.add("onUsAuxiliary"); - openapiFields.add("onUs"); - openapiFields.add("counterpartyRoutingNumber"); - openapiFields.add("additionalVerificationStatus"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("updatedAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("originated"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CheckPaymentAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CheckPaymentAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CheckPaymentAttributes is not found in the empty JSON string", CheckPaymentAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CheckPaymentAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CheckPaymentAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CheckPaymentAttributes.openapiRequiredFields) { - 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("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())); - } - if ((jsonObj.get("memo") != null && !jsonObj.get("memo").isJsonNull()) && !jsonObj.get("memo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memo").toString())); - } - if ((jsonObj.get("deliveryStatus") != null && !jsonObj.get("deliveryStatus").isJsonNull()) && !jsonObj.get("deliveryStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `deliveryStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deliveryStatus").toString())); - } - // validate the optional field `counterparty` - if (jsonObj.get("counterparty") != null && !jsonObj.get("counterparty").isJsonNull()) { - CheckPaymentAttributesCounterparty.validateJsonElement(jsonObj.get("counterparty")); - } - if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); - } - if ((jsonObj.get("rejectReason") != null && !jsonObj.get("rejectReason").isJsonNull()) && !jsonObj.get("rejectReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `rejectReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rejectReason").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("pendingReviewReasons") != null && !jsonObj.get("pendingReviewReasons").isJsonNull() && !jsonObj.get("pendingReviewReasons").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `pendingReviewReasons` to be an array in the JSON string but got `%s`", jsonObj.get("pendingReviewReasons").toString())); - } - if ((jsonObj.get("checkNumber") != null && !jsonObj.get("checkNumber").isJsonNull()) && !jsonObj.get("checkNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `checkNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("checkNumber").toString())); - } - if ((jsonObj.get("onUsAuxiliary") != null && !jsonObj.get("onUsAuxiliary").isJsonNull()) && !jsonObj.get("onUsAuxiliary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `onUsAuxiliary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("onUsAuxiliary").toString())); - } - if ((jsonObj.get("onUs") != null && !jsonObj.get("onUs").isJsonNull()) && !jsonObj.get("onUs").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `onUs` to be a primitive type in the JSON string but got `%s`", jsonObj.get("onUs").toString())); - } - if ((jsonObj.get("counterpartyRoutingNumber") != null && !jsonObj.get("counterpartyRoutingNumber").isJsonNull()) && !jsonObj.get("counterpartyRoutingNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `counterpartyRoutingNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("counterpartyRoutingNumber").toString())); - } - if ((jsonObj.get("additionalVerificationStatus") != null && !jsonObj.get("additionalVerificationStatus").isJsonNull()) && !jsonObj.get("additionalVerificationStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `additionalVerificationStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalVerificationStatus").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CheckPaymentAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CheckPaymentAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CheckPaymentAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CheckPaymentAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CheckPaymentAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CheckPaymentAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckPaymentAttributes - * @throws IOException if the JSON string is invalid with respect to CheckPaymentAttributes - */ - public static CheckPaymentAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CheckPaymentAttributes.class); - } - - /** - * Convert an instance of CheckPaymentAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CheckPaymentAttributesCounterparty.java b/src/main/java/org/openapitools/client/model/CheckPaymentAttributesCounterparty.java deleted file mode 100644 index bb3ae032..00000000 --- a/src/main/java/org/openapitools/client/model/CheckPaymentAttributesCounterparty.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Address; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CheckPaymentAttributesCounterparty - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CheckPaymentAttributesCounterparty { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_COUNTERPARTY_MOVED = "counterpartyMoved"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_MOVED) - private Boolean counterpartyMoved; - - public CheckPaymentAttributesCounterparty() { - } - - public CheckPaymentAttributesCounterparty name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public CheckPaymentAttributesCounterparty address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public CheckPaymentAttributesCounterparty counterpartyMoved(Boolean counterpartyMoved) { - - this.counterpartyMoved = counterpartyMoved; - return this; - } - - /** - * Get counterpartyMoved - * @return counterpartyMoved - **/ - @javax.annotation.Nullable - public Boolean getCounterpartyMoved() { - return counterpartyMoved; - } - - - public void setCounterpartyMoved(Boolean counterpartyMoved) { - this.counterpartyMoved = counterpartyMoved; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckPaymentAttributesCounterparty checkPaymentAttributesCounterparty = (CheckPaymentAttributesCounterparty) o; - return Objects.equals(this.name, checkPaymentAttributesCounterparty.name) && - Objects.equals(this.address, checkPaymentAttributesCounterparty.address) && - Objects.equals(this.counterpartyMoved, checkPaymentAttributesCounterparty.counterpartyMoved); - } - - @Override - public int hashCode() { - return Objects.hash(name, address, counterpartyMoved); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckPaymentAttributesCounterparty {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" counterpartyMoved: ").append(toIndentedString(counterpartyMoved)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("address"); - openapiFields.add("counterpartyMoved"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CheckPaymentAttributesCounterparty - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CheckPaymentAttributesCounterparty.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CheckPaymentAttributesCounterparty is not found in the empty JSON string", CheckPaymentAttributesCounterparty.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CheckPaymentAttributesCounterparty.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CheckPaymentAttributesCounterparty` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("address")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CheckPaymentAttributesCounterparty.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CheckPaymentAttributesCounterparty' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CheckPaymentAttributesCounterparty.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CheckPaymentAttributesCounterparty value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CheckPaymentAttributesCounterparty read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CheckPaymentAttributesCounterparty given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckPaymentAttributesCounterparty - * @throws IOException if the JSON string is invalid with respect to CheckPaymentAttributesCounterparty - */ - public static CheckPaymentAttributesCounterparty fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CheckPaymentAttributesCounterparty.class); - } - - /** - * Convert an instance of CheckPaymentAttributesCounterparty to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CheckPaymentRelationship.java b/src/main/java/org/openapitools/client/model/CheckPaymentRelationship.java deleted file mode 100644 index 63b94830..00000000 --- a/src/main/java/org/openapitools/client/model/CheckPaymentRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PaymentRelationshipData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CheckPaymentRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CheckPaymentRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private PaymentRelationshipData data; - - public CheckPaymentRelationship() { - } - - public CheckPaymentRelationship data(PaymentRelationshipData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public PaymentRelationshipData getData() { - return data; - } - - - public void setData(PaymentRelationshipData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckPaymentRelationship checkPaymentRelationship = (CheckPaymentRelationship) o; - return Objects.equals(this.data, checkPaymentRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckPaymentRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CheckPaymentRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CheckPaymentRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CheckPaymentRelationship is not found in the empty JSON string", CheckPaymentRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CheckPaymentRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CheckPaymentRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CheckPaymentRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - PaymentRelationshipData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CheckPaymentRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CheckPaymentRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CheckPaymentRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CheckPaymentRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CheckPaymentRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CheckPaymentRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckPaymentRelationship - * @throws IOException if the JSON string is invalid with respect to CheckPaymentRelationship - */ - public static CheckPaymentRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CheckPaymentRelationship.class); - } - - /** - * Convert an instance of CheckPaymentRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CheckPaymentRelationships.java b/src/main/java/org/openapitools/client/model/CheckPaymentRelationships.java deleted file mode 100644 index 5cce9363..00000000 --- a/src/main/java/org/openapitools/client/model/CheckPaymentRelationships.java +++ /dev/null @@ -1,315 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CustomersRelationship; -import org.openapitools.client.model.ReceivedPaymentRelationshipsCustomer; -import org.openapitools.client.model.ReceivedPaymentRelationshipsReceivePaymentTransaction; -import org.openapitools.client.model.RecurringAchPaymentRelationshipsAccount; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CheckPaymentRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CheckPaymentRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private RecurringAchPaymentRelationshipsAccount account; - - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private ReceivedPaymentRelationshipsCustomer customer; - - public static final String SERIALIZED_NAME_CUSTOMERS = "customers"; - @SerializedName(SERIALIZED_NAME_CUSTOMERS) - private CustomersRelationship customers; - - public static final String SERIALIZED_NAME_TRANSACTION = "transaction"; - @SerializedName(SERIALIZED_NAME_TRANSACTION) - private ReceivedPaymentRelationshipsReceivePaymentTransaction transaction; - - public CheckPaymentRelationships() { - } - - public CheckPaymentRelationships account(RecurringAchPaymentRelationshipsAccount account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public RecurringAchPaymentRelationshipsAccount getAccount() { - return account; - } - - - public void setAccount(RecurringAchPaymentRelationshipsAccount account) { - this.account = account; - } - - - public CheckPaymentRelationships customer(ReceivedPaymentRelationshipsCustomer customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nullable - public ReceivedPaymentRelationshipsCustomer getCustomer() { - return customer; - } - - - public void setCustomer(ReceivedPaymentRelationshipsCustomer customer) { - this.customer = customer; - } - - - public CheckPaymentRelationships customers(CustomersRelationship customers) { - - this.customers = customers; - return this; - } - - /** - * Get customers - * @return customers - **/ - @javax.annotation.Nullable - public CustomersRelationship getCustomers() { - return customers; - } - - - public void setCustomers(CustomersRelationship customers) { - this.customers = customers; - } - - - public CheckPaymentRelationships transaction(ReceivedPaymentRelationshipsReceivePaymentTransaction transaction) { - - this.transaction = transaction; - return this; - } - - /** - * Get transaction - * @return transaction - **/ - @javax.annotation.Nullable - public ReceivedPaymentRelationshipsReceivePaymentTransaction getTransaction() { - return transaction; - } - - - public void setTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction transaction) { - this.transaction = transaction; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckPaymentRelationships checkPaymentRelationships = (CheckPaymentRelationships) o; - return Objects.equals(this.account, checkPaymentRelationships.account) && - Objects.equals(this.customer, checkPaymentRelationships.customer) && - Objects.equals(this.customers, checkPaymentRelationships.customers) && - Objects.equals(this.transaction, checkPaymentRelationships.transaction); - } - - @Override - public int hashCode() { - return Objects.hash(account, customer, customers, transaction); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckPaymentRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" customers: ").append(toIndentedString(customers)).append("\n"); - sb.append(" transaction: ").append(toIndentedString(transaction)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - openapiFields.add("customer"); - openapiFields.add("customers"); - openapiFields.add("transaction"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CheckPaymentRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CheckPaymentRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CheckPaymentRelationships is not found in the empty JSON string", CheckPaymentRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CheckPaymentRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CheckPaymentRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CheckPaymentRelationships.openapiRequiredFields) { - 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(); - // validate the required field `account` - RecurringAchPaymentRelationshipsAccount.validateJsonElement(jsonObj.get("account")); - // validate the optional field `customer` - if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { - ReceivedPaymentRelationshipsCustomer.validateJsonElement(jsonObj.get("customer")); - } - // validate the optional field `customers` - if (jsonObj.get("customers") != null && !jsonObj.get("customers").isJsonNull()) { - CustomersRelationship.validateJsonElement(jsonObj.get("customers")); - } - // validate the optional field `transaction` - if (jsonObj.get("transaction") != null && !jsonObj.get("transaction").isJsonNull()) { - ReceivedPaymentRelationshipsReceivePaymentTransaction.validateJsonElement(jsonObj.get("transaction")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CheckPaymentRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CheckPaymentRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CheckPaymentRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CheckPaymentRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CheckPaymentRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CheckPaymentRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckPaymentRelationships - * @throws IOException if the JSON string is invalid with respect to CheckPaymentRelationships - */ - public static CheckPaymentRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CheckPaymentRelationships.class); - } - - /** - * Convert an instance of CheckPaymentRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CheckPaymentTransaction.java b/src/main/java/org/openapitools/client/model/CheckPaymentTransaction.java deleted file mode 100644 index a69cd520..00000000 --- a/src/main/java/org/openapitools/client/model/CheckPaymentTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CheckDepositTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CheckPaymentTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CheckPaymentTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CheckDepositTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public CheckPaymentTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public CheckPaymentTransaction attributes(CheckDepositTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CheckDepositTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CheckDepositTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public CheckPaymentTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckPaymentTransaction checkPaymentTransaction = (CheckPaymentTransaction) o; - return Objects.equals(this.attributes, checkPaymentTransaction.attributes) && - Objects.equals(this.relationships, checkPaymentTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckPaymentTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CheckPaymentTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CheckPaymentTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CheckPaymentTransaction is not found in the empty JSON string", CheckPaymentTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CheckPaymentTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CheckPaymentTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CheckPaymentTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CheckPaymentTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CheckPaymentTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CheckPaymentTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CheckPaymentTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CheckPaymentTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CheckPaymentTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of CheckPaymentTransaction - * @throws IOException if the JSON string is invalid with respect to CheckPaymentTransaction - */ - public static CheckPaymentTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CheckPaymentTransaction.class); - } - - /** - * Convert an instance of CheckPaymentTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CloseAccountRequest.java b/src/main/java/org/openapitools/client/model/CloseAccountRequest.java deleted file mode 100644 index cc15fc3d..00000000 --- a/src/main/java/org/openapitools/client/model/CloseAccountRequest.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CloseAccountRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CloseAccountRequest { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CloseAccountRequest data; - - public CloseAccountRequest() { - } - - public CloseAccountRequest data(CloseAccountRequest data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CloseAccountRequest getData() { - return data; - } - - - public void setData(CloseAccountRequest data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CloseAccountRequest closeAccountRequest = (CloseAccountRequest) o; - return Objects.equals(this.data, closeAccountRequest.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CloseAccountRequest {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CloseAccountRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CloseAccountRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CloseAccountRequest is not found in the empty JSON string", CloseAccountRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CloseAccountRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CloseAccountRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CloseAccountRequest.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CloseAccountRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CloseAccountRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CloseAccountRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CloseAccountRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CloseAccountRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CloseAccountRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CloseAccountRequest - * @throws IOException if the JSON string is invalid with respect to CloseAccountRequest - */ - public static CloseAccountRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CloseAccountRequest.class); - } - - /** - * Convert an instance of CloseAccountRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CloseAccountRequestAttributes.java b/src/main/java/org/openapitools/client/model/CloseAccountRequestAttributes.java deleted file mode 100644 index 8e353233..00000000 --- a/src/main/java/org/openapitools/client/model/CloseAccountRequestAttributes.java +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CloseAccountRequestAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CloseAccountRequestAttributes { - /** - * Gets or Sets reason - */ - @JsonAdapter(ReasonEnum.Adapter.class) - public enum ReasonEnum { - BYCUSTOMER("ByCustomer"), - - FRAUD("Fraud"); - - private String value; - - ReasonEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ReasonEnum fromValue(String value) { - for (ReasonEnum b : ReasonEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ReasonEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ReasonEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ReasonEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_REASON = "reason"; - @SerializedName(SERIALIZED_NAME_REASON) - private ReasonEnum reason = ReasonEnum.BYCUSTOMER; - - /** - * Gets or Sets fraudReason - */ - @JsonAdapter(FraudReasonEnum.Adapter.class) - public enum FraudReasonEnum { - ACHACTIVITY("ACHActivity"), - - CARDACTIVITY("CardActivity"), - - CHECKACTIVITY("CheckActivity"), - - APPLICATIONHISTORY("ApplicationHistory"), - - ACCOUNTACTIVITY("AccountActivity"), - - CLIENTIDENTIFIED("ClientIdentified"), - - IDENTITYTHEFT("IdentityTheft"), - - LINKEDTOFRAUDULENTCUSTOMER("LinkedToFraudulentCustomer"); - - private String value; - - FraudReasonEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FraudReasonEnum fromValue(String value) { - for (FraudReasonEnum b : FraudReasonEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FraudReasonEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FraudReasonEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FraudReasonEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_FRAUD_REASON = "fraudReason"; - @SerializedName(SERIALIZED_NAME_FRAUD_REASON) - private FraudReasonEnum fraudReason; - - public CloseAccountRequestAttributes() { - } - - public CloseAccountRequestAttributes reason(ReasonEnum reason) { - - this.reason = reason; - return this; - } - - /** - * Get reason - * @return reason - **/ - @javax.annotation.Nullable - public ReasonEnum getReason() { - return reason; - } - - - public void setReason(ReasonEnum reason) { - this.reason = reason; - } - - - public CloseAccountRequestAttributes fraudReason(FraudReasonEnum fraudReason) { - - this.fraudReason = fraudReason; - return this; - } - - /** - * Get fraudReason - * @return fraudReason - **/ - @javax.annotation.Nullable - public FraudReasonEnum getFraudReason() { - return fraudReason; - } - - - public void setFraudReason(FraudReasonEnum fraudReason) { - this.fraudReason = fraudReason; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CloseAccountRequestAttributes closeAccountRequestAttributes = (CloseAccountRequestAttributes) o; - return Objects.equals(this.reason, closeAccountRequestAttributes.reason) && - Objects.equals(this.fraudReason, closeAccountRequestAttributes.fraudReason); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(reason, fraudReason); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CloseAccountRequestAttributes {\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append(" fraudReason: ").append(toIndentedString(fraudReason)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("reason"); - openapiFields.add("fraudReason"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CloseAccountRequestAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CloseAccountRequestAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CloseAccountRequestAttributes is not found in the empty JSON string", CloseAccountRequestAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CloseAccountRequestAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CloseAccountRequestAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); - } - if ((jsonObj.get("fraudReason") != null && !jsonObj.get("fraudReason").isJsonNull()) && !jsonObj.get("fraudReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fraudReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fraudReason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CloseAccountRequestAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CloseAccountRequestAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CloseAccountRequestAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CloseAccountRequestAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CloseAccountRequestAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CloseAccountRequestAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CloseAccountRequestAttributes - * @throws IOException if the JSON string is invalid with respect to CloseAccountRequestAttributes - */ - public static CloseAccountRequestAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CloseAccountRequestAttributes.class); - } - - /** - * Convert an instance of CloseAccountRequestAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Contact.java b/src/main/java/org/openapitools/client/model/Contact.java deleted file mode 100644 index 01738508..00000000 --- a/src/main/java/org/openapitools/client/model/Contact.java +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.FullName; -import org.openapitools.client.model.Phone; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Contact - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Contact { - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_JWT_SUBJECT = "jwtSubject"; - @SerializedName(SERIALIZED_NAME_JWT_SUBJECT) - private String jwtSubject; - - public Contact() { - } - - public Contact fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nullable - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public Contact email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public Contact phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public Contact jwtSubject(String jwtSubject) { - - this.jwtSubject = jwtSubject; - return this; - } - - /** - * Get jwtSubject - * @return jwtSubject - **/ - @javax.annotation.Nullable - public String getJwtSubject() { - return jwtSubject; - } - - - public void setJwtSubject(String jwtSubject) { - this.jwtSubject = jwtSubject; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Contact contact = (Contact) o; - return Objects.equals(this.fullName, contact.fullName) && - Objects.equals(this.email, contact.email) && - Objects.equals(this.phone, contact.phone) && - Objects.equals(this.jwtSubject, contact.jwtSubject); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(fullName, email, phone, jwtSubject); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Contact {\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fullName"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("jwtSubject"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Contact - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Contact.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Contact is not found in the empty JSON string", Contact.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Contact.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Contact` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `fullName` - if (jsonObj.get("fullName") != null && !jsonObj.get("fullName").isJsonNull()) { - FullName.validateJsonElement(jsonObj.get("fullName")); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); - } - if ((jsonObj.get("jwtSubject") != null && !jsonObj.get("jwtSubject").isJsonNull()) && !jsonObj.get("jwtSubject").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `jwtSubject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jwtSubject").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Contact.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Contact' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Contact.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Contact value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Contact read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Contact given an JSON string - * - * @param jsonString JSON string - * @return An instance of Contact - * @throws IOException if the JSON string is invalid with respect to Contact - */ - public static Contact fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Contact.class); - } - - /** - * Convert an instance of Contact to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Coordinates.java b/src/main/java/org/openapitools/client/model/Coordinates.java deleted file mode 100644 index 75de3b5f..00000000 --- a/src/main/java/org/openapitools/client/model/Coordinates.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.math.BigDecimal; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Coordinates - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Coordinates { - public static final String SERIALIZED_NAME_LONGITUDE = "longitude"; - @SerializedName(SERIALIZED_NAME_LONGITUDE) - private BigDecimal longitude; - - public static final String SERIALIZED_NAME_LATITUDE = "latitude"; - @SerializedName(SERIALIZED_NAME_LATITUDE) - private BigDecimal latitude; - - public Coordinates() { - } - - public Coordinates longitude(BigDecimal longitude) { - - this.longitude = longitude; - return this; - } - - /** - * Get longitude - * @return longitude - **/ - @javax.annotation.Nonnull - public BigDecimal getLongitude() { - return longitude; - } - - - public void setLongitude(BigDecimal longitude) { - this.longitude = longitude; - } - - - public Coordinates latitude(BigDecimal latitude) { - - this.latitude = latitude; - return this; - } - - /** - * Get latitude - * @return latitude - **/ - @javax.annotation.Nonnull - public BigDecimal getLatitude() { - return latitude; - } - - - public void setLatitude(BigDecimal latitude) { - this.latitude = latitude; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Coordinates coordinates = (Coordinates) o; - return Objects.equals(this.longitude, coordinates.longitude) && - Objects.equals(this.latitude, coordinates.latitude); - } - - @Override - public int hashCode() { - return Objects.hash(longitude, latitude); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Coordinates {\n"); - sb.append(" longitude: ").append(toIndentedString(longitude)).append("\n"); - sb.append(" latitude: ").append(toIndentedString(latitude)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("longitude"); - openapiFields.add("latitude"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("longitude"); - openapiRequiredFields.add("latitude"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Coordinates - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Coordinates.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Coordinates is not found in the empty JSON string", Coordinates.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Coordinates.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Coordinates` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Coordinates.openapiRequiredFields) { - 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 { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Coordinates.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Coordinates' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Coordinates.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Coordinates value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Coordinates read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Coordinates given an JSON string - * - * @param jsonString JSON string - * @return An instance of Coordinates - * @throws IOException if the JSON string is invalid with respect to Coordinates - */ - public static Coordinates fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Coordinates.class); - } - - /** - * Convert an instance of Coordinates to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Counterparty.java b/src/main/java/org/openapitools/client/model/Counterparty.java deleted file mode 100644 index 6c1cc602..00000000 --- a/src/main/java/org/openapitools/client/model/Counterparty.java +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Counterparty - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Counterparty { - public static final String SERIALIZED_NAME_ROUTING_NUMBER = "routingNumber"; - @SerializedName(SERIALIZED_NAME_ROUTING_NUMBER) - private String routingNumber; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - /** - * Gets or Sets accountType - */ - @JsonAdapter(AccountTypeEnum.Adapter.class) - public enum AccountTypeEnum { - CHECKING("Checking"), - - SAVINGS("Savings"), - - LOAN("Loan"); - - private String value; - - AccountTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AccountTypeEnum fromValue(String value) { - for (AccountTypeEnum b : AccountTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AccountTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AccountTypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "accountType"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) - private AccountTypeEnum accountType; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public Counterparty() { - } - - public Counterparty routingNumber(String routingNumber) { - - this.routingNumber = routingNumber; - return this; - } - - /** - * Get routingNumber - * @return routingNumber - **/ - @javax.annotation.Nonnull - public String getRoutingNumber() { - return routingNumber; - } - - - public void setRoutingNumber(String routingNumber) { - this.routingNumber = routingNumber; - } - - - public Counterparty accountNumber(String accountNumber) { - - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - **/ - @javax.annotation.Nonnull - public String getAccountNumber() { - return accountNumber; - } - - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Counterparty accountType(AccountTypeEnum accountType) { - - this.accountType = accountType; - return this; - } - - /** - * Get accountType - * @return accountType - **/ - @javax.annotation.Nonnull - public AccountTypeEnum getAccountType() { - return accountType; - } - - - public void setAccountType(AccountTypeEnum accountType) { - this.accountType = accountType; - } - - - public Counterparty name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Counterparty counterparty = (Counterparty) o; - return Objects.equals(this.routingNumber, counterparty.routingNumber) && - Objects.equals(this.accountNumber, counterparty.accountNumber) && - Objects.equals(this.accountType, counterparty.accountType) && - Objects.equals(this.name, counterparty.name); - } - - @Override - public int hashCode() { - return Objects.hash(routingNumber, accountNumber, accountType, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Counterparty {\n"); - sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("routingNumber"); - openapiFields.add("accountNumber"); - openapiFields.add("accountType"); - openapiFields.add("name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("routingNumber"); - openapiRequiredFields.add("accountNumber"); - openapiRequiredFields.add("accountType"); - openapiRequiredFields.add("name"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Counterparty - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Counterparty.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Counterparty is not found in the empty JSON string", Counterparty.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Counterparty.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Counterparty` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Counterparty.openapiRequiredFields) { - 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("routingNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `routingNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("routingNumber").toString())); - } - if (!jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if (!jsonObj.get("accountType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountType").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Counterparty.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Counterparty' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Counterparty.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Counterparty value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Counterparty read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Counterparty given an JSON string - * - * @param jsonString JSON string - * @return An instance of Counterparty - * @throws IOException if the JSON string is invalid with respect to Counterparty - */ - public static Counterparty fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Counterparty.class); - } - - /** - * Convert an instance of Counterparty to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Counterparty1.java b/src/main/java/org/openapitools/client/model/Counterparty1.java deleted file mode 100644 index 4a165468..00000000 --- a/src/main/java/org/openapitools/client/model/Counterparty1.java +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Counterparty1Attributes; -import org.openapitools.client.model.CounterpartyRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Counterparty1 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Counterparty1 { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private Counterparty1Attributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CounterpartyRelationships relationships; - - public Counterparty1() { - } - - public Counterparty1 type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public Counterparty1 id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public Counterparty1 attributes(Counterparty1Attributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public Counterparty1Attributes getAttributes() { - return attributes; - } - - - public void setAttributes(Counterparty1Attributes attributes) { - this.attributes = attributes; - } - - - public Counterparty1 relationships(CounterpartyRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public CounterpartyRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CounterpartyRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Counterparty1 counterparty1 = (Counterparty1) o; - return Objects.equals(this.type, counterparty1.type) && - Objects.equals(this.id, counterparty1.id) && - Objects.equals(this.attributes, counterparty1.attributes) && - Objects.equals(this.relationships, counterparty1.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Counterparty1 {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Counterparty1 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Counterparty1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Counterparty1 is not found in the empty JSON string", Counterparty1.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Counterparty1.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Counterparty1` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - 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())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - Counterparty1Attributes.validateJsonElement(jsonObj.get("attributes")); - } - // validate the optional field `relationships` - if (jsonObj.get("relationships") != null && !jsonObj.get("relationships").isJsonNull()) { - CounterpartyRelationships.validateJsonElement(jsonObj.get("relationships")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Counterparty1.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Counterparty1' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Counterparty1.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Counterparty1 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Counterparty1 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Counterparty1 given an JSON string - * - * @param jsonString JSON string - * @return An instance of Counterparty1 - * @throws IOException if the JSON string is invalid with respect to Counterparty1 - */ - public static Counterparty1 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Counterparty1.class); - } - - /** - * Convert an instance of Counterparty1 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Counterparty1Attributes.java b/src/main/java/org/openapitools/client/model/Counterparty1Attributes.java deleted file mode 100644 index f682f6f6..00000000 --- a/src/main/java/org/openapitools/client/model/Counterparty1Attributes.java +++ /dev/null @@ -1,612 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Counterparty1Attributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Counterparty1Attributes { - public static final String SERIALIZED_NAME_ROUTING_NUMBER = "routingNumber"; - @SerializedName(SERIALIZED_NAME_ROUTING_NUMBER) - private String routingNumber; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - /** - * Gets or Sets accountType - */ - @JsonAdapter(AccountTypeEnum.Adapter.class) - public enum AccountTypeEnum { - CHECKING("Checking"), - - SAVINGS("Savings"), - - LOAN("Loan"); - - private String value; - - AccountTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AccountTypeEnum fromValue(String value) { - for (AccountTypeEnum b : AccountTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AccountTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AccountTypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "accountType"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) - private AccountTypeEnum accountType; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - BUSINESS("Business"), - - PERSON("Person"), - - UNKNOWN("Unknown"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_BANK = "bank"; - @SerializedName(SERIALIZED_NAME_BANK) - private String bank; - - /** - * Gets or Sets permissions - */ - @JsonAdapter(PermissionsEnum.Adapter.class) - public enum PermissionsEnum { - CREDITONLY("CreditOnly"), - - DEBITONLY("DebitOnly"), - - CREDITANDDEBIT("CreditAndDebit"); - - private String value; - - PermissionsEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PermissionsEnum fromValue(String value) { - for (PermissionsEnum b : PermissionsEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PermissionsEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PermissionsEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PermissionsEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; - @SerializedName(SERIALIZED_NAME_PERMISSIONS) - private PermissionsEnum permissions; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public Counterparty1Attributes() { - } - - public Counterparty1Attributes routingNumber(String routingNumber) { - - this.routingNumber = routingNumber; - return this; - } - - /** - * Get routingNumber - * @return routingNumber - **/ - @javax.annotation.Nonnull - public String getRoutingNumber() { - return routingNumber; - } - - - public void setRoutingNumber(String routingNumber) { - this.routingNumber = routingNumber; - } - - - public Counterparty1Attributes accountNumber(String accountNumber) { - - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - **/ - @javax.annotation.Nonnull - public String getAccountNumber() { - return accountNumber; - } - - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Counterparty1Attributes accountType(AccountTypeEnum accountType) { - - this.accountType = accountType; - return this; - } - - /** - * Get accountType - * @return accountType - **/ - @javax.annotation.Nonnull - public AccountTypeEnum getAccountType() { - return accountType; - } - - - public void setAccountType(AccountTypeEnum accountType) { - this.accountType = accountType; - } - - - public Counterparty1Attributes type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public Counterparty1Attributes name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public Counterparty1Attributes bank(String bank) { - - this.bank = bank; - return this; - } - - /** - * Get bank - * @return bank - **/ - @javax.annotation.Nullable - public String getBank() { - return bank; - } - - - public void setBank(String bank) { - this.bank = bank; - } - - - public Counterparty1Attributes permissions(PermissionsEnum permissions) { - - this.permissions = permissions; - return this; - } - - /** - * Get permissions - * @return permissions - **/ - @javax.annotation.Nonnull - public PermissionsEnum getPermissions() { - return permissions; - } - - - public void setPermissions(PermissionsEnum permissions) { - this.permissions = permissions; - } - - - public Counterparty1Attributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public Counterparty1Attributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Counterparty1Attributes counterparty1Attributes = (Counterparty1Attributes) o; - return Objects.equals(this.routingNumber, counterparty1Attributes.routingNumber) && - Objects.equals(this.accountNumber, counterparty1Attributes.accountNumber) && - Objects.equals(this.accountType, counterparty1Attributes.accountType) && - Objects.equals(this.type, counterparty1Attributes.type) && - Objects.equals(this.name, counterparty1Attributes.name) && - Objects.equals(this.bank, counterparty1Attributes.bank) && - Objects.equals(this.permissions, counterparty1Attributes.permissions) && - Objects.equals(this.tags, counterparty1Attributes.tags) && - Objects.equals(this.createdAt, counterparty1Attributes.createdAt); - } - - @Override - public int hashCode() { - return Objects.hash(routingNumber, accountNumber, accountType, type, name, bank, permissions, tags, createdAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Counterparty1Attributes {\n"); - sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" bank: ").append(toIndentedString(bank)).append("\n"); - sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("routingNumber"); - openapiFields.add("accountNumber"); - openapiFields.add("accountType"); - openapiFields.add("type"); - openapiFields.add("name"); - openapiFields.add("bank"); - openapiFields.add("permissions"); - openapiFields.add("tags"); - openapiFields.add("createdAt"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("routingNumber"); - openapiRequiredFields.add("accountNumber"); - openapiRequiredFields.add("accountType"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("permissions"); - openapiRequiredFields.add("createdAt"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Counterparty1Attributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Counterparty1Attributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Counterparty1Attributes is not found in the empty JSON string", Counterparty1Attributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Counterparty1Attributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Counterparty1Attributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Counterparty1Attributes.openapiRequiredFields) { - 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("routingNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `routingNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("routingNumber").toString())); - } - if (!jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if (!jsonObj.get("accountType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountType").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("bank") != null && !jsonObj.get("bank").isJsonNull()) && !jsonObj.get("bank").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bank` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bank").toString())); - } - if (!jsonObj.get("permissions").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `permissions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("permissions").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Counterparty1Attributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Counterparty1Attributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Counterparty1Attributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Counterparty1Attributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Counterparty1Attributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Counterparty1Attributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of Counterparty1Attributes - * @throws IOException if the JSON string is invalid with respect to Counterparty1Attributes - */ - public static Counterparty1Attributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Counterparty1Attributes.class); - } - - /** - * Convert an instance of Counterparty1Attributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Counterparty2.java b/src/main/java/org/openapitools/client/model/Counterparty2.java deleted file mode 100644 index 43f30c44..00000000 --- a/src/main/java/org/openapitools/client/model/Counterparty2.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Counterparty2 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Counterparty2 { - public static final String SERIALIZED_NAME_ROUTING_NUMBER = "routingNumber"; - @SerializedName(SERIALIZED_NAME_ROUTING_NUMBER) - private String routingNumber; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public Counterparty2() { - } - - public Counterparty2 routingNumber(String routingNumber) { - - this.routingNumber = routingNumber; - return this; - } - - /** - * Get routingNumber - * @return routingNumber - **/ - @javax.annotation.Nonnull - public String getRoutingNumber() { - return routingNumber; - } - - - public void setRoutingNumber(String routingNumber) { - this.routingNumber = routingNumber; - } - - - public Counterparty2 accountNumber(String accountNumber) { - - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - **/ - @javax.annotation.Nonnull - public String getAccountNumber() { - return accountNumber; - } - - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Counterparty2 name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Counterparty2 counterparty2 = (Counterparty2) o; - return Objects.equals(this.routingNumber, counterparty2.routingNumber) && - Objects.equals(this.accountNumber, counterparty2.accountNumber) && - Objects.equals(this.name, counterparty2.name); - } - - @Override - public int hashCode() { - return Objects.hash(routingNumber, accountNumber, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Counterparty2 {\n"); - sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("routingNumber"); - openapiFields.add("accountNumber"); - openapiFields.add("name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("routingNumber"); - openapiRequiredFields.add("accountNumber"); - openapiRequiredFields.add("name"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Counterparty2 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Counterparty2.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Counterparty2 is not found in the empty JSON string", Counterparty2.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Counterparty2.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Counterparty2` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Counterparty2.openapiRequiredFields) { - 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("routingNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `routingNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("routingNumber").toString())); - } - if (!jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Counterparty2.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Counterparty2' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Counterparty2.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Counterparty2 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Counterparty2 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Counterparty2 given an JSON string - * - * @param jsonString JSON string - * @return An instance of Counterparty2 - * @throws IOException if the JSON string is invalid with respect to Counterparty2 - */ - public static Counterparty2 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Counterparty2.class); - } - - /** - * Convert an instance of Counterparty2 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationship.java b/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationship.java deleted file mode 100644 index 9f2b1517..00000000 --- a/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CounterpartyAccountRelationshipData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CounterpartyAccountRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CounterpartyAccountRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CounterpartyAccountRelationshipData data; - - public CounterpartyAccountRelationship() { - } - - public CounterpartyAccountRelationship data(CounterpartyAccountRelationshipData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public CounterpartyAccountRelationshipData getData() { - return data; - } - - - public void setData(CounterpartyAccountRelationshipData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CounterpartyAccountRelationship counterpartyAccountRelationship = (CounterpartyAccountRelationship) o; - return Objects.equals(this.data, counterpartyAccountRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CounterpartyAccountRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CounterpartyAccountRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CounterpartyAccountRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CounterpartyAccountRelationship is not found in the empty JSON string", CounterpartyAccountRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CounterpartyAccountRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CounterpartyAccountRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CounterpartyAccountRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - CounterpartyAccountRelationshipData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CounterpartyAccountRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CounterpartyAccountRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CounterpartyAccountRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CounterpartyAccountRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CounterpartyAccountRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CounterpartyAccountRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of CounterpartyAccountRelationship - * @throws IOException if the JSON string is invalid with respect to CounterpartyAccountRelationship - */ - public static CounterpartyAccountRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CounterpartyAccountRelationship.class); - } - - /** - * Convert an instance of CounterpartyAccountRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationship1.java b/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationship1.java deleted file mode 100644 index 7fe4a3b7..00000000 --- a/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationship1.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RelationshipsAccountData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CounterpartyAccountRelationship1 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CounterpartyAccountRelationship1 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private RelationshipsAccountData data; - - public CounterpartyAccountRelationship1() { - } - - public CounterpartyAccountRelationship1 data(RelationshipsAccountData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public RelationshipsAccountData getData() { - return data; - } - - - public void setData(RelationshipsAccountData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CounterpartyAccountRelationship1 counterpartyAccountRelationship1 = (CounterpartyAccountRelationship1) o; - return Objects.equals(this.data, counterpartyAccountRelationship1.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CounterpartyAccountRelationship1 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CounterpartyAccountRelationship1 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CounterpartyAccountRelationship1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CounterpartyAccountRelationship1 is not found in the empty JSON string", CounterpartyAccountRelationship1.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CounterpartyAccountRelationship1.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CounterpartyAccountRelationship1` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CounterpartyAccountRelationship1.openapiRequiredFields) { - 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(); - // validate the required field `data` - RelationshipsAccountData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CounterpartyAccountRelationship1.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CounterpartyAccountRelationship1' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CounterpartyAccountRelationship1.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CounterpartyAccountRelationship1 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CounterpartyAccountRelationship1 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CounterpartyAccountRelationship1 given an JSON string - * - * @param jsonString JSON string - * @return An instance of CounterpartyAccountRelationship1 - * @throws IOException if the JSON string is invalid with respect to CounterpartyAccountRelationship1 - */ - public static CounterpartyAccountRelationship1 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CounterpartyAccountRelationship1.class); - } - - /** - * Convert an instance of CounterpartyAccountRelationship1 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationshipData.java b/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationshipData.java deleted file mode 100644 index df9ae4fb..00000000 --- a/src/main/java/org/openapitools/client/model/CounterpartyAccountRelationshipData.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CounterpartyAccountRelationshipData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CounterpartyAccountRelationshipData { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - ACCOUNT("account"), - - DEPOSITACCOUNT("depositAccount"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public CounterpartyAccountRelationshipData() { - } - - public CounterpartyAccountRelationshipData type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CounterpartyAccountRelationshipData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CounterpartyAccountRelationshipData counterpartyAccountRelationshipData = (CounterpartyAccountRelationshipData) o; - return Objects.equals(this.type, counterpartyAccountRelationshipData.type) && - Objects.equals(this.id, counterpartyAccountRelationshipData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CounterpartyAccountRelationshipData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CounterpartyAccountRelationshipData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CounterpartyAccountRelationshipData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CounterpartyAccountRelationshipData is not found in the empty JSON string", CounterpartyAccountRelationshipData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CounterpartyAccountRelationshipData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CounterpartyAccountRelationshipData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CounterpartyAccountRelationshipData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CounterpartyAccountRelationshipData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CounterpartyAccountRelationshipData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CounterpartyAccountRelationshipData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CounterpartyAccountRelationshipData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CounterpartyAccountRelationshipData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CounterpartyAccountRelationshipData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CounterpartyAccountRelationshipData - * @throws IOException if the JSON string is invalid with respect to CounterpartyAccountRelationshipData - */ - public static CounterpartyAccountRelationshipData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CounterpartyAccountRelationshipData.class); - } - - /** - * Convert an instance of CounterpartyAccountRelationshipData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CounterpartyBalance.java b/src/main/java/org/openapitools/client/model/CounterpartyBalance.java deleted file mode 100644 index 205cb178..00000000 --- a/src/main/java/org/openapitools/client/model/CounterpartyBalance.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CounterpartyBalanceAttributes; -import org.openapitools.client.model.CounterpartyBalanceRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CounterpartyBalance - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CounterpartyBalance { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "counterpartyBalance"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CounterpartyBalanceAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CounterpartyBalanceRelationships relationships; - - public CounterpartyBalance() { - } - - public CounterpartyBalance type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CounterpartyBalance id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public CounterpartyBalance attributes(CounterpartyBalanceAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public CounterpartyBalanceAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CounterpartyBalanceAttributes attributes) { - this.attributes = attributes; - } - - - public CounterpartyBalance relationships(CounterpartyBalanceRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CounterpartyBalanceRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CounterpartyBalanceRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CounterpartyBalance counterpartyBalance = (CounterpartyBalance) o; - return Objects.equals(this.type, counterpartyBalance.type) && - Objects.equals(this.id, counterpartyBalance.id) && - Objects.equals(this.attributes, counterpartyBalance.attributes) && - Objects.equals(this.relationships, counterpartyBalance.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CounterpartyBalance {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CounterpartyBalance - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CounterpartyBalance.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CounterpartyBalance is not found in the empty JSON string", CounterpartyBalance.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CounterpartyBalance.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CounterpartyBalance` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CounterpartyBalance.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - CounterpartyBalanceAttributes.validateJsonElement(jsonObj.get("attributes")); - } - // validate the required field `relationships` - CounterpartyBalanceRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CounterpartyBalance.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CounterpartyBalance' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CounterpartyBalance.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CounterpartyBalance value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CounterpartyBalance read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CounterpartyBalance given an JSON string - * - * @param jsonString JSON string - * @return An instance of CounterpartyBalance - * @throws IOException if the JSON string is invalid with respect to CounterpartyBalance - */ - public static CounterpartyBalance fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CounterpartyBalance.class); - } - - /** - * Convert an instance of CounterpartyBalance to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CounterpartyBalanceAttributes.java b/src/main/java/org/openapitools/client/model/CounterpartyBalanceAttributes.java deleted file mode 100644 index 14ef0f29..00000000 --- a/src/main/java/org/openapitools/client/model/CounterpartyBalanceAttributes.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.math.BigDecimal; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CounterpartyBalanceAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CounterpartyBalanceAttributes { - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private BigDecimal balance; - - public static final String SERIALIZED_NAME_AVAILABLE = "available"; - @SerializedName(SERIALIZED_NAME_AVAILABLE) - private BigDecimal available; - - public CounterpartyBalanceAttributes() { - } - - public CounterpartyBalanceAttributes balance(BigDecimal balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public BigDecimal getBalance() { - return balance; - } - - - public void setBalance(BigDecimal balance) { - this.balance = balance; - } - - - public CounterpartyBalanceAttributes available(BigDecimal available) { - - this.available = available; - return this; - } - - /** - * Get available - * @return available - **/ - @javax.annotation.Nullable - public BigDecimal getAvailable() { - return available; - } - - - public void setAvailable(BigDecimal available) { - this.available = available; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CounterpartyBalanceAttributes counterpartyBalanceAttributes = (CounterpartyBalanceAttributes) o; - return Objects.equals(this.balance, counterpartyBalanceAttributes.balance) && - Objects.equals(this.available, counterpartyBalanceAttributes.available); - } - - @Override - public int hashCode() { - return Objects.hash(balance, available); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CounterpartyBalanceAttributes {\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" available: ").append(toIndentedString(available)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("balance"); - openapiFields.add("available"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("balance"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CounterpartyBalanceAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CounterpartyBalanceAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CounterpartyBalanceAttributes is not found in the empty JSON string", CounterpartyBalanceAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CounterpartyBalanceAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CounterpartyBalanceAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CounterpartyBalanceAttributes.openapiRequiredFields) { - 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 { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CounterpartyBalanceAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CounterpartyBalanceAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CounterpartyBalanceAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CounterpartyBalanceAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CounterpartyBalanceAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CounterpartyBalanceAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CounterpartyBalanceAttributes - * @throws IOException if the JSON string is invalid with respect to CounterpartyBalanceAttributes - */ - public static CounterpartyBalanceAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CounterpartyBalanceAttributes.class); - } - - /** - * Convert an instance of CounterpartyBalanceAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationships.java b/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationships.java deleted file mode 100644 index 7db99b91..00000000 --- a/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationships.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CounterpartyBalanceRelationshipsCounterparty; -import org.openapitools.client.model.RelationshipsCustomer; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CounterpartyBalanceRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CounterpartyBalanceRelationships { - public static final String SERIALIZED_NAME_COUNTERPARTY = "counterparty"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY) - private CounterpartyBalanceRelationshipsCounterparty counterparty; - - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private RelationshipsCustomer customer; - - public CounterpartyBalanceRelationships() { - } - - public CounterpartyBalanceRelationships counterparty(CounterpartyBalanceRelationshipsCounterparty counterparty) { - - this.counterparty = counterparty; - return this; - } - - /** - * Get counterparty - * @return counterparty - **/ - @javax.annotation.Nonnull - public CounterpartyBalanceRelationshipsCounterparty getCounterparty() { - return counterparty; - } - - - public void setCounterparty(CounterpartyBalanceRelationshipsCounterparty counterparty) { - this.counterparty = counterparty; - } - - - public CounterpartyBalanceRelationships customer(RelationshipsCustomer customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nonnull - public RelationshipsCustomer getCustomer() { - return customer; - } - - - public void setCustomer(RelationshipsCustomer customer) { - this.customer = customer; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CounterpartyBalanceRelationships counterpartyBalanceRelationships = (CounterpartyBalanceRelationships) o; - return Objects.equals(this.counterparty, counterpartyBalanceRelationships.counterparty) && - Objects.equals(this.customer, counterpartyBalanceRelationships.customer); - } - - @Override - public int hashCode() { - return Objects.hash(counterparty, customer); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CounterpartyBalanceRelationships {\n"); - sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("counterparty"); - openapiFields.add("customer"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("counterparty"); - openapiRequiredFields.add("customer"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CounterpartyBalanceRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CounterpartyBalanceRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CounterpartyBalanceRelationships is not found in the empty JSON string", CounterpartyBalanceRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CounterpartyBalanceRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CounterpartyBalanceRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CounterpartyBalanceRelationships.openapiRequiredFields) { - 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(); - // validate the required field `counterparty` - CounterpartyBalanceRelationshipsCounterparty.validateJsonElement(jsonObj.get("counterparty")); - // validate the required field `customer` - RelationshipsCustomer.validateJsonElement(jsonObj.get("customer")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CounterpartyBalanceRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CounterpartyBalanceRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CounterpartyBalanceRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CounterpartyBalanceRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CounterpartyBalanceRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CounterpartyBalanceRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CounterpartyBalanceRelationships - * @throws IOException if the JSON string is invalid with respect to CounterpartyBalanceRelationships - */ - public static CounterpartyBalanceRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CounterpartyBalanceRelationships.class); - } - - /** - * Convert an instance of CounterpartyBalanceRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationshipsCounterparty.java b/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationshipsCounterparty.java deleted file mode 100644 index 6fe134e3..00000000 --- a/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationshipsCounterparty.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CounterpartyBalanceRelationshipsCounterpartyData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CounterpartyBalanceRelationshipsCounterparty - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CounterpartyBalanceRelationshipsCounterparty { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CounterpartyBalanceRelationshipsCounterpartyData data; - - public CounterpartyBalanceRelationshipsCounterparty() { - } - - public CounterpartyBalanceRelationshipsCounterparty data(CounterpartyBalanceRelationshipsCounterpartyData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public CounterpartyBalanceRelationshipsCounterpartyData getData() { - return data; - } - - - public void setData(CounterpartyBalanceRelationshipsCounterpartyData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CounterpartyBalanceRelationshipsCounterparty counterpartyBalanceRelationshipsCounterparty = (CounterpartyBalanceRelationshipsCounterparty) o; - return Objects.equals(this.data, counterpartyBalanceRelationshipsCounterparty.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CounterpartyBalanceRelationshipsCounterparty {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CounterpartyBalanceRelationshipsCounterparty - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CounterpartyBalanceRelationshipsCounterparty.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CounterpartyBalanceRelationshipsCounterparty is not found in the empty JSON string", CounterpartyBalanceRelationshipsCounterparty.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CounterpartyBalanceRelationshipsCounterparty.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CounterpartyBalanceRelationshipsCounterparty` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CounterpartyBalanceRelationshipsCounterparty.openapiRequiredFields) { - 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(); - // validate the required field `data` - CounterpartyBalanceRelationshipsCounterpartyData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CounterpartyBalanceRelationshipsCounterparty.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CounterpartyBalanceRelationshipsCounterparty' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CounterpartyBalanceRelationshipsCounterparty.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CounterpartyBalanceRelationshipsCounterparty value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CounterpartyBalanceRelationshipsCounterparty read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CounterpartyBalanceRelationshipsCounterparty given an JSON string - * - * @param jsonString JSON string - * @return An instance of CounterpartyBalanceRelationshipsCounterparty - * @throws IOException if the JSON string is invalid with respect to CounterpartyBalanceRelationshipsCounterparty - */ - public static CounterpartyBalanceRelationshipsCounterparty fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CounterpartyBalanceRelationshipsCounterparty.class); - } - - /** - * Convert an instance of CounterpartyBalanceRelationshipsCounterparty to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationshipsCounterpartyData.java b/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationshipsCounterpartyData.java deleted file mode 100644 index a605c92b..00000000 --- a/src/main/java/org/openapitools/client/model/CounterpartyBalanceRelationshipsCounterpartyData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CounterpartyBalanceRelationshipsCounterpartyData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CounterpartyBalanceRelationshipsCounterpartyData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "counterparty"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public CounterpartyBalanceRelationshipsCounterpartyData() { - } - - public CounterpartyBalanceRelationshipsCounterpartyData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CounterpartyBalanceRelationshipsCounterpartyData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CounterpartyBalanceRelationshipsCounterpartyData counterpartyBalanceRelationshipsCounterpartyData = (CounterpartyBalanceRelationshipsCounterpartyData) o; - return Objects.equals(this.type, counterpartyBalanceRelationshipsCounterpartyData.type) && - Objects.equals(this.id, counterpartyBalanceRelationshipsCounterpartyData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CounterpartyBalanceRelationshipsCounterpartyData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CounterpartyBalanceRelationshipsCounterpartyData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CounterpartyBalanceRelationshipsCounterpartyData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CounterpartyBalanceRelationshipsCounterpartyData is not found in the empty JSON string", CounterpartyBalanceRelationshipsCounterpartyData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CounterpartyBalanceRelationshipsCounterpartyData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CounterpartyBalanceRelationshipsCounterpartyData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CounterpartyBalanceRelationshipsCounterpartyData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CounterpartyBalanceRelationshipsCounterpartyData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CounterpartyBalanceRelationshipsCounterpartyData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CounterpartyBalanceRelationshipsCounterpartyData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CounterpartyBalanceRelationshipsCounterpartyData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CounterpartyBalanceRelationshipsCounterpartyData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CounterpartyBalanceRelationshipsCounterpartyData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CounterpartyBalanceRelationshipsCounterpartyData - * @throws IOException if the JSON string is invalid with respect to CounterpartyBalanceRelationshipsCounterpartyData - */ - public static CounterpartyBalanceRelationshipsCounterpartyData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CounterpartyBalanceRelationshipsCounterpartyData.class); - } - - /** - * Convert an instance of CounterpartyBalanceRelationshipsCounterpartyData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CounterpartyCustomerRelationship.java b/src/main/java/org/openapitools/client/model/CounterpartyCustomerRelationship.java deleted file mode 100644 index f3a5b445..00000000 --- a/src/main/java/org/openapitools/client/model/CounterpartyCustomerRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RelationshipsCustomerData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CounterpartyCustomerRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CounterpartyCustomerRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private RelationshipsCustomerData data; - - public CounterpartyCustomerRelationship() { - } - - public CounterpartyCustomerRelationship data(RelationshipsCustomerData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public RelationshipsCustomerData getData() { - return data; - } - - - public void setData(RelationshipsCustomerData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CounterpartyCustomerRelationship counterpartyCustomerRelationship = (CounterpartyCustomerRelationship) o; - return Objects.equals(this.data, counterpartyCustomerRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CounterpartyCustomerRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CounterpartyCustomerRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CounterpartyCustomerRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CounterpartyCustomerRelationship is not found in the empty JSON string", CounterpartyCustomerRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CounterpartyCustomerRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CounterpartyCustomerRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CounterpartyCustomerRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - RelationshipsCustomerData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CounterpartyCustomerRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CounterpartyCustomerRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CounterpartyCustomerRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CounterpartyCustomerRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CounterpartyCustomerRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CounterpartyCustomerRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of CounterpartyCustomerRelationship - * @throws IOException if the JSON string is invalid with respect to CounterpartyCustomerRelationship - */ - public static CounterpartyCustomerRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CounterpartyCustomerRelationship.class); - } - - /** - * Convert an instance of CounterpartyCustomerRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CounterpartyRelationship.java b/src/main/java/org/openapitools/client/model/CounterpartyRelationship.java deleted file mode 100644 index d0de6427..00000000 --- a/src/main/java/org/openapitools/client/model/CounterpartyRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CounterpartyRelationshipData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CounterpartyRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CounterpartyRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CounterpartyRelationshipData data; - - public CounterpartyRelationship() { - } - - public CounterpartyRelationship data(CounterpartyRelationshipData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public CounterpartyRelationshipData getData() { - return data; - } - - - public void setData(CounterpartyRelationshipData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CounterpartyRelationship counterpartyRelationship = (CounterpartyRelationship) o; - return Objects.equals(this.data, counterpartyRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CounterpartyRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CounterpartyRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CounterpartyRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CounterpartyRelationship is not found in the empty JSON string", CounterpartyRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CounterpartyRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CounterpartyRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CounterpartyRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - CounterpartyRelationshipData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CounterpartyRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CounterpartyRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CounterpartyRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CounterpartyRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CounterpartyRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CounterpartyRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of CounterpartyRelationship - * @throws IOException if the JSON string is invalid with respect to CounterpartyRelationship - */ - public static CounterpartyRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CounterpartyRelationship.class); - } - - /** - * Convert an instance of CounterpartyRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CounterpartyRelationshipData.java b/src/main/java/org/openapitools/client/model/CounterpartyRelationshipData.java deleted file mode 100644 index 04ac7ed0..00000000 --- a/src/main/java/org/openapitools/client/model/CounterpartyRelationshipData.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CounterpartyRelationshipData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CounterpartyRelationshipData { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - ACCOUNT("account"), - - DEPOSITACCOUNT("depositAccount"), - - COUNTERPARTY("counterparty"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public CounterpartyRelationshipData() { - } - - public CounterpartyRelationshipData type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CounterpartyRelationshipData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CounterpartyRelationshipData counterpartyRelationshipData = (CounterpartyRelationshipData) o; - return Objects.equals(this.type, counterpartyRelationshipData.type) && - Objects.equals(this.id, counterpartyRelationshipData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CounterpartyRelationshipData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CounterpartyRelationshipData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CounterpartyRelationshipData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CounterpartyRelationshipData is not found in the empty JSON string", CounterpartyRelationshipData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CounterpartyRelationshipData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CounterpartyRelationshipData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CounterpartyRelationshipData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CounterpartyRelationshipData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CounterpartyRelationshipData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CounterpartyRelationshipData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CounterpartyRelationshipData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CounterpartyRelationshipData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CounterpartyRelationshipData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CounterpartyRelationshipData - * @throws IOException if the JSON string is invalid with respect to CounterpartyRelationshipData - */ - public static CounterpartyRelationshipData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CounterpartyRelationshipData.class); - } - - /** - * Convert an instance of CounterpartyRelationshipData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CounterpartyRelationships.java b/src/main/java/org/openapitools/client/model/CounterpartyRelationships.java deleted file mode 100644 index 50e2ac66..00000000 --- a/src/main/java/org/openapitools/client/model/CounterpartyRelationships.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RelationshipsCustomer; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CounterpartyRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CounterpartyRelationships { - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private RelationshipsCustomer customer; - - public CounterpartyRelationships() { - } - - public CounterpartyRelationships customer(RelationshipsCustomer customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nonnull - public RelationshipsCustomer getCustomer() { - return customer; - } - - - public void setCustomer(RelationshipsCustomer customer) { - this.customer = customer; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CounterpartyRelationships counterpartyRelationships = (CounterpartyRelationships) o; - return Objects.equals(this.customer, counterpartyRelationships.customer); - } - - @Override - public int hashCode() { - return Objects.hash(customer); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CounterpartyRelationships {\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("customer"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("customer"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CounterpartyRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CounterpartyRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CounterpartyRelationships is not found in the empty JSON string", CounterpartyRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CounterpartyRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CounterpartyRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CounterpartyRelationships.openapiRequiredFields) { - 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(); - // validate the required field `customer` - RelationshipsCustomer.validateJsonElement(jsonObj.get("customer")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CounterpartyRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CounterpartyRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CounterpartyRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CounterpartyRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CounterpartyRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CounterpartyRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CounterpartyRelationships - * @throws IOException if the JSON string is invalid with respect to CounterpartyRelationships - */ - public static CounterpartyRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CounterpartyRelationships.class); - } - - /** - * Convert an instance of CounterpartyRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateAccount.java b/src/main/java/org/openapitools/client/model/CreateAccount.java deleted file mode 100644 index 550c5db3..00000000 --- a/src/main/java/org/openapitools/client/model/CreateAccount.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateAccountData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateAccount - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAccount { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateAccountData data; - - public CreateAccount() { - } - - public CreateAccount data(CreateAccountData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public CreateAccountData getData() { - return data; - } - - - public void setData(CreateAccountData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAccount createAccount = (CreateAccount) o; - return Objects.equals(this.data, createAccount.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAccount {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateAccount - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAccount is not found in the empty JSON string", CreateAccount.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateAccount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateAccount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateAccount.openapiRequiredFields) { - 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(); - // validate the required field `data` - CreateAccountData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAccount.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAccount' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateAccount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAccount value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAccount read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAccount given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAccount - * @throws IOException if the JSON string is invalid with respect to CreateAccount - */ - public static CreateAccount fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAccount.class); - } - - /** - * Convert an instance of CreateAccount to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateAccountData.java b/src/main/java/org/openapitools/client/model/CreateAccountData.java deleted file mode 100644 index 57b4857f..00000000 --- a/src/main/java/org/openapitools/client/model/CreateAccountData.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateCreditAccount; -import org.openapitools.client.model.CreateDepositAccount; -import org.openapitools.client.model.CreateDepositAccountAttributes; -import org.openapitools.client.model.CreateDepositAccountRelationships; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -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 com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import org.openapitools.client.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAccountData extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(CreateAccountData.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAccountData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAccountData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterCreateCreditAccount = gson.getDelegateAdapter(this, TypeToken.get(CreateCreditAccount.class)); - final TypeAdapter adapterCreateDepositAccount = gson.getDelegateAdapter(this, TypeToken.get(CreateDepositAccount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAccountData value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `CreateCreditAccount` - if (value.getActualInstance() instanceof CreateCreditAccount) { - JsonElement element = adapterCreateCreditAccount.toJsonTree((CreateCreditAccount)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateDepositAccount` - if (value.getActualInstance() instanceof CreateDepositAccount) { - JsonElement element = adapterCreateDepositAccount.toJsonTree((CreateDepositAccount)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CreateCreditAccount, CreateDepositAccount"); - } - - @Override - public CreateAccountData read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize CreateCreditAccount - try { - // validate the JSON object to see if any exception is thrown - CreateCreditAccount.validateJsonElement(jsonElement); - actualAdapter = adapterCreateCreditAccount; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateCreditAccount'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateCreditAccount failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateCreditAccount'", e); - } - // deserialize CreateDepositAccount - try { - // validate the JSON object to see if any exception is thrown - CreateDepositAccount.validateJsonElement(jsonElement); - actualAdapter = adapterCreateDepositAccount; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateDepositAccount'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateDepositAccount failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateDepositAccount'", e); - } - - if (match == 1) { - CreateAccountData ret = new CreateAccountData(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for CreateAccountData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public CreateAccountData() { - super("oneOf", Boolean.FALSE); - } - - public CreateAccountData(CreateCreditAccount o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreateAccountData(CreateDepositAccount o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("CreateCreditAccount", CreateCreditAccount.class); - schemas.put("CreateDepositAccount", CreateDepositAccount.class); - } - - @Override - public Map> getSchemas() { - return CreateAccountData.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * CreateCreditAccount, CreateDepositAccount - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof CreateCreditAccount) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateDepositAccount) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be CreateCreditAccount, CreateDepositAccount"); - } - - /** - * Get the actual instance, which can be the following: - * CreateCreditAccount, CreateDepositAccount - * - * @return The actual instance (CreateCreditAccount, CreateDepositAccount) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `CreateCreditAccount`. If the actual instance is not `CreateCreditAccount`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateCreditAccount` - * @throws ClassCastException if the instance is not `CreateCreditAccount` - */ - public CreateCreditAccount getCreateCreditAccount() throws ClassCastException { - return (CreateCreditAccount)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateDepositAccount`. If the actual instance is not `CreateDepositAccount`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateDepositAccount` - * @throws ClassCastException if the instance is not `CreateDepositAccount` - */ - public CreateDepositAccount getCreateDepositAccount() throws ClassCastException { - return (CreateDepositAccount)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateAccountData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with CreateCreditAccount - try { - CreateCreditAccount.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateCreditAccount failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateDepositAccount - try { - CreateDepositAccount.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateDepositAccount failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for CreateAccountData with oneOf schemas: CreateCreditAccount, CreateDepositAccount. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of CreateAccountData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAccountData - * @throws IOException if the JSON string is invalid with respect to CreateAccountData - */ - public static CreateAccountData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAccountData.class); - } - - /** - * Convert an instance of CreateAccountData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateAchCounterparty.java b/src/main/java/org/openapitools/client/model/CreateAchCounterparty.java deleted file mode 100644 index f08db7a8..00000000 --- a/src/main/java/org/openapitools/client/model/CreateAchCounterparty.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateAchCounterpartyAttributes; -import org.openapitools.client.model.CreateCounterpartyRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateAchCounterparty - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAchCounterparty { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateAchCounterpartyAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateCounterpartyRelationships relationships; - - public CreateAchCounterparty() { - } - - public CreateAchCounterparty type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateAchCounterparty attributes(CreateAchCounterpartyAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateAchCounterpartyAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateAchCounterpartyAttributes attributes) { - this.attributes = attributes; - } - - - public CreateAchCounterparty relationships(CreateCounterpartyRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateCounterpartyRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateCounterpartyRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAchCounterparty createAchCounterparty = (CreateAchCounterparty) o; - return Objects.equals(this.type, createAchCounterparty.type) && - Objects.equals(this.attributes, createAchCounterparty.attributes) && - Objects.equals(this.relationships, createAchCounterparty.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAchCounterparty {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateAchCounterparty - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateAchCounterparty.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAchCounterparty is not found in the empty JSON string", CreateAchCounterparty.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateAchCounterparty.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateAchCounterparty` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateAchCounterparty.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateAchCounterpartyAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateCounterpartyRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAchCounterparty.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAchCounterparty' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateAchCounterparty.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAchCounterparty value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAchCounterparty read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAchCounterparty given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAchCounterparty - * @throws IOException if the JSON string is invalid with respect to CreateAchCounterparty - */ - public static CreateAchCounterparty fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAchCounterparty.class); - } - - /** - * Convert an instance of CreateAchCounterparty to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateAchCounterpartyAttributes.java b/src/main/java/org/openapitools/client/model/CreateAchCounterpartyAttributes.java deleted file mode 100644 index 6dd53377..00000000 --- a/src/main/java/org/openapitools/client/model/CreateAchCounterpartyAttributes.java +++ /dev/null @@ -1,581 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateAchCounterpartyAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAchCounterpartyAttributes { - public static final String SERIALIZED_NAME_ROUTING_NUMBER = "routingNumber"; - @SerializedName(SERIALIZED_NAME_ROUTING_NUMBER) - private String routingNumber; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - /** - * Gets or Sets accountType - */ - @JsonAdapter(AccountTypeEnum.Adapter.class) - public enum AccountTypeEnum { - CHECKING("Checking"), - - SAVINGS("Savings"), - - LOAN("Loan"); - - private String value; - - AccountTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AccountTypeEnum fromValue(String value) { - for (AccountTypeEnum b : AccountTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AccountTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AccountTypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "accountType"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) - private AccountTypeEnum accountType; - - /** - * Gets or Sets permissions - */ - @JsonAdapter(PermissionsEnum.Adapter.class) - public enum PermissionsEnum { - CREDITONLY("CreditOnly"), - - DEBITONLY("DebitOnly"), - - CREDITANDDEBIT("CreditAndDebit"); - - private String value; - - PermissionsEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PermissionsEnum fromValue(String value) { - for (PermissionsEnum b : PermissionsEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PermissionsEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PermissionsEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PermissionsEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; - @SerializedName(SERIALIZED_NAME_PERMISSIONS) - private PermissionsEnum permissions; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - BUSINESS("Business"), - - PERSON("Person"), - - UNKNOWN("Unknown"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public CreateAchCounterpartyAttributes() { - } - - public CreateAchCounterpartyAttributes routingNumber(String routingNumber) { - - this.routingNumber = routingNumber; - return this; - } - - /** - * Get routingNumber - * @return routingNumber - **/ - @javax.annotation.Nonnull - public String getRoutingNumber() { - return routingNumber; - } - - - public void setRoutingNumber(String routingNumber) { - this.routingNumber = routingNumber; - } - - - public CreateAchCounterpartyAttributes accountNumber(String accountNumber) { - - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - **/ - @javax.annotation.Nonnull - public String getAccountNumber() { - return accountNumber; - } - - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public CreateAchCounterpartyAttributes accountType(AccountTypeEnum accountType) { - - this.accountType = accountType; - return this; - } - - /** - * Get accountType - * @return accountType - **/ - @javax.annotation.Nonnull - public AccountTypeEnum getAccountType() { - return accountType; - } - - - public void setAccountType(AccountTypeEnum accountType) { - this.accountType = accountType; - } - - - public CreateAchCounterpartyAttributes permissions(PermissionsEnum permissions) { - - this.permissions = permissions; - return this; - } - - /** - * Get permissions - * @return permissions - **/ - @javax.annotation.Nullable - public PermissionsEnum getPermissions() { - return permissions; - } - - - public void setPermissions(PermissionsEnum permissions) { - this.permissions = permissions; - } - - - public CreateAchCounterpartyAttributes type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CreateAchCounterpartyAttributes name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public CreateAchCounterpartyAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateAchCounterpartyAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAchCounterpartyAttributes createAchCounterpartyAttributes = (CreateAchCounterpartyAttributes) o; - return Objects.equals(this.routingNumber, createAchCounterpartyAttributes.routingNumber) && - Objects.equals(this.accountNumber, createAchCounterpartyAttributes.accountNumber) && - Objects.equals(this.accountType, createAchCounterpartyAttributes.accountType) && - Objects.equals(this.permissions, createAchCounterpartyAttributes.permissions) && - Objects.equals(this.type, createAchCounterpartyAttributes.type) && - Objects.equals(this.name, createAchCounterpartyAttributes.name) && - Objects.equals(this.tags, createAchCounterpartyAttributes.tags) && - Objects.equals(this.idempotencyKey, createAchCounterpartyAttributes.idempotencyKey); - } - - @Override - public int hashCode() { - return Objects.hash(routingNumber, accountNumber, accountType, permissions, type, name, tags, idempotencyKey); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAchCounterpartyAttributes {\n"); - sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); - sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("routingNumber"); - openapiFields.add("accountNumber"); - openapiFields.add("accountType"); - openapiFields.add("permissions"); - openapiFields.add("type"); - openapiFields.add("name"); - openapiFields.add("tags"); - openapiFields.add("idempotencyKey"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("routingNumber"); - openapiRequiredFields.add("accountNumber"); - openapiRequiredFields.add("accountType"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("name"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateAchCounterpartyAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateAchCounterpartyAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAchCounterpartyAttributes is not found in the empty JSON string", CreateAchCounterpartyAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateAchCounterpartyAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateAchCounterpartyAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateAchCounterpartyAttributes.openapiRequiredFields) { - 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("routingNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `routingNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("routingNumber").toString())); - } - if (!jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if (!jsonObj.get("accountType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountType").toString())); - } - if ((jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonNull()) && !jsonObj.get("permissions").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `permissions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("permissions").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAchCounterpartyAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAchCounterpartyAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateAchCounterpartyAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAchCounterpartyAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAchCounterpartyAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAchCounterpartyAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAchCounterpartyAttributes - * @throws IOException if the JSON string is invalid with respect to CreateAchCounterpartyAttributes - */ - public static CreateAchCounterpartyAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAchCounterpartyAttributes.class); - } - - /** - * Convert an instance of CreateAchCounterpartyAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateAchPayment.java b/src/main/java/org/openapitools/client/model/CreateAchPayment.java deleted file mode 100644 index 349a70e7..00000000 --- a/src/main/java/org/openapitools/client/model/CreateAchPayment.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateAchPaymentAttributes; -import org.openapitools.client.model.CreateAchPaymentRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateAchPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAchPayment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "achPayment"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateAchPaymentAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateAchPaymentRelationships relationships; - - public CreateAchPayment() { - } - - public CreateAchPayment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateAchPayment attributes(CreateAchPaymentAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateAchPaymentAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateAchPaymentAttributes attributes) { - this.attributes = attributes; - } - - - public CreateAchPayment relationships(CreateAchPaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateAchPaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateAchPaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAchPayment createAchPayment = (CreateAchPayment) o; - return Objects.equals(this.type, createAchPayment.type) && - Objects.equals(this.attributes, createAchPayment.attributes) && - Objects.equals(this.relationships, createAchPayment.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAchPayment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateAchPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateAchPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAchPayment is not found in the empty JSON string", CreateAchPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateAchPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateAchPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateAchPayment.openapiRequiredFields) { - 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("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateAchPaymentAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateAchPaymentRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAchPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAchPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateAchPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAchPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAchPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAchPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAchPayment - * @throws IOException if the JSON string is invalid with respect to CreateAchPayment - */ - public static CreateAchPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAchPayment.class); - } - - /** - * Convert an instance of CreateAchPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateAchPaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreateAchPaymentAttributes.java deleted file mode 100644 index 35649f34..00000000 --- a/src/main/java/org/openapitools/client/model/CreateAchPaymentAttributes.java +++ /dev/null @@ -1,554 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Counterparty; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateAchPaymentAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAchPaymentAttributes { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_ADDENDA = "addenda"; - @SerializedName(SERIALIZED_NAME_ADDENDA) - private String addenda; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - DEBIT("Debit"), - - CREDIT("Credit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_COUNTERPARTY = "counterparty"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY) - private Counterparty counterparty; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_SAME_DAY = "sameDay"; - @SerializedName(SERIALIZED_NAME_SAME_DAY) - private Boolean sameDay; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - /** - * Gets or Sets secCode - */ - @JsonAdapter(SecCodeEnum.Adapter.class) - public enum SecCodeEnum { - WEB("WEB"), - - CCD("CCD"), - - PPD("PPD"); - - private String value; - - SecCodeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static SecCodeEnum fromValue(String value) { - for (SecCodeEnum b : SecCodeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final SecCodeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public SecCodeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return SecCodeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_SEC_CODE = "secCode"; - @SerializedName(SERIALIZED_NAME_SEC_CODE) - private SecCodeEnum secCode; - - public CreateAchPaymentAttributes() { - } - - public CreateAchPaymentAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CreateAchPaymentAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public CreateAchPaymentAttributes addenda(String addenda) { - - this.addenda = addenda; - return this; - } - - /** - * Get addenda - * @return addenda - **/ - @javax.annotation.Nullable - public String getAddenda() { - return addenda; - } - - - public void setAddenda(String addenda) { - this.addenda = addenda; - } - - - public CreateAchPaymentAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public CreateAchPaymentAttributes counterparty(Counterparty counterparty) { - - this.counterparty = counterparty; - return this; - } - - /** - * Get counterparty - * @return counterparty - **/ - @javax.annotation.Nonnull - public Counterparty getCounterparty() { - return counterparty; - } - - - public void setCounterparty(Counterparty counterparty) { - this.counterparty = counterparty; - } - - - public CreateAchPaymentAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateAchPaymentAttributes sameDay(Boolean sameDay) { - - this.sameDay = sameDay; - return this; - } - - /** - * Get sameDay - * @return sameDay - **/ - @javax.annotation.Nullable - public Boolean getSameDay() { - return sameDay; - } - - - public void setSameDay(Boolean sameDay) { - this.sameDay = sameDay; - } - - - public CreateAchPaymentAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateAchPaymentAttributes secCode(SecCodeEnum secCode) { - - this.secCode = secCode; - return this; - } - - /** - * Get secCode - * @return secCode - **/ - @javax.annotation.Nullable - public SecCodeEnum getSecCode() { - return secCode; - } - - - public void setSecCode(SecCodeEnum secCode) { - this.secCode = secCode; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAchPaymentAttributes createAchPaymentAttributes = (CreateAchPaymentAttributes) o; - return Objects.equals(this.amount, createAchPaymentAttributes.amount) && - Objects.equals(this.description, createAchPaymentAttributes.description) && - Objects.equals(this.addenda, createAchPaymentAttributes.addenda) && - Objects.equals(this.direction, createAchPaymentAttributes.direction) && - Objects.equals(this.counterparty, createAchPaymentAttributes.counterparty) && - Objects.equals(this.idempotencyKey, createAchPaymentAttributes.idempotencyKey) && - Objects.equals(this.sameDay, createAchPaymentAttributes.sameDay) && - Objects.equals(this.tags, createAchPaymentAttributes.tags) && - Objects.equals(this.secCode, createAchPaymentAttributes.secCode); - } - - @Override - public int hashCode() { - return Objects.hash(amount, description, addenda, direction, counterparty, idempotencyKey, sameDay, tags, secCode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAchPaymentAttributes {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" sameDay: ").append(toIndentedString(sameDay)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" secCode: ").append(toIndentedString(secCode)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("description"); - openapiFields.add("addenda"); - openapiFields.add("direction"); - openapiFields.add("counterparty"); - openapiFields.add("idempotencyKey"); - openapiFields.add("sameDay"); - openapiFields.add("tags"); - openapiFields.add("secCode"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("counterparty"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateAchPaymentAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateAchPaymentAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAchPaymentAttributes is not found in the empty JSON string", CreateAchPaymentAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateAchPaymentAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateAchPaymentAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateAchPaymentAttributes.openapiRequiredFields) { - 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("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("addenda") != null && !jsonObj.get("addenda").isJsonNull()) && !jsonObj.get("addenda").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `addenda` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addenda").toString())); - } - if (!jsonObj.get("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - // validate the required field `counterparty` - Counterparty.validateJsonElement(jsonObj.get("counterparty")); - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - if ((jsonObj.get("secCode") != null && !jsonObj.get("secCode").isJsonNull()) && !jsonObj.get("secCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `secCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secCode").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAchPaymentAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAchPaymentAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateAchPaymentAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAchPaymentAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAchPaymentAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAchPaymentAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAchPaymentAttributes - * @throws IOException if the JSON string is invalid with respect to CreateAchPaymentAttributes - */ - public static CreateAchPaymentAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAchPaymentAttributes.class); - } - - /** - * Convert an instance of CreateAchPaymentAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterparty.java b/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterparty.java deleted file mode 100644 index 24dcc3e9..00000000 --- a/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterparty.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateAchPaymentCounterpartyAttributes; -import org.openapitools.client.model.CreateAchPaymentCounterpartyRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateAchPaymentCounterparty - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAchPaymentCounterparty { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "achPayment"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateAchPaymentCounterpartyAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateAchPaymentCounterpartyRelationships relationships; - - public CreateAchPaymentCounterparty() { - } - - public CreateAchPaymentCounterparty type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateAchPaymentCounterparty attributes(CreateAchPaymentCounterpartyAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateAchPaymentCounterpartyAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateAchPaymentCounterpartyAttributes attributes) { - this.attributes = attributes; - } - - - public CreateAchPaymentCounterparty relationships(CreateAchPaymentCounterpartyRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateAchPaymentCounterpartyRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateAchPaymentCounterpartyRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAchPaymentCounterparty createAchPaymentCounterparty = (CreateAchPaymentCounterparty) o; - return Objects.equals(this.type, createAchPaymentCounterparty.type) && - Objects.equals(this.attributes, createAchPaymentCounterparty.attributes) && - Objects.equals(this.relationships, createAchPaymentCounterparty.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAchPaymentCounterparty {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateAchPaymentCounterparty - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateAchPaymentCounterparty.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAchPaymentCounterparty is not found in the empty JSON string", CreateAchPaymentCounterparty.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateAchPaymentCounterparty.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateAchPaymentCounterparty` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateAchPaymentCounterparty.openapiRequiredFields) { - 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("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateAchPaymentCounterpartyAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateAchPaymentCounterpartyRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAchPaymentCounterparty.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAchPaymentCounterparty' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateAchPaymentCounterparty.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAchPaymentCounterparty value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAchPaymentCounterparty read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAchPaymentCounterparty given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAchPaymentCounterparty - * @throws IOException if the JSON string is invalid with respect to CreateAchPaymentCounterparty - */ - public static CreateAchPaymentCounterparty fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAchPaymentCounterparty.class); - } - - /** - * Convert an instance of CreateAchPaymentCounterparty to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterpartyAttributes.java b/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterpartyAttributes.java deleted file mode 100644 index a74c662d..00000000 --- a/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterpartyAttributes.java +++ /dev/null @@ -1,550 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateAchPaymentCounterpartyAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAchPaymentCounterpartyAttributes { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_ADDENDA = "addenda"; - @SerializedName(SERIALIZED_NAME_ADDENDA) - private String addenda; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - DEBIT("Debit"), - - CREDIT("Credit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_SAME_DAY = "sameDay"; - @SerializedName(SERIALIZED_NAME_SAME_DAY) - private Boolean sameDay; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_VERIFY_COUNTERPARTY_BALANCE = "verifyCounterpartyBalance"; - @SerializedName(SERIALIZED_NAME_VERIFY_COUNTERPARTY_BALANCE) - private Boolean verifyCounterpartyBalance = false; - - /** - * Gets or Sets secCode - */ - @JsonAdapter(SecCodeEnum.Adapter.class) - public enum SecCodeEnum { - WEB("WEB"), - - CCD("CCD"), - - PPD("PPD"); - - private String value; - - SecCodeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static SecCodeEnum fromValue(String value) { - for (SecCodeEnum b : SecCodeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final SecCodeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public SecCodeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return SecCodeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_SEC_CODE = "secCode"; - @SerializedName(SERIALIZED_NAME_SEC_CODE) - private SecCodeEnum secCode; - - public CreateAchPaymentCounterpartyAttributes() { - } - - public CreateAchPaymentCounterpartyAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CreateAchPaymentCounterpartyAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public CreateAchPaymentCounterpartyAttributes addenda(String addenda) { - - this.addenda = addenda; - return this; - } - - /** - * Get addenda - * @return addenda - **/ - @javax.annotation.Nullable - public String getAddenda() { - return addenda; - } - - - public void setAddenda(String addenda) { - this.addenda = addenda; - } - - - public CreateAchPaymentCounterpartyAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public CreateAchPaymentCounterpartyAttributes sameDay(Boolean sameDay) { - - this.sameDay = sameDay; - return this; - } - - /** - * Get sameDay - * @return sameDay - **/ - @javax.annotation.Nullable - public Boolean getSameDay() { - return sameDay; - } - - - public void setSameDay(Boolean sameDay) { - this.sameDay = sameDay; - } - - - public CreateAchPaymentCounterpartyAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateAchPaymentCounterpartyAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateAchPaymentCounterpartyAttributes verifyCounterpartyBalance(Boolean verifyCounterpartyBalance) { - - this.verifyCounterpartyBalance = verifyCounterpartyBalance; - return this; - } - - /** - * Get verifyCounterpartyBalance - * @return verifyCounterpartyBalance - **/ - @javax.annotation.Nullable - public Boolean getVerifyCounterpartyBalance() { - return verifyCounterpartyBalance; - } - - - public void setVerifyCounterpartyBalance(Boolean verifyCounterpartyBalance) { - this.verifyCounterpartyBalance = verifyCounterpartyBalance; - } - - - public CreateAchPaymentCounterpartyAttributes secCode(SecCodeEnum secCode) { - - this.secCode = secCode; - return this; - } - - /** - * Get secCode - * @return secCode - **/ - @javax.annotation.Nullable - public SecCodeEnum getSecCode() { - return secCode; - } - - - public void setSecCode(SecCodeEnum secCode) { - this.secCode = secCode; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAchPaymentCounterpartyAttributes createAchPaymentCounterpartyAttributes = (CreateAchPaymentCounterpartyAttributes) o; - return Objects.equals(this.amount, createAchPaymentCounterpartyAttributes.amount) && - Objects.equals(this.description, createAchPaymentCounterpartyAttributes.description) && - Objects.equals(this.addenda, createAchPaymentCounterpartyAttributes.addenda) && - Objects.equals(this.direction, createAchPaymentCounterpartyAttributes.direction) && - Objects.equals(this.sameDay, createAchPaymentCounterpartyAttributes.sameDay) && - Objects.equals(this.idempotencyKey, createAchPaymentCounterpartyAttributes.idempotencyKey) && - Objects.equals(this.tags, createAchPaymentCounterpartyAttributes.tags) && - Objects.equals(this.verifyCounterpartyBalance, createAchPaymentCounterpartyAttributes.verifyCounterpartyBalance) && - Objects.equals(this.secCode, createAchPaymentCounterpartyAttributes.secCode); - } - - @Override - public int hashCode() { - return Objects.hash(amount, description, addenda, direction, sameDay, idempotencyKey, tags, verifyCounterpartyBalance, secCode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAchPaymentCounterpartyAttributes {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" sameDay: ").append(toIndentedString(sameDay)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" verifyCounterpartyBalance: ").append(toIndentedString(verifyCounterpartyBalance)).append("\n"); - sb.append(" secCode: ").append(toIndentedString(secCode)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("description"); - openapiFields.add("addenda"); - openapiFields.add("direction"); - openapiFields.add("sameDay"); - openapiFields.add("idempotencyKey"); - openapiFields.add("tags"); - openapiFields.add("verifyCounterpartyBalance"); - openapiFields.add("secCode"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("direction"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateAchPaymentCounterpartyAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateAchPaymentCounterpartyAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAchPaymentCounterpartyAttributes is not found in the empty JSON string", CreateAchPaymentCounterpartyAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateAchPaymentCounterpartyAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateAchPaymentCounterpartyAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateAchPaymentCounterpartyAttributes.openapiRequiredFields) { - 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("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("addenda") != null && !jsonObj.get("addenda").isJsonNull()) && !jsonObj.get("addenda").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `addenda` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addenda").toString())); - } - if (!jsonObj.get("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - if ((jsonObj.get("secCode") != null && !jsonObj.get("secCode").isJsonNull()) && !jsonObj.get("secCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `secCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secCode").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAchPaymentCounterpartyAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAchPaymentCounterpartyAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateAchPaymentCounterpartyAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAchPaymentCounterpartyAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAchPaymentCounterpartyAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAchPaymentCounterpartyAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAchPaymentCounterpartyAttributes - * @throws IOException if the JSON string is invalid with respect to CreateAchPaymentCounterpartyAttributes - */ - public static CreateAchPaymentCounterpartyAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAchPaymentCounterpartyAttributes.class); - } - - /** - * Convert an instance of CreateAchPaymentCounterpartyAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterpartyRelationships.java b/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterpartyRelationships.java deleted file mode 100644 index 6101689b..00000000 --- a/src/main/java/org/openapitools/client/model/CreateAchPaymentCounterpartyRelationships.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AccountRelationship; -import org.openapitools.client.model.CounterpartyRelationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateAchPaymentCounterpartyRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAchPaymentCounterpartyRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private AccountRelationship account; - - public static final String SERIALIZED_NAME_COUNTERPARTY = "counterparty"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY) - private CounterpartyRelationship counterparty; - - public CreateAchPaymentCounterpartyRelationships() { - } - - public CreateAchPaymentCounterpartyRelationships account(AccountRelationship account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public AccountRelationship getAccount() { - return account; - } - - - public void setAccount(AccountRelationship account) { - this.account = account; - } - - - public CreateAchPaymentCounterpartyRelationships counterparty(CounterpartyRelationship counterparty) { - - this.counterparty = counterparty; - return this; - } - - /** - * Get counterparty - * @return counterparty - **/ - @javax.annotation.Nonnull - public CounterpartyRelationship getCounterparty() { - return counterparty; - } - - - public void setCounterparty(CounterpartyRelationship counterparty) { - this.counterparty = counterparty; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAchPaymentCounterpartyRelationships createAchPaymentCounterpartyRelationships = (CreateAchPaymentCounterpartyRelationships) o; - return Objects.equals(this.account, createAchPaymentCounterpartyRelationships.account) && - Objects.equals(this.counterparty, createAchPaymentCounterpartyRelationships.counterparty); - } - - @Override - public int hashCode() { - return Objects.hash(account, counterparty); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAchPaymentCounterpartyRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - openapiFields.add("counterparty"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account"); - openapiRequiredFields.add("counterparty"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateAchPaymentCounterpartyRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateAchPaymentCounterpartyRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAchPaymentCounterpartyRelationships is not found in the empty JSON string", CreateAchPaymentCounterpartyRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateAchPaymentCounterpartyRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateAchPaymentCounterpartyRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateAchPaymentCounterpartyRelationships.openapiRequiredFields) { - 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(); - // validate the required field `account` - AccountRelationship.validateJsonElement(jsonObj.get("account")); - // validate the required field `counterparty` - CounterpartyRelationship.validateJsonElement(jsonObj.get("counterparty")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAchPaymentCounterpartyRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAchPaymentCounterpartyRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateAchPaymentCounterpartyRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAchPaymentCounterpartyRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAchPaymentCounterpartyRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAchPaymentCounterpartyRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAchPaymentCounterpartyRelationships - * @throws IOException if the JSON string is invalid with respect to CreateAchPaymentCounterpartyRelationships - */ - public static CreateAchPaymentCounterpartyRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAchPaymentCounterpartyRelationships.class); - } - - /** - * Convert an instance of CreateAchPaymentCounterpartyRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateAchPaymentPlaid.java b/src/main/java/org/openapitools/client/model/CreateAchPaymentPlaid.java deleted file mode 100644 index 247101fb..00000000 --- a/src/main/java/org/openapitools/client/model/CreateAchPaymentPlaid.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateAchPaymentPlaidAttributes; -import org.openapitools.client.model.CreateAchPaymentRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateAchPaymentPlaid - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAchPaymentPlaid { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "achPayment"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateAchPaymentPlaidAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateAchPaymentRelationships relationships; - - public CreateAchPaymentPlaid() { - } - - public CreateAchPaymentPlaid type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateAchPaymentPlaid attributes(CreateAchPaymentPlaidAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateAchPaymentPlaidAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateAchPaymentPlaidAttributes attributes) { - this.attributes = attributes; - } - - - public CreateAchPaymentPlaid relationships(CreateAchPaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateAchPaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateAchPaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAchPaymentPlaid createAchPaymentPlaid = (CreateAchPaymentPlaid) o; - return Objects.equals(this.type, createAchPaymentPlaid.type) && - Objects.equals(this.attributes, createAchPaymentPlaid.attributes) && - Objects.equals(this.relationships, createAchPaymentPlaid.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAchPaymentPlaid {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateAchPaymentPlaid - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateAchPaymentPlaid.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAchPaymentPlaid is not found in the empty JSON string", CreateAchPaymentPlaid.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateAchPaymentPlaid.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateAchPaymentPlaid` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateAchPaymentPlaid.openapiRequiredFields) { - 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("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateAchPaymentPlaidAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateAchPaymentRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAchPaymentPlaid.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAchPaymentPlaid' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateAchPaymentPlaid.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAchPaymentPlaid value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAchPaymentPlaid read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAchPaymentPlaid given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAchPaymentPlaid - * @throws IOException if the JSON string is invalid with respect to CreateAchPaymentPlaid - */ - public static CreateAchPaymentPlaid fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAchPaymentPlaid.class); - } - - /** - * Convert an instance of CreateAchPaymentPlaid to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateAchPaymentPlaidAttributes.java b/src/main/java/org/openapitools/client/model/CreateAchPaymentPlaidAttributes.java deleted file mode 100644 index deaea9d6..00000000 --- a/src/main/java/org/openapitools/client/model/CreateAchPaymentPlaidAttributes.java +++ /dev/null @@ -1,613 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateAchPaymentPlaidAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAchPaymentPlaidAttributes { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_ADDENDA = "addenda"; - @SerializedName(SERIALIZED_NAME_ADDENDA) - private String addenda; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - DEBIT("Debit"), - - CREDIT("Credit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_PLAID_PROCESSOR_TOKEN = "plaidProcessorToken"; - @SerializedName(SERIALIZED_NAME_PLAID_PROCESSOR_TOKEN) - private String plaidProcessorToken; - - public static final String SERIALIZED_NAME_COUNTERPARTY_NAME = "counterpartyName"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_NAME) - private String counterpartyName; - - public static final String SERIALIZED_NAME_SAME_DAY = "sameDay"; - @SerializedName(SERIALIZED_NAME_SAME_DAY) - private Boolean sameDay; - - public static final String SERIALIZED_NAME_VERIFY_COUNTERPARTY_BALANCE = "verifyCounterpartyBalance"; - @SerializedName(SERIALIZED_NAME_VERIFY_COUNTERPARTY_BALANCE) - private Boolean verifyCounterpartyBalance = false; - - /** - * Gets or Sets secCode - */ - @JsonAdapter(SecCodeEnum.Adapter.class) - public enum SecCodeEnum { - WEB("WEB"), - - CCD("CCD"), - - PPD("PPD"); - - private String value; - - SecCodeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static SecCodeEnum fromValue(String value) { - for (SecCodeEnum b : SecCodeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final SecCodeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public SecCodeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return SecCodeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_SEC_CODE = "secCode"; - @SerializedName(SERIALIZED_NAME_SEC_CODE) - private SecCodeEnum secCode; - - public CreateAchPaymentPlaidAttributes() { - } - - public CreateAchPaymentPlaidAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CreateAchPaymentPlaidAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public CreateAchPaymentPlaidAttributes addenda(String addenda) { - - this.addenda = addenda; - return this; - } - - /** - * Get addenda - * @return addenda - **/ - @javax.annotation.Nullable - public String getAddenda() { - return addenda; - } - - - public void setAddenda(String addenda) { - this.addenda = addenda; - } - - - public CreateAchPaymentPlaidAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public CreateAchPaymentPlaidAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateAchPaymentPlaidAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateAchPaymentPlaidAttributes plaidProcessorToken(String plaidProcessorToken) { - - this.plaidProcessorToken = plaidProcessorToken; - return this; - } - - /** - * Get plaidProcessorToken - * @return plaidProcessorToken - **/ - @javax.annotation.Nonnull - public String getPlaidProcessorToken() { - return plaidProcessorToken; - } - - - public void setPlaidProcessorToken(String plaidProcessorToken) { - this.plaidProcessorToken = plaidProcessorToken; - } - - - public CreateAchPaymentPlaidAttributes counterpartyName(String counterpartyName) { - - this.counterpartyName = counterpartyName; - return this; - } - - /** - * Get counterpartyName - * @return counterpartyName - **/ - @javax.annotation.Nullable - public String getCounterpartyName() { - return counterpartyName; - } - - - public void setCounterpartyName(String counterpartyName) { - this.counterpartyName = counterpartyName; - } - - - public CreateAchPaymentPlaidAttributes sameDay(Boolean sameDay) { - - this.sameDay = sameDay; - return this; - } - - /** - * Get sameDay - * @return sameDay - **/ - @javax.annotation.Nullable - public Boolean getSameDay() { - return sameDay; - } - - - public void setSameDay(Boolean sameDay) { - this.sameDay = sameDay; - } - - - public CreateAchPaymentPlaidAttributes verifyCounterpartyBalance(Boolean verifyCounterpartyBalance) { - - this.verifyCounterpartyBalance = verifyCounterpartyBalance; - return this; - } - - /** - * Get verifyCounterpartyBalance - * @return verifyCounterpartyBalance - **/ - @javax.annotation.Nullable - public Boolean getVerifyCounterpartyBalance() { - return verifyCounterpartyBalance; - } - - - public void setVerifyCounterpartyBalance(Boolean verifyCounterpartyBalance) { - this.verifyCounterpartyBalance = verifyCounterpartyBalance; - } - - - public CreateAchPaymentPlaidAttributes secCode(SecCodeEnum secCode) { - - this.secCode = secCode; - return this; - } - - /** - * Get secCode - * @return secCode - **/ - @javax.annotation.Nullable - public SecCodeEnum getSecCode() { - return secCode; - } - - - public void setSecCode(SecCodeEnum secCode) { - this.secCode = secCode; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAchPaymentPlaidAttributes createAchPaymentPlaidAttributes = (CreateAchPaymentPlaidAttributes) o; - return Objects.equals(this.amount, createAchPaymentPlaidAttributes.amount) && - Objects.equals(this.description, createAchPaymentPlaidAttributes.description) && - Objects.equals(this.addenda, createAchPaymentPlaidAttributes.addenda) && - Objects.equals(this.direction, createAchPaymentPlaidAttributes.direction) && - Objects.equals(this.idempotencyKey, createAchPaymentPlaidAttributes.idempotencyKey) && - Objects.equals(this.tags, createAchPaymentPlaidAttributes.tags) && - Objects.equals(this.plaidProcessorToken, createAchPaymentPlaidAttributes.plaidProcessorToken) && - Objects.equals(this.counterpartyName, createAchPaymentPlaidAttributes.counterpartyName) && - Objects.equals(this.sameDay, createAchPaymentPlaidAttributes.sameDay) && - Objects.equals(this.verifyCounterpartyBalance, createAchPaymentPlaidAttributes.verifyCounterpartyBalance) && - Objects.equals(this.secCode, createAchPaymentPlaidAttributes.secCode); - } - - @Override - public int hashCode() { - return Objects.hash(amount, description, addenda, direction, idempotencyKey, tags, plaidProcessorToken, counterpartyName, sameDay, verifyCounterpartyBalance, secCode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAchPaymentPlaidAttributes {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" plaidProcessorToken: ").append(toIndentedString(plaidProcessorToken)).append("\n"); - sb.append(" counterpartyName: ").append(toIndentedString(counterpartyName)).append("\n"); - sb.append(" sameDay: ").append(toIndentedString(sameDay)).append("\n"); - sb.append(" verifyCounterpartyBalance: ").append(toIndentedString(verifyCounterpartyBalance)).append("\n"); - sb.append(" secCode: ").append(toIndentedString(secCode)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("description"); - openapiFields.add("addenda"); - openapiFields.add("direction"); - openapiFields.add("idempotencyKey"); - openapiFields.add("tags"); - openapiFields.add("plaidProcessorToken"); - openapiFields.add("counterpartyName"); - openapiFields.add("sameDay"); - openapiFields.add("verifyCounterpartyBalance"); - openapiFields.add("secCode"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("plaidProcessorToken"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateAchPaymentPlaidAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateAchPaymentPlaidAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAchPaymentPlaidAttributes is not found in the empty JSON string", CreateAchPaymentPlaidAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateAchPaymentPlaidAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateAchPaymentPlaidAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateAchPaymentPlaidAttributes.openapiRequiredFields) { - 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("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("addenda") != null && !jsonObj.get("addenda").isJsonNull()) && !jsonObj.get("addenda").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `addenda` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addenda").toString())); - } - if (!jsonObj.get("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - if (!jsonObj.get("plaidProcessorToken").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plaidProcessorToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plaidProcessorToken").toString())); - } - if ((jsonObj.get("counterpartyName") != null && !jsonObj.get("counterpartyName").isJsonNull()) && !jsonObj.get("counterpartyName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `counterpartyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("counterpartyName").toString())); - } - if ((jsonObj.get("secCode") != null && !jsonObj.get("secCode").isJsonNull()) && !jsonObj.get("secCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `secCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secCode").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAchPaymentPlaidAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAchPaymentPlaidAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateAchPaymentPlaidAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAchPaymentPlaidAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAchPaymentPlaidAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAchPaymentPlaidAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAchPaymentPlaidAttributes - * @throws IOException if the JSON string is invalid with respect to CreateAchPaymentPlaidAttributes - */ - public static CreateAchPaymentPlaidAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAchPaymentPlaidAttributes.class); - } - - /** - * Convert an instance of CreateAchPaymentPlaidAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateAchPaymentRelationships.java b/src/main/java/org/openapitools/client/model/CreateAchPaymentRelationships.java deleted file mode 100644 index 716dc845..00000000 --- a/src/main/java/org/openapitools/client/model/CreateAchPaymentRelationships.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AccountRelationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateAchPaymentRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAchPaymentRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private AccountRelationship account; - - public CreateAchPaymentRelationships() { - } - - public CreateAchPaymentRelationships account(AccountRelationship account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public AccountRelationship getAccount() { - return account; - } - - - public void setAccount(AccountRelationship account) { - this.account = account; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAchPaymentRelationships createAchPaymentRelationships = (CreateAchPaymentRelationships) o; - return Objects.equals(this.account, createAchPaymentRelationships.account); - } - - @Override - public int hashCode() { - return Objects.hash(account); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAchPaymentRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateAchPaymentRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateAchPaymentRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAchPaymentRelationships is not found in the empty JSON string", CreateAchPaymentRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateAchPaymentRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateAchPaymentRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateAchPaymentRelationships.openapiRequiredFields) { - 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(); - // validate the required field `account` - AccountRelationship.validateJsonElement(jsonObj.get("account")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAchPaymentRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAchPaymentRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateAchPaymentRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAchPaymentRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAchPaymentRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAchPaymentRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAchPaymentRelationships - * @throws IOException if the JSON string is invalid with respect to CreateAchPaymentRelationships - */ - public static CreateAchPaymentRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAchPaymentRelationships.class); - } - - /** - * Convert an instance of CreateAchPaymentRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateAchRepayment.java b/src/main/java/org/openapitools/client/model/CreateAchRepayment.java deleted file mode 100644 index 04e3543d..00000000 --- a/src/main/java/org/openapitools/client/model/CreateAchRepayment.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateAchRepaymentAttributes; -import org.openapitools.client.model.CreateAchRepaymentRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateAchRepayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAchRepayment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "achRepayment"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateAchRepaymentAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateAchRepaymentRelationships relationships; - - public CreateAchRepayment() { - } - - public CreateAchRepayment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateAchRepayment attributes(CreateAchRepaymentAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateAchRepaymentAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateAchRepaymentAttributes attributes) { - this.attributes = attributes; - } - - - public CreateAchRepayment relationships(CreateAchRepaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateAchRepaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateAchRepaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAchRepayment createAchRepayment = (CreateAchRepayment) o; - return Objects.equals(this.type, createAchRepayment.type) && - Objects.equals(this.attributes, createAchRepayment.attributes) && - Objects.equals(this.relationships, createAchRepayment.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAchRepayment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateAchRepayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateAchRepayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAchRepayment is not found in the empty JSON string", CreateAchRepayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateAchRepayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateAchRepayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateAchRepayment.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateAchRepaymentAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateAchRepaymentRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAchRepayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAchRepayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateAchRepayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAchRepayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAchRepayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAchRepayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAchRepayment - * @throws IOException if the JSON string is invalid with respect to CreateAchRepayment - */ - public static CreateAchRepayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAchRepayment.class); - } - - /** - * Convert an instance of CreateAchRepayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateAchRepaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreateAchRepaymentAttributes.java deleted file mode 100644 index 32bade61..00000000 --- a/src/main/java/org/openapitools/client/model/CreateAchRepaymentAttributes.java +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateAchRepaymentAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAchRepaymentAttributes { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_ADDENDA = "addenda"; - @SerializedName(SERIALIZED_NAME_ADDENDA) - private String addenda; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_SAME_DAY = "sameDay"; - @SerializedName(SERIALIZED_NAME_SAME_DAY) - private Boolean sameDay; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public CreateAchRepaymentAttributes() { - } - - public CreateAchRepaymentAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CreateAchRepaymentAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public CreateAchRepaymentAttributes addenda(String addenda) { - - this.addenda = addenda; - return this; - } - - /** - * Get addenda - * @return addenda - **/ - @javax.annotation.Nullable - public String getAddenda() { - return addenda; - } - - - public void setAddenda(String addenda) { - this.addenda = addenda; - } - - - public CreateAchRepaymentAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateAchRepaymentAttributes sameDay(Boolean sameDay) { - - this.sameDay = sameDay; - return this; - } - - /** - * Get sameDay - * @return sameDay - **/ - @javax.annotation.Nullable - public Boolean getSameDay() { - return sameDay; - } - - - public void setSameDay(Boolean sameDay) { - this.sameDay = sameDay; - } - - - public CreateAchRepaymentAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAchRepaymentAttributes createAchRepaymentAttributes = (CreateAchRepaymentAttributes) o; - return Objects.equals(this.amount, createAchRepaymentAttributes.amount) && - Objects.equals(this.description, createAchRepaymentAttributes.description) && - Objects.equals(this.addenda, createAchRepaymentAttributes.addenda) && - Objects.equals(this.idempotencyKey, createAchRepaymentAttributes.idempotencyKey) && - Objects.equals(this.sameDay, createAchRepaymentAttributes.sameDay) && - Objects.equals(this.tags, createAchRepaymentAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(amount, description, addenda, idempotencyKey, sameDay, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAchRepaymentAttributes {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" sameDay: ").append(toIndentedString(sameDay)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("description"); - openapiFields.add("addenda"); - openapiFields.add("idempotencyKey"); - openapiFields.add("sameDay"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateAchRepaymentAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateAchRepaymentAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAchRepaymentAttributes is not found in the empty JSON string", CreateAchRepaymentAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateAchRepaymentAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateAchRepaymentAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateAchRepaymentAttributes.openapiRequiredFields) { - 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("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("addenda") != null && !jsonObj.get("addenda").isJsonNull()) && !jsonObj.get("addenda").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `addenda` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addenda").toString())); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAchRepaymentAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAchRepaymentAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateAchRepaymentAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAchRepaymentAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAchRepaymentAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAchRepaymentAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAchRepaymentAttributes - * @throws IOException if the JSON string is invalid with respect to CreateAchRepaymentAttributes - */ - public static CreateAchRepaymentAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAchRepaymentAttributes.class); - } - - /** - * Convert an instance of CreateAchRepaymentAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateAchRepaymentRelationships.java b/src/main/java/org/openapitools/client/model/CreateAchRepaymentRelationships.java deleted file mode 100644 index fc99edfb..00000000 --- a/src/main/java/org/openapitools/client/model/CreateAchRepaymentRelationships.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Relationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateAchRepaymentRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateAchRepaymentRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private Relationship account; - - public static final String SERIALIZED_NAME_CREDIT_ACCOUNT = "creditAccount"; - @SerializedName(SERIALIZED_NAME_CREDIT_ACCOUNT) - private Relationship creditAccount; - - public static final String SERIALIZED_NAME_COUNTERPARTY = "counterparty"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY) - private Relationship counterparty; - - public CreateAchRepaymentRelationships() { - } - - public CreateAchRepaymentRelationships account(Relationship account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public Relationship getAccount() { - return account; - } - - - public void setAccount(Relationship account) { - this.account = account; - } - - - public CreateAchRepaymentRelationships creditAccount(Relationship creditAccount) { - - this.creditAccount = creditAccount; - return this; - } - - /** - * Get creditAccount - * @return creditAccount - **/ - @javax.annotation.Nonnull - public Relationship getCreditAccount() { - return creditAccount; - } - - - public void setCreditAccount(Relationship creditAccount) { - this.creditAccount = creditAccount; - } - - - public CreateAchRepaymentRelationships counterparty(Relationship counterparty) { - - this.counterparty = counterparty; - return this; - } - - /** - * Get counterparty - * @return counterparty - **/ - @javax.annotation.Nonnull - public Relationship getCounterparty() { - return counterparty; - } - - - public void setCounterparty(Relationship counterparty) { - this.counterparty = counterparty; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateAchRepaymentRelationships createAchRepaymentRelationships = (CreateAchRepaymentRelationships) o; - return Objects.equals(this.account, createAchRepaymentRelationships.account) && - Objects.equals(this.creditAccount, createAchRepaymentRelationships.creditAccount) && - Objects.equals(this.counterparty, createAchRepaymentRelationships.counterparty); - } - - @Override - public int hashCode() { - return Objects.hash(account, creditAccount, counterparty); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateAchRepaymentRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" creditAccount: ").append(toIndentedString(creditAccount)).append("\n"); - sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - openapiFields.add("creditAccount"); - openapiFields.add("counterparty"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account"); - openapiRequiredFields.add("creditAccount"); - openapiRequiredFields.add("counterparty"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateAchRepaymentRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateAchRepaymentRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAchRepaymentRelationships is not found in the empty JSON string", CreateAchRepaymentRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateAchRepaymentRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateAchRepaymentRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateAchRepaymentRelationships.openapiRequiredFields) { - 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(); - // validate the required field `account` - Relationship.validateJsonElement(jsonObj.get("account")); - // validate the required field `creditAccount` - Relationship.validateJsonElement(jsonObj.get("creditAccount")); - // validate the required field `counterparty` - Relationship.validateJsonElement(jsonObj.get("counterparty")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateAchRepaymentRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateAchRepaymentRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateAchRepaymentRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateAchRepaymentRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateAchRepaymentRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateAchRepaymentRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAchRepaymentRelationships - * @throws IOException if the JSON string is invalid with respect to CreateAchRepaymentRelationships - */ - public static CreateAchRepaymentRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateAchRepaymentRelationships.class); - } - - /** - * Convert an instance of CreateAchRepaymentRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateApiToken.java b/src/main/java/org/openapitools/client/model/CreateApiToken.java deleted file mode 100644 index 9502f5a2..00000000 --- a/src/main/java/org/openapitools/client/model/CreateApiToken.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateApiTokenData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateApiToken - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateApiToken { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateApiTokenData data; - - public CreateApiToken() { - } - - public CreateApiToken data(CreateApiTokenData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateApiTokenData getData() { - return data; - } - - - public void setData(CreateApiTokenData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateApiToken createApiToken = (CreateApiToken) o; - return Objects.equals(this.data, createApiToken.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateApiToken {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateApiToken - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateApiToken.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateApiToken is not found in the empty JSON string", CreateApiToken.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateApiToken.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApiToken` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateApiTokenData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateApiToken.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateApiToken' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateApiToken.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateApiToken value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateApiToken read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateApiToken given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateApiToken - * @throws IOException if the JSON string is invalid with respect to CreateApiToken - */ - public static CreateApiToken fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateApiToken.class); - } - - /** - * Convert an instance of CreateApiToken to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateApiTokenData.java b/src/main/java/org/openapitools/client/model/CreateApiTokenData.java deleted file mode 100644 index 7c3c9690..00000000 --- a/src/main/java/org/openapitools/client/model/CreateApiTokenData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateApiTokenDataAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateApiTokenData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateApiTokenData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "apiToken"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateApiTokenDataAttributes attributes; - - public CreateApiTokenData() { - } - - public CreateApiTokenData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateApiTokenData attributes(CreateApiTokenDataAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateApiTokenDataAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateApiTokenDataAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateApiTokenData createApiTokenData = (CreateApiTokenData) o; - return Objects.equals(this.type, createApiTokenData.type) && - Objects.equals(this.attributes, createApiTokenData.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateApiTokenData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateApiTokenData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateApiTokenData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateApiTokenData is not found in the empty JSON string", CreateApiTokenData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateApiTokenData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApiTokenData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateApiTokenData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateApiTokenDataAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateApiTokenData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateApiTokenData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateApiTokenData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateApiTokenData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateApiTokenData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateApiTokenData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateApiTokenData - * @throws IOException if the JSON string is invalid with respect to CreateApiTokenData - */ - public static CreateApiTokenData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateApiTokenData.class); - } - - /** - * Convert an instance of CreateApiTokenData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateApiTokenDataAttributes.java b/src/main/java/org/openapitools/client/model/CreateApiTokenDataAttributes.java deleted file mode 100644 index 238a77ac..00000000 --- a/src/main/java/org/openapitools/client/model/CreateApiTokenDataAttributes.java +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.CreateApiTokenDataAttributesResourcesInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateApiTokenDataAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateApiTokenDataAttributes { - public static final String SERIALIZED_NAME_SCOPE = "scope"; - @SerializedName(SERIALIZED_NAME_SCOPE) - private String scope; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_EXPIRATION = "expiration"; - @SerializedName(SERIALIZED_NAME_EXPIRATION) - private OffsetDateTime expiration; - - public static final String SERIALIZED_NAME_SOURCE_IP = "sourceIp"; - @SerializedName(SERIALIZED_NAME_SOURCE_IP) - private String sourceIp; - - public static final String SERIALIZED_NAME_RESOURCES = "resources"; - @SerializedName(SERIALIZED_NAME_RESOURCES) - private List resources; - - public CreateApiTokenDataAttributes() { - } - - public CreateApiTokenDataAttributes scope(String scope) { - - this.scope = scope; - return this; - } - - /** - * Get scope - * @return scope - **/ - @javax.annotation.Nullable - public String getScope() { - return scope; - } - - - public void setScope(String scope) { - this.scope = scope; - } - - - public CreateApiTokenDataAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public CreateApiTokenDataAttributes expiration(OffsetDateTime expiration) { - - this.expiration = expiration; - return this; - } - - /** - * Get expiration - * @return expiration - **/ - @javax.annotation.Nonnull - public OffsetDateTime getExpiration() { - return expiration; - } - - - public void setExpiration(OffsetDateTime expiration) { - this.expiration = expiration; - } - - - public CreateApiTokenDataAttributes sourceIp(String sourceIp) { - - this.sourceIp = sourceIp; - return this; - } - - /** - * Get sourceIp - * @return sourceIp - **/ - @javax.annotation.Nullable - public String getSourceIp() { - return sourceIp; - } - - - public void setSourceIp(String sourceIp) { - this.sourceIp = sourceIp; - } - - - public CreateApiTokenDataAttributes resources(List resources) { - - this.resources = resources; - return this; - } - - public CreateApiTokenDataAttributes addResourcesItem(CreateApiTokenDataAttributesResourcesInner resourcesItem) { - if (this.resources == null) { - this.resources = new ArrayList<>(); - } - this.resources.add(resourcesItem); - return this; - } - - /** - * Get resources - * @return resources - **/ - @javax.annotation.Nullable - public List getResources() { - return resources; - } - - - public void setResources(List resources) { - this.resources = resources; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateApiTokenDataAttributes createApiTokenDataAttributes = (CreateApiTokenDataAttributes) o; - return Objects.equals(this.scope, createApiTokenDataAttributes.scope) && - Objects.equals(this.description, createApiTokenDataAttributes.description) && - Objects.equals(this.expiration, createApiTokenDataAttributes.expiration) && - Objects.equals(this.sourceIp, createApiTokenDataAttributes.sourceIp) && - Objects.equals(this.resources, createApiTokenDataAttributes.resources); - } - - @Override - public int hashCode() { - return Objects.hash(scope, description, expiration, sourceIp, resources); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateApiTokenDataAttributes {\n"); - sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" expiration: ").append(toIndentedString(expiration)).append("\n"); - sb.append(" sourceIp: ").append(toIndentedString(sourceIp)).append("\n"); - sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("scope"); - openapiFields.add("description"); - openapiFields.add("expiration"); - openapiFields.add("sourceIp"); - openapiFields.add("resources"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("expiration"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateApiTokenDataAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateApiTokenDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateApiTokenDataAttributes is not found in the empty JSON string", CreateApiTokenDataAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateApiTokenDataAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApiTokenDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateApiTokenDataAttributes.openapiRequiredFields) { - 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("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); - } - if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("sourceIp") != null && !jsonObj.get("sourceIp").isJsonNull()) && !jsonObj.get("sourceIp").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sourceIp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sourceIp").toString())); - } - if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonNull()) { - JsonArray jsonArrayresources = jsonObj.getAsJsonArray("resources"); - if (jsonArrayresources != null) { - // ensure the json data is an array - if (!jsonObj.get("resources").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `resources` to be an array in the JSON string but got `%s`", jsonObj.get("resources").toString())); - } - - // validate the optional field `resources` (array) - for (int i = 0; i < jsonArrayresources.size(); i++) { - CreateApiTokenDataAttributesResourcesInner.validateJsonElement(jsonArrayresources.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateApiTokenDataAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateApiTokenDataAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateApiTokenDataAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateApiTokenDataAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateApiTokenDataAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateApiTokenDataAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateApiTokenDataAttributes - * @throws IOException if the JSON string is invalid with respect to CreateApiTokenDataAttributes - */ - public static CreateApiTokenDataAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateApiTokenDataAttributes.class); - } - - /** - * Convert an instance of CreateApiTokenDataAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateApiTokenDataAttributesResourcesInner.java b/src/main/java/org/openapitools/client/model/CreateApiTokenDataAttributesResourcesInner.java deleted file mode 100644 index d4a4146d..00000000 --- a/src/main/java/org/openapitools/client/model/CreateApiTokenDataAttributesResourcesInner.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateApiTokenDataAttributesResourcesInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateApiTokenDataAttributesResourcesInner { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - CARD("card"), - - ACCOUNT("account"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_IDS = "ids"; - @SerializedName(SERIALIZED_NAME_IDS) - private List ids; - - public CreateApiTokenDataAttributesResourcesInner() { - } - - public CreateApiTokenDataAttributesResourcesInner type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CreateApiTokenDataAttributesResourcesInner ids(List ids) { - - this.ids = ids; - return this; - } - - public CreateApiTokenDataAttributesResourcesInner addIdsItem(String idsItem) { - if (this.ids == null) { - this.ids = new ArrayList<>(); - } - this.ids.add(idsItem); - return this; - } - - /** - * Get ids - * @return ids - **/ - @javax.annotation.Nullable - public List getIds() { - return ids; - } - - - public void setIds(List ids) { - this.ids = ids; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateApiTokenDataAttributesResourcesInner createApiTokenDataAttributesResourcesInner = (CreateApiTokenDataAttributesResourcesInner) o; - return Objects.equals(this.type, createApiTokenDataAttributesResourcesInner.type) && - Objects.equals(this.ids, createApiTokenDataAttributesResourcesInner.ids); - } - - @Override - public int hashCode() { - return Objects.hash(type, ids); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateApiTokenDataAttributesResourcesInner {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" ids: ").append(toIndentedString(ids)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("ids"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateApiTokenDataAttributesResourcesInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateApiTokenDataAttributesResourcesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateApiTokenDataAttributesResourcesInner is not found in the empty JSON string", CreateApiTokenDataAttributesResourcesInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateApiTokenDataAttributesResourcesInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApiTokenDataAttributesResourcesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ids") != null && !jsonObj.get("ids").isJsonNull() && !jsonObj.get("ids").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ids` to be an array in the JSON string but got `%s`", jsonObj.get("ids").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateApiTokenDataAttributesResourcesInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateApiTokenDataAttributesResourcesInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateApiTokenDataAttributesResourcesInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateApiTokenDataAttributesResourcesInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateApiTokenDataAttributesResourcesInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateApiTokenDataAttributesResourcesInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateApiTokenDataAttributesResourcesInner - * @throws IOException if the JSON string is invalid with respect to CreateApiTokenDataAttributesResourcesInner - */ - public static CreateApiTokenDataAttributesResourcesInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateApiTokenDataAttributesResourcesInner.class); - } - - /** - * Convert an instance of CreateApiTokenDataAttributesResourcesInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateApplication.java b/src/main/java/org/openapitools/client/model/CreateApplication.java deleted file mode 100644 index 45ea9884..00000000 --- a/src/main/java/org/openapitools/client/model/CreateApplication.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateApplicationData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateApplication - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateApplication { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateApplicationData data; - - public CreateApplication() { - } - - public CreateApplication data(CreateApplicationData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public CreateApplicationData getData() { - return data; - } - - - public void setData(CreateApplicationData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateApplication createApplication = (CreateApplication) o; - return Objects.equals(this.data, createApplication.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateApplication {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateApplication - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateApplication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateApplication is not found in the empty JSON string", CreateApplication.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateApplication.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApplication` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateApplication.openapiRequiredFields) { - 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(); - // validate the required field `data` - CreateApplicationData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateApplication.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateApplication' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateApplication.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateApplication value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateApplication read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateApplication given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateApplication - * @throws IOException if the JSON string is invalid with respect to CreateApplication - */ - public static CreateApplication fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateApplication.class); - } - - /** - * Convert an instance of CreateApplication to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateApplicationData.java b/src/main/java/org/openapitools/client/model/CreateApplicationData.java deleted file mode 100644 index 844c8b7c..00000000 --- a/src/main/java/org/openapitools/client/model/CreateApplicationData.java +++ /dev/null @@ -1,377 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateBusinessApplication; -import org.openapitools.client.model.CreateIndividualApplication; -import org.openapitools.client.model.CreateSoleProprietorApplication; -import org.openapitools.client.model.CreateTrustApplication; -import org.openapitools.client.model.CreateTrustApplicationAttributes; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -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 com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import org.openapitools.client.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateApplicationData extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(CreateApplicationData.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateApplicationData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateApplicationData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterCreateIndividualApplication = gson.getDelegateAdapter(this, TypeToken.get(CreateIndividualApplication.class)); - final TypeAdapter adapterCreateSoleProprietorApplication = gson.getDelegateAdapter(this, TypeToken.get(CreateSoleProprietorApplication.class)); - final TypeAdapter adapterCreateBusinessApplication = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessApplication.class)); - final TypeAdapter adapterCreateTrustApplication = gson.getDelegateAdapter(this, TypeToken.get(CreateTrustApplication.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateApplicationData value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `CreateIndividualApplication` - if (value.getActualInstance() instanceof CreateIndividualApplication) { - JsonElement element = adapterCreateIndividualApplication.toJsonTree((CreateIndividualApplication)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateSoleProprietorApplication` - if (value.getActualInstance() instanceof CreateSoleProprietorApplication) { - JsonElement element = adapterCreateSoleProprietorApplication.toJsonTree((CreateSoleProprietorApplication)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateBusinessApplication` - if (value.getActualInstance() instanceof CreateBusinessApplication) { - JsonElement element = adapterCreateBusinessApplication.toJsonTree((CreateBusinessApplication)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateTrustApplication` - if (value.getActualInstance() instanceof CreateTrustApplication) { - JsonElement element = adapterCreateTrustApplication.toJsonTree((CreateTrustApplication)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CreateBusinessApplication, CreateIndividualApplication, CreateSoleProprietorApplication, CreateTrustApplication"); - } - - @Override - public CreateApplicationData read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize CreateIndividualApplication - try { - // validate the JSON object to see if any exception is thrown - CreateIndividualApplication.validateJsonElement(jsonElement); - actualAdapter = adapterCreateIndividualApplication; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateIndividualApplication'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateIndividualApplication failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateIndividualApplication'", e); - } - // deserialize CreateSoleProprietorApplication - try { - // validate the JSON object to see if any exception is thrown - CreateSoleProprietorApplication.validateJsonElement(jsonElement); - actualAdapter = adapterCreateSoleProprietorApplication; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateSoleProprietorApplication'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateSoleProprietorApplication failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateSoleProprietorApplication'", e); - } - // deserialize CreateBusinessApplication - try { - // validate the JSON object to see if any exception is thrown - CreateBusinessApplication.validateJsonElement(jsonElement); - actualAdapter = adapterCreateBusinessApplication; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateBusinessApplication'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateBusinessApplication failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateBusinessApplication'", e); - } - // deserialize CreateTrustApplication - try { - // validate the JSON object to see if any exception is thrown - CreateTrustApplication.validateJsonElement(jsonElement); - actualAdapter = adapterCreateTrustApplication; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateTrustApplication'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateTrustApplication failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateTrustApplication'", e); - } - - if (match == 1) { - CreateApplicationData ret = new CreateApplicationData(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for CreateApplicationData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public CreateApplicationData() { - super("oneOf", Boolean.FALSE); - } - - public CreateApplicationData(CreateBusinessApplication o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreateApplicationData(CreateIndividualApplication o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreateApplicationData(CreateSoleProprietorApplication o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreateApplicationData(CreateTrustApplication o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("CreateIndividualApplication", CreateIndividualApplication.class); - schemas.put("CreateSoleProprietorApplication", CreateSoleProprietorApplication.class); - schemas.put("CreateBusinessApplication", CreateBusinessApplication.class); - schemas.put("CreateTrustApplication", CreateTrustApplication.class); - } - - @Override - public Map> getSchemas() { - return CreateApplicationData.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * CreateBusinessApplication, CreateIndividualApplication, CreateSoleProprietorApplication, CreateTrustApplication - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof CreateIndividualApplication) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateSoleProprietorApplication) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateBusinessApplication) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateTrustApplication) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be CreateBusinessApplication, CreateIndividualApplication, CreateSoleProprietorApplication, CreateTrustApplication"); - } - - /** - * Get the actual instance, which can be the following: - * CreateBusinessApplication, CreateIndividualApplication, CreateSoleProprietorApplication, CreateTrustApplication - * - * @return The actual instance (CreateBusinessApplication, CreateIndividualApplication, CreateSoleProprietorApplication, CreateTrustApplication) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `CreateIndividualApplication`. If the actual instance is not `CreateIndividualApplication`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateIndividualApplication` - * @throws ClassCastException if the instance is not `CreateIndividualApplication` - */ - public CreateIndividualApplication getCreateIndividualApplication() throws ClassCastException { - return (CreateIndividualApplication)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateSoleProprietorApplication`. If the actual instance is not `CreateSoleProprietorApplication`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateSoleProprietorApplication` - * @throws ClassCastException if the instance is not `CreateSoleProprietorApplication` - */ - public CreateSoleProprietorApplication getCreateSoleProprietorApplication() throws ClassCastException { - return (CreateSoleProprietorApplication)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateBusinessApplication`. If the actual instance is not `CreateBusinessApplication`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateBusinessApplication` - * @throws ClassCastException if the instance is not `CreateBusinessApplication` - */ - public CreateBusinessApplication getCreateBusinessApplication() throws ClassCastException { - return (CreateBusinessApplication)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateTrustApplication`. If the actual instance is not `CreateTrustApplication`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateTrustApplication` - * @throws ClassCastException if the instance is not `CreateTrustApplication` - */ - public CreateTrustApplication getCreateTrustApplication() throws ClassCastException { - return (CreateTrustApplication)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateApplicationData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with CreateIndividualApplication - try { - CreateIndividualApplication.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateIndividualApplication failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateSoleProprietorApplication - try { - CreateSoleProprietorApplication.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateSoleProprietorApplication failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateBusinessApplication - try { - CreateBusinessApplication.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateBusinessApplication failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateTrustApplication - try { - CreateTrustApplication.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateTrustApplication failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for CreateApplicationData with oneOf schemas: CreateBusinessApplication, CreateIndividualApplication, CreateSoleProprietorApplication, CreateTrustApplication. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of CreateApplicationData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateApplicationData - * @throws IOException if the JSON string is invalid with respect to CreateApplicationData - */ - public static CreateApplicationData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateApplicationData.class); - } - - /** - * Convert an instance of CreateApplicationData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateApplicationForm.java b/src/main/java/org/openapitools/client/model/CreateApplicationForm.java deleted file mode 100644 index e20b96c7..00000000 --- a/src/main/java/org/openapitools/client/model/CreateApplicationForm.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateApplicationFormData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateApplicationForm - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateApplicationForm { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateApplicationFormData data; - - public CreateApplicationForm() { - } - - public CreateApplicationForm data(CreateApplicationFormData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateApplicationFormData getData() { - return data; - } - - - public void setData(CreateApplicationFormData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateApplicationForm createApplicationForm = (CreateApplicationForm) o; - return Objects.equals(this.data, createApplicationForm.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateApplicationForm {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateApplicationForm - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateApplicationForm.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateApplicationForm is not found in the empty JSON string", CreateApplicationForm.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateApplicationForm.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApplicationForm` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateApplicationFormData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateApplicationForm.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateApplicationForm' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateApplicationForm.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateApplicationForm value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateApplicationForm read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateApplicationForm given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateApplicationForm - * @throws IOException if the JSON string is invalid with respect to CreateApplicationForm - */ - public static CreateApplicationForm fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateApplicationForm.class); - } - - /** - * Convert an instance of CreateApplicationForm to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateApplicationFormData.java b/src/main/java/org/openapitools/client/model/CreateApplicationFormData.java deleted file mode 100644 index fbe6b349..00000000 --- a/src/main/java/org/openapitools/client/model/CreateApplicationFormData.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateApplicationFormDataAttributes; -import org.openapitools.client.model.CreateApplicationFormRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateApplicationFormData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateApplicationFormData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "applicationForm"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateApplicationFormDataAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateApplicationFormRelationships relationships; - - public CreateApplicationFormData() { - } - - public CreateApplicationFormData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateApplicationFormData attributes(CreateApplicationFormDataAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public CreateApplicationFormDataAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateApplicationFormDataAttributes attributes) { - this.attributes = attributes; - } - - - public CreateApplicationFormData relationships(CreateApplicationFormRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public CreateApplicationFormRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateApplicationFormRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateApplicationFormData createApplicationFormData = (CreateApplicationFormData) o; - return Objects.equals(this.type, createApplicationFormData.type) && - Objects.equals(this.attributes, createApplicationFormData.attributes) && - Objects.equals(this.relationships, createApplicationFormData.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateApplicationFormData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateApplicationFormData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateApplicationFormData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateApplicationFormData is not found in the empty JSON string", CreateApplicationFormData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateApplicationFormData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApplicationFormData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateApplicationFormData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - CreateApplicationFormDataAttributes.validateJsonElement(jsonObj.get("attributes")); - } - // validate the optional field `relationships` - if (jsonObj.get("relationships") != null && !jsonObj.get("relationships").isJsonNull()) { - CreateApplicationFormRelationships.validateJsonElement(jsonObj.get("relationships")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateApplicationFormData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateApplicationFormData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateApplicationFormData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateApplicationFormData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateApplicationFormData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateApplicationFormData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateApplicationFormData - * @throws IOException if the JSON string is invalid with respect to CreateApplicationFormData - */ - public static CreateApplicationFormData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateApplicationFormData.class); - } - - /** - * Convert an instance of CreateApplicationFormData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateApplicationFormDataAttributes.java b/src/main/java/org/openapitools/client/model/CreateApplicationFormDataAttributes.java deleted file mode 100644 index 5396b6d2..00000000 --- a/src/main/java/org/openapitools/client/model/CreateApplicationFormDataAttributes.java +++ /dev/null @@ -1,501 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ApplicationFormPrefill; -import org.openapitools.client.model.ApplicationFormSettingsOverride; -import org.openapitools.client.model.RequireIdVerification; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateApplicationFormDataAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateApplicationFormDataAttributes { - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_APPLICANT_DETAILS = "applicantDetails"; - @SerializedName(SERIALIZED_NAME_APPLICANT_DETAILS) - private ApplicationFormPrefill applicantDetails; - - public static final String SERIALIZED_NAME_SETTINGS_OVERRIDE = "settingsOverride"; - @SerializedName(SERIALIZED_NAME_SETTINGS_OVERRIDE) - private ApplicationFormSettingsOverride settingsOverride; - - public static final String SERIALIZED_NAME_REQUIRE_ID_VERIFICATION = "requireIdVerification"; - @SerializedName(SERIALIZED_NAME_REQUIRE_ID_VERIFICATION) - private RequireIdVerification requireIdVerification; - - /** - * Gets or Sets allowedApplicationTypes - */ - @JsonAdapter(AllowedApplicationTypesEnum.Adapter.class) - public enum AllowedApplicationTypesEnum { - INDIVIDUAL("Individual"), - - BUSINESS("Business"), - - SOLEPROPRIETORSHIP("SoleProprietorship"); - - private String value; - - AllowedApplicationTypesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AllowedApplicationTypesEnum fromValue(String value) { - for (AllowedApplicationTypesEnum b : AllowedApplicationTypesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AllowedApplicationTypesEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AllowedApplicationTypesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AllowedApplicationTypesEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_ALLOWED_APPLICATION_TYPES = "allowedApplicationTypes"; - @SerializedName(SERIALIZED_NAME_ALLOWED_APPLICATION_TYPES) - private List allowedApplicationTypes; - - /** - * Gets or Sets lang - */ - @JsonAdapter(LangEnum.Adapter.class) - public enum LangEnum { - EN("en"), - - ES("es"); - - private String value; - - LangEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static LangEnum fromValue(String value) { - for (LangEnum b : LangEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final LangEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public LangEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return LangEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_LANG = "lang"; - @SerializedName(SERIALIZED_NAME_LANG) - private LangEnum lang; - - public static final String SERIALIZED_NAME_HIDE_APPLICATION_PROGRESS_TRACKER = "hideApplicationProgressTracker"; - @SerializedName(SERIALIZED_NAME_HIDE_APPLICATION_PROGRESS_TRACKER) - private Boolean hideApplicationProgressTracker; - - public CreateApplicationFormDataAttributes() { - } - - public CreateApplicationFormDataAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateApplicationFormDataAttributes applicantDetails(ApplicationFormPrefill applicantDetails) { - - this.applicantDetails = applicantDetails; - return this; - } - - /** - * Get applicantDetails - * @return applicantDetails - **/ - @javax.annotation.Nullable - public ApplicationFormPrefill getApplicantDetails() { - return applicantDetails; - } - - - public void setApplicantDetails(ApplicationFormPrefill applicantDetails) { - this.applicantDetails = applicantDetails; - } - - - public CreateApplicationFormDataAttributes settingsOverride(ApplicationFormSettingsOverride settingsOverride) { - - this.settingsOverride = settingsOverride; - return this; - } - - /** - * Get settingsOverride - * @return settingsOverride - **/ - @javax.annotation.Nullable - public ApplicationFormSettingsOverride getSettingsOverride() { - return settingsOverride; - } - - - public void setSettingsOverride(ApplicationFormSettingsOverride settingsOverride) { - this.settingsOverride = settingsOverride; - } - - - public CreateApplicationFormDataAttributes requireIdVerification(RequireIdVerification requireIdVerification) { - - this.requireIdVerification = requireIdVerification; - return this; - } - - /** - * Get requireIdVerification - * @return requireIdVerification - **/ - @javax.annotation.Nullable - public RequireIdVerification getRequireIdVerification() { - return requireIdVerification; - } - - - public void setRequireIdVerification(RequireIdVerification requireIdVerification) { - this.requireIdVerification = requireIdVerification; - } - - - public CreateApplicationFormDataAttributes allowedApplicationTypes(List allowedApplicationTypes) { - - this.allowedApplicationTypes = allowedApplicationTypes; - return this; - } - - public CreateApplicationFormDataAttributes addAllowedApplicationTypesItem(AllowedApplicationTypesEnum allowedApplicationTypesItem) { - if (this.allowedApplicationTypes == null) { - this.allowedApplicationTypes = new ArrayList<>(); - } - this.allowedApplicationTypes.add(allowedApplicationTypesItem); - return this; - } - - /** - * Get allowedApplicationTypes - * @return allowedApplicationTypes - **/ - @javax.annotation.Nullable - public List getAllowedApplicationTypes() { - return allowedApplicationTypes; - } - - - public void setAllowedApplicationTypes(List allowedApplicationTypes) { - this.allowedApplicationTypes = allowedApplicationTypes; - } - - - public CreateApplicationFormDataAttributes lang(LangEnum lang) { - - this.lang = lang; - return this; - } - - /** - * Get lang - * @return lang - **/ - @javax.annotation.Nullable - public LangEnum getLang() { - return lang; - } - - - public void setLang(LangEnum lang) { - this.lang = lang; - } - - - public CreateApplicationFormDataAttributes hideApplicationProgressTracker(Boolean hideApplicationProgressTracker) { - - this.hideApplicationProgressTracker = hideApplicationProgressTracker; - return this; - } - - /** - * Get hideApplicationProgressTracker - * @return hideApplicationProgressTracker - **/ - @javax.annotation.Nullable - public Boolean getHideApplicationProgressTracker() { - return hideApplicationProgressTracker; - } - - - public void setHideApplicationProgressTracker(Boolean hideApplicationProgressTracker) { - this.hideApplicationProgressTracker = hideApplicationProgressTracker; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateApplicationFormDataAttributes createApplicationFormDataAttributes = (CreateApplicationFormDataAttributes) o; - return Objects.equals(this.tags, createApplicationFormDataAttributes.tags) && - Objects.equals(this.applicantDetails, createApplicationFormDataAttributes.applicantDetails) && - Objects.equals(this.settingsOverride, createApplicationFormDataAttributes.settingsOverride) && - Objects.equals(this.requireIdVerification, createApplicationFormDataAttributes.requireIdVerification) && - Objects.equals(this.allowedApplicationTypes, createApplicationFormDataAttributes.allowedApplicationTypes) && - Objects.equals(this.lang, createApplicationFormDataAttributes.lang) && - Objects.equals(this.hideApplicationProgressTracker, createApplicationFormDataAttributes.hideApplicationProgressTracker); - } - - @Override - public int hashCode() { - return Objects.hash(tags, applicantDetails, settingsOverride, requireIdVerification, allowedApplicationTypes, lang, hideApplicationProgressTracker); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateApplicationFormDataAttributes {\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" applicantDetails: ").append(toIndentedString(applicantDetails)).append("\n"); - sb.append(" settingsOverride: ").append(toIndentedString(settingsOverride)).append("\n"); - sb.append(" requireIdVerification: ").append(toIndentedString(requireIdVerification)).append("\n"); - sb.append(" allowedApplicationTypes: ").append(toIndentedString(allowedApplicationTypes)).append("\n"); - sb.append(" lang: ").append(toIndentedString(lang)).append("\n"); - sb.append(" hideApplicationProgressTracker: ").append(toIndentedString(hideApplicationProgressTracker)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tags"); - openapiFields.add("applicantDetails"); - openapiFields.add("settingsOverride"); - openapiFields.add("requireIdVerification"); - openapiFields.add("allowedApplicationTypes"); - openapiFields.add("lang"); - openapiFields.add("hideApplicationProgressTracker"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateApplicationFormDataAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateApplicationFormDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateApplicationFormDataAttributes is not found in the empty JSON string", CreateApplicationFormDataAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateApplicationFormDataAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApplicationFormDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `applicantDetails` - if (jsonObj.get("applicantDetails") != null && !jsonObj.get("applicantDetails").isJsonNull()) { - ApplicationFormPrefill.validateJsonElement(jsonObj.get("applicantDetails")); - } - // validate the optional field `settingsOverride` - if (jsonObj.get("settingsOverride") != null && !jsonObj.get("settingsOverride").isJsonNull()) { - ApplicationFormSettingsOverride.validateJsonElement(jsonObj.get("settingsOverride")); - } - // validate the optional field `requireIdVerification` - if (jsonObj.get("requireIdVerification") != null && !jsonObj.get("requireIdVerification").isJsonNull()) { - RequireIdVerification.validateJsonElement(jsonObj.get("requireIdVerification")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("allowedApplicationTypes") != null && !jsonObj.get("allowedApplicationTypes").isJsonNull() && !jsonObj.get("allowedApplicationTypes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `allowedApplicationTypes` to be an array in the JSON string but got `%s`", jsonObj.get("allowedApplicationTypes").toString())); - } - if ((jsonObj.get("lang") != null && !jsonObj.get("lang").isJsonNull()) && !jsonObj.get("lang").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `lang` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lang").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateApplicationFormDataAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateApplicationFormDataAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateApplicationFormDataAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateApplicationFormDataAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateApplicationFormDataAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateApplicationFormDataAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateApplicationFormDataAttributes - * @throws IOException if the JSON string is invalid with respect to CreateApplicationFormDataAttributes - */ - public static CreateApplicationFormDataAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateApplicationFormDataAttributes.class); - } - - /** - * Convert an instance of CreateApplicationFormDataAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateApplicationFormRelationships.java b/src/main/java/org/openapitools/client/model/CreateApplicationFormRelationships.java deleted file mode 100644 index 94eceff4..00000000 --- a/src/main/java/org/openapitools/client/model/CreateApplicationFormRelationships.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Relationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateApplicationFormRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateApplicationFormRelationships { - public static final String SERIALIZED_NAME_APPLICATION = "application"; - @SerializedName(SERIALIZED_NAME_APPLICATION) - private Relationship application; - - public CreateApplicationFormRelationships() { - } - - public CreateApplicationFormRelationships application(Relationship application) { - - this.application = application; - return this; - } - - /** - * Get application - * @return application - **/ - @javax.annotation.Nullable - public Relationship getApplication() { - return application; - } - - - public void setApplication(Relationship application) { - this.application = application; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateApplicationFormRelationships createApplicationFormRelationships = (CreateApplicationFormRelationships) o; - return Objects.equals(this.application, createApplicationFormRelationships.application); - } - - @Override - public int hashCode() { - return Objects.hash(application); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateApplicationFormRelationships {\n"); - sb.append(" application: ").append(toIndentedString(application)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("application"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateApplicationFormRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateApplicationFormRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateApplicationFormRelationships is not found in the empty JSON string", CreateApplicationFormRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateApplicationFormRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateApplicationFormRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `application` - if (jsonObj.get("application") != null && !jsonObj.get("application").isJsonNull()) { - Relationship.validateJsonElement(jsonObj.get("application")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateApplicationFormRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateApplicationFormRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateApplicationFormRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateApplicationFormRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateApplicationFormRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateApplicationFormRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateApplicationFormRelationships - * @throws IOException if the JSON string is invalid with respect to CreateApplicationFormRelationships - */ - public static CreateApplicationFormRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateApplicationFormRelationships.class); - } - - /** - * Convert an instance of CreateApplicationFormRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateBeneficialOwner.java b/src/main/java/org/openapitools/client/model/CreateBeneficialOwner.java deleted file mode 100644 index 6bdb28e1..00000000 --- a/src/main/java/org/openapitools/client/model/CreateBeneficialOwner.java +++ /dev/null @@ -1,616 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.Arrays; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.AnnualIncome; -import org.openapitools.client.model.EvaluationParams; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Occupation; -import org.openapitools.client.model.Phone; -import org.openapitools.client.model.SourceOfIncome; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateBeneficialOwner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateBeneficialOwner { - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_MATRICULA_CONSULAR = "matriculaConsular"; - @SerializedName(SERIALIZED_NAME_MATRICULA_CONSULAR) - private String matriculaConsular; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public static final String SERIALIZED_NAME_PERCENTAGE = "percentage"; - @SerializedName(SERIALIZED_NAME_PERCENTAGE) - private Integer percentage; - - public static final String SERIALIZED_NAME_EVALUATION_PARAMS = "evaluationParams"; - @SerializedName(SERIALIZED_NAME_EVALUATION_PARAMS) - private EvaluationParams evaluationParams; - - public static final String SERIALIZED_NAME_OCCUPATION = "occupation"; - @SerializedName(SERIALIZED_NAME_OCCUPATION) - private Occupation occupation; - - public static final String SERIALIZED_NAME_ANNUAL_INCOME = "annualIncome"; - @SerializedName(SERIALIZED_NAME_ANNUAL_INCOME) - private AnnualIncome annualIncome; - - public static final String SERIALIZED_NAME_SOURCE_OF_INCOME = "sourceOfIncome"; - @SerializedName(SERIALIZED_NAME_SOURCE_OF_INCOME) - private SourceOfIncome sourceOfIncome; - - public CreateBeneficialOwner() { - } - - public CreateBeneficialOwner fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nonnull - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public CreateBeneficialOwner email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nonnull - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public CreateBeneficialOwner phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nonnull - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public CreateBeneficialOwner ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public CreateBeneficialOwner passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public CreateBeneficialOwner nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public CreateBeneficialOwner matriculaConsular(String matriculaConsular) { - - this.matriculaConsular = matriculaConsular; - return this; - } - - /** - * Get matriculaConsular - * @return matriculaConsular - **/ - @javax.annotation.Nullable - public String getMatriculaConsular() { - return matriculaConsular; - } - - - public void setMatriculaConsular(String matriculaConsular) { - this.matriculaConsular = matriculaConsular; - } - - - public CreateBeneficialOwner address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nonnull - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public CreateBeneficialOwner dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nonnull - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public CreateBeneficialOwner percentage(Integer percentage) { - - this.percentage = percentage; - return this; - } - - /** - * Get percentage - * minimum: 0 - * maximum: 100 - * @return percentage - **/ - @javax.annotation.Nullable - public Integer getPercentage() { - return percentage; - } - - - public void setPercentage(Integer percentage) { - this.percentage = percentage; - } - - - public CreateBeneficialOwner evaluationParams(EvaluationParams evaluationParams) { - - this.evaluationParams = evaluationParams; - return this; - } - - /** - * Get evaluationParams - * @return evaluationParams - **/ - @javax.annotation.Nullable - public EvaluationParams getEvaluationParams() { - return evaluationParams; - } - - - public void setEvaluationParams(EvaluationParams evaluationParams) { - this.evaluationParams = evaluationParams; - } - - - public CreateBeneficialOwner occupation(Occupation occupation) { - - this.occupation = occupation; - return this; - } - - /** - * Get occupation - * @return occupation - **/ - @javax.annotation.Nullable - public Occupation getOccupation() { - return occupation; - } - - - public void setOccupation(Occupation occupation) { - this.occupation = occupation; - } - - - public CreateBeneficialOwner annualIncome(AnnualIncome annualIncome) { - - this.annualIncome = annualIncome; - return this; - } - - /** - * Get annualIncome - * @return annualIncome - **/ - @javax.annotation.Nullable - public AnnualIncome getAnnualIncome() { - return annualIncome; - } - - - public void setAnnualIncome(AnnualIncome annualIncome) { - this.annualIncome = annualIncome; - } - - - public CreateBeneficialOwner sourceOfIncome(SourceOfIncome sourceOfIncome) { - - this.sourceOfIncome = sourceOfIncome; - return this; - } - - /** - * Get sourceOfIncome - * @return sourceOfIncome - **/ - @javax.annotation.Nullable - public SourceOfIncome getSourceOfIncome() { - return sourceOfIncome; - } - - - public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { - this.sourceOfIncome = sourceOfIncome; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateBeneficialOwner createBeneficialOwner = (CreateBeneficialOwner) o; - return Objects.equals(this.fullName, createBeneficialOwner.fullName) && - Objects.equals(this.email, createBeneficialOwner.email) && - Objects.equals(this.phone, createBeneficialOwner.phone) && - Objects.equals(this.ssn, createBeneficialOwner.ssn) && - Objects.equals(this.passport, createBeneficialOwner.passport) && - Objects.equals(this.nationality, createBeneficialOwner.nationality) && - Objects.equals(this.matriculaConsular, createBeneficialOwner.matriculaConsular) && - Objects.equals(this.address, createBeneficialOwner.address) && - Objects.equals(this.dateOfBirth, createBeneficialOwner.dateOfBirth) && - Objects.equals(this.percentage, createBeneficialOwner.percentage) && - Objects.equals(this.evaluationParams, createBeneficialOwner.evaluationParams) && - Objects.equals(this.occupation, createBeneficialOwner.occupation) && - Objects.equals(this.annualIncome, createBeneficialOwner.annualIncome) && - Objects.equals(this.sourceOfIncome, createBeneficialOwner.sourceOfIncome); - } - - @Override - public int hashCode() { - return Objects.hash(fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, percentage, evaluationParams, occupation, annualIncome, sourceOfIncome); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateBeneficialOwner {\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" percentage: ").append(toIndentedString(percentage)).append("\n"); - sb.append(" evaluationParams: ").append(toIndentedString(evaluationParams)).append("\n"); - sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); - sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); - sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fullName"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("nationality"); - openapiFields.add("matriculaConsular"); - openapiFields.add("address"); - openapiFields.add("dateOfBirth"); - openapiFields.add("percentage"); - openapiFields.add("evaluationParams"); - openapiFields.add("occupation"); - openapiFields.add("annualIncome"); - openapiFields.add("sourceOfIncome"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("fullName"); - openapiRequiredFields.add("email"); - openapiRequiredFields.add("phone"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("dateOfBirth"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateBeneficialOwner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateBeneficialOwner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBeneficialOwner is not found in the empty JSON string", CreateBeneficialOwner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateBeneficialOwner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateBeneficialOwner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateBeneficialOwner.openapiRequiredFields) { - 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(); - // validate the required field `fullName` - FullName.validateJsonElement(jsonObj.get("fullName")); - if (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the required field `phone` - Phone.validateJsonElement(jsonObj.get("phone")); - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - if ((jsonObj.get("matriculaConsular") != null && !jsonObj.get("matriculaConsular").isJsonNull()) && !jsonObj.get("matriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `matriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("matriculaConsular").toString())); - } - // validate the required field `address` - Address.validateJsonElement(jsonObj.get("address")); - // validate the optional field `evaluationParams` - if (jsonObj.get("evaluationParams") != null && !jsonObj.get("evaluationParams").isJsonNull()) { - EvaluationParams.validateJsonElement(jsonObj.get("evaluationParams")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateBeneficialOwner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateBeneficialOwner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateBeneficialOwner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateBeneficialOwner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateBeneficialOwner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateBeneficialOwner given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateBeneficialOwner - * @throws IOException if the JSON string is invalid with respect to CreateBeneficialOwner - */ - public static CreateBeneficialOwner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateBeneficialOwner.class); - } - - /** - * Convert an instance of CreateBeneficialOwner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateBillPayment.java b/src/main/java/org/openapitools/client/model/CreateBillPayment.java deleted file mode 100644 index 37e055bc..00000000 --- a/src/main/java/org/openapitools/client/model/CreateBillPayment.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateAchPaymentRelationships; -import org.openapitools.client.model.CreateBillPaymentAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateBillPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateBillPayment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "billPayment"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateBillPaymentAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateAchPaymentRelationships relationships; - - public CreateBillPayment() { - } - - public CreateBillPayment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateBillPayment attributes(CreateBillPaymentAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateBillPaymentAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateBillPaymentAttributes attributes) { - this.attributes = attributes; - } - - - public CreateBillPayment relationships(CreateAchPaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateAchPaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateAchPaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateBillPayment createBillPayment = (CreateBillPayment) o; - return Objects.equals(this.type, createBillPayment.type) && - Objects.equals(this.attributes, createBillPayment.attributes) && - Objects.equals(this.relationships, createBillPayment.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateBillPayment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateBillPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateBillPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBillPayment is not found in the empty JSON string", CreateBillPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateBillPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateBillPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateBillPayment.openapiRequiredFields) { - 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("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateBillPaymentAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateAchPaymentRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateBillPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateBillPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateBillPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateBillPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateBillPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateBillPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateBillPayment - * @throws IOException if the JSON string is invalid with respect to CreateBillPayment - */ - public static CreateBillPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateBillPayment.class); - } - - /** - * Convert an instance of CreateBillPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateBillPaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreateBillPaymentAttributes.java deleted file mode 100644 index 2d64c3b2..00000000 --- a/src/main/java/org/openapitools/client/model/CreateBillPaymentAttributes.java +++ /dev/null @@ -1,430 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.Arrays; -import org.openapitools.client.model.FullName; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateBillPaymentAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateBillPaymentAttributes { - public static final String SERIALIZED_NAME_BILLER_ID = "billerId"; - @SerializedName(SERIALIZED_NAME_BILLER_ID) - private String billerId; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public CreateBillPaymentAttributes() { - } - - public CreateBillPaymentAttributes billerId(String billerId) { - - this.billerId = billerId; - return this; - } - - /** - * Get billerId - * @return billerId - **/ - @javax.annotation.Nonnull - public String getBillerId() { - return billerId; - } - - - public void setBillerId(String billerId) { - this.billerId = billerId; - } - - - public CreateBillPaymentAttributes accountNumber(String accountNumber) { - - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - **/ - @javax.annotation.Nonnull - public String getAccountNumber() { - return accountNumber; - } - - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public CreateBillPaymentAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CreateBillPaymentAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public CreateBillPaymentAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateBillPaymentAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateBillPaymentAttributes fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nullable - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public CreateBillPaymentAttributes dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nullable - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateBillPaymentAttributes createBillPaymentAttributes = (CreateBillPaymentAttributes) o; - return Objects.equals(this.billerId, createBillPaymentAttributes.billerId) && - Objects.equals(this.accountNumber, createBillPaymentAttributes.accountNumber) && - Objects.equals(this.amount, createBillPaymentAttributes.amount) && - Objects.equals(this.description, createBillPaymentAttributes.description) && - Objects.equals(this.idempotencyKey, createBillPaymentAttributes.idempotencyKey) && - Objects.equals(this.tags, createBillPaymentAttributes.tags) && - Objects.equals(this.fullName, createBillPaymentAttributes.fullName) && - Objects.equals(this.dateOfBirth, createBillPaymentAttributes.dateOfBirth); - } - - @Override - public int hashCode() { - return Objects.hash(billerId, accountNumber, amount, description, idempotencyKey, tags, fullName, dateOfBirth); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateBillPaymentAttributes {\n"); - sb.append(" billerId: ").append(toIndentedString(billerId)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("billerId"); - openapiFields.add("accountNumber"); - openapiFields.add("amount"); - openapiFields.add("description"); - openapiFields.add("idempotencyKey"); - openapiFields.add("tags"); - openapiFields.add("fullName"); - openapiFields.add("dateOfBirth"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("billerId"); - openapiRequiredFields.add("accountNumber"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateBillPaymentAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateBillPaymentAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBillPaymentAttributes is not found in the empty JSON string", CreateBillPaymentAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateBillPaymentAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateBillPaymentAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateBillPaymentAttributes.openapiRequiredFields) { - 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("billerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `billerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billerId").toString())); - } - if (!jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - // validate the optional field `fullName` - if (jsonObj.get("fullName") != null && !jsonObj.get("fullName").isJsonNull()) { - FullName.validateJsonElement(jsonObj.get("fullName")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateBillPaymentAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateBillPaymentAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateBillPaymentAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateBillPaymentAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateBillPaymentAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateBillPaymentAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateBillPaymentAttributes - * @throws IOException if the JSON string is invalid with respect to CreateBillPaymentAttributes - */ - public static CreateBillPaymentAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateBillPaymentAttributes.class); - } - - /** - * Convert an instance of CreateBillPaymentAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateBookPayment.java b/src/main/java/org/openapitools/client/model/CreateBookPayment.java deleted file mode 100644 index 33e7a40e..00000000 --- a/src/main/java/org/openapitools/client/model/CreateBookPayment.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateBookPaymentAttributes; -import org.openapitools.client.model.CreateBookPaymentRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateBookPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateBookPayment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "bookPayment"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateBookPaymentAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateBookPaymentRelationships relationships; - - public CreateBookPayment() { - } - - public CreateBookPayment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateBookPayment attributes(CreateBookPaymentAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateBookPaymentAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateBookPaymentAttributes attributes) { - this.attributes = attributes; - } - - - public CreateBookPayment relationships(CreateBookPaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateBookPaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateBookPaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateBookPayment createBookPayment = (CreateBookPayment) o; - return Objects.equals(this.type, createBookPayment.type) && - Objects.equals(this.attributes, createBookPayment.attributes) && - Objects.equals(this.relationships, createBookPayment.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateBookPayment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateBookPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateBookPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBookPayment is not found in the empty JSON string", CreateBookPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateBookPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateBookPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateBookPayment.openapiRequiredFields) { - 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("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateBookPaymentAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateBookPaymentRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateBookPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateBookPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateBookPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateBookPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateBookPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateBookPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateBookPayment - * @throws IOException if the JSON string is invalid with respect to CreateBookPayment - */ - public static CreateBookPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateBookPayment.class); - } - - /** - * Convert an instance of CreateBookPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateBookPaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreateBookPaymentAttributes.java deleted file mode 100644 index 5d918c99..00000000 --- a/src/main/java/org/openapitools/client/model/CreateBookPaymentAttributes.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateBookPaymentAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateBookPaymentAttributes { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_TRANSACTION_SUMMARY_OVERRIDE = "transactionSummaryOverride"; - @SerializedName(SERIALIZED_NAME_TRANSACTION_SUMMARY_OVERRIDE) - private String transactionSummaryOverride; - - public CreateBookPaymentAttributes() { - } - - public CreateBookPaymentAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CreateBookPaymentAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public CreateBookPaymentAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateBookPaymentAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateBookPaymentAttributes transactionSummaryOverride(String transactionSummaryOverride) { - - this.transactionSummaryOverride = transactionSummaryOverride; - return this; - } - - /** - * Get transactionSummaryOverride - * @return transactionSummaryOverride - **/ - @javax.annotation.Nullable - public String getTransactionSummaryOverride() { - return transactionSummaryOverride; - } - - - public void setTransactionSummaryOverride(String transactionSummaryOverride) { - this.transactionSummaryOverride = transactionSummaryOverride; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateBookPaymentAttributes createBookPaymentAttributes = (CreateBookPaymentAttributes) o; - return Objects.equals(this.amount, createBookPaymentAttributes.amount) && - Objects.equals(this.description, createBookPaymentAttributes.description) && - Objects.equals(this.idempotencyKey, createBookPaymentAttributes.idempotencyKey) && - Objects.equals(this.tags, createBookPaymentAttributes.tags) && - Objects.equals(this.transactionSummaryOverride, createBookPaymentAttributes.transactionSummaryOverride); - } - - @Override - public int hashCode() { - return Objects.hash(amount, description, idempotencyKey, tags, transactionSummaryOverride); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateBookPaymentAttributes {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" transactionSummaryOverride: ").append(toIndentedString(transactionSummaryOverride)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("description"); - openapiFields.add("idempotencyKey"); - openapiFields.add("tags"); - openapiFields.add("transactionSummaryOverride"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateBookPaymentAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateBookPaymentAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBookPaymentAttributes is not found in the empty JSON string", CreateBookPaymentAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateBookPaymentAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateBookPaymentAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateBookPaymentAttributes.openapiRequiredFields) { - 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("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - if ((jsonObj.get("transactionSummaryOverride") != null && !jsonObj.get("transactionSummaryOverride").isJsonNull()) && !jsonObj.get("transactionSummaryOverride").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transactionSummaryOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transactionSummaryOverride").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateBookPaymentAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateBookPaymentAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateBookPaymentAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateBookPaymentAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateBookPaymentAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateBookPaymentAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateBookPaymentAttributes - * @throws IOException if the JSON string is invalid with respect to CreateBookPaymentAttributes - */ - public static CreateBookPaymentAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateBookPaymentAttributes.class); - } - - /** - * Convert an instance of CreateBookPaymentAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateBookPaymentRelationships.java b/src/main/java/org/openapitools/client/model/CreateBookPaymentRelationships.java deleted file mode 100644 index eb5a9265..00000000 --- a/src/main/java/org/openapitools/client/model/CreateBookPaymentRelationships.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AccountRelationship; -import org.openapitools.client.model.CounterpartyAccountRelationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateBookPaymentRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateBookPaymentRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private AccountRelationship account; - - public static final String SERIALIZED_NAME_COUNTERPARTY_ACCOUNT = "counterpartyAccount"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_ACCOUNT) - private CounterpartyAccountRelationship counterpartyAccount; - - public CreateBookPaymentRelationships() { - } - - public CreateBookPaymentRelationships account(AccountRelationship account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public AccountRelationship getAccount() { - return account; - } - - - public void setAccount(AccountRelationship account) { - this.account = account; - } - - - public CreateBookPaymentRelationships counterpartyAccount(CounterpartyAccountRelationship counterpartyAccount) { - - this.counterpartyAccount = counterpartyAccount; - return this; - } - - /** - * Get counterpartyAccount - * @return counterpartyAccount - **/ - @javax.annotation.Nonnull - public CounterpartyAccountRelationship getCounterpartyAccount() { - return counterpartyAccount; - } - - - public void setCounterpartyAccount(CounterpartyAccountRelationship counterpartyAccount) { - this.counterpartyAccount = counterpartyAccount; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateBookPaymentRelationships createBookPaymentRelationships = (CreateBookPaymentRelationships) o; - return Objects.equals(this.account, createBookPaymentRelationships.account) && - Objects.equals(this.counterpartyAccount, createBookPaymentRelationships.counterpartyAccount); - } - - @Override - public int hashCode() { - return Objects.hash(account, counterpartyAccount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateBookPaymentRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" counterpartyAccount: ").append(toIndentedString(counterpartyAccount)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - openapiFields.add("counterpartyAccount"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account"); - openapiRequiredFields.add("counterpartyAccount"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateBookPaymentRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateBookPaymentRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBookPaymentRelationships is not found in the empty JSON string", CreateBookPaymentRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateBookPaymentRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateBookPaymentRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateBookPaymentRelationships.openapiRequiredFields) { - 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(); - // validate the required field `account` - AccountRelationship.validateJsonElement(jsonObj.get("account")); - // validate the required field `counterpartyAccount` - CounterpartyAccountRelationship.validateJsonElement(jsonObj.get("counterpartyAccount")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateBookPaymentRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateBookPaymentRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateBookPaymentRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateBookPaymentRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateBookPaymentRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateBookPaymentRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateBookPaymentRelationships - * @throws IOException if the JSON string is invalid with respect to CreateBookPaymentRelationships - */ - public static CreateBookPaymentRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateBookPaymentRelationships.class); - } - - /** - * Convert an instance of CreateBookPaymentRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateBookRepayment.java b/src/main/java/org/openapitools/client/model/CreateBookRepayment.java deleted file mode 100644 index 07d6656e..00000000 --- a/src/main/java/org/openapitools/client/model/CreateBookRepayment.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateBookRepaymentAttributes; -import org.openapitools.client.model.CreateBookRepaymentRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateBookRepayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateBookRepayment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "bookRepayment"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateBookRepaymentAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateBookRepaymentRelationships relationships; - - public CreateBookRepayment() { - } - - public CreateBookRepayment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateBookRepayment attributes(CreateBookRepaymentAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateBookRepaymentAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateBookRepaymentAttributes attributes) { - this.attributes = attributes; - } - - - public CreateBookRepayment relationships(CreateBookRepaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateBookRepaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateBookRepaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateBookRepayment createBookRepayment = (CreateBookRepayment) o; - return Objects.equals(this.type, createBookRepayment.type) && - Objects.equals(this.attributes, createBookRepayment.attributes) && - Objects.equals(this.relationships, createBookRepayment.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateBookRepayment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateBookRepayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateBookRepayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBookRepayment is not found in the empty JSON string", CreateBookRepayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateBookRepayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateBookRepayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateBookRepayment.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateBookRepaymentAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateBookRepaymentRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateBookRepayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateBookRepayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateBookRepayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateBookRepayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateBookRepayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateBookRepayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateBookRepayment - * @throws IOException if the JSON string is invalid with respect to CreateBookRepayment - */ - public static CreateBookRepayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateBookRepayment.class); - } - - /** - * Convert an instance of CreateBookRepayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateBookRepaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreateBookRepaymentAttributes.java deleted file mode 100644 index f024cda4..00000000 --- a/src/main/java/org/openapitools/client/model/CreateBookRepaymentAttributes.java +++ /dev/null @@ -1,336 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateBookRepaymentAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateBookRepaymentAttributes { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_TRANSACTION_SUMMARY_OVERRIDE = "transactionSummaryOverride"; - @SerializedName(SERIALIZED_NAME_TRANSACTION_SUMMARY_OVERRIDE) - private String transactionSummaryOverride; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public CreateBookRepaymentAttributes() { - } - - public CreateBookRepaymentAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CreateBookRepaymentAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public CreateBookRepaymentAttributes transactionSummaryOverride(String transactionSummaryOverride) { - - this.transactionSummaryOverride = transactionSummaryOverride; - return this; - } - - /** - * Get transactionSummaryOverride - * @return transactionSummaryOverride - **/ - @javax.annotation.Nullable - public String getTransactionSummaryOverride() { - return transactionSummaryOverride; - } - - - public void setTransactionSummaryOverride(String transactionSummaryOverride) { - this.transactionSummaryOverride = transactionSummaryOverride; - } - - - public CreateBookRepaymentAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateBookRepaymentAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateBookRepaymentAttributes createBookRepaymentAttributes = (CreateBookRepaymentAttributes) o; - return Objects.equals(this.amount, createBookRepaymentAttributes.amount) && - Objects.equals(this.description, createBookRepaymentAttributes.description) && - Objects.equals(this.transactionSummaryOverride, createBookRepaymentAttributes.transactionSummaryOverride) && - Objects.equals(this.idempotencyKey, createBookRepaymentAttributes.idempotencyKey) && - Objects.equals(this.tags, createBookRepaymentAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(amount, description, transactionSummaryOverride, idempotencyKey, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateBookRepaymentAttributes {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" transactionSummaryOverride: ").append(toIndentedString(transactionSummaryOverride)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("description"); - openapiFields.add("transactionSummaryOverride"); - openapiFields.add("idempotencyKey"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateBookRepaymentAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateBookRepaymentAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBookRepaymentAttributes is not found in the empty JSON string", CreateBookRepaymentAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateBookRepaymentAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateBookRepaymentAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateBookRepaymentAttributes.openapiRequiredFields) { - 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("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("transactionSummaryOverride") != null && !jsonObj.get("transactionSummaryOverride").isJsonNull()) && !jsonObj.get("transactionSummaryOverride").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transactionSummaryOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transactionSummaryOverride").toString())); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateBookRepaymentAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateBookRepaymentAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateBookRepaymentAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateBookRepaymentAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateBookRepaymentAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateBookRepaymentAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateBookRepaymentAttributes - * @throws IOException if the JSON string is invalid with respect to CreateBookRepaymentAttributes - */ - public static CreateBookRepaymentAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateBookRepaymentAttributes.class); - } - - /** - * Convert an instance of CreateBookRepaymentAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateBookRepaymentRelationships.java b/src/main/java/org/openapitools/client/model/CreateBookRepaymentRelationships.java deleted file mode 100644 index e5062649..00000000 --- a/src/main/java/org/openapitools/client/model/CreateBookRepaymentRelationships.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Relationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateBookRepaymentRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateBookRepaymentRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private Relationship account; - - public static final String SERIALIZED_NAME_CREDIT_ACCOUNT = "creditAccount"; - @SerializedName(SERIALIZED_NAME_CREDIT_ACCOUNT) - private Relationship creditAccount; - - public static final String SERIALIZED_NAME_COUNTERPARTY_ACCOUNT = "counterpartyAccount"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_ACCOUNT) - private Relationship counterpartyAccount; - - public CreateBookRepaymentRelationships() { - } - - public CreateBookRepaymentRelationships account(Relationship account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public Relationship getAccount() { - return account; - } - - - public void setAccount(Relationship account) { - this.account = account; - } - - - public CreateBookRepaymentRelationships creditAccount(Relationship creditAccount) { - - this.creditAccount = creditAccount; - return this; - } - - /** - * Get creditAccount - * @return creditAccount - **/ - @javax.annotation.Nonnull - public Relationship getCreditAccount() { - return creditAccount; - } - - - public void setCreditAccount(Relationship creditAccount) { - this.creditAccount = creditAccount; - } - - - public CreateBookRepaymentRelationships counterpartyAccount(Relationship counterpartyAccount) { - - this.counterpartyAccount = counterpartyAccount; - return this; - } - - /** - * Get counterpartyAccount - * @return counterpartyAccount - **/ - @javax.annotation.Nonnull - public Relationship getCounterpartyAccount() { - return counterpartyAccount; - } - - - public void setCounterpartyAccount(Relationship counterpartyAccount) { - this.counterpartyAccount = counterpartyAccount; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateBookRepaymentRelationships createBookRepaymentRelationships = (CreateBookRepaymentRelationships) o; - return Objects.equals(this.account, createBookRepaymentRelationships.account) && - Objects.equals(this.creditAccount, createBookRepaymentRelationships.creditAccount) && - Objects.equals(this.counterpartyAccount, createBookRepaymentRelationships.counterpartyAccount); - } - - @Override - public int hashCode() { - return Objects.hash(account, creditAccount, counterpartyAccount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateBookRepaymentRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" creditAccount: ").append(toIndentedString(creditAccount)).append("\n"); - sb.append(" counterpartyAccount: ").append(toIndentedString(counterpartyAccount)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - openapiFields.add("creditAccount"); - openapiFields.add("counterpartyAccount"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account"); - openapiRequiredFields.add("creditAccount"); - openapiRequiredFields.add("counterpartyAccount"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateBookRepaymentRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateBookRepaymentRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBookRepaymentRelationships is not found in the empty JSON string", CreateBookRepaymentRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateBookRepaymentRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateBookRepaymentRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateBookRepaymentRelationships.openapiRequiredFields) { - 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(); - // validate the required field `account` - Relationship.validateJsonElement(jsonObj.get("account")); - // validate the required field `creditAccount` - Relationship.validateJsonElement(jsonObj.get("creditAccount")); - // validate the required field `counterpartyAccount` - Relationship.validateJsonElement(jsonObj.get("counterpartyAccount")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateBookRepaymentRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateBookRepaymentRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateBookRepaymentRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateBookRepaymentRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateBookRepaymentRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateBookRepaymentRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateBookRepaymentRelationships - * @throws IOException if the JSON string is invalid with respect to CreateBookRepaymentRelationships - */ - public static CreateBookRepaymentRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateBookRepaymentRelationships.class); - } - - /** - * Convert an instance of CreateBookRepaymentRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateBusinessApplication.java b/src/main/java/org/openapitools/client/model/CreateBusinessApplication.java deleted file mode 100644 index 0c25071c..00000000 --- a/src/main/java/org/openapitools/client/model/CreateBusinessApplication.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateBusinessApplicationAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateBusinessApplication - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateBusinessApplication { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "businessApplication"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateBusinessApplicationAttributes attributes; - - public CreateBusinessApplication() { - } - - public CreateBusinessApplication type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateBusinessApplication attributes(CreateBusinessApplicationAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateBusinessApplicationAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateBusinessApplicationAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateBusinessApplication createBusinessApplication = (CreateBusinessApplication) o; - return Objects.equals(this.type, createBusinessApplication.type) && - Objects.equals(this.attributes, createBusinessApplication.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateBusinessApplication {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateBusinessApplication - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateBusinessApplication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBusinessApplication is not found in the empty JSON string", CreateBusinessApplication.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateBusinessApplication.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateBusinessApplication` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateBusinessApplication.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateBusinessApplicationAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateBusinessApplication.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateBusinessApplication' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessApplication.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateBusinessApplication value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateBusinessApplication read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateBusinessApplication given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateBusinessApplication - * @throws IOException if the JSON string is invalid with respect to CreateBusinessApplication - */ - public static CreateBusinessApplication fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateBusinessApplication.class); - } - - /** - * Convert an instance of CreateBusinessApplication to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateBusinessApplicationAttributes.java b/src/main/java/org/openapitools/client/model/CreateBusinessApplicationAttributes.java deleted file mode 100644 index 22102af3..00000000 --- a/src/main/java/org/openapitools/client/model/CreateBusinessApplicationAttributes.java +++ /dev/null @@ -1,998 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.BusinessAnnualRevenue; -import org.openapitools.client.model.BusinessNumberOfEmployees; -import org.openapitools.client.model.BusinessVertical; -import org.openapitools.client.model.CashFlow; -import org.openapitools.client.model.Contact; -import org.openapitools.client.model.CreateBeneficialOwner; -import org.openapitools.client.model.CreateOfficer; -import org.openapitools.client.model.DeviceFingerprint; -import org.openapitools.client.model.EntityType; -import org.openapitools.client.model.Industry; -import org.openapitools.client.model.Phone; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateBusinessApplicationAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateBusinessApplicationAttributes { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_DBA = "dba"; - @SerializedName(SERIALIZED_NAME_DBA) - private String dba; - - public static final String SERIALIZED_NAME_EIN = "ein"; - @SerializedName(SERIALIZED_NAME_EIN) - private String ein; - - public static final String SERIALIZED_NAME_ENTITY_TYPE = "entityType"; - @SerializedName(SERIALIZED_NAME_ENTITY_TYPE) - private EntityType entityType; - - public static final String SERIALIZED_NAME_DATE_OF_INCORPORATION = "dateOfIncorporation"; - @SerializedName(SERIALIZED_NAME_DATE_OF_INCORPORATION) - private LocalDate dateOfIncorporation; - - public static final String SERIALIZED_NAME_STATE_OF_INCORPORATION = "stateOfIncorporation"; - @SerializedName(SERIALIZED_NAME_STATE_OF_INCORPORATION) - private String stateOfIncorporation; - - public static final String SERIALIZED_NAME_PURPOSE = "purpose"; - @SerializedName(SERIALIZED_NAME_PURPOSE) - private String purpose; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_CONTACT = "contact"; - @SerializedName(SERIALIZED_NAME_CONTACT) - private Contact contact; - - public static final String SERIALIZED_NAME_OFFICER = "officer"; - @SerializedName(SERIALIZED_NAME_OFFICER) - private CreateOfficer officer; - - public static final String SERIALIZED_NAME_IP = "ip"; - @SerializedName(SERIALIZED_NAME_IP) - private String ip; - - public static final String SERIALIZED_NAME_WEBSITE = "website"; - @SerializedName(SERIALIZED_NAME_WEBSITE) - private String website; - - public static final String SERIALIZED_NAME_BENEFICIAL_OWNERS = "beneficialOwners"; - @SerializedName(SERIALIZED_NAME_BENEFICIAL_OWNERS) - private List beneficialOwners = new ArrayList<>(); - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_DEVICE_FINGERPRINTS = "deviceFingerprints"; - @SerializedName(SERIALIZED_NAME_DEVICE_FINGERPRINTS) - private List deviceFingerprints; - - public static final String SERIALIZED_NAME_INDUSTRY = "industry"; - @SerializedName(SERIALIZED_NAME_INDUSTRY) - private Industry industry; - - public static final String SERIALIZED_NAME_ANNUAL_REVENUE = "annualRevenue"; - @SerializedName(SERIALIZED_NAME_ANNUAL_REVENUE) - private BusinessAnnualRevenue annualRevenue; - - public static final String SERIALIZED_NAME_NUMBER_OF_EMPLOYEES = "numberOfEmployees"; - @SerializedName(SERIALIZED_NAME_NUMBER_OF_EMPLOYEES) - private BusinessNumberOfEmployees numberOfEmployees; - - public static final String SERIALIZED_NAME_CASH_FLOW = "cashFlow"; - @SerializedName(SERIALIZED_NAME_CASH_FLOW) - private CashFlow cashFlow; - - public static final String SERIALIZED_NAME_YEAR_OF_INCORPORATION = "yearOfIncorporation"; - @SerializedName(SERIALIZED_NAME_YEAR_OF_INCORPORATION) - private String yearOfIncorporation; - - public static final String SERIALIZED_NAME_COUNTRIES_OF_OPERATION = "countriesOfOperation"; - @SerializedName(SERIALIZED_NAME_COUNTRIES_OF_OPERATION) - private List countriesOfOperation; - - public static final String SERIALIZED_NAME_STOCK_SYMBOL = "stockSymbol"; - @SerializedName(SERIALIZED_NAME_STOCK_SYMBOL) - private String stockSymbol; - - public static final String SERIALIZED_NAME_BUSINESS_VERTICAL = "businessVertical"; - @SerializedName(SERIALIZED_NAME_BUSINESS_VERTICAL) - private BusinessVertical businessVertical; - - public CreateBusinessApplicationAttributes() { - } - - public CreateBusinessApplicationAttributes name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public CreateBusinessApplicationAttributes dba(String dba) { - - this.dba = dba; - return this; - } - - /** - * Get dba - * @return dba - **/ - @javax.annotation.Nullable - public String getDba() { - return dba; - } - - - public void setDba(String dba) { - this.dba = dba; - } - - - public CreateBusinessApplicationAttributes ein(String ein) { - - this.ein = ein; - return this; - } - - /** - * Get ein - * @return ein - **/ - @javax.annotation.Nonnull - public String getEin() { - return ein; - } - - - public void setEin(String ein) { - this.ein = ein; - } - - - public CreateBusinessApplicationAttributes entityType(EntityType entityType) { - - this.entityType = entityType; - return this; - } - - /** - * Get entityType - * @return entityType - **/ - @javax.annotation.Nonnull - public EntityType getEntityType() { - return entityType; - } - - - public void setEntityType(EntityType entityType) { - this.entityType = entityType; - } - - - public CreateBusinessApplicationAttributes dateOfIncorporation(LocalDate dateOfIncorporation) { - - this.dateOfIncorporation = dateOfIncorporation; - return this; - } - - /** - * Get dateOfIncorporation - * @return dateOfIncorporation - **/ - @javax.annotation.Nullable - public LocalDate getDateOfIncorporation() { - return dateOfIncorporation; - } - - - public void setDateOfIncorporation(LocalDate dateOfIncorporation) { - this.dateOfIncorporation = dateOfIncorporation; - } - - - public CreateBusinessApplicationAttributes stateOfIncorporation(String stateOfIncorporation) { - - this.stateOfIncorporation = stateOfIncorporation; - return this; - } - - /** - * Get stateOfIncorporation - * @return stateOfIncorporation - **/ - @javax.annotation.Nonnull - public String getStateOfIncorporation() { - return stateOfIncorporation; - } - - - public void setStateOfIncorporation(String stateOfIncorporation) { - this.stateOfIncorporation = stateOfIncorporation; - } - - - public CreateBusinessApplicationAttributes purpose(String purpose) { - - this.purpose = purpose; - return this; - } - - /** - * Get purpose - * @return purpose - **/ - @javax.annotation.Nullable - public String getPurpose() { - return purpose; - } - - - public void setPurpose(String purpose) { - this.purpose = purpose; - } - - - public CreateBusinessApplicationAttributes phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nonnull - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public CreateBusinessApplicationAttributes address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nonnull - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public CreateBusinessApplicationAttributes contact(Contact contact) { - - this.contact = contact; - return this; - } - - /** - * Get contact - * @return contact - **/ - @javax.annotation.Nonnull - public Contact getContact() { - return contact; - } - - - public void setContact(Contact contact) { - this.contact = contact; - } - - - public CreateBusinessApplicationAttributes officer(CreateOfficer officer) { - - this.officer = officer; - return this; - } - - /** - * Get officer - * @return officer - **/ - @javax.annotation.Nonnull - public CreateOfficer getOfficer() { - return officer; - } - - - public void setOfficer(CreateOfficer officer) { - this.officer = officer; - } - - - public CreateBusinessApplicationAttributes ip(String ip) { - - this.ip = ip; - return this; - } - - /** - * Get ip - * @return ip - **/ - @javax.annotation.Nullable - public String getIp() { - return ip; - } - - - public void setIp(String ip) { - this.ip = ip; - } - - - public CreateBusinessApplicationAttributes website(String website) { - - this.website = website; - return this; - } - - /** - * Get website - * @return website - **/ - @javax.annotation.Nullable - public String getWebsite() { - return website; - } - - - public void setWebsite(String website) { - this.website = website; - } - - - public CreateBusinessApplicationAttributes beneficialOwners(List beneficialOwners) { - - this.beneficialOwners = beneficialOwners; - return this; - } - - public CreateBusinessApplicationAttributes addBeneficialOwnersItem(CreateBeneficialOwner beneficialOwnersItem) { - if (this.beneficialOwners == null) { - this.beneficialOwners = new ArrayList<>(); - } - this.beneficialOwners.add(beneficialOwnersItem); - return this; - } - - /** - * Get beneficialOwners - * @return beneficialOwners - **/ - @javax.annotation.Nonnull - public List getBeneficialOwners() { - return beneficialOwners; - } - - - public void setBeneficialOwners(List beneficialOwners) { - this.beneficialOwners = beneficialOwners; - } - - - public CreateBusinessApplicationAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateBusinessApplicationAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateBusinessApplicationAttributes deviceFingerprints(List deviceFingerprints) { - - this.deviceFingerprints = deviceFingerprints; - return this; - } - - public CreateBusinessApplicationAttributes addDeviceFingerprintsItem(DeviceFingerprint deviceFingerprintsItem) { - if (this.deviceFingerprints == null) { - this.deviceFingerprints = new ArrayList<>(); - } - this.deviceFingerprints.add(deviceFingerprintsItem); - return this; - } - - /** - * Get deviceFingerprints - * @return deviceFingerprints - **/ - @javax.annotation.Nullable - public List getDeviceFingerprints() { - return deviceFingerprints; - } - - - public void setDeviceFingerprints(List deviceFingerprints) { - this.deviceFingerprints = deviceFingerprints; - } - - - public CreateBusinessApplicationAttributes industry(Industry industry) { - - this.industry = industry; - return this; - } - - /** - * Get industry - * @return industry - **/ - @javax.annotation.Nullable - public Industry getIndustry() { - return industry; - } - - - public void setIndustry(Industry industry) { - this.industry = industry; - } - - - public CreateBusinessApplicationAttributes annualRevenue(BusinessAnnualRevenue annualRevenue) { - - this.annualRevenue = annualRevenue; - return this; - } - - /** - * Get annualRevenue - * @return annualRevenue - **/ - @javax.annotation.Nullable - public BusinessAnnualRevenue getAnnualRevenue() { - return annualRevenue; - } - - - public void setAnnualRevenue(BusinessAnnualRevenue annualRevenue) { - this.annualRevenue = annualRevenue; - } - - - public CreateBusinessApplicationAttributes numberOfEmployees(BusinessNumberOfEmployees numberOfEmployees) { - - this.numberOfEmployees = numberOfEmployees; - return this; - } - - /** - * Get numberOfEmployees - * @return numberOfEmployees - **/ - @javax.annotation.Nullable - public BusinessNumberOfEmployees getNumberOfEmployees() { - return numberOfEmployees; - } - - - public void setNumberOfEmployees(BusinessNumberOfEmployees numberOfEmployees) { - this.numberOfEmployees = numberOfEmployees; - } - - - public CreateBusinessApplicationAttributes cashFlow(CashFlow cashFlow) { - - this.cashFlow = cashFlow; - return this; - } - - /** - * Get cashFlow - * @return cashFlow - **/ - @javax.annotation.Nullable - public CashFlow getCashFlow() { - return cashFlow; - } - - - public void setCashFlow(CashFlow cashFlow) { - this.cashFlow = cashFlow; - } - - - public CreateBusinessApplicationAttributes yearOfIncorporation(String yearOfIncorporation) { - - this.yearOfIncorporation = yearOfIncorporation; - return this; - } - - /** - * Get yearOfIncorporation - * @return yearOfIncorporation - **/ - @javax.annotation.Nullable - public String getYearOfIncorporation() { - return yearOfIncorporation; - } - - - public void setYearOfIncorporation(String yearOfIncorporation) { - this.yearOfIncorporation = yearOfIncorporation; - } - - - public CreateBusinessApplicationAttributes countriesOfOperation(List countriesOfOperation) { - - this.countriesOfOperation = countriesOfOperation; - return this; - } - - public CreateBusinessApplicationAttributes addCountriesOfOperationItem(String countriesOfOperationItem) { - if (this.countriesOfOperation == null) { - this.countriesOfOperation = new ArrayList<>(); - } - this.countriesOfOperation.add(countriesOfOperationItem); - return this; - } - - /** - * Get countriesOfOperation - * @return countriesOfOperation - **/ - @javax.annotation.Nullable - public List getCountriesOfOperation() { - return countriesOfOperation; - } - - - public void setCountriesOfOperation(List countriesOfOperation) { - this.countriesOfOperation = countriesOfOperation; - } - - - public CreateBusinessApplicationAttributes stockSymbol(String stockSymbol) { - - this.stockSymbol = stockSymbol; - return this; - } - - /** - * Get stockSymbol - * @return stockSymbol - **/ - @javax.annotation.Nullable - public String getStockSymbol() { - return stockSymbol; - } - - - public void setStockSymbol(String stockSymbol) { - this.stockSymbol = stockSymbol; - } - - - public CreateBusinessApplicationAttributes businessVertical(BusinessVertical businessVertical) { - - this.businessVertical = businessVertical; - return this; - } - - /** - * Get businessVertical - * @return businessVertical - **/ - @javax.annotation.Nullable - public BusinessVertical getBusinessVertical() { - return businessVertical; - } - - - public void setBusinessVertical(BusinessVertical businessVertical) { - this.businessVertical = businessVertical; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateBusinessApplicationAttributes createBusinessApplicationAttributes = (CreateBusinessApplicationAttributes) o; - return Objects.equals(this.name, createBusinessApplicationAttributes.name) && - Objects.equals(this.dba, createBusinessApplicationAttributes.dba) && - Objects.equals(this.ein, createBusinessApplicationAttributes.ein) && - Objects.equals(this.entityType, createBusinessApplicationAttributes.entityType) && - Objects.equals(this.dateOfIncorporation, createBusinessApplicationAttributes.dateOfIncorporation) && - Objects.equals(this.stateOfIncorporation, createBusinessApplicationAttributes.stateOfIncorporation) && - Objects.equals(this.purpose, createBusinessApplicationAttributes.purpose) && - Objects.equals(this.phone, createBusinessApplicationAttributes.phone) && - Objects.equals(this.address, createBusinessApplicationAttributes.address) && - Objects.equals(this.contact, createBusinessApplicationAttributes.contact) && - Objects.equals(this.officer, createBusinessApplicationAttributes.officer) && - Objects.equals(this.ip, createBusinessApplicationAttributes.ip) && - Objects.equals(this.website, createBusinessApplicationAttributes.website) && - Objects.equals(this.beneficialOwners, createBusinessApplicationAttributes.beneficialOwners) && - Objects.equals(this.tags, createBusinessApplicationAttributes.tags) && - Objects.equals(this.idempotencyKey, createBusinessApplicationAttributes.idempotencyKey) && - Objects.equals(this.deviceFingerprints, createBusinessApplicationAttributes.deviceFingerprints) && - Objects.equals(this.industry, createBusinessApplicationAttributes.industry) && - Objects.equals(this.annualRevenue, createBusinessApplicationAttributes.annualRevenue) && - Objects.equals(this.numberOfEmployees, createBusinessApplicationAttributes.numberOfEmployees) && - Objects.equals(this.cashFlow, createBusinessApplicationAttributes.cashFlow) && - Objects.equals(this.yearOfIncorporation, createBusinessApplicationAttributes.yearOfIncorporation) && - Objects.equals(this.countriesOfOperation, createBusinessApplicationAttributes.countriesOfOperation) && - Objects.equals(this.stockSymbol, createBusinessApplicationAttributes.stockSymbol) && - Objects.equals(this.businessVertical, createBusinessApplicationAttributes.businessVertical); - } - - @Override - public int hashCode() { - return Objects.hash(name, dba, ein, entityType, dateOfIncorporation, stateOfIncorporation, purpose, phone, address, contact, officer, ip, website, beneficialOwners, tags, idempotencyKey, deviceFingerprints, industry, annualRevenue, numberOfEmployees, cashFlow, yearOfIncorporation, countriesOfOperation, stockSymbol, businessVertical); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateBusinessApplicationAttributes {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" dba: ").append(toIndentedString(dba)).append("\n"); - sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); - sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); - sb.append(" dateOfIncorporation: ").append(toIndentedString(dateOfIncorporation)).append("\n"); - sb.append(" stateOfIncorporation: ").append(toIndentedString(stateOfIncorporation)).append("\n"); - sb.append(" purpose: ").append(toIndentedString(purpose)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); - sb.append(" officer: ").append(toIndentedString(officer)).append("\n"); - sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); - sb.append(" website: ").append(toIndentedString(website)).append("\n"); - sb.append(" beneficialOwners: ").append(toIndentedString(beneficialOwners)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" deviceFingerprints: ").append(toIndentedString(deviceFingerprints)).append("\n"); - sb.append(" industry: ").append(toIndentedString(industry)).append("\n"); - sb.append(" annualRevenue: ").append(toIndentedString(annualRevenue)).append("\n"); - sb.append(" numberOfEmployees: ").append(toIndentedString(numberOfEmployees)).append("\n"); - sb.append(" cashFlow: ").append(toIndentedString(cashFlow)).append("\n"); - sb.append(" yearOfIncorporation: ").append(toIndentedString(yearOfIncorporation)).append("\n"); - sb.append(" countriesOfOperation: ").append(toIndentedString(countriesOfOperation)).append("\n"); - sb.append(" stockSymbol: ").append(toIndentedString(stockSymbol)).append("\n"); - sb.append(" businessVertical: ").append(toIndentedString(businessVertical)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("dba"); - openapiFields.add("ein"); - openapiFields.add("entityType"); - openapiFields.add("dateOfIncorporation"); - openapiFields.add("stateOfIncorporation"); - openapiFields.add("purpose"); - openapiFields.add("phone"); - openapiFields.add("address"); - openapiFields.add("contact"); - openapiFields.add("officer"); - openapiFields.add("ip"); - openapiFields.add("website"); - openapiFields.add("beneficialOwners"); - openapiFields.add("tags"); - openapiFields.add("idempotencyKey"); - openapiFields.add("deviceFingerprints"); - openapiFields.add("industry"); - openapiFields.add("annualRevenue"); - openapiFields.add("numberOfEmployees"); - openapiFields.add("cashFlow"); - openapiFields.add("yearOfIncorporation"); - openapiFields.add("countriesOfOperation"); - openapiFields.add("stockSymbol"); - openapiFields.add("businessVertical"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("ein"); - openapiRequiredFields.add("entityType"); - openapiRequiredFields.add("stateOfIncorporation"); - openapiRequiredFields.add("phone"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("contact"); - openapiRequiredFields.add("officer"); - openapiRequiredFields.add("beneficialOwners"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateBusinessApplicationAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateBusinessApplicationAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBusinessApplicationAttributes is not found in the empty JSON string", CreateBusinessApplicationAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateBusinessApplicationAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateBusinessApplicationAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateBusinessApplicationAttributes.openapiRequiredFields) { - 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("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("dba") != null && !jsonObj.get("dba").isJsonNull()) && !jsonObj.get("dba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dba").toString())); - } - if (!jsonObj.get("ein").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ein` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ein").toString())); - } - if (!jsonObj.get("stateOfIncorporation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `stateOfIncorporation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stateOfIncorporation").toString())); - } - if ((jsonObj.get("purpose") != null && !jsonObj.get("purpose").isJsonNull()) && !jsonObj.get("purpose").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `purpose` to be a primitive type in the JSON string but got `%s`", jsonObj.get("purpose").toString())); - } - // validate the required field `phone` - Phone.validateJsonElement(jsonObj.get("phone")); - // validate the required field `address` - Address.validateJsonElement(jsonObj.get("address")); - // validate the required field `contact` - Contact.validateJsonElement(jsonObj.get("contact")); - // validate the required field `officer` - CreateOfficer.validateJsonElement(jsonObj.get("officer")); - if ((jsonObj.get("ip") != null && !jsonObj.get("ip").isJsonNull()) && !jsonObj.get("ip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip").toString())); - } - if ((jsonObj.get("website") != null && !jsonObj.get("website").isJsonNull()) && !jsonObj.get("website").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `website` to be a primitive type in the JSON string but got `%s`", jsonObj.get("website").toString())); - } - // ensure the json data is an array - if (!jsonObj.get("beneficialOwners").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `beneficialOwners` to be an array in the JSON string but got `%s`", jsonObj.get("beneficialOwners").toString())); - } - - JsonArray jsonArraybeneficialOwners = jsonObj.getAsJsonArray("beneficialOwners"); - // validate the required field `beneficialOwners` (array) - for (int i = 0; i < jsonArraybeneficialOwners.size(); i++) { - CreateBeneficialOwner.validateJsonElement(jsonArraybeneficialOwners.get(i)); - }; - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - if (jsonObj.get("deviceFingerprints") != null && !jsonObj.get("deviceFingerprints").isJsonNull()) { - JsonArray jsonArraydeviceFingerprints = jsonObj.getAsJsonArray("deviceFingerprints"); - if (jsonArraydeviceFingerprints != null) { - // ensure the json data is an array - if (!jsonObj.get("deviceFingerprints").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `deviceFingerprints` to be an array in the JSON string but got `%s`", jsonObj.get("deviceFingerprints").toString())); - } - - // validate the optional field `deviceFingerprints` (array) - for (int i = 0; i < jsonArraydeviceFingerprints.size(); i++) { - DeviceFingerprint.validateJsonElement(jsonArraydeviceFingerprints.get(i)); - }; - } - } - if ((jsonObj.get("yearOfIncorporation") != null && !jsonObj.get("yearOfIncorporation").isJsonNull()) && !jsonObj.get("yearOfIncorporation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `yearOfIncorporation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("yearOfIncorporation").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("countriesOfOperation") != null && !jsonObj.get("countriesOfOperation").isJsonNull() && !jsonObj.get("countriesOfOperation").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `countriesOfOperation` to be an array in the JSON string but got `%s`", jsonObj.get("countriesOfOperation").toString())); - } - if ((jsonObj.get("stockSymbol") != null && !jsonObj.get("stockSymbol").isJsonNull()) && !jsonObj.get("stockSymbol").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `stockSymbol` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stockSymbol").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateBusinessApplicationAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateBusinessApplicationAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessApplicationAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateBusinessApplicationAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateBusinessApplicationAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateBusinessApplicationAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateBusinessApplicationAttributes - * @throws IOException if the JSON string is invalid with respect to CreateBusinessApplicationAttributes - */ - public static CreateBusinessApplicationAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateBusinessApplicationAttributes.class); - } - - /** - * Convert an instance of CreateBusinessApplicationAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateBusinessCreditCard.java b/src/main/java/org/openapitools/client/model/CreateBusinessCreditCard.java deleted file mode 100644 index 8be1e192..00000000 --- a/src/main/java/org/openapitools/client/model/CreateBusinessCreditCard.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateBusinessDebitCardAttributes; -import org.openapitools.client.model.CreateCardRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateBusinessCreditCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateBusinessCreditCard { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - BUSINESSCREDITCARD("businessCreditCard"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type = TypeEnum.BUSINESSCREDITCARD; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateBusinessDebitCardAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateCardRelationships relationships; - - public CreateBusinessCreditCard() { - } - - public CreateBusinessCreditCard type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CreateBusinessCreditCard attributes(CreateBusinessDebitCardAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateBusinessDebitCardAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateBusinessDebitCardAttributes attributes) { - this.attributes = attributes; - } - - - public CreateBusinessCreditCard relationships(CreateCardRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateCardRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateCardRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateBusinessCreditCard createBusinessCreditCard = (CreateBusinessCreditCard) o; - return Objects.equals(this.type, createBusinessCreditCard.type) && - Objects.equals(this.attributes, createBusinessCreditCard.attributes) && - Objects.equals(this.relationships, createBusinessCreditCard.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateBusinessCreditCard {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateBusinessCreditCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateBusinessCreditCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBusinessCreditCard is not found in the empty JSON string", CreateBusinessCreditCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateBusinessCreditCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateBusinessCreditCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateBusinessCreditCard.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateBusinessDebitCardAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateCardRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateBusinessCreditCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateBusinessCreditCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessCreditCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateBusinessCreditCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateBusinessCreditCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateBusinessCreditCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateBusinessCreditCard - * @throws IOException if the JSON string is invalid with respect to CreateBusinessCreditCard - */ - public static CreateBusinessCreditCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateBusinessCreditCard.class); - } - - /** - * Convert an instance of CreateBusinessCreditCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateBusinessDebitCard.java b/src/main/java/org/openapitools/client/model/CreateBusinessDebitCard.java deleted file mode 100644 index 0c454dde..00000000 --- a/src/main/java/org/openapitools/client/model/CreateBusinessDebitCard.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateBusinessDebitCardAttributes; -import org.openapitools.client.model.CreateCardRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateBusinessDebitCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateBusinessDebitCard { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - BUSINESSDEBITCARD("businessDebitCard"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type = TypeEnum.BUSINESSDEBITCARD; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateBusinessDebitCardAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateCardRelationships relationships; - - public CreateBusinessDebitCard() { - } - - public CreateBusinessDebitCard type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CreateBusinessDebitCard attributes(CreateBusinessDebitCardAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateBusinessDebitCardAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateBusinessDebitCardAttributes attributes) { - this.attributes = attributes; - } - - - public CreateBusinessDebitCard relationships(CreateCardRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateCardRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateCardRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateBusinessDebitCard createBusinessDebitCard = (CreateBusinessDebitCard) o; - return Objects.equals(this.type, createBusinessDebitCard.type) && - Objects.equals(this.attributes, createBusinessDebitCard.attributes) && - Objects.equals(this.relationships, createBusinessDebitCard.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateBusinessDebitCard {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateBusinessDebitCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateBusinessDebitCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBusinessDebitCard is not found in the empty JSON string", CreateBusinessDebitCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateBusinessDebitCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateBusinessDebitCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateBusinessDebitCard.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateBusinessDebitCardAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateCardRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateBusinessDebitCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateBusinessDebitCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessDebitCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateBusinessDebitCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateBusinessDebitCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateBusinessDebitCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateBusinessDebitCard - * @throws IOException if the JSON string is invalid with respect to CreateBusinessDebitCard - */ - public static CreateBusinessDebitCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateBusinessDebitCard.class); - } - - /** - * Convert an instance of CreateBusinessDebitCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateBusinessDebitCardAttributes.java b/src/main/java/org/openapitools/client/model/CreateBusinessDebitCardAttributes.java deleted file mode 100644 index 45519d54..00000000 --- a/src/main/java/org/openapitools/client/model/CreateBusinessDebitCardAttributes.java +++ /dev/null @@ -1,708 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.Arrays; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.CardLevelLimits; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Phone; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateBusinessDebitCardAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateBusinessDebitCardAttributes { - public static final String SERIALIZED_NAME_SHIPPING_ADDRESS = "shippingAddress"; - @SerializedName(SERIALIZED_NAME_SHIPPING_ADDRESS) - private Address shippingAddress; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_DESIGN = "design"; - @SerializedName(SERIALIZED_NAME_DESIGN) - private String design; - - public static final String SERIALIZED_NAME_ADDITIONAL_EMBOSSED_TEXT = "additionalEmbossedText"; - @SerializedName(SERIALIZED_NAME_ADDITIONAL_EMBOSSED_TEXT) - private String additionalEmbossedText; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_LIMITS = "limits"; - @SerializedName(SERIALIZED_NAME_LIMITS) - private CardLevelLimits limits; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_ACTIVE_FOR_ONLINE_USE = "activeForOnlineUse"; - @SerializedName(SERIALIZED_NAME_ACTIVE_FOR_ONLINE_USE) - private Boolean activeForOnlineUse; - - public static final String SERIALIZED_NAME_PRINT_ONLY_BUSINESS_NAME = "printOnlyBusinessName"; - @SerializedName(SERIALIZED_NAME_PRINT_ONLY_BUSINESS_NAME) - private Boolean printOnlyBusinessName; - - public static final String SERIALIZED_NAME_EXPIRY_DATE = "expiryDate"; - @SerializedName(SERIALIZED_NAME_EXPIRY_DATE) - private String expiryDate; - - public CreateBusinessDebitCardAttributes() { - } - - public CreateBusinessDebitCardAttributes shippingAddress(Address shippingAddress) { - - this.shippingAddress = shippingAddress; - return this; - } - - /** - * Get shippingAddress - * @return shippingAddress - **/ - @javax.annotation.Nullable - public Address getShippingAddress() { - return shippingAddress; - } - - - public void setShippingAddress(Address shippingAddress) { - this.shippingAddress = shippingAddress; - } - - - public CreateBusinessDebitCardAttributes address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nonnull - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public CreateBusinessDebitCardAttributes fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nonnull - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public CreateBusinessDebitCardAttributes phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nonnull - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public CreateBusinessDebitCardAttributes email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nonnull - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public CreateBusinessDebitCardAttributes dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nonnull - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public CreateBusinessDebitCardAttributes nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public CreateBusinessDebitCardAttributes ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public CreateBusinessDebitCardAttributes passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public CreateBusinessDebitCardAttributes design(String design) { - - this.design = design; - return this; - } - - /** - * Get design - * @return design - **/ - @javax.annotation.Nullable - public String getDesign() { - return design; - } - - - public void setDesign(String design) { - this.design = design; - } - - - public CreateBusinessDebitCardAttributes additionalEmbossedText(String additionalEmbossedText) { - - this.additionalEmbossedText = additionalEmbossedText; - return this; - } - - /** - * Get additionalEmbossedText - * @return additionalEmbossedText - **/ - @javax.annotation.Nullable - public String getAdditionalEmbossedText() { - return additionalEmbossedText; - } - - - public void setAdditionalEmbossedText(String additionalEmbossedText) { - this.additionalEmbossedText = additionalEmbossedText; - } - - - public CreateBusinessDebitCardAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateBusinessDebitCardAttributes limits(CardLevelLimits limits) { - - this.limits = limits; - return this; - } - - /** - * Get limits - * @return limits - **/ - @javax.annotation.Nullable - public CardLevelLimits getLimits() { - return limits; - } - - - public void setLimits(CardLevelLimits limits) { - this.limits = limits; - } - - - public CreateBusinessDebitCardAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateBusinessDebitCardAttributes activeForOnlineUse(Boolean activeForOnlineUse) { - - this.activeForOnlineUse = activeForOnlineUse; - return this; - } - - /** - * Get activeForOnlineUse - * @return activeForOnlineUse - **/ - @javax.annotation.Nullable - public Boolean getActiveForOnlineUse() { - return activeForOnlineUse; - } - - - public void setActiveForOnlineUse(Boolean activeForOnlineUse) { - this.activeForOnlineUse = activeForOnlineUse; - } - - - public CreateBusinessDebitCardAttributes printOnlyBusinessName(Boolean printOnlyBusinessName) { - - this.printOnlyBusinessName = printOnlyBusinessName; - return this; - } - - /** - * Get printOnlyBusinessName - * @return printOnlyBusinessName - **/ - @javax.annotation.Nullable - public Boolean getPrintOnlyBusinessName() { - return printOnlyBusinessName; - } - - - public void setPrintOnlyBusinessName(Boolean printOnlyBusinessName) { - this.printOnlyBusinessName = printOnlyBusinessName; - } - - - public CreateBusinessDebitCardAttributes expiryDate(String expiryDate) { - - this.expiryDate = expiryDate; - return this; - } - - /** - * Get expiryDate - * @return expiryDate - **/ - @javax.annotation.Nullable - public String getExpiryDate() { - return expiryDate; - } - - - public void setExpiryDate(String expiryDate) { - this.expiryDate = expiryDate; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateBusinessDebitCardAttributes createBusinessDebitCardAttributes = (CreateBusinessDebitCardAttributes) o; - return Objects.equals(this.shippingAddress, createBusinessDebitCardAttributes.shippingAddress) && - Objects.equals(this.address, createBusinessDebitCardAttributes.address) && - Objects.equals(this.fullName, createBusinessDebitCardAttributes.fullName) && - Objects.equals(this.phone, createBusinessDebitCardAttributes.phone) && - Objects.equals(this.email, createBusinessDebitCardAttributes.email) && - Objects.equals(this.dateOfBirth, createBusinessDebitCardAttributes.dateOfBirth) && - Objects.equals(this.nationality, createBusinessDebitCardAttributes.nationality) && - Objects.equals(this.ssn, createBusinessDebitCardAttributes.ssn) && - Objects.equals(this.passport, createBusinessDebitCardAttributes.passport) && - Objects.equals(this.design, createBusinessDebitCardAttributes.design) && - Objects.equals(this.additionalEmbossedText, createBusinessDebitCardAttributes.additionalEmbossedText) && - Objects.equals(this.tags, createBusinessDebitCardAttributes.tags) && - Objects.equals(this.limits, createBusinessDebitCardAttributes.limits) && - Objects.equals(this.idempotencyKey, createBusinessDebitCardAttributes.idempotencyKey) && - Objects.equals(this.activeForOnlineUse, createBusinessDebitCardAttributes.activeForOnlineUse) && - Objects.equals(this.printOnlyBusinessName, createBusinessDebitCardAttributes.printOnlyBusinessName) && - Objects.equals(this.expiryDate, createBusinessDebitCardAttributes.expiryDate); - } - - @Override - public int hashCode() { - return Objects.hash(shippingAddress, address, fullName, phone, email, dateOfBirth, nationality, ssn, passport, design, additionalEmbossedText, tags, limits, idempotencyKey, activeForOnlineUse, printOnlyBusinessName, expiryDate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateBusinessDebitCardAttributes {\n"); - sb.append(" shippingAddress: ").append(toIndentedString(shippingAddress)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" design: ").append(toIndentedString(design)).append("\n"); - sb.append(" additionalEmbossedText: ").append(toIndentedString(additionalEmbossedText)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" activeForOnlineUse: ").append(toIndentedString(activeForOnlineUse)).append("\n"); - sb.append(" printOnlyBusinessName: ").append(toIndentedString(printOnlyBusinessName)).append("\n"); - sb.append(" expiryDate: ").append(toIndentedString(expiryDate)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("shippingAddress"); - openapiFields.add("address"); - openapiFields.add("fullName"); - openapiFields.add("phone"); - openapiFields.add("email"); - openapiFields.add("dateOfBirth"); - openapiFields.add("nationality"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("design"); - openapiFields.add("additionalEmbossedText"); - openapiFields.add("tags"); - openapiFields.add("limits"); - openapiFields.add("idempotencyKey"); - openapiFields.add("activeForOnlineUse"); - openapiFields.add("printOnlyBusinessName"); - openapiFields.add("expiryDate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("fullName"); - openapiRequiredFields.add("phone"); - openapiRequiredFields.add("email"); - openapiRequiredFields.add("dateOfBirth"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateBusinessDebitCardAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateBusinessDebitCardAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBusinessDebitCardAttributes is not found in the empty JSON string", CreateBusinessDebitCardAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateBusinessDebitCardAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateBusinessDebitCardAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateBusinessDebitCardAttributes.openapiRequiredFields) { - 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(); - // validate the optional field `shippingAddress` - if (jsonObj.get("shippingAddress") != null && !jsonObj.get("shippingAddress").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("shippingAddress")); - } - // validate the required field `address` - Address.validateJsonElement(jsonObj.get("address")); - // validate the required field `fullName` - FullName.validateJsonElement(jsonObj.get("fullName")); - // validate the required field `phone` - Phone.validateJsonElement(jsonObj.get("phone")); - if (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("design") != null && !jsonObj.get("design").isJsonNull()) && !jsonObj.get("design").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `design` to be a primitive type in the JSON string but got `%s`", jsonObj.get("design").toString())); - } - if ((jsonObj.get("additionalEmbossedText") != null && !jsonObj.get("additionalEmbossedText").isJsonNull()) && !jsonObj.get("additionalEmbossedText").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `additionalEmbossedText` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalEmbossedText").toString())); - } - // validate the optional field `limits` - if (jsonObj.get("limits") != null && !jsonObj.get("limits").isJsonNull()) { - CardLevelLimits.validateJsonElement(jsonObj.get("limits")); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - if ((jsonObj.get("expiryDate") != null && !jsonObj.get("expiryDate").isJsonNull()) && !jsonObj.get("expiryDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `expiryDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expiryDate").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateBusinessDebitCardAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateBusinessDebitCardAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessDebitCardAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateBusinessDebitCardAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateBusinessDebitCardAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateBusinessDebitCardAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateBusinessDebitCardAttributes - * @throws IOException if the JSON string is invalid with respect to CreateBusinessDebitCardAttributes - */ - public static CreateBusinessDebitCardAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateBusinessDebitCardAttributes.class); - } - - /** - * Convert an instance of CreateBusinessDebitCardAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateBusinessVirtualCreditCard.java b/src/main/java/org/openapitools/client/model/CreateBusinessVirtualCreditCard.java deleted file mode 100644 index 29f8c177..00000000 --- a/src/main/java/org/openapitools/client/model/CreateBusinessVirtualCreditCard.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateBusinessVirtualDebitCardAttributes; -import org.openapitools.client.model.CreateCardRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateBusinessVirtualCreditCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateBusinessVirtualCreditCard { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - BUSINESSVIRTUALCREDITCARD("businessVirtualCreditCard"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type = TypeEnum.BUSINESSVIRTUALCREDITCARD; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateBusinessVirtualDebitCardAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateCardRelationships relationships; - - public CreateBusinessVirtualCreditCard() { - } - - public CreateBusinessVirtualCreditCard type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CreateBusinessVirtualCreditCard attributes(CreateBusinessVirtualDebitCardAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateBusinessVirtualDebitCardAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateBusinessVirtualDebitCardAttributes attributes) { - this.attributes = attributes; - } - - - public CreateBusinessVirtualCreditCard relationships(CreateCardRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateCardRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateCardRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateBusinessVirtualCreditCard createBusinessVirtualCreditCard = (CreateBusinessVirtualCreditCard) o; - return Objects.equals(this.type, createBusinessVirtualCreditCard.type) && - Objects.equals(this.attributes, createBusinessVirtualCreditCard.attributes) && - Objects.equals(this.relationships, createBusinessVirtualCreditCard.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateBusinessVirtualCreditCard {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateBusinessVirtualCreditCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateBusinessVirtualCreditCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBusinessVirtualCreditCard is not found in the empty JSON string", CreateBusinessVirtualCreditCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateBusinessVirtualCreditCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateBusinessVirtualCreditCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateBusinessVirtualCreditCard.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateBusinessVirtualDebitCardAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateCardRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateBusinessVirtualCreditCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateBusinessVirtualCreditCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessVirtualCreditCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateBusinessVirtualCreditCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateBusinessVirtualCreditCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateBusinessVirtualCreditCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateBusinessVirtualCreditCard - * @throws IOException if the JSON string is invalid with respect to CreateBusinessVirtualCreditCard - */ - public static CreateBusinessVirtualCreditCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateBusinessVirtualCreditCard.class); - } - - /** - * Convert an instance of CreateBusinessVirtualCreditCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateBusinessVirtualDebitCard.java b/src/main/java/org/openapitools/client/model/CreateBusinessVirtualDebitCard.java deleted file mode 100644 index 8489ec5a..00000000 --- a/src/main/java/org/openapitools/client/model/CreateBusinessVirtualDebitCard.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateBusinessVirtualDebitCardAttributes; -import org.openapitools.client.model.CreateCardRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateBusinessVirtualDebitCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateBusinessVirtualDebitCard { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - BUSINESSVIRTUALDEBITCARD("businessVirtualDebitCard"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type = TypeEnum.BUSINESSVIRTUALDEBITCARD; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateBusinessVirtualDebitCardAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateCardRelationships relationships; - - public CreateBusinessVirtualDebitCard() { - } - - public CreateBusinessVirtualDebitCard type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CreateBusinessVirtualDebitCard attributes(CreateBusinessVirtualDebitCardAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateBusinessVirtualDebitCardAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateBusinessVirtualDebitCardAttributes attributes) { - this.attributes = attributes; - } - - - public CreateBusinessVirtualDebitCard relationships(CreateCardRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateCardRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateCardRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateBusinessVirtualDebitCard createBusinessVirtualDebitCard = (CreateBusinessVirtualDebitCard) o; - return Objects.equals(this.type, createBusinessVirtualDebitCard.type) && - Objects.equals(this.attributes, createBusinessVirtualDebitCard.attributes) && - Objects.equals(this.relationships, createBusinessVirtualDebitCard.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateBusinessVirtualDebitCard {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateBusinessVirtualDebitCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateBusinessVirtualDebitCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBusinessVirtualDebitCard is not found in the empty JSON string", CreateBusinessVirtualDebitCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateBusinessVirtualDebitCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateBusinessVirtualDebitCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateBusinessVirtualDebitCard.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateBusinessVirtualDebitCardAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateCardRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateBusinessVirtualDebitCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateBusinessVirtualDebitCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessVirtualDebitCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateBusinessVirtualDebitCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateBusinessVirtualDebitCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateBusinessVirtualDebitCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateBusinessVirtualDebitCard - * @throws IOException if the JSON string is invalid with respect to CreateBusinessVirtualDebitCard - */ - public static CreateBusinessVirtualDebitCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateBusinessVirtualDebitCard.class); - } - - /** - * Convert an instance of CreateBusinessVirtualDebitCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateBusinessVirtualDebitCardAttributes.java b/src/main/java/org/openapitools/client/model/CreateBusinessVirtualDebitCardAttributes.java deleted file mode 100644 index cc31f142..00000000 --- a/src/main/java/org/openapitools/client/model/CreateBusinessVirtualDebitCardAttributes.java +++ /dev/null @@ -1,558 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.Arrays; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.CardLevelLimits; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Phone; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateBusinessVirtualDebitCardAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateBusinessVirtualDebitCardAttributes { - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_LIMITS = "limits"; - @SerializedName(SERIALIZED_NAME_LIMITS) - private CardLevelLimits limits; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_EXPIRY_DATE = "expiryDate"; - @SerializedName(SERIALIZED_NAME_EXPIRY_DATE) - private String expiryDate; - - public CreateBusinessVirtualDebitCardAttributes() { - } - - public CreateBusinessVirtualDebitCardAttributes address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nonnull - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public CreateBusinessVirtualDebitCardAttributes fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nonnull - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public CreateBusinessVirtualDebitCardAttributes phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nonnull - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public CreateBusinessVirtualDebitCardAttributes email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nonnull - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public CreateBusinessVirtualDebitCardAttributes dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nonnull - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public CreateBusinessVirtualDebitCardAttributes nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public CreateBusinessVirtualDebitCardAttributes ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public CreateBusinessVirtualDebitCardAttributes passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public CreateBusinessVirtualDebitCardAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateBusinessVirtualDebitCardAttributes limits(CardLevelLimits limits) { - - this.limits = limits; - return this; - } - - /** - * Get limits - * @return limits - **/ - @javax.annotation.Nullable - public CardLevelLimits getLimits() { - return limits; - } - - - public void setLimits(CardLevelLimits limits) { - this.limits = limits; - } - - - public CreateBusinessVirtualDebitCardAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateBusinessVirtualDebitCardAttributes expiryDate(String expiryDate) { - - this.expiryDate = expiryDate; - return this; - } - - /** - * Get expiryDate - * @return expiryDate - **/ - @javax.annotation.Nullable - public String getExpiryDate() { - return expiryDate; - } - - - public void setExpiryDate(String expiryDate) { - this.expiryDate = expiryDate; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateBusinessVirtualDebitCardAttributes createBusinessVirtualDebitCardAttributes = (CreateBusinessVirtualDebitCardAttributes) o; - return Objects.equals(this.address, createBusinessVirtualDebitCardAttributes.address) && - Objects.equals(this.fullName, createBusinessVirtualDebitCardAttributes.fullName) && - Objects.equals(this.phone, createBusinessVirtualDebitCardAttributes.phone) && - Objects.equals(this.email, createBusinessVirtualDebitCardAttributes.email) && - Objects.equals(this.dateOfBirth, createBusinessVirtualDebitCardAttributes.dateOfBirth) && - Objects.equals(this.nationality, createBusinessVirtualDebitCardAttributes.nationality) && - Objects.equals(this.ssn, createBusinessVirtualDebitCardAttributes.ssn) && - Objects.equals(this.passport, createBusinessVirtualDebitCardAttributes.passport) && - Objects.equals(this.tags, createBusinessVirtualDebitCardAttributes.tags) && - Objects.equals(this.limits, createBusinessVirtualDebitCardAttributes.limits) && - Objects.equals(this.idempotencyKey, createBusinessVirtualDebitCardAttributes.idempotencyKey) && - Objects.equals(this.expiryDate, createBusinessVirtualDebitCardAttributes.expiryDate); - } - - @Override - public int hashCode() { - return Objects.hash(address, fullName, phone, email, dateOfBirth, nationality, ssn, passport, tags, limits, idempotencyKey, expiryDate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateBusinessVirtualDebitCardAttributes {\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" expiryDate: ").append(toIndentedString(expiryDate)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address"); - openapiFields.add("fullName"); - openapiFields.add("phone"); - openapiFields.add("email"); - openapiFields.add("dateOfBirth"); - openapiFields.add("nationality"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("tags"); - openapiFields.add("limits"); - openapiFields.add("idempotencyKey"); - openapiFields.add("expiryDate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("fullName"); - openapiRequiredFields.add("phone"); - openapiRequiredFields.add("email"); - openapiRequiredFields.add("dateOfBirth"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateBusinessVirtualDebitCardAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateBusinessVirtualDebitCardAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBusinessVirtualDebitCardAttributes is not found in the empty JSON string", CreateBusinessVirtualDebitCardAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateBusinessVirtualDebitCardAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateBusinessVirtualDebitCardAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateBusinessVirtualDebitCardAttributes.openapiRequiredFields) { - 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(); - // validate the required field `address` - Address.validateJsonElement(jsonObj.get("address")); - // validate the required field `fullName` - FullName.validateJsonElement(jsonObj.get("fullName")); - // validate the required field `phone` - Phone.validateJsonElement(jsonObj.get("phone")); - if (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - // validate the optional field `limits` - if (jsonObj.get("limits") != null && !jsonObj.get("limits").isJsonNull()) { - CardLevelLimits.validateJsonElement(jsonObj.get("limits")); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - if ((jsonObj.get("expiryDate") != null && !jsonObj.get("expiryDate").isJsonNull()) && !jsonObj.get("expiryDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `expiryDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expiryDate").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateBusinessVirtualDebitCardAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateBusinessVirtualDebitCardAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessVirtualDebitCardAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateBusinessVirtualDebitCardAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateBusinessVirtualDebitCardAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateBusinessVirtualDebitCardAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateBusinessVirtualDebitCardAttributes - * @throws IOException if the JSON string is invalid with respect to CreateBusinessVirtualDebitCardAttributes - */ - public static CreateBusinessVirtualDebitCardAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateBusinessVirtualDebitCardAttributes.class); - } - - /** - * Convert an instance of CreateBusinessVirtualDebitCardAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCard.java b/src/main/java/org/openapitools/client/model/CreateCard.java deleted file mode 100644 index f5292da4..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCard.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateCardData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCard { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateCardData data; - - public CreateCard() { - } - - public CreateCard data(CreateCardData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateCardData getData() { - return data; - } - - - public void setData(CreateCardData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCard createCard = (CreateCard) o; - return Objects.equals(this.data, createCard.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCard {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCard is not found in the empty JSON string", CreateCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateCardData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCard - * @throws IOException if the JSON string is invalid with respect to CreateCard - */ - public static CreateCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCard.class); - } - - /** - * Convert an instance of CreateCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCardData.java b/src/main/java/org/openapitools/client/model/CreateCardData.java deleted file mode 100644 index bb23d505..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCardData.java +++ /dev/null @@ -1,476 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateBusinessCreditCard; -import org.openapitools.client.model.CreateBusinessDebitCard; -import org.openapitools.client.model.CreateBusinessVirtualCreditCard; -import org.openapitools.client.model.CreateBusinessVirtualDebitCard; -import org.openapitools.client.model.CreateBusinessVirtualDebitCardAttributes; -import org.openapitools.client.model.CreateCardRelationships; -import org.openapitools.client.model.CreateIndividualDebitCard; -import org.openapitools.client.model.CreateIndividualVirtualDebitCard; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -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 com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import org.openapitools.client.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCardData extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(CreateCardData.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCardData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCardData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterCreateIndividualDebitCard = gson.getDelegateAdapter(this, TypeToken.get(CreateIndividualDebitCard.class)); - final TypeAdapter adapterCreateBusinessDebitCard = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessDebitCard.class)); - final TypeAdapter adapterCreateBusinessCreditCard = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessCreditCard.class)); - final TypeAdapter adapterCreateIndividualVirtualDebitCard = gson.getDelegateAdapter(this, TypeToken.get(CreateIndividualVirtualDebitCard.class)); - final TypeAdapter adapterCreateBusinessVirtualDebitCard = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessVirtualDebitCard.class)); - final TypeAdapter adapterCreateBusinessVirtualCreditCard = gson.getDelegateAdapter(this, TypeToken.get(CreateBusinessVirtualCreditCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCardData value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `CreateIndividualDebitCard` - if (value.getActualInstance() instanceof CreateIndividualDebitCard) { - JsonElement element = adapterCreateIndividualDebitCard.toJsonTree((CreateIndividualDebitCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateBusinessDebitCard` - if (value.getActualInstance() instanceof CreateBusinessDebitCard) { - JsonElement element = adapterCreateBusinessDebitCard.toJsonTree((CreateBusinessDebitCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateBusinessCreditCard` - if (value.getActualInstance() instanceof CreateBusinessCreditCard) { - JsonElement element = adapterCreateBusinessCreditCard.toJsonTree((CreateBusinessCreditCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateIndividualVirtualDebitCard` - if (value.getActualInstance() instanceof CreateIndividualVirtualDebitCard) { - JsonElement element = adapterCreateIndividualVirtualDebitCard.toJsonTree((CreateIndividualVirtualDebitCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateBusinessVirtualDebitCard` - if (value.getActualInstance() instanceof CreateBusinessVirtualDebitCard) { - JsonElement element = adapterCreateBusinessVirtualDebitCard.toJsonTree((CreateBusinessVirtualDebitCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateBusinessVirtualCreditCard` - if (value.getActualInstance() instanceof CreateBusinessVirtualCreditCard) { - JsonElement element = adapterCreateBusinessVirtualCreditCard.toJsonTree((CreateBusinessVirtualCreditCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard"); - } - - @Override - public CreateCardData read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize CreateIndividualDebitCard - try { - // validate the JSON object to see if any exception is thrown - CreateIndividualDebitCard.validateJsonElement(jsonElement); - actualAdapter = adapterCreateIndividualDebitCard; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateIndividualDebitCard'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateIndividualDebitCard failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateIndividualDebitCard'", e); - } - // deserialize CreateBusinessDebitCard - try { - // validate the JSON object to see if any exception is thrown - CreateBusinessDebitCard.validateJsonElement(jsonElement); - actualAdapter = adapterCreateBusinessDebitCard; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateBusinessDebitCard'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateBusinessDebitCard failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateBusinessDebitCard'", e); - } - // deserialize CreateBusinessCreditCard - try { - // validate the JSON object to see if any exception is thrown - CreateBusinessCreditCard.validateJsonElement(jsonElement); - actualAdapter = adapterCreateBusinessCreditCard; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateBusinessCreditCard'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateBusinessCreditCard failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateBusinessCreditCard'", e); - } - // deserialize CreateIndividualVirtualDebitCard - try { - // validate the JSON object to see if any exception is thrown - CreateIndividualVirtualDebitCard.validateJsonElement(jsonElement); - actualAdapter = adapterCreateIndividualVirtualDebitCard; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateIndividualVirtualDebitCard'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateIndividualVirtualDebitCard failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateIndividualVirtualDebitCard'", e); - } - // deserialize CreateBusinessVirtualDebitCard - try { - // validate the JSON object to see if any exception is thrown - CreateBusinessVirtualDebitCard.validateJsonElement(jsonElement); - actualAdapter = adapterCreateBusinessVirtualDebitCard; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateBusinessVirtualDebitCard'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateBusinessVirtualDebitCard failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateBusinessVirtualDebitCard'", e); - } - // deserialize CreateBusinessVirtualCreditCard - try { - // validate the JSON object to see if any exception is thrown - CreateBusinessVirtualCreditCard.validateJsonElement(jsonElement); - actualAdapter = adapterCreateBusinessVirtualCreditCard; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateBusinessVirtualCreditCard'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateBusinessVirtualCreditCard failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateBusinessVirtualCreditCard'", e); - } - - if (match == 1) { - CreateCardData ret = new CreateCardData(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for CreateCardData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public CreateCardData() { - super("oneOf", Boolean.FALSE); - } - - public CreateCardData(CreateBusinessCreditCard o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreateCardData(CreateBusinessDebitCard o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreateCardData(CreateBusinessVirtualCreditCard o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreateCardData(CreateBusinessVirtualDebitCard o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreateCardData(CreateIndividualDebitCard o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreateCardData(CreateIndividualVirtualDebitCard o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("CreateIndividualDebitCard", CreateIndividualDebitCard.class); - schemas.put("CreateBusinessDebitCard", CreateBusinessDebitCard.class); - schemas.put("CreateBusinessCreditCard", CreateBusinessCreditCard.class); - schemas.put("CreateIndividualVirtualDebitCard", CreateIndividualVirtualDebitCard.class); - schemas.put("CreateBusinessVirtualDebitCard", CreateBusinessVirtualDebitCard.class); - schemas.put("CreateBusinessVirtualCreditCard", CreateBusinessVirtualCreditCard.class); - } - - @Override - public Map> getSchemas() { - return CreateCardData.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof CreateIndividualDebitCard) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateBusinessDebitCard) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateBusinessCreditCard) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateIndividualVirtualDebitCard) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateBusinessVirtualDebitCard) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateBusinessVirtualCreditCard) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard"); - } - - /** - * Get the actual instance, which can be the following: - * CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard - * - * @return The actual instance (CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `CreateIndividualDebitCard`. If the actual instance is not `CreateIndividualDebitCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateIndividualDebitCard` - * @throws ClassCastException if the instance is not `CreateIndividualDebitCard` - */ - public CreateIndividualDebitCard getCreateIndividualDebitCard() throws ClassCastException { - return (CreateIndividualDebitCard)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateBusinessDebitCard`. If the actual instance is not `CreateBusinessDebitCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateBusinessDebitCard` - * @throws ClassCastException if the instance is not `CreateBusinessDebitCard` - */ - public CreateBusinessDebitCard getCreateBusinessDebitCard() throws ClassCastException { - return (CreateBusinessDebitCard)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateBusinessCreditCard`. If the actual instance is not `CreateBusinessCreditCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateBusinessCreditCard` - * @throws ClassCastException if the instance is not `CreateBusinessCreditCard` - */ - public CreateBusinessCreditCard getCreateBusinessCreditCard() throws ClassCastException { - return (CreateBusinessCreditCard)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateIndividualVirtualDebitCard`. If the actual instance is not `CreateIndividualVirtualDebitCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateIndividualVirtualDebitCard` - * @throws ClassCastException if the instance is not `CreateIndividualVirtualDebitCard` - */ - public CreateIndividualVirtualDebitCard getCreateIndividualVirtualDebitCard() throws ClassCastException { - return (CreateIndividualVirtualDebitCard)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateBusinessVirtualDebitCard`. If the actual instance is not `CreateBusinessVirtualDebitCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateBusinessVirtualDebitCard` - * @throws ClassCastException if the instance is not `CreateBusinessVirtualDebitCard` - */ - public CreateBusinessVirtualDebitCard getCreateBusinessVirtualDebitCard() throws ClassCastException { - return (CreateBusinessVirtualDebitCard)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateBusinessVirtualCreditCard`. If the actual instance is not `CreateBusinessVirtualCreditCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateBusinessVirtualCreditCard` - * @throws ClassCastException if the instance is not `CreateBusinessVirtualCreditCard` - */ - public CreateBusinessVirtualCreditCard getCreateBusinessVirtualCreditCard() throws ClassCastException { - return (CreateBusinessVirtualCreditCard)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCardData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with CreateIndividualDebitCard - try { - CreateIndividualDebitCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateIndividualDebitCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateBusinessDebitCard - try { - CreateBusinessDebitCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateBusinessDebitCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateBusinessCreditCard - try { - CreateBusinessCreditCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateBusinessCreditCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateIndividualVirtualDebitCard - try { - CreateIndividualVirtualDebitCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateIndividualVirtualDebitCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateBusinessVirtualDebitCard - try { - CreateBusinessVirtualDebitCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateBusinessVirtualDebitCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateBusinessVirtualCreditCard - try { - CreateBusinessVirtualCreditCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateBusinessVirtualCreditCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for CreateCardData with oneOf schemas: CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of CreateCardData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCardData - * @throws IOException if the JSON string is invalid with respect to CreateCardData - */ - public static CreateCardData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCardData.class); - } - - /** - * Convert an instance of CreateCardData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCardRelationships.java b/src/main/java/org/openapitools/client/model/CreateCardRelationships.java deleted file mode 100644 index 3672b6ee..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCardRelationships.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Relationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateCardRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCardRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private Relationship account; - - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private Relationship customer; - - public static final String SERIALIZED_NAME_DEFAULT_FUNDING_ACCOUNT = "defaultFundingAccount"; - @SerializedName(SERIALIZED_NAME_DEFAULT_FUNDING_ACCOUNT) - private Relationship defaultFundingAccount; - - public CreateCardRelationships() { - } - - public CreateCardRelationships account(Relationship account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public Relationship getAccount() { - return account; - } - - - public void setAccount(Relationship account) { - this.account = account; - } - - - public CreateCardRelationships customer(Relationship customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nullable - public Relationship getCustomer() { - return customer; - } - - - public void setCustomer(Relationship customer) { - this.customer = customer; - } - - - public CreateCardRelationships defaultFundingAccount(Relationship defaultFundingAccount) { - - this.defaultFundingAccount = defaultFundingAccount; - return this; - } - - /** - * Get defaultFundingAccount - * @return defaultFundingAccount - **/ - @javax.annotation.Nullable - public Relationship getDefaultFundingAccount() { - return defaultFundingAccount; - } - - - public void setDefaultFundingAccount(Relationship defaultFundingAccount) { - this.defaultFundingAccount = defaultFundingAccount; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCardRelationships createCardRelationships = (CreateCardRelationships) o; - return Objects.equals(this.account, createCardRelationships.account) && - Objects.equals(this.customer, createCardRelationships.customer) && - Objects.equals(this.defaultFundingAccount, createCardRelationships.defaultFundingAccount); - } - - @Override - public int hashCode() { - return Objects.hash(account, customer, defaultFundingAccount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCardRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" defaultFundingAccount: ").append(toIndentedString(defaultFundingAccount)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - openapiFields.add("customer"); - openapiFields.add("defaultFundingAccount"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCardRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCardRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCardRelationships is not found in the empty JSON string", CreateCardRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCardRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCardRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateCardRelationships.openapiRequiredFields) { - 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(); - // validate the required field `account` - Relationship.validateJsonElement(jsonObj.get("account")); - // validate the optional field `customer` - if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { - Relationship.validateJsonElement(jsonObj.get("customer")); - } - // validate the optional field `defaultFundingAccount` - if (jsonObj.get("defaultFundingAccount") != null && !jsonObj.get("defaultFundingAccount").isJsonNull()) { - Relationship.validateJsonElement(jsonObj.get("defaultFundingAccount")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCardRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCardRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCardRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCardRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCardRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCardRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCardRelationships - * @throws IOException if the JSON string is invalid with respect to CreateCardRelationships - */ - public static CreateCardRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCardRelationships.class); - } - - /** - * Convert an instance of CreateCardRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCheckDeposit.java b/src/main/java/org/openapitools/client/model/CreateCheckDeposit.java deleted file mode 100644 index 8295c0ae..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCheckDeposit.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateCheckDepositData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateCheckDeposit - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCheckDeposit { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateCheckDepositData data; - - public CreateCheckDeposit() { - } - - public CreateCheckDeposit data(CreateCheckDepositData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateCheckDepositData getData() { - return data; - } - - - public void setData(CreateCheckDepositData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCheckDeposit createCheckDeposit = (CreateCheckDeposit) o; - return Objects.equals(this.data, createCheckDeposit.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCheckDeposit {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCheckDeposit - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCheckDeposit.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCheckDeposit is not found in the empty JSON string", CreateCheckDeposit.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCheckDeposit.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCheckDeposit` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateCheckDepositData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCheckDeposit.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCheckDeposit' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCheckDeposit.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCheckDeposit value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCheckDeposit read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCheckDeposit given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCheckDeposit - * @throws IOException if the JSON string is invalid with respect to CreateCheckDeposit - */ - public static CreateCheckDeposit fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCheckDeposit.class); - } - - /** - * Convert an instance of CreateCheckDeposit to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCheckDepositData.java b/src/main/java/org/openapitools/client/model/CreateCheckDepositData.java deleted file mode 100644 index c053142b..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCheckDepositData.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateCheckDepositDataAttributes; -import org.openapitools.client.model.CreateCheckDepositRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateCheckDepositData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCheckDepositData { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - CHECKDEPOSIT("checkDeposit"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type = TypeEnum.CHECKDEPOSIT; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateCheckDepositDataAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateCheckDepositRelationships relationships; - - public CreateCheckDepositData() { - } - - public CreateCheckDepositData type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CreateCheckDepositData attributes(CreateCheckDepositDataAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateCheckDepositDataAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateCheckDepositDataAttributes attributes) { - this.attributes = attributes; - } - - - public CreateCheckDepositData relationships(CreateCheckDepositRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateCheckDepositRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateCheckDepositRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCheckDepositData createCheckDepositData = (CreateCheckDepositData) o; - return Objects.equals(this.type, createCheckDepositData.type) && - Objects.equals(this.attributes, createCheckDepositData.attributes) && - Objects.equals(this.relationships, createCheckDepositData.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCheckDepositData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCheckDepositData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCheckDepositData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCheckDepositData is not found in the empty JSON string", CreateCheckDepositData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCheckDepositData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCheckDepositData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateCheckDepositData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateCheckDepositDataAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateCheckDepositRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCheckDepositData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCheckDepositData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCheckDepositData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCheckDepositData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCheckDepositData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCheckDepositData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCheckDepositData - * @throws IOException if the JSON string is invalid with respect to CreateCheckDepositData - */ - public static CreateCheckDepositData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCheckDepositData.class); - } - - /** - * Convert an instance of CreateCheckDepositData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCheckDepositDataAttributes.java b/src/main/java/org/openapitools/client/model/CreateCheckDepositDataAttributes.java deleted file mode 100644 index 206e1f77..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCheckDepositDataAttributes.java +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateCheckDepositDataAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCheckDepositDataAttributes { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public CreateCheckDepositDataAttributes() { - } - - public CreateCheckDepositDataAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CreateCheckDepositDataAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public CreateCheckDepositDataAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateCheckDepositDataAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCheckDepositDataAttributes createCheckDepositDataAttributes = (CreateCheckDepositDataAttributes) o; - return Objects.equals(this.amount, createCheckDepositDataAttributes.amount) && - Objects.equals(this.description, createCheckDepositDataAttributes.description) && - Objects.equals(this.idempotencyKey, createCheckDepositDataAttributes.idempotencyKey) && - Objects.equals(this.tags, createCheckDepositDataAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(amount, description, idempotencyKey, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCheckDepositDataAttributes {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("description"); - openapiFields.add("idempotencyKey"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCheckDepositDataAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCheckDepositDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCheckDepositDataAttributes is not found in the empty JSON string", CreateCheckDepositDataAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCheckDepositDataAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCheckDepositDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateCheckDepositDataAttributes.openapiRequiredFields) { - 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("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCheckDepositDataAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCheckDepositDataAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCheckDepositDataAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCheckDepositDataAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCheckDepositDataAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCheckDepositDataAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCheckDepositDataAttributes - * @throws IOException if the JSON string is invalid with respect to CreateCheckDepositDataAttributes - */ - public static CreateCheckDepositDataAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCheckDepositDataAttributes.class); - } - - /** - * Convert an instance of CreateCheckDepositDataAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCheckDepositRelationships.java b/src/main/java/org/openapitools/client/model/CreateCheckDepositRelationships.java deleted file mode 100644 index 75fe67a4..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCheckDepositRelationships.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Relationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateCheckDepositRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCheckDepositRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private Relationship account; - - public CreateCheckDepositRelationships() { - } - - public CreateCheckDepositRelationships account(Relationship account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public Relationship getAccount() { - return account; - } - - - public void setAccount(Relationship account) { - this.account = account; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCheckDepositRelationships createCheckDepositRelationships = (CreateCheckDepositRelationships) o; - return Objects.equals(this.account, createCheckDepositRelationships.account); - } - - @Override - public int hashCode() { - return Objects.hash(account); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCheckDepositRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCheckDepositRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCheckDepositRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCheckDepositRelationships is not found in the empty JSON string", CreateCheckDepositRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCheckDepositRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCheckDepositRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateCheckDepositRelationships.openapiRequiredFields) { - 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(); - // validate the required field `account` - Relationship.validateJsonElement(jsonObj.get("account")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCheckDepositRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCheckDepositRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCheckDepositRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCheckDepositRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCheckDepositRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCheckDepositRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCheckDepositRelationships - * @throws IOException if the JSON string is invalid with respect to CreateCheckDepositRelationships - */ - public static CreateCheckDepositRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCheckDepositRelationships.class); - } - - /** - * Convert an instance of CreateCheckDepositRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCheckPayment.java b/src/main/java/org/openapitools/client/model/CreateCheckPayment.java deleted file mode 100644 index ab7a0d24..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCheckPayment.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CheckPayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateCheckPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCheckPayment { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CheckPayment data; - - public CreateCheckPayment() { - } - - public CreateCheckPayment data(CheckPayment data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public CheckPayment getData() { - return data; - } - - - public void setData(CheckPayment data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCheckPayment createCheckPayment = (CreateCheckPayment) o; - return Objects.equals(this.data, createCheckPayment.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCheckPayment {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCheckPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCheckPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCheckPayment is not found in the empty JSON string", CreateCheckPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCheckPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCheckPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateCheckPayment.openapiRequiredFields) { - 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(); - // validate the required field `data` - CheckPayment.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCheckPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCheckPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCheckPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCheckPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCheckPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCheckPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCheckPayment - * @throws IOException if the JSON string is invalid with respect to CreateCheckPayment - */ - public static CreateCheckPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCheckPayment.class); - } - - /** - * Convert an instance of CreateCheckPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCounterparty.java b/src/main/java/org/openapitools/client/model/CreateCounterparty.java deleted file mode 100644 index d596d12b..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCounterparty.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateCounterpartyData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateCounterparty - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCounterparty { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateCounterpartyData data; - - public CreateCounterparty() { - } - - public CreateCounterparty data(CreateCounterpartyData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateCounterpartyData getData() { - return data; - } - - - public void setData(CreateCounterpartyData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCounterparty createCounterparty = (CreateCounterparty) o; - return Objects.equals(this.data, createCounterparty.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCounterparty {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCounterparty - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCounterparty.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCounterparty is not found in the empty JSON string", CreateCounterparty.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCounterparty.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCounterparty` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateCounterpartyData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCounterparty.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCounterparty' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCounterparty.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCounterparty value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCounterparty read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCounterparty given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCounterparty - * @throws IOException if the JSON string is invalid with respect to CreateCounterparty - */ - public static CreateCounterparty fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCounterparty.class); - } - - /** - * Convert an instance of CreateCounterparty to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCounterpartyData.java b/src/main/java/org/openapitools/client/model/CreateCounterpartyData.java deleted file mode 100644 index 8d6e86dd..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCounterpartyData.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateAchCounterparty; -import org.openapitools.client.model.CreateCounterpartyRelationships; -import org.openapitools.client.model.CreatePlaidCounterparty; -import org.openapitools.client.model.CreatePlaidCounterpartyAttributes; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -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 com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import org.openapitools.client.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCounterpartyData extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(CreateCounterpartyData.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCounterpartyData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCounterpartyData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterCreateAchCounterparty = gson.getDelegateAdapter(this, TypeToken.get(CreateAchCounterparty.class)); - final TypeAdapter adapterCreatePlaidCounterparty = gson.getDelegateAdapter(this, TypeToken.get(CreatePlaidCounterparty.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCounterpartyData value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `CreateAchCounterparty` - if (value.getActualInstance() instanceof CreateAchCounterparty) { - JsonElement element = adapterCreateAchCounterparty.toJsonTree((CreateAchCounterparty)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreatePlaidCounterparty` - if (value.getActualInstance() instanceof CreatePlaidCounterparty) { - JsonElement element = adapterCreatePlaidCounterparty.toJsonTree((CreatePlaidCounterparty)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CreateAchCounterparty, CreatePlaidCounterparty"); - } - - @Override - public CreateCounterpartyData read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize CreateAchCounterparty - try { - // validate the JSON object to see if any exception is thrown - CreateAchCounterparty.validateJsonElement(jsonElement); - actualAdapter = adapterCreateAchCounterparty; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateAchCounterparty'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateAchCounterparty failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateAchCounterparty'", e); - } - // deserialize CreatePlaidCounterparty - try { - // validate the JSON object to see if any exception is thrown - CreatePlaidCounterparty.validateJsonElement(jsonElement); - actualAdapter = adapterCreatePlaidCounterparty; - match++; - log.log(Level.FINER, "Input data matches schema 'CreatePlaidCounterparty'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreatePlaidCounterparty failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreatePlaidCounterparty'", e); - } - - if (match == 1) { - CreateCounterpartyData ret = new CreateCounterpartyData(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for CreateCounterpartyData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public CreateCounterpartyData() { - super("oneOf", Boolean.FALSE); - } - - public CreateCounterpartyData(CreateAchCounterparty o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreateCounterpartyData(CreatePlaidCounterparty o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("CreateAchCounterparty", CreateAchCounterparty.class); - schemas.put("CreatePlaidCounterparty", CreatePlaidCounterparty.class); - } - - @Override - public Map> getSchemas() { - return CreateCounterpartyData.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * CreateAchCounterparty, CreatePlaidCounterparty - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof CreateAchCounterparty) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreatePlaidCounterparty) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be CreateAchCounterparty, CreatePlaidCounterparty"); - } - - /** - * Get the actual instance, which can be the following: - * CreateAchCounterparty, CreatePlaidCounterparty - * - * @return The actual instance (CreateAchCounterparty, CreatePlaidCounterparty) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `CreateAchCounterparty`. If the actual instance is not `CreateAchCounterparty`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateAchCounterparty` - * @throws ClassCastException if the instance is not `CreateAchCounterparty` - */ - public CreateAchCounterparty getCreateAchCounterparty() throws ClassCastException { - return (CreateAchCounterparty)super.getActualInstance(); - } - /** - * Get the actual instance of `CreatePlaidCounterparty`. If the actual instance is not `CreatePlaidCounterparty`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreatePlaidCounterparty` - * @throws ClassCastException if the instance is not `CreatePlaidCounterparty` - */ - public CreatePlaidCounterparty getCreatePlaidCounterparty() throws ClassCastException { - return (CreatePlaidCounterparty)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCounterpartyData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with CreateAchCounterparty - try { - CreateAchCounterparty.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateAchCounterparty failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreatePlaidCounterparty - try { - CreatePlaidCounterparty.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreatePlaidCounterparty failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for CreateCounterpartyData with oneOf schemas: CreateAchCounterparty, CreatePlaidCounterparty. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of CreateCounterpartyData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCounterpartyData - * @throws IOException if the JSON string is invalid with respect to CreateCounterpartyData - */ - public static CreateCounterpartyData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCounterpartyData.class); - } - - /** - * Convert an instance of CreateCounterpartyData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCounterpartyRelationships.java b/src/main/java/org/openapitools/client/model/CreateCounterpartyRelationships.java deleted file mode 100644 index a73475de..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCounterpartyRelationships.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Relationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateCounterpartyRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCounterpartyRelationships { - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private Relationship customer; - - public CreateCounterpartyRelationships() { - } - - public CreateCounterpartyRelationships customer(Relationship customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nonnull - public Relationship getCustomer() { - return customer; - } - - - public void setCustomer(Relationship customer) { - this.customer = customer; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCounterpartyRelationships createCounterpartyRelationships = (CreateCounterpartyRelationships) o; - return Objects.equals(this.customer, createCounterpartyRelationships.customer); - } - - @Override - public int hashCode() { - return Objects.hash(customer); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCounterpartyRelationships {\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("customer"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("customer"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCounterpartyRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCounterpartyRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCounterpartyRelationships is not found in the empty JSON string", CreateCounterpartyRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCounterpartyRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCounterpartyRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateCounterpartyRelationships.openapiRequiredFields) { - 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(); - // validate the required field `customer` - Relationship.validateJsonElement(jsonObj.get("customer")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCounterpartyRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCounterpartyRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCounterpartyRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCounterpartyRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCounterpartyRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCounterpartyRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCounterpartyRelationships - * @throws IOException if the JSON string is invalid with respect to CreateCounterpartyRelationships - */ - public static CreateCounterpartyRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCounterpartyRelationships.class); - } - - /** - * Convert an instance of CreateCounterpartyRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCreditAccount.java b/src/main/java/org/openapitools/client/model/CreateCreditAccount.java deleted file mode 100644 index a44d76ae..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCreditAccount.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateCreditAccountAttributes; -import org.openapitools.client.model.CreateCreditAccountRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateCreditAccount - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCreditAccount { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - CREDITACCOUNT("creditAccount"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type = TypeEnum.CREDITACCOUNT; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateCreditAccountAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateCreditAccountRelationships relationships; - - public CreateCreditAccount() { - } - - public CreateCreditAccount type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CreateCreditAccount attributes(CreateCreditAccountAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public CreateCreditAccountAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateCreditAccountAttributes attributes) { - this.attributes = attributes; - } - - - public CreateCreditAccount relationships(CreateCreditAccountRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public CreateCreditAccountRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateCreditAccountRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCreditAccount createCreditAccount = (CreateCreditAccount) o; - return Objects.equals(this.type, createCreditAccount.type) && - Objects.equals(this.attributes, createCreditAccount.attributes) && - Objects.equals(this.relationships, createCreditAccount.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCreditAccount {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCreditAccount - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCreditAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCreditAccount is not found in the empty JSON string", CreateCreditAccount.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCreditAccount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCreditAccount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - CreateCreditAccountAttributes.validateJsonElement(jsonObj.get("attributes")); - } - // validate the optional field `relationships` - if (jsonObj.get("relationships") != null && !jsonObj.get("relationships").isJsonNull()) { - CreateCreditAccountRelationships.validateJsonElement(jsonObj.get("relationships")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCreditAccount.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCreditAccount' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCreditAccount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCreditAccount value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCreditAccount read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCreditAccount given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCreditAccount - * @throws IOException if the JSON string is invalid with respect to CreateCreditAccount - */ - public static CreateCreditAccount fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCreditAccount.class); - } - - /** - * Convert an instance of CreateCreditAccount to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCreditAccountAttributes.java b/src/main/java/org/openapitools/client/model/CreateCreditAccountAttributes.java deleted file mode 100644 index 2de597ef..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCreditAccountAttributes.java +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateCreditAccountAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCreditAccountAttributes { - public static final String SERIALIZED_NAME_CREDIT_TERMS = "creditTerms"; - @SerializedName(SERIALIZED_NAME_CREDIT_TERMS) - private String creditTerms; - - public static final String SERIALIZED_NAME_CREDIT_LIMIT = "creditLimit"; - @SerializedName(SERIALIZED_NAME_CREDIT_LIMIT) - private Integer creditLimit; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public CreateCreditAccountAttributes() { - } - - public CreateCreditAccountAttributes creditTerms(String creditTerms) { - - this.creditTerms = creditTerms; - return this; - } - - /** - * Get creditTerms - * @return creditTerms - **/ - @javax.annotation.Nonnull - public String getCreditTerms() { - return creditTerms; - } - - - public void setCreditTerms(String creditTerms) { - this.creditTerms = creditTerms; - } - - - public CreateCreditAccountAttributes creditLimit(Integer creditLimit) { - - this.creditLimit = creditLimit; - return this; - } - - /** - * Get creditLimit - * @return creditLimit - **/ - @javax.annotation.Nonnull - public Integer getCreditLimit() { - return creditLimit; - } - - - public void setCreditLimit(Integer creditLimit) { - this.creditLimit = creditLimit; - } - - - public CreateCreditAccountAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateCreditAccountAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCreditAccountAttributes createCreditAccountAttributes = (CreateCreditAccountAttributes) o; - return Objects.equals(this.creditTerms, createCreditAccountAttributes.creditTerms) && - Objects.equals(this.creditLimit, createCreditAccountAttributes.creditLimit) && - Objects.equals(this.tags, createCreditAccountAttributes.tags) && - Objects.equals(this.idempotencyKey, createCreditAccountAttributes.idempotencyKey); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(creditTerms, creditLimit, tags, idempotencyKey); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCreditAccountAttributes {\n"); - sb.append(" creditTerms: ").append(toIndentedString(creditTerms)).append("\n"); - sb.append(" creditLimit: ").append(toIndentedString(creditLimit)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("creditTerms"); - openapiFields.add("creditLimit"); - openapiFields.add("tags"); - openapiFields.add("idempotencyKey"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("creditTerms"); - openapiRequiredFields.add("creditLimit"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCreditAccountAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCreditAccountAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCreditAccountAttributes is not found in the empty JSON string", CreateCreditAccountAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCreditAccountAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCreditAccountAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateCreditAccountAttributes.openapiRequiredFields) { - 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("creditTerms").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `creditTerms` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creditTerms").toString())); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCreditAccountAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCreditAccountAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCreditAccountAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCreditAccountAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCreditAccountAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCreditAccountAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCreditAccountAttributes - * @throws IOException if the JSON string is invalid with respect to CreateCreditAccountAttributes - */ - public static CreateCreditAccountAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCreditAccountAttributes.class); - } - - /** - * Convert an instance of CreateCreditAccountAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCreditAccountRelationships.java b/src/main/java/org/openapitools/client/model/CreateCreditAccountRelationships.java deleted file mode 100644 index fdf2035e..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCreditAccountRelationships.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CustomerLinkage; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateCreditAccountRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCreditAccountRelationships { - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private CustomerLinkage customer; - - public CreateCreditAccountRelationships() { - } - - public CreateCreditAccountRelationships customer(CustomerLinkage customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nullable - public CustomerLinkage getCustomer() { - return customer; - } - - - public void setCustomer(CustomerLinkage customer) { - this.customer = customer; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCreditAccountRelationships createCreditAccountRelationships = (CreateCreditAccountRelationships) o; - return Objects.equals(this.customer, createCreditAccountRelationships.customer); - } - - @Override - public int hashCode() { - return Objects.hash(customer); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCreditAccountRelationships {\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("customer"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCreditAccountRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCreditAccountRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCreditAccountRelationships is not found in the empty JSON string", CreateCreditAccountRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCreditAccountRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCreditAccountRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `customer` - if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { - CustomerLinkage.validateJsonElement(jsonObj.get("customer")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCreditAccountRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCreditAccountRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCreditAccountRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCreditAccountRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCreditAccountRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCreditAccountRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCreditAccountRelationships - * @throws IOException if the JSON string is invalid with respect to CreateCreditAccountRelationships - */ - public static CreateCreditAccountRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCreditAccountRelationships.class); - } - - /** - * Convert an instance of CreateCreditAccountRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCustomerToken.java b/src/main/java/org/openapitools/client/model/CreateCustomerToken.java deleted file mode 100644 index 1d43b530..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCustomerToken.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateCustomerTokenData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateCustomerToken - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCustomerToken { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateCustomerTokenData data; - - public CreateCustomerToken() { - } - - public CreateCustomerToken data(CreateCustomerTokenData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateCustomerTokenData getData() { - return data; - } - - - public void setData(CreateCustomerTokenData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCustomerToken createCustomerToken = (CreateCustomerToken) o; - return Objects.equals(this.data, createCustomerToken.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCustomerToken {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCustomerToken - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCustomerToken.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCustomerToken is not found in the empty JSON string", CreateCustomerToken.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCustomerToken.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCustomerToken` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateCustomerTokenData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCustomerToken.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCustomerToken' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCustomerToken.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCustomerToken value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCustomerToken read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCustomerToken given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCustomerToken - * @throws IOException if the JSON string is invalid with respect to CreateCustomerToken - */ - public static CreateCustomerToken fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCustomerToken.class); - } - - /** - * Convert an instance of CreateCustomerToken to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCustomerTokenData.java b/src/main/java/org/openapitools/client/model/CreateCustomerTokenData.java deleted file mode 100644 index c9b1514d..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCustomerTokenData.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateCustomerTokenDataAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateCustomerTokenData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCustomerTokenData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "customerToken"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateCustomerTokenDataAttributes attributes; - - public CreateCustomerTokenData() { - } - - public CreateCustomerTokenData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateCustomerTokenData attributes(CreateCustomerTokenDataAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public CreateCustomerTokenDataAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateCustomerTokenDataAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCustomerTokenData createCustomerTokenData = (CreateCustomerTokenData) o; - return Objects.equals(this.type, createCustomerTokenData.type) && - Objects.equals(this.attributes, createCustomerTokenData.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCustomerTokenData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCustomerTokenData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCustomerTokenData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCustomerTokenData is not found in the empty JSON string", CreateCustomerTokenData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCustomerTokenData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCustomerTokenData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - CreateCustomerTokenDataAttributes.validateJsonElement(jsonObj.get("attributes")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCustomerTokenData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCustomerTokenData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCustomerTokenData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCustomerTokenData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCustomerTokenData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCustomerTokenData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCustomerTokenData - * @throws IOException if the JSON string is invalid with respect to CreateCustomerTokenData - */ - public static CreateCustomerTokenData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCustomerTokenData.class); - } - - /** - * Convert an instance of CreateCustomerTokenData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCustomerTokenDataAttributes.java b/src/main/java/org/openapitools/client/model/CreateCustomerTokenDataAttributes.java deleted file mode 100644 index 3fd5737b..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCustomerTokenDataAttributes.java +++ /dev/null @@ -1,413 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.CreateApiTokenDataAttributesResourcesInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateCustomerTokenDataAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCustomerTokenDataAttributes { - public static final String SERIALIZED_NAME_SCOPE = "scope"; - @SerializedName(SERIALIZED_NAME_SCOPE) - private String scope; - - public static final String SERIALIZED_NAME_VERIFICATION_TOKEN = "verificationToken"; - @SerializedName(SERIALIZED_NAME_VERIFICATION_TOKEN) - private String verificationToken; - - public static final String SERIALIZED_NAME_JWT_TOKEN = "jwtToken"; - @SerializedName(SERIALIZED_NAME_JWT_TOKEN) - private String jwtToken; - - public static final String SERIALIZED_NAME_EXPIRES_IN = "expiresIn"; - @SerializedName(SERIALIZED_NAME_EXPIRES_IN) - private Integer expiresIn; - - public static final String SERIALIZED_NAME_VERIFICATION_CODE = "verificationCode"; - @SerializedName(SERIALIZED_NAME_VERIFICATION_CODE) - private String verificationCode; - - public static final String SERIALIZED_NAME_RESOURCES = "resources"; - @SerializedName(SERIALIZED_NAME_RESOURCES) - private List resources; - - public static final String SERIALIZED_NAME_UPGRADABLE_SCOPE = "upgradableScope"; - @SerializedName(SERIALIZED_NAME_UPGRADABLE_SCOPE) - private String upgradableScope; - - public CreateCustomerTokenDataAttributes() { - } - - public CreateCustomerTokenDataAttributes scope(String scope) { - - this.scope = scope; - return this; - } - - /** - * Get scope - * @return scope - **/ - @javax.annotation.Nullable - public String getScope() { - return scope; - } - - - public void setScope(String scope) { - this.scope = scope; - } - - - public CreateCustomerTokenDataAttributes verificationToken(String verificationToken) { - - this.verificationToken = verificationToken; - return this; - } - - /** - * Get verificationToken - * @return verificationToken - **/ - @javax.annotation.Nullable - public String getVerificationToken() { - return verificationToken; - } - - - public void setVerificationToken(String verificationToken) { - this.verificationToken = verificationToken; - } - - - public CreateCustomerTokenDataAttributes jwtToken(String jwtToken) { - - this.jwtToken = jwtToken; - return this; - } - - /** - * Get jwtToken - * @return jwtToken - **/ - @javax.annotation.Nullable - public String getJwtToken() { - return jwtToken; - } - - - public void setJwtToken(String jwtToken) { - this.jwtToken = jwtToken; - } - - - public CreateCustomerTokenDataAttributes expiresIn(Integer expiresIn) { - - this.expiresIn = expiresIn; - return this; - } - - /** - * Get expiresIn - * @return expiresIn - **/ - @javax.annotation.Nullable - public Integer getExpiresIn() { - return expiresIn; - } - - - public void setExpiresIn(Integer expiresIn) { - this.expiresIn = expiresIn; - } - - - public CreateCustomerTokenDataAttributes verificationCode(String verificationCode) { - - this.verificationCode = verificationCode; - return this; - } - - /** - * Get verificationCode - * @return verificationCode - **/ - @javax.annotation.Nullable - public String getVerificationCode() { - return verificationCode; - } - - - public void setVerificationCode(String verificationCode) { - this.verificationCode = verificationCode; - } - - - public CreateCustomerTokenDataAttributes resources(List resources) { - - this.resources = resources; - return this; - } - - public CreateCustomerTokenDataAttributes addResourcesItem(CreateApiTokenDataAttributesResourcesInner resourcesItem) { - if (this.resources == null) { - this.resources = new ArrayList<>(); - } - this.resources.add(resourcesItem); - return this; - } - - /** - * Get resources - * @return resources - **/ - @javax.annotation.Nullable - public List getResources() { - return resources; - } - - - public void setResources(List resources) { - this.resources = resources; - } - - - public CreateCustomerTokenDataAttributes upgradableScope(String upgradableScope) { - - this.upgradableScope = upgradableScope; - return this; - } - - /** - * Get upgradableScope - * @return upgradableScope - **/ - @javax.annotation.Nullable - public String getUpgradableScope() { - return upgradableScope; - } - - - public void setUpgradableScope(String upgradableScope) { - this.upgradableScope = upgradableScope; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCustomerTokenDataAttributes createCustomerTokenDataAttributes = (CreateCustomerTokenDataAttributes) o; - return Objects.equals(this.scope, createCustomerTokenDataAttributes.scope) && - Objects.equals(this.verificationToken, createCustomerTokenDataAttributes.verificationToken) && - Objects.equals(this.jwtToken, createCustomerTokenDataAttributes.jwtToken) && - Objects.equals(this.expiresIn, createCustomerTokenDataAttributes.expiresIn) && - Objects.equals(this.verificationCode, createCustomerTokenDataAttributes.verificationCode) && - Objects.equals(this.resources, createCustomerTokenDataAttributes.resources) && - Objects.equals(this.upgradableScope, createCustomerTokenDataAttributes.upgradableScope); - } - - @Override - public int hashCode() { - return Objects.hash(scope, verificationToken, jwtToken, expiresIn, verificationCode, resources, upgradableScope); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCustomerTokenDataAttributes {\n"); - sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); - sb.append(" verificationToken: ").append(toIndentedString(verificationToken)).append("\n"); - sb.append(" jwtToken: ").append(toIndentedString(jwtToken)).append("\n"); - sb.append(" expiresIn: ").append(toIndentedString(expiresIn)).append("\n"); - sb.append(" verificationCode: ").append(toIndentedString(verificationCode)).append("\n"); - sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); - sb.append(" upgradableScope: ").append(toIndentedString(upgradableScope)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("scope"); - openapiFields.add("verificationToken"); - openapiFields.add("jwtToken"); - openapiFields.add("expiresIn"); - openapiFields.add("verificationCode"); - openapiFields.add("resources"); - openapiFields.add("upgradableScope"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCustomerTokenDataAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCustomerTokenDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCustomerTokenDataAttributes is not found in the empty JSON string", CreateCustomerTokenDataAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCustomerTokenDataAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCustomerTokenDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); - } - if ((jsonObj.get("verificationToken") != null && !jsonObj.get("verificationToken").isJsonNull()) && !jsonObj.get("verificationToken").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `verificationToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("verificationToken").toString())); - } - if ((jsonObj.get("jwtToken") != null && !jsonObj.get("jwtToken").isJsonNull()) && !jsonObj.get("jwtToken").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `jwtToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jwtToken").toString())); - } - if ((jsonObj.get("verificationCode") != null && !jsonObj.get("verificationCode").isJsonNull()) && !jsonObj.get("verificationCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `verificationCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("verificationCode").toString())); - } - if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonNull()) { - JsonArray jsonArrayresources = jsonObj.getAsJsonArray("resources"); - if (jsonArrayresources != null) { - // ensure the json data is an array - if (!jsonObj.get("resources").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `resources` to be an array in the JSON string but got `%s`", jsonObj.get("resources").toString())); - } - - // validate the optional field `resources` (array) - for (int i = 0; i < jsonArrayresources.size(); i++) { - CreateApiTokenDataAttributesResourcesInner.validateJsonElement(jsonArrayresources.get(i)); - }; - } - } - if ((jsonObj.get("upgradableScope") != null && !jsonObj.get("upgradableScope").isJsonNull()) && !jsonObj.get("upgradableScope").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `upgradableScope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("upgradableScope").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCustomerTokenDataAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCustomerTokenDataAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCustomerTokenDataAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCustomerTokenDataAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCustomerTokenDataAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCustomerTokenDataAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCustomerTokenDataAttributes - * @throws IOException if the JSON string is invalid with respect to CreateCustomerTokenDataAttributes - */ - public static CreateCustomerTokenDataAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCustomerTokenDataAttributes.class); - } - - /** - * Convert an instance of CreateCustomerTokenDataAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerification.java b/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerification.java deleted file mode 100644 index be22b104..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerification.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateCustomerTokenVerificationData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateCustomerTokenVerification - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCustomerTokenVerification { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateCustomerTokenVerificationData data; - - public CreateCustomerTokenVerification() { - } - - public CreateCustomerTokenVerification data(CreateCustomerTokenVerificationData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateCustomerTokenVerificationData getData() { - return data; - } - - - public void setData(CreateCustomerTokenVerificationData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCustomerTokenVerification createCustomerTokenVerification = (CreateCustomerTokenVerification) o; - return Objects.equals(this.data, createCustomerTokenVerification.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCustomerTokenVerification {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCustomerTokenVerification - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCustomerTokenVerification.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCustomerTokenVerification is not found in the empty JSON string", CreateCustomerTokenVerification.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCustomerTokenVerification.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCustomerTokenVerification` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateCustomerTokenVerificationData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCustomerTokenVerification.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCustomerTokenVerification' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCustomerTokenVerification.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCustomerTokenVerification value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCustomerTokenVerification read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCustomerTokenVerification given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCustomerTokenVerification - * @throws IOException if the JSON string is invalid with respect to CreateCustomerTokenVerification - */ - public static CreateCustomerTokenVerification fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCustomerTokenVerification.class); - } - - /** - * Convert an instance of CreateCustomerTokenVerification to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerificationData.java b/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerificationData.java deleted file mode 100644 index 8deb241a..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerificationData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateCustomerTokenVerificationDataAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateCustomerTokenVerificationData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCustomerTokenVerificationData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "customerTokenVerification"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateCustomerTokenVerificationDataAttributes attributes; - - public CreateCustomerTokenVerificationData() { - } - - public CreateCustomerTokenVerificationData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateCustomerTokenVerificationData attributes(CreateCustomerTokenVerificationDataAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateCustomerTokenVerificationDataAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateCustomerTokenVerificationDataAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCustomerTokenVerificationData createCustomerTokenVerificationData = (CreateCustomerTokenVerificationData) o; - return Objects.equals(this.type, createCustomerTokenVerificationData.type) && - Objects.equals(this.attributes, createCustomerTokenVerificationData.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCustomerTokenVerificationData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCustomerTokenVerificationData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCustomerTokenVerificationData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCustomerTokenVerificationData is not found in the empty JSON string", CreateCustomerTokenVerificationData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCustomerTokenVerificationData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCustomerTokenVerificationData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateCustomerTokenVerificationData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateCustomerTokenVerificationDataAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCustomerTokenVerificationData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCustomerTokenVerificationData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCustomerTokenVerificationData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCustomerTokenVerificationData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCustomerTokenVerificationData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCustomerTokenVerificationData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCustomerTokenVerificationData - * @throws IOException if the JSON string is invalid with respect to CreateCustomerTokenVerificationData - */ - public static CreateCustomerTokenVerificationData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCustomerTokenVerificationData.class); - } - - /** - * Convert an instance of CreateCustomerTokenVerificationData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerificationDataAttributes.java b/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerificationDataAttributes.java deleted file mode 100644 index de674d8f..00000000 --- a/src/main/java/org/openapitools/client/model/CreateCustomerTokenVerificationDataAttributes.java +++ /dev/null @@ -1,483 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Phone; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateCustomerTokenVerificationDataAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateCustomerTokenVerificationDataAttributes { - /** - * Gets or Sets channel - */ - @JsonAdapter(ChannelEnum.Adapter.class) - public enum ChannelEnum { - SMS("sms"), - - CALL("call"); - - private String value; - - ChannelEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ChannelEnum fromValue(String value) { - for (ChannelEnum b : ChannelEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ChannelEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ChannelEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ChannelEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_CHANNEL = "channel"; - @SerializedName(SERIALIZED_NAME_CHANNEL) - private ChannelEnum channel; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_APP_HASH = "appHash"; - @SerializedName(SERIALIZED_NAME_APP_HASH) - private String appHash; - - /** - * Gets or Sets language - */ - @JsonAdapter(LanguageEnum.Adapter.class) - public enum LanguageEnum { - EN("en"), - - AF("af"), - - AR("ar"), - - CA("ca"), - - ZH("zh"), - - ZH_CN("zh-CN"), - - ZH_HK("zh-HK"), - - HR("hr"), - - CS("cs"), - - DA("da"), - - NL("nl"), - - EN_GB("en-GB"), - - ET("et"), - - FI("fi"), - - FR("fr"), - - DE("de"), - - EL("el"), - - HE("he"), - - HI("hi"), - - HU("hu"), - - ID("id"), - - IT("it"), - - JA("ja"), - - KN("kn"), - - KO("ko"), - - MS("ms"), - - MR("mr"), - - NB("nb"), - - PL("pl"), - - PT_BR("pt-BR"), - - PT("pt"), - - RO("ro"), - - RU("ru"), - - SK("sk"), - - ES("es"), - - SV("sv"), - - TL("tl"), - - TE("te"), - - TH("th"), - - TR("tr"), - - VI("vi"); - - private String value; - - LanguageEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static LanguageEnum fromValue(String value) { - for (LanguageEnum b : LanguageEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final LanguageEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public LanguageEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return LanguageEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_LANGUAGE = "language"; - @SerializedName(SERIALIZED_NAME_LANGUAGE) - private LanguageEnum language; - - public CreateCustomerTokenVerificationDataAttributes() { - } - - public CreateCustomerTokenVerificationDataAttributes channel(ChannelEnum channel) { - - this.channel = channel; - return this; - } - - /** - * Get channel - * @return channel - **/ - @javax.annotation.Nonnull - public ChannelEnum getChannel() { - return channel; - } - - - public void setChannel(ChannelEnum channel) { - this.channel = channel; - } - - - public CreateCustomerTokenVerificationDataAttributes phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public CreateCustomerTokenVerificationDataAttributes appHash(String appHash) { - - this.appHash = appHash; - return this; - } - - /** - * Get appHash - * @return appHash - **/ - @javax.annotation.Nullable - public String getAppHash() { - return appHash; - } - - - public void setAppHash(String appHash) { - this.appHash = appHash; - } - - - public CreateCustomerTokenVerificationDataAttributes language(LanguageEnum language) { - - this.language = language; - return this; - } - - /** - * Get language - * @return language - **/ - @javax.annotation.Nullable - public LanguageEnum getLanguage() { - return language; - } - - - public void setLanguage(LanguageEnum language) { - this.language = language; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateCustomerTokenVerificationDataAttributes createCustomerTokenVerificationDataAttributes = (CreateCustomerTokenVerificationDataAttributes) o; - return Objects.equals(this.channel, createCustomerTokenVerificationDataAttributes.channel) && - Objects.equals(this.phone, createCustomerTokenVerificationDataAttributes.phone) && - Objects.equals(this.appHash, createCustomerTokenVerificationDataAttributes.appHash) && - Objects.equals(this.language, createCustomerTokenVerificationDataAttributes.language); - } - - @Override - public int hashCode() { - return Objects.hash(channel, phone, appHash, language); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateCustomerTokenVerificationDataAttributes {\n"); - sb.append(" channel: ").append(toIndentedString(channel)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" appHash: ").append(toIndentedString(appHash)).append("\n"); - sb.append(" language: ").append(toIndentedString(language)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("channel"); - openapiFields.add("phone"); - openapiFields.add("appHash"); - openapiFields.add("language"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("channel"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateCustomerTokenVerificationDataAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateCustomerTokenVerificationDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCustomerTokenVerificationDataAttributes is not found in the empty JSON string", CreateCustomerTokenVerificationDataAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateCustomerTokenVerificationDataAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCustomerTokenVerificationDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateCustomerTokenVerificationDataAttributes.openapiRequiredFields) { - 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("channel").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `channel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("channel").toString())); - } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); - } - if ((jsonObj.get("appHash") != null && !jsonObj.get("appHash").isJsonNull()) && !jsonObj.get("appHash").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appHash` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appHash").toString())); - } - if ((jsonObj.get("language") != null && !jsonObj.get("language").isJsonNull()) && !jsonObj.get("language").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `language` to be a primitive type in the JSON string but got `%s`", jsonObj.get("language").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateCustomerTokenVerificationDataAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateCustomerTokenVerificationDataAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateCustomerTokenVerificationDataAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateCustomerTokenVerificationDataAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateCustomerTokenVerificationDataAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateCustomerTokenVerificationDataAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCustomerTokenVerificationDataAttributes - * @throws IOException if the JSON string is invalid with respect to CreateCustomerTokenVerificationDataAttributes - */ - public static CreateCustomerTokenVerificationDataAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateCustomerTokenVerificationDataAttributes.class); - } - - /** - * Convert an instance of CreateCustomerTokenVerificationDataAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateDepositAccount.java b/src/main/java/org/openapitools/client/model/CreateDepositAccount.java deleted file mode 100644 index ffd3f8bb..00000000 --- a/src/main/java/org/openapitools/client/model/CreateDepositAccount.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateDepositAccountAttributes; -import org.openapitools.client.model.CreateDepositAccountRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateDepositAccount - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateDepositAccount { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - DEPOSITACCOUNT("depositAccount"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type = TypeEnum.DEPOSITACCOUNT; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateDepositAccountAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateDepositAccountRelationships relationships; - - public CreateDepositAccount() { - } - - public CreateDepositAccount type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CreateDepositAccount attributes(CreateDepositAccountAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public CreateDepositAccountAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateDepositAccountAttributes attributes) { - this.attributes = attributes; - } - - - public CreateDepositAccount relationships(CreateDepositAccountRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public CreateDepositAccountRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateDepositAccountRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateDepositAccount createDepositAccount = (CreateDepositAccount) o; - return Objects.equals(this.type, createDepositAccount.type) && - Objects.equals(this.attributes, createDepositAccount.attributes) && - Objects.equals(this.relationships, createDepositAccount.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateDepositAccount {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateDepositAccount - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateDepositAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateDepositAccount is not found in the empty JSON string", CreateDepositAccount.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateDepositAccount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateDepositAccount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - CreateDepositAccountAttributes.validateJsonElement(jsonObj.get("attributes")); - } - // validate the optional field `relationships` - if (jsonObj.get("relationships") != null && !jsonObj.get("relationships").isJsonNull()) { - CreateDepositAccountRelationships.validateJsonElement(jsonObj.get("relationships")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateDepositAccount.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateDepositAccount' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateDepositAccount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateDepositAccount value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateDepositAccount read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateDepositAccount given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateDepositAccount - * @throws IOException if the JSON string is invalid with respect to CreateDepositAccount - */ - public static CreateDepositAccount fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateDepositAccount.class); - } - - /** - * Convert an instance of CreateDepositAccount to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateDepositAccountAttributes.java b/src/main/java/org/openapitools/client/model/CreateDepositAccountAttributes.java deleted file mode 100644 index 494b5bfb..00000000 --- a/src/main/java/org/openapitools/client/model/CreateDepositAccountAttributes.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateDepositAccountAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateDepositAccountAttributes { - public static final String SERIALIZED_NAME_DEPOSIT_PRODUCT = "depositProduct"; - @SerializedName(SERIALIZED_NAME_DEPOSIT_PRODUCT) - private String depositProduct; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public CreateDepositAccountAttributes() { - } - - public CreateDepositAccountAttributes depositProduct(String depositProduct) { - - this.depositProduct = depositProduct; - return this; - } - - /** - * Get depositProduct - * @return depositProduct - **/ - @javax.annotation.Nonnull - public String getDepositProduct() { - return depositProduct; - } - - - public void setDepositProduct(String depositProduct) { - this.depositProduct = depositProduct; - } - - - public CreateDepositAccountAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateDepositAccountAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateDepositAccountAttributes createDepositAccountAttributes = (CreateDepositAccountAttributes) o; - return Objects.equals(this.depositProduct, createDepositAccountAttributes.depositProduct) && - Objects.equals(this.tags, createDepositAccountAttributes.tags) && - Objects.equals(this.idempotencyKey, createDepositAccountAttributes.idempotencyKey); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(depositProduct, tags, idempotencyKey); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateDepositAccountAttributes {\n"); - sb.append(" depositProduct: ").append(toIndentedString(depositProduct)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("depositProduct"); - openapiFields.add("tags"); - openapiFields.add("idempotencyKey"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("depositProduct"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateDepositAccountAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateDepositAccountAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateDepositAccountAttributes is not found in the empty JSON string", CreateDepositAccountAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateDepositAccountAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateDepositAccountAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateDepositAccountAttributes.openapiRequiredFields) { - 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("depositProduct").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `depositProduct` to be a primitive type in the JSON string but got `%s`", jsonObj.get("depositProduct").toString())); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateDepositAccountAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateDepositAccountAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateDepositAccountAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateDepositAccountAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateDepositAccountAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateDepositAccountAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateDepositAccountAttributes - * @throws IOException if the JSON string is invalid with respect to CreateDepositAccountAttributes - */ - public static CreateDepositAccountAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateDepositAccountAttributes.class); - } - - /** - * Convert an instance of CreateDepositAccountAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateDepositAccountRelationships.java b/src/main/java/org/openapitools/client/model/CreateDepositAccountRelationships.java deleted file mode 100644 index a18e7841..00000000 --- a/src/main/java/org/openapitools/client/model/CreateDepositAccountRelationships.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CustomerLinkage; -import org.openapitools.client.model.CustomersRelationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateDepositAccountRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateDepositAccountRelationships { - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private CustomerLinkage customer; - - public static final String SERIALIZED_NAME_CUSTOMERS = "customers"; - @SerializedName(SERIALIZED_NAME_CUSTOMERS) - private CustomersRelationship customers; - - public CreateDepositAccountRelationships() { - } - - public CreateDepositAccountRelationships customer(CustomerLinkage customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nullable - public CustomerLinkage getCustomer() { - return customer; - } - - - public void setCustomer(CustomerLinkage customer) { - this.customer = customer; - } - - - public CreateDepositAccountRelationships customers(CustomersRelationship customers) { - - this.customers = customers; - return this; - } - - /** - * Get customers - * @return customers - **/ - @javax.annotation.Nullable - public CustomersRelationship getCustomers() { - return customers; - } - - - public void setCustomers(CustomersRelationship customers) { - this.customers = customers; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateDepositAccountRelationships createDepositAccountRelationships = (CreateDepositAccountRelationships) o; - return Objects.equals(this.customer, createDepositAccountRelationships.customer) && - Objects.equals(this.customers, createDepositAccountRelationships.customers); - } - - @Override - public int hashCode() { - return Objects.hash(customer, customers); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateDepositAccountRelationships {\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" customers: ").append(toIndentedString(customers)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("customer"); - openapiFields.add("customers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateDepositAccountRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateDepositAccountRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateDepositAccountRelationships is not found in the empty JSON string", CreateDepositAccountRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateDepositAccountRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateDepositAccountRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `customer` - if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { - CustomerLinkage.validateJsonElement(jsonObj.get("customer")); - } - // validate the optional field `customers` - if (jsonObj.get("customers") != null && !jsonObj.get("customers").isJsonNull()) { - CustomersRelationship.validateJsonElement(jsonObj.get("customers")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateDepositAccountRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateDepositAccountRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateDepositAccountRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateDepositAccountRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateDepositAccountRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateDepositAccountRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateDepositAccountRelationships - * @throws IOException if the JSON string is invalid with respect to CreateDepositAccountRelationships - */ - public static CreateDepositAccountRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateDepositAccountRelationships.class); - } - - /** - * Convert an instance of CreateDepositAccountRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateIndividualApplication.java b/src/main/java/org/openapitools/client/model/CreateIndividualApplication.java deleted file mode 100644 index ddd6cf96..00000000 --- a/src/main/java/org/openapitools/client/model/CreateIndividualApplication.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateIndividualApplicationAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateIndividualApplication - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateIndividualApplication { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "individualApplication"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateIndividualApplicationAttributes attributes; - - public CreateIndividualApplication() { - } - - public CreateIndividualApplication type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateIndividualApplication attributes(CreateIndividualApplicationAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateIndividualApplicationAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateIndividualApplicationAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateIndividualApplication createIndividualApplication = (CreateIndividualApplication) o; - return Objects.equals(this.type, createIndividualApplication.type) && - Objects.equals(this.attributes, createIndividualApplication.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateIndividualApplication {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateIndividualApplication - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateIndividualApplication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateIndividualApplication is not found in the empty JSON string", CreateIndividualApplication.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateIndividualApplication.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateIndividualApplication` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateIndividualApplication.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateIndividualApplicationAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateIndividualApplication.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateIndividualApplication' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateIndividualApplication.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateIndividualApplication value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateIndividualApplication read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateIndividualApplication given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateIndividualApplication - * @throws IOException if the JSON string is invalid with respect to CreateIndividualApplication - */ - public static CreateIndividualApplication fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateIndividualApplication.class); - } - - /** - * Convert an instance of CreateIndividualApplication to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateIndividualApplicationAttributes.java b/src/main/java/org/openapitools/client/model/CreateIndividualApplicationAttributes.java deleted file mode 100644 index db3bb78d..00000000 --- a/src/main/java/org/openapitools/client/model/CreateIndividualApplicationAttributes.java +++ /dev/null @@ -1,803 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.AnnualIncome; -import org.openapitools.client.model.CreatePowerOfAttorneyAgent; -import org.openapitools.client.model.DeviceFingerprint; -import org.openapitools.client.model.EvaluationParams; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Industry; -import org.openapitools.client.model.Occupation; -import org.openapitools.client.model.Phone; -import org.openapitools.client.model.SourceOfIncome; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateIndividualApplicationAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateIndividualApplicationAttributes { - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public static final String SERIALIZED_NAME_IP = "ip"; - @SerializedName(SERIALIZED_NAME_IP) - private String ip; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_DEVICE_FINGERPRINTS = "deviceFingerprints"; - @SerializedName(SERIALIZED_NAME_DEVICE_FINGERPRINTS) - private List deviceFingerprints; - - public static final String SERIALIZED_NAME_JWT_SUBJECT = "jwtSubject"; - @SerializedName(SERIALIZED_NAME_JWT_SUBJECT) - private String jwtSubject; - - public static final String SERIALIZED_NAME_POWER_OF_ATTORNEY_AGENT = "powerOfAttorneyAgent"; - @SerializedName(SERIALIZED_NAME_POWER_OF_ATTORNEY_AGENT) - private CreatePowerOfAttorneyAgent powerOfAttorneyAgent; - - public static final String SERIALIZED_NAME_INDUSTRY = "industry"; - @SerializedName(SERIALIZED_NAME_INDUSTRY) - private Industry industry; - - public static final String SERIALIZED_NAME_EVALUATION_PARAMS = "evaluationParams"; - @SerializedName(SERIALIZED_NAME_EVALUATION_PARAMS) - private EvaluationParams evaluationParams; - - public static final String SERIALIZED_NAME_OCCUPATION = "occupation"; - @SerializedName(SERIALIZED_NAME_OCCUPATION) - private Occupation occupation; - - public static final String SERIALIZED_NAME_ANNUAL_INCOME = "annualIncome"; - @SerializedName(SERIALIZED_NAME_ANNUAL_INCOME) - private AnnualIncome annualIncome; - - public static final String SERIALIZED_NAME_SOURCE_OF_INCOME = "sourceOfIncome"; - @SerializedName(SERIALIZED_NAME_SOURCE_OF_INCOME) - private SourceOfIncome sourceOfIncome; - - public CreateIndividualApplicationAttributes() { - } - - public CreateIndividualApplicationAttributes fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nonnull - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public CreateIndividualApplicationAttributes email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nonnull - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public CreateIndividualApplicationAttributes phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nonnull - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public CreateIndividualApplicationAttributes ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public CreateIndividualApplicationAttributes passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public CreateIndividualApplicationAttributes nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public CreateIndividualApplicationAttributes address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nonnull - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public CreateIndividualApplicationAttributes dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nonnull - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public CreateIndividualApplicationAttributes ip(String ip) { - - this.ip = ip; - return this; - } - - /** - * Get ip - * @return ip - **/ - @javax.annotation.Nullable - public String getIp() { - return ip; - } - - - public void setIp(String ip) { - this.ip = ip; - } - - - public CreateIndividualApplicationAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateIndividualApplicationAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateIndividualApplicationAttributes deviceFingerprints(List deviceFingerprints) { - - this.deviceFingerprints = deviceFingerprints; - return this; - } - - public CreateIndividualApplicationAttributes addDeviceFingerprintsItem(DeviceFingerprint deviceFingerprintsItem) { - if (this.deviceFingerprints == null) { - this.deviceFingerprints = new ArrayList<>(); - } - this.deviceFingerprints.add(deviceFingerprintsItem); - return this; - } - - /** - * Get deviceFingerprints - * @return deviceFingerprints - **/ - @javax.annotation.Nullable - public List getDeviceFingerprints() { - return deviceFingerprints; - } - - - public void setDeviceFingerprints(List deviceFingerprints) { - this.deviceFingerprints = deviceFingerprints; - } - - - public CreateIndividualApplicationAttributes jwtSubject(String jwtSubject) { - - this.jwtSubject = jwtSubject; - return this; - } - - /** - * Get jwtSubject - * @return jwtSubject - **/ - @javax.annotation.Nullable - public String getJwtSubject() { - return jwtSubject; - } - - - public void setJwtSubject(String jwtSubject) { - this.jwtSubject = jwtSubject; - } - - - public CreateIndividualApplicationAttributes powerOfAttorneyAgent(CreatePowerOfAttorneyAgent powerOfAttorneyAgent) { - - this.powerOfAttorneyAgent = powerOfAttorneyAgent; - return this; - } - - /** - * Get powerOfAttorneyAgent - * @return powerOfAttorneyAgent - **/ - @javax.annotation.Nullable - public CreatePowerOfAttorneyAgent getPowerOfAttorneyAgent() { - return powerOfAttorneyAgent; - } - - - public void setPowerOfAttorneyAgent(CreatePowerOfAttorneyAgent powerOfAttorneyAgent) { - this.powerOfAttorneyAgent = powerOfAttorneyAgent; - } - - - public CreateIndividualApplicationAttributes industry(Industry industry) { - - this.industry = industry; - return this; - } - - /** - * Get industry - * @return industry - **/ - @javax.annotation.Nullable - public Industry getIndustry() { - return industry; - } - - - public void setIndustry(Industry industry) { - this.industry = industry; - } - - - public CreateIndividualApplicationAttributes evaluationParams(EvaluationParams evaluationParams) { - - this.evaluationParams = evaluationParams; - return this; - } - - /** - * Get evaluationParams - * @return evaluationParams - **/ - @javax.annotation.Nullable - public EvaluationParams getEvaluationParams() { - return evaluationParams; - } - - - public void setEvaluationParams(EvaluationParams evaluationParams) { - this.evaluationParams = evaluationParams; - } - - - public CreateIndividualApplicationAttributes occupation(Occupation occupation) { - - this.occupation = occupation; - return this; - } - - /** - * Get occupation - * @return occupation - **/ - @javax.annotation.Nullable - public Occupation getOccupation() { - return occupation; - } - - - public void setOccupation(Occupation occupation) { - this.occupation = occupation; - } - - - public CreateIndividualApplicationAttributes annualIncome(AnnualIncome annualIncome) { - - this.annualIncome = annualIncome; - return this; - } - - /** - * Get annualIncome - * @return annualIncome - **/ - @javax.annotation.Nullable - public AnnualIncome getAnnualIncome() { - return annualIncome; - } - - - public void setAnnualIncome(AnnualIncome annualIncome) { - this.annualIncome = annualIncome; - } - - - public CreateIndividualApplicationAttributes sourceOfIncome(SourceOfIncome sourceOfIncome) { - - this.sourceOfIncome = sourceOfIncome; - return this; - } - - /** - * Get sourceOfIncome - * @return sourceOfIncome - **/ - @javax.annotation.Nullable - public SourceOfIncome getSourceOfIncome() { - return sourceOfIncome; - } - - - public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { - this.sourceOfIncome = sourceOfIncome; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateIndividualApplicationAttributes createIndividualApplicationAttributes = (CreateIndividualApplicationAttributes) o; - return Objects.equals(this.fullName, createIndividualApplicationAttributes.fullName) && - Objects.equals(this.email, createIndividualApplicationAttributes.email) && - Objects.equals(this.phone, createIndividualApplicationAttributes.phone) && - Objects.equals(this.ssn, createIndividualApplicationAttributes.ssn) && - Objects.equals(this.passport, createIndividualApplicationAttributes.passport) && - Objects.equals(this.nationality, createIndividualApplicationAttributes.nationality) && - Objects.equals(this.address, createIndividualApplicationAttributes.address) && - Objects.equals(this.dateOfBirth, createIndividualApplicationAttributes.dateOfBirth) && - Objects.equals(this.ip, createIndividualApplicationAttributes.ip) && - Objects.equals(this.tags, createIndividualApplicationAttributes.tags) && - Objects.equals(this.idempotencyKey, createIndividualApplicationAttributes.idempotencyKey) && - Objects.equals(this.deviceFingerprints, createIndividualApplicationAttributes.deviceFingerprints) && - Objects.equals(this.jwtSubject, createIndividualApplicationAttributes.jwtSubject) && - Objects.equals(this.powerOfAttorneyAgent, createIndividualApplicationAttributes.powerOfAttorneyAgent) && - Objects.equals(this.industry, createIndividualApplicationAttributes.industry) && - Objects.equals(this.evaluationParams, createIndividualApplicationAttributes.evaluationParams) && - Objects.equals(this.occupation, createIndividualApplicationAttributes.occupation) && - Objects.equals(this.annualIncome, createIndividualApplicationAttributes.annualIncome) && - Objects.equals(this.sourceOfIncome, createIndividualApplicationAttributes.sourceOfIncome); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(fullName, email, phone, ssn, passport, nationality, address, dateOfBirth, ip, tags, idempotencyKey, deviceFingerprints, jwtSubject, powerOfAttorneyAgent, industry, evaluationParams, occupation, annualIncome, sourceOfIncome); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateIndividualApplicationAttributes {\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" deviceFingerprints: ").append(toIndentedString(deviceFingerprints)).append("\n"); - sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); - sb.append(" powerOfAttorneyAgent: ").append(toIndentedString(powerOfAttorneyAgent)).append("\n"); - sb.append(" industry: ").append(toIndentedString(industry)).append("\n"); - sb.append(" evaluationParams: ").append(toIndentedString(evaluationParams)).append("\n"); - sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); - sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); - sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fullName"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("nationality"); - openapiFields.add("address"); - openapiFields.add("dateOfBirth"); - openapiFields.add("ip"); - openapiFields.add("tags"); - openapiFields.add("idempotencyKey"); - openapiFields.add("deviceFingerprints"); - openapiFields.add("jwtSubject"); - openapiFields.add("powerOfAttorneyAgent"); - openapiFields.add("industry"); - openapiFields.add("evaluationParams"); - openapiFields.add("occupation"); - openapiFields.add("annualIncome"); - openapiFields.add("sourceOfIncome"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("fullName"); - openapiRequiredFields.add("email"); - openapiRequiredFields.add("phone"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("dateOfBirth"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateIndividualApplicationAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateIndividualApplicationAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateIndividualApplicationAttributes is not found in the empty JSON string", CreateIndividualApplicationAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateIndividualApplicationAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateIndividualApplicationAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateIndividualApplicationAttributes.openapiRequiredFields) { - 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(); - // validate the required field `fullName` - FullName.validateJsonElement(jsonObj.get("fullName")); - if (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the required field `phone` - Phone.validateJsonElement(jsonObj.get("phone")); - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - // validate the required field `address` - Address.validateJsonElement(jsonObj.get("address")); - if ((jsonObj.get("ip") != null && !jsonObj.get("ip").isJsonNull()) && !jsonObj.get("ip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip").toString())); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - if (jsonObj.get("deviceFingerprints") != null && !jsonObj.get("deviceFingerprints").isJsonNull()) { - JsonArray jsonArraydeviceFingerprints = jsonObj.getAsJsonArray("deviceFingerprints"); - if (jsonArraydeviceFingerprints != null) { - // ensure the json data is an array - if (!jsonObj.get("deviceFingerprints").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `deviceFingerprints` to be an array in the JSON string but got `%s`", jsonObj.get("deviceFingerprints").toString())); - } - - // validate the optional field `deviceFingerprints` (array) - for (int i = 0; i < jsonArraydeviceFingerprints.size(); i++) { - DeviceFingerprint.validateJsonElement(jsonArraydeviceFingerprints.get(i)); - }; - } - } - if ((jsonObj.get("jwtSubject") != null && !jsonObj.get("jwtSubject").isJsonNull()) && !jsonObj.get("jwtSubject").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `jwtSubject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jwtSubject").toString())); - } - // validate the optional field `powerOfAttorneyAgent` - if (jsonObj.get("powerOfAttorneyAgent") != null && !jsonObj.get("powerOfAttorneyAgent").isJsonNull()) { - CreatePowerOfAttorneyAgent.validateJsonElement(jsonObj.get("powerOfAttorneyAgent")); - } - // validate the optional field `evaluationParams` - if (jsonObj.get("evaluationParams") != null && !jsonObj.get("evaluationParams").isJsonNull()) { - EvaluationParams.validateJsonElement(jsonObj.get("evaluationParams")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateIndividualApplicationAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateIndividualApplicationAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateIndividualApplicationAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateIndividualApplicationAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateIndividualApplicationAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateIndividualApplicationAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateIndividualApplicationAttributes - * @throws IOException if the JSON string is invalid with respect to CreateIndividualApplicationAttributes - */ - public static CreateIndividualApplicationAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateIndividualApplicationAttributes.class); - } - - /** - * Convert an instance of CreateIndividualApplicationAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateIndividualDebitCard.java b/src/main/java/org/openapitools/client/model/CreateIndividualDebitCard.java deleted file mode 100644 index e9caec0c..00000000 --- a/src/main/java/org/openapitools/client/model/CreateIndividualDebitCard.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateCardRelationships; -import org.openapitools.client.model.CreateIndividualDebitCardAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateIndividualDebitCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateIndividualDebitCard { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - INDIVIDUALDEBITCARD("individualDebitCard"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type = TypeEnum.INDIVIDUALDEBITCARD; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateIndividualDebitCardAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateCardRelationships relationships; - - public CreateIndividualDebitCard() { - } - - public CreateIndividualDebitCard type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CreateIndividualDebitCard attributes(CreateIndividualDebitCardAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateIndividualDebitCardAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateIndividualDebitCardAttributes attributes) { - this.attributes = attributes; - } - - - public CreateIndividualDebitCard relationships(CreateCardRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateCardRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateCardRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateIndividualDebitCard createIndividualDebitCard = (CreateIndividualDebitCard) o; - return Objects.equals(this.type, createIndividualDebitCard.type) && - Objects.equals(this.attributes, createIndividualDebitCard.attributes) && - Objects.equals(this.relationships, createIndividualDebitCard.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateIndividualDebitCard {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateIndividualDebitCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateIndividualDebitCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateIndividualDebitCard is not found in the empty JSON string", CreateIndividualDebitCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateIndividualDebitCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateIndividualDebitCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateIndividualDebitCard.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateIndividualDebitCardAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateCardRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateIndividualDebitCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateIndividualDebitCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateIndividualDebitCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateIndividualDebitCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateIndividualDebitCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateIndividualDebitCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateIndividualDebitCard - * @throws IOException if the JSON string is invalid with respect to CreateIndividualDebitCard - */ - public static CreateIndividualDebitCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateIndividualDebitCard.class); - } - - /** - * Convert an instance of CreateIndividualDebitCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateIndividualDebitCardAttributes.java b/src/main/java/org/openapitools/client/model/CreateIndividualDebitCardAttributes.java deleted file mode 100644 index 18086843..00000000 --- a/src/main/java/org/openapitools/client/model/CreateIndividualDebitCardAttributes.java +++ /dev/null @@ -1,546 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Address; -import org.openapitools.client.model.BIN; -import org.openapitools.client.model.CardLevelLimits; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateIndividualDebitCardAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateIndividualDebitCardAttributes { - public static final String SERIALIZED_NAME_SHIPPING_ADDRESS = "shippingAddress"; - @SerializedName(SERIALIZED_NAME_SHIPPING_ADDRESS) - private Address shippingAddress; - - public static final String SERIALIZED_NAME_DESIGN = "design"; - @SerializedName(SERIALIZED_NAME_DESIGN) - private String design; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_LIMITS = "limits"; - @SerializedName(SERIALIZED_NAME_LIMITS) - private CardLevelLimits limits; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_BIN = "bin"; - @SerializedName(SERIALIZED_NAME_BIN) - private BIN bin; - - public static final String SERIALIZED_NAME_CARD_QUALIFIER = "cardQualifier"; - @SerializedName(SERIALIZED_NAME_CARD_QUALIFIER) - private String cardQualifier; - - public static final String SERIALIZED_NAME_CARD_DESIGN_ID = "cardDesignId"; - @SerializedName(SERIALIZED_NAME_CARD_DESIGN_ID) - private String cardDesignId; - - public static final String SERIALIZED_NAME_ADDITIONAL_EMBOSSED_TEXT = "additionalEmbossedText"; - @SerializedName(SERIALIZED_NAME_ADDITIONAL_EMBOSSED_TEXT) - private String additionalEmbossedText; - - public static final String SERIALIZED_NAME_ACTIVE_FOR_ONLINE_USE = "activeForOnlineUse"; - @SerializedName(SERIALIZED_NAME_ACTIVE_FOR_ONLINE_USE) - private Boolean activeForOnlineUse; - - public static final String SERIALIZED_NAME_PRINT_ONLY_BUSINESS_NAME = "printOnlyBusinessName"; - @SerializedName(SERIALIZED_NAME_PRINT_ONLY_BUSINESS_NAME) - private Boolean printOnlyBusinessName; - - public static final String SERIALIZED_NAME_EXPIRY_DATE = "expiryDate"; - @SerializedName(SERIALIZED_NAME_EXPIRY_DATE) - private String expiryDate; - - public CreateIndividualDebitCardAttributes() { - } - - public CreateIndividualDebitCardAttributes shippingAddress(Address shippingAddress) { - - this.shippingAddress = shippingAddress; - return this; - } - - /** - * Get shippingAddress - * @return shippingAddress - **/ - @javax.annotation.Nullable - public Address getShippingAddress() { - return shippingAddress; - } - - - public void setShippingAddress(Address shippingAddress) { - this.shippingAddress = shippingAddress; - } - - - public CreateIndividualDebitCardAttributes design(String design) { - - this.design = design; - return this; - } - - /** - * Get design - * @return design - **/ - @javax.annotation.Nullable - public String getDesign() { - return design; - } - - - public void setDesign(String design) { - this.design = design; - } - - - public CreateIndividualDebitCardAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateIndividualDebitCardAttributes limits(CardLevelLimits limits) { - - this.limits = limits; - return this; - } - - /** - * Get limits - * @return limits - **/ - @javax.annotation.Nullable - public CardLevelLimits getLimits() { - return limits; - } - - - public void setLimits(CardLevelLimits limits) { - this.limits = limits; - } - - - public CreateIndividualDebitCardAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateIndividualDebitCardAttributes bin(BIN bin) { - - this.bin = bin; - return this; - } - - /** - * Get bin - * @return bin - **/ - @javax.annotation.Nullable - public BIN getBin() { - return bin; - } - - - public void setBin(BIN bin) { - this.bin = bin; - } - - - public CreateIndividualDebitCardAttributes cardQualifier(String cardQualifier) { - - this.cardQualifier = cardQualifier; - return this; - } - - /** - * Get cardQualifier - * @return cardQualifier - **/ - @javax.annotation.Nullable - public String getCardQualifier() { - return cardQualifier; - } - - - public void setCardQualifier(String cardQualifier) { - this.cardQualifier = cardQualifier; - } - - - public CreateIndividualDebitCardAttributes cardDesignId(String cardDesignId) { - - this.cardDesignId = cardDesignId; - return this; - } - - /** - * Get cardDesignId - * @return cardDesignId - **/ - @javax.annotation.Nullable - public String getCardDesignId() { - return cardDesignId; - } - - - public void setCardDesignId(String cardDesignId) { - this.cardDesignId = cardDesignId; - } - - - public CreateIndividualDebitCardAttributes additionalEmbossedText(String additionalEmbossedText) { - - this.additionalEmbossedText = additionalEmbossedText; - return this; - } - - /** - * Get additionalEmbossedText - * @return additionalEmbossedText - **/ - @javax.annotation.Nullable - public String getAdditionalEmbossedText() { - return additionalEmbossedText; - } - - - public void setAdditionalEmbossedText(String additionalEmbossedText) { - this.additionalEmbossedText = additionalEmbossedText; - } - - - public CreateIndividualDebitCardAttributes activeForOnlineUse(Boolean activeForOnlineUse) { - - this.activeForOnlineUse = activeForOnlineUse; - return this; - } - - /** - * Get activeForOnlineUse - * @return activeForOnlineUse - **/ - @javax.annotation.Nullable - public Boolean getActiveForOnlineUse() { - return activeForOnlineUse; - } - - - public void setActiveForOnlineUse(Boolean activeForOnlineUse) { - this.activeForOnlineUse = activeForOnlineUse; - } - - - public CreateIndividualDebitCardAttributes printOnlyBusinessName(Boolean printOnlyBusinessName) { - - this.printOnlyBusinessName = printOnlyBusinessName; - return this; - } - - /** - * Get printOnlyBusinessName - * @return printOnlyBusinessName - **/ - @javax.annotation.Nullable - public Boolean getPrintOnlyBusinessName() { - return printOnlyBusinessName; - } - - - public void setPrintOnlyBusinessName(Boolean printOnlyBusinessName) { - this.printOnlyBusinessName = printOnlyBusinessName; - } - - - public CreateIndividualDebitCardAttributes expiryDate(String expiryDate) { - - this.expiryDate = expiryDate; - return this; - } - - /** - * Get expiryDate - * @return expiryDate - **/ - @javax.annotation.Nullable - public String getExpiryDate() { - return expiryDate; - } - - - public void setExpiryDate(String expiryDate) { - this.expiryDate = expiryDate; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateIndividualDebitCardAttributes createIndividualDebitCardAttributes = (CreateIndividualDebitCardAttributes) o; - return Objects.equals(this.shippingAddress, createIndividualDebitCardAttributes.shippingAddress) && - Objects.equals(this.design, createIndividualDebitCardAttributes.design) && - Objects.equals(this.tags, createIndividualDebitCardAttributes.tags) && - Objects.equals(this.limits, createIndividualDebitCardAttributes.limits) && - Objects.equals(this.idempotencyKey, createIndividualDebitCardAttributes.idempotencyKey) && - Objects.equals(this.bin, createIndividualDebitCardAttributes.bin) && - Objects.equals(this.cardQualifier, createIndividualDebitCardAttributes.cardQualifier) && - Objects.equals(this.cardDesignId, createIndividualDebitCardAttributes.cardDesignId) && - Objects.equals(this.additionalEmbossedText, createIndividualDebitCardAttributes.additionalEmbossedText) && - Objects.equals(this.activeForOnlineUse, createIndividualDebitCardAttributes.activeForOnlineUse) && - Objects.equals(this.printOnlyBusinessName, createIndividualDebitCardAttributes.printOnlyBusinessName) && - Objects.equals(this.expiryDate, createIndividualDebitCardAttributes.expiryDate); - } - - @Override - public int hashCode() { - return Objects.hash(shippingAddress, design, tags, limits, idempotencyKey, bin, cardQualifier, cardDesignId, additionalEmbossedText, activeForOnlineUse, printOnlyBusinessName, expiryDate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateIndividualDebitCardAttributes {\n"); - sb.append(" shippingAddress: ").append(toIndentedString(shippingAddress)).append("\n"); - sb.append(" design: ").append(toIndentedString(design)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" bin: ").append(toIndentedString(bin)).append("\n"); - sb.append(" cardQualifier: ").append(toIndentedString(cardQualifier)).append("\n"); - sb.append(" cardDesignId: ").append(toIndentedString(cardDesignId)).append("\n"); - sb.append(" additionalEmbossedText: ").append(toIndentedString(additionalEmbossedText)).append("\n"); - sb.append(" activeForOnlineUse: ").append(toIndentedString(activeForOnlineUse)).append("\n"); - sb.append(" printOnlyBusinessName: ").append(toIndentedString(printOnlyBusinessName)).append("\n"); - sb.append(" expiryDate: ").append(toIndentedString(expiryDate)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("shippingAddress"); - openapiFields.add("design"); - openapiFields.add("tags"); - openapiFields.add("limits"); - openapiFields.add("idempotencyKey"); - openapiFields.add("bin"); - openapiFields.add("cardQualifier"); - openapiFields.add("cardDesignId"); - openapiFields.add("additionalEmbossedText"); - openapiFields.add("activeForOnlineUse"); - openapiFields.add("printOnlyBusinessName"); - openapiFields.add("expiryDate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateIndividualDebitCardAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateIndividualDebitCardAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateIndividualDebitCardAttributes is not found in the empty JSON string", CreateIndividualDebitCardAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateIndividualDebitCardAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateIndividualDebitCardAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `shippingAddress` - if (jsonObj.get("shippingAddress") != null && !jsonObj.get("shippingAddress").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("shippingAddress")); - } - if ((jsonObj.get("design") != null && !jsonObj.get("design").isJsonNull()) && !jsonObj.get("design").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `design` to be a primitive type in the JSON string but got `%s`", jsonObj.get("design").toString())); - } - // validate the optional field `limits` - if (jsonObj.get("limits") != null && !jsonObj.get("limits").isJsonNull()) { - CardLevelLimits.validateJsonElement(jsonObj.get("limits")); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - // validate the optional field `bin` - if (jsonObj.get("bin") != null && !jsonObj.get("bin").isJsonNull()) { - BIN.validateJsonElement(jsonObj.get("bin")); - } - if ((jsonObj.get("cardQualifier") != null && !jsonObj.get("cardQualifier").isJsonNull()) && !jsonObj.get("cardQualifier").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardQualifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardQualifier").toString())); - } - if ((jsonObj.get("cardDesignId") != null && !jsonObj.get("cardDesignId").isJsonNull()) && !jsonObj.get("cardDesignId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardDesignId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardDesignId").toString())); - } - if ((jsonObj.get("additionalEmbossedText") != null && !jsonObj.get("additionalEmbossedText").isJsonNull()) && !jsonObj.get("additionalEmbossedText").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `additionalEmbossedText` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalEmbossedText").toString())); - } - if ((jsonObj.get("expiryDate") != null && !jsonObj.get("expiryDate").isJsonNull()) && !jsonObj.get("expiryDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `expiryDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expiryDate").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateIndividualDebitCardAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateIndividualDebitCardAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateIndividualDebitCardAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateIndividualDebitCardAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateIndividualDebitCardAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateIndividualDebitCardAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateIndividualDebitCardAttributes - * @throws IOException if the JSON string is invalid with respect to CreateIndividualDebitCardAttributes - */ - public static CreateIndividualDebitCardAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateIndividualDebitCardAttributes.class); - } - - /** - * Convert an instance of CreateIndividualDebitCardAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateIndividualVirtualDebitCard.java b/src/main/java/org/openapitools/client/model/CreateIndividualVirtualDebitCard.java deleted file mode 100644 index b421bc66..00000000 --- a/src/main/java/org/openapitools/client/model/CreateIndividualVirtualDebitCard.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateCardRelationships; -import org.openapitools.client.model.CreateIndividualVirtualDebitCardAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateIndividualVirtualDebitCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateIndividualVirtualDebitCard { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - INDIVIDUALVIRTUALDEBITCARD("individualVirtualDebitCard"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type = TypeEnum.INDIVIDUALVIRTUALDEBITCARD; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateIndividualVirtualDebitCardAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateCardRelationships relationships; - - public CreateIndividualVirtualDebitCard() { - } - - public CreateIndividualVirtualDebitCard type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CreateIndividualVirtualDebitCard attributes(CreateIndividualVirtualDebitCardAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateIndividualVirtualDebitCardAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateIndividualVirtualDebitCardAttributes attributes) { - this.attributes = attributes; - } - - - public CreateIndividualVirtualDebitCard relationships(CreateCardRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateCardRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateCardRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateIndividualVirtualDebitCard createIndividualVirtualDebitCard = (CreateIndividualVirtualDebitCard) o; - return Objects.equals(this.type, createIndividualVirtualDebitCard.type) && - Objects.equals(this.attributes, createIndividualVirtualDebitCard.attributes) && - Objects.equals(this.relationships, createIndividualVirtualDebitCard.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateIndividualVirtualDebitCard {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateIndividualVirtualDebitCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateIndividualVirtualDebitCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateIndividualVirtualDebitCard is not found in the empty JSON string", CreateIndividualVirtualDebitCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateIndividualVirtualDebitCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateIndividualVirtualDebitCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateIndividualVirtualDebitCard.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateIndividualVirtualDebitCardAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateCardRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateIndividualVirtualDebitCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateIndividualVirtualDebitCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateIndividualVirtualDebitCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateIndividualVirtualDebitCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateIndividualVirtualDebitCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateIndividualVirtualDebitCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateIndividualVirtualDebitCard - * @throws IOException if the JSON string is invalid with respect to CreateIndividualVirtualDebitCard - */ - public static CreateIndividualVirtualDebitCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateIndividualVirtualDebitCard.class); - } - - /** - * Convert an instance of CreateIndividualVirtualDebitCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateIndividualVirtualDebitCardAttributes.java b/src/main/java/org/openapitools/client/model/CreateIndividualVirtualDebitCardAttributes.java deleted file mode 100644 index e55e25d5..00000000 --- a/src/main/java/org/openapitools/client/model/CreateIndividualVirtualDebitCardAttributes.java +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.BIN; -import org.openapitools.client.model.CardLevelLimits; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateIndividualVirtualDebitCardAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateIndividualVirtualDebitCardAttributes { - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_LIMITS = "limits"; - @SerializedName(SERIALIZED_NAME_LIMITS) - private CardLevelLimits limits; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_BIN = "bin"; - @SerializedName(SERIALIZED_NAME_BIN) - private BIN bin; - - public static final String SERIALIZED_NAME_CARD_QUALIFIER = "cardQualifier"; - @SerializedName(SERIALIZED_NAME_CARD_QUALIFIER) - private String cardQualifier; - - public static final String SERIALIZED_NAME_EXPIRY_DATE = "expiryDate"; - @SerializedName(SERIALIZED_NAME_EXPIRY_DATE) - private String expiryDate; - - public CreateIndividualVirtualDebitCardAttributes() { - } - - public CreateIndividualVirtualDebitCardAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateIndividualVirtualDebitCardAttributes limits(CardLevelLimits limits) { - - this.limits = limits; - return this; - } - - /** - * Get limits - * @return limits - **/ - @javax.annotation.Nullable - public CardLevelLimits getLimits() { - return limits; - } - - - public void setLimits(CardLevelLimits limits) { - this.limits = limits; - } - - - public CreateIndividualVirtualDebitCardAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateIndividualVirtualDebitCardAttributes bin(BIN bin) { - - this.bin = bin; - return this; - } - - /** - * Get bin - * @return bin - **/ - @javax.annotation.Nullable - public BIN getBin() { - return bin; - } - - - public void setBin(BIN bin) { - this.bin = bin; - } - - - public CreateIndividualVirtualDebitCardAttributes cardQualifier(String cardQualifier) { - - this.cardQualifier = cardQualifier; - return this; - } - - /** - * Get cardQualifier - * @return cardQualifier - **/ - @javax.annotation.Nullable - public String getCardQualifier() { - return cardQualifier; - } - - - public void setCardQualifier(String cardQualifier) { - this.cardQualifier = cardQualifier; - } - - - public CreateIndividualVirtualDebitCardAttributes expiryDate(String expiryDate) { - - this.expiryDate = expiryDate; - return this; - } - - /** - * Get expiryDate - * @return expiryDate - **/ - @javax.annotation.Nullable - public String getExpiryDate() { - return expiryDate; - } - - - public void setExpiryDate(String expiryDate) { - this.expiryDate = expiryDate; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateIndividualVirtualDebitCardAttributes createIndividualVirtualDebitCardAttributes = (CreateIndividualVirtualDebitCardAttributes) o; - return Objects.equals(this.tags, createIndividualVirtualDebitCardAttributes.tags) && - Objects.equals(this.limits, createIndividualVirtualDebitCardAttributes.limits) && - Objects.equals(this.idempotencyKey, createIndividualVirtualDebitCardAttributes.idempotencyKey) && - Objects.equals(this.bin, createIndividualVirtualDebitCardAttributes.bin) && - Objects.equals(this.cardQualifier, createIndividualVirtualDebitCardAttributes.cardQualifier) && - Objects.equals(this.expiryDate, createIndividualVirtualDebitCardAttributes.expiryDate); - } - - @Override - public int hashCode() { - return Objects.hash(tags, limits, idempotencyKey, bin, cardQualifier, expiryDate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateIndividualVirtualDebitCardAttributes {\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" bin: ").append(toIndentedString(bin)).append("\n"); - sb.append(" cardQualifier: ").append(toIndentedString(cardQualifier)).append("\n"); - sb.append(" expiryDate: ").append(toIndentedString(expiryDate)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tags"); - openapiFields.add("limits"); - openapiFields.add("idempotencyKey"); - openapiFields.add("bin"); - openapiFields.add("cardQualifier"); - openapiFields.add("expiryDate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateIndividualVirtualDebitCardAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateIndividualVirtualDebitCardAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateIndividualVirtualDebitCardAttributes is not found in the empty JSON string", CreateIndividualVirtualDebitCardAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateIndividualVirtualDebitCardAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateIndividualVirtualDebitCardAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `limits` - if (jsonObj.get("limits") != null && !jsonObj.get("limits").isJsonNull()) { - CardLevelLimits.validateJsonElement(jsonObj.get("limits")); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - // validate the optional field `bin` - if (jsonObj.get("bin") != null && !jsonObj.get("bin").isJsonNull()) { - BIN.validateJsonElement(jsonObj.get("bin")); - } - if ((jsonObj.get("cardQualifier") != null && !jsonObj.get("cardQualifier").isJsonNull()) && !jsonObj.get("cardQualifier").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardQualifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardQualifier").toString())); - } - if ((jsonObj.get("expiryDate") != null && !jsonObj.get("expiryDate").isJsonNull()) && !jsonObj.get("expiryDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `expiryDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expiryDate").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateIndividualVirtualDebitCardAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateIndividualVirtualDebitCardAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateIndividualVirtualDebitCardAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateIndividualVirtualDebitCardAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateIndividualVirtualDebitCardAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateIndividualVirtualDebitCardAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateIndividualVirtualDebitCardAttributes - * @throws IOException if the JSON string is invalid with respect to CreateIndividualVirtualDebitCardAttributes - */ - public static CreateIndividualVirtualDebitCardAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateIndividualVirtualDebitCardAttributes.class); - } - - /** - * Convert an instance of CreateIndividualVirtualDebitCardAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateOfficer.java b/src/main/java/org/openapitools/client/model/CreateOfficer.java deleted file mode 100644 index 93f72a8a..00000000 --- a/src/main/java/org/openapitools/client/model/CreateOfficer.java +++ /dev/null @@ -1,689 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.Arrays; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.AnnualIncome; -import org.openapitools.client.model.EvaluationParams; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Occupation; -import org.openapitools.client.model.Phone; -import org.openapitools.client.model.SourceOfIncome; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateOfficer - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateOfficer { - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_MATRICULA_CONSULAR = "matriculaConsular"; - @SerializedName(SERIALIZED_NAME_MATRICULA_CONSULAR) - private String matriculaConsular; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - /** - * Gets or Sets title - */ - @JsonAdapter(TitleEnum.Adapter.class) - public enum TitleEnum { - PRESIDENT("President"), - - CEO("CEO"), - - COO("COO"), - - CFO("CFO"), - - BENEFITSADMINISTRATIONOFFICER("BenefitsAdministrationOfficer"), - - CIO("CIO"), - - VP("VP"), - - AVP("AVP"), - - TREASURER("Treasurer"), - - SECRETARY("Secretary"), - - CONTROLLER("Controller"), - - MANAGER("Manager"), - - PARTNER("Partner"), - - MEMBER("Member"); - - private String value; - - TitleEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TitleEnum fromValue(String value) { - for (TitleEnum b : TitleEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TitleEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TitleEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TitleEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TITLE = "title"; - @SerializedName(SERIALIZED_NAME_TITLE) - private TitleEnum title; - - public static final String SERIALIZED_NAME_EVALUATION_PARAMS = "evaluationParams"; - @SerializedName(SERIALIZED_NAME_EVALUATION_PARAMS) - private EvaluationParams evaluationParams; - - public static final String SERIALIZED_NAME_OCCUPATION = "occupation"; - @SerializedName(SERIALIZED_NAME_OCCUPATION) - private Occupation occupation; - - public static final String SERIALIZED_NAME_ANNUAL_INCOME = "annualIncome"; - @SerializedName(SERIALIZED_NAME_ANNUAL_INCOME) - private AnnualIncome annualIncome; - - public static final String SERIALIZED_NAME_SOURCE_OF_INCOME = "sourceOfIncome"; - @SerializedName(SERIALIZED_NAME_SOURCE_OF_INCOME) - private SourceOfIncome sourceOfIncome; - - public CreateOfficer() { - } - - public CreateOfficer fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nonnull - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public CreateOfficer email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nonnull - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public CreateOfficer phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nonnull - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public CreateOfficer ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public CreateOfficer passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public CreateOfficer nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public CreateOfficer matriculaConsular(String matriculaConsular) { - - this.matriculaConsular = matriculaConsular; - return this; - } - - /** - * Get matriculaConsular - * @return matriculaConsular - **/ - @javax.annotation.Nullable - public String getMatriculaConsular() { - return matriculaConsular; - } - - - public void setMatriculaConsular(String matriculaConsular) { - this.matriculaConsular = matriculaConsular; - } - - - public CreateOfficer address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nonnull - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public CreateOfficer dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nonnull - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public CreateOfficer title(TitleEnum title) { - - this.title = title; - return this; - } - - /** - * Get title - * @return title - **/ - @javax.annotation.Nullable - public TitleEnum getTitle() { - return title; - } - - - public void setTitle(TitleEnum title) { - this.title = title; - } - - - public CreateOfficer evaluationParams(EvaluationParams evaluationParams) { - - this.evaluationParams = evaluationParams; - return this; - } - - /** - * Get evaluationParams - * @return evaluationParams - **/ - @javax.annotation.Nullable - public EvaluationParams getEvaluationParams() { - return evaluationParams; - } - - - public void setEvaluationParams(EvaluationParams evaluationParams) { - this.evaluationParams = evaluationParams; - } - - - public CreateOfficer occupation(Occupation occupation) { - - this.occupation = occupation; - return this; - } - - /** - * Get occupation - * @return occupation - **/ - @javax.annotation.Nonnull - public Occupation getOccupation() { - return occupation; - } - - - public void setOccupation(Occupation occupation) { - this.occupation = occupation; - } - - - public CreateOfficer annualIncome(AnnualIncome annualIncome) { - - this.annualIncome = annualIncome; - return this; - } - - /** - * Get annualIncome - * @return annualIncome - **/ - @javax.annotation.Nullable - public AnnualIncome getAnnualIncome() { - return annualIncome; - } - - - public void setAnnualIncome(AnnualIncome annualIncome) { - this.annualIncome = annualIncome; - } - - - public CreateOfficer sourceOfIncome(SourceOfIncome sourceOfIncome) { - - this.sourceOfIncome = sourceOfIncome; - return this; - } - - /** - * Get sourceOfIncome - * @return sourceOfIncome - **/ - @javax.annotation.Nullable - public SourceOfIncome getSourceOfIncome() { - return sourceOfIncome; - } - - - public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { - this.sourceOfIncome = sourceOfIncome; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateOfficer createOfficer = (CreateOfficer) o; - return Objects.equals(this.fullName, createOfficer.fullName) && - Objects.equals(this.email, createOfficer.email) && - Objects.equals(this.phone, createOfficer.phone) && - Objects.equals(this.ssn, createOfficer.ssn) && - Objects.equals(this.passport, createOfficer.passport) && - Objects.equals(this.nationality, createOfficer.nationality) && - Objects.equals(this.matriculaConsular, createOfficer.matriculaConsular) && - Objects.equals(this.address, createOfficer.address) && - Objects.equals(this.dateOfBirth, createOfficer.dateOfBirth) && - Objects.equals(this.title, createOfficer.title) && - Objects.equals(this.evaluationParams, createOfficer.evaluationParams) && - Objects.equals(this.occupation, createOfficer.occupation) && - Objects.equals(this.annualIncome, createOfficer.annualIncome) && - Objects.equals(this.sourceOfIncome, createOfficer.sourceOfIncome); - } - - @Override - public int hashCode() { - return Objects.hash(fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, title, evaluationParams, occupation, annualIncome, sourceOfIncome); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateOfficer {\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" evaluationParams: ").append(toIndentedString(evaluationParams)).append("\n"); - sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); - sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); - sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fullName"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("nationality"); - openapiFields.add("matriculaConsular"); - openapiFields.add("address"); - openapiFields.add("dateOfBirth"); - openapiFields.add("title"); - openapiFields.add("evaluationParams"); - openapiFields.add("occupation"); - openapiFields.add("annualIncome"); - openapiFields.add("sourceOfIncome"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("fullName"); - openapiRequiredFields.add("email"); - openapiRequiredFields.add("phone"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("dateOfBirth"); - openapiRequiredFields.add("occupation"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateOfficer - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateOfficer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateOfficer is not found in the empty JSON string", CreateOfficer.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateOfficer.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateOfficer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateOfficer.openapiRequiredFields) { - 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(); - // validate the required field `fullName` - FullName.validateJsonElement(jsonObj.get("fullName")); - if (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the required field `phone` - Phone.validateJsonElement(jsonObj.get("phone")); - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - if ((jsonObj.get("matriculaConsular") != null && !jsonObj.get("matriculaConsular").isJsonNull()) && !jsonObj.get("matriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `matriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("matriculaConsular").toString())); - } - // validate the required field `address` - Address.validateJsonElement(jsonObj.get("address")); - if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); - } - // validate the optional field `evaluationParams` - if (jsonObj.get("evaluationParams") != null && !jsonObj.get("evaluationParams").isJsonNull()) { - EvaluationParams.validateJsonElement(jsonObj.get("evaluationParams")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateOfficer.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateOfficer' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateOfficer.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateOfficer value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateOfficer read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateOfficer given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateOfficer - * @throws IOException if the JSON string is invalid with respect to CreateOfficer - */ - public static CreateOfficer fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateOfficer.class); - } - - /** - * Convert an instance of CreateOfficer to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreatePayment.java b/src/main/java/org/openapitools/client/model/CreatePayment.java deleted file mode 100644 index de7f9299..00000000 --- a/src/main/java/org/openapitools/client/model/CreatePayment.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreatePaymentData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreatePayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreatePayment { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreatePaymentData data; - - public CreatePayment() { - } - - public CreatePayment data(CreatePaymentData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreatePaymentData getData() { - return data; - } - - - public void setData(CreatePaymentData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePayment createPayment = (CreatePayment) o; - return Objects.equals(this.data, createPayment.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreatePayment {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreatePayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreatePayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreatePayment is not found in the empty JSON string", CreatePayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreatePayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreatePayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreatePaymentData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreatePayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreatePayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreatePayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreatePayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreatePayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreatePayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreatePayment - * @throws IOException if the JSON string is invalid with respect to CreatePayment - */ - public static CreatePayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreatePayment.class); - } - - /** - * Convert an instance of CreatePayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreatePaymentData.java b/src/main/java/org/openapitools/client/model/CreatePaymentData.java deleted file mode 100644 index d613af0c..00000000 --- a/src/main/java/org/openapitools/client/model/CreatePaymentData.java +++ /dev/null @@ -1,525 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateAchPayment; -import org.openapitools.client.model.CreateAchPaymentCounterparty; -import org.openapitools.client.model.CreateAchPaymentPlaid; -import org.openapitools.client.model.CreateAchPaymentRelationships; -import org.openapitools.client.model.CreateBillPayment; -import org.openapitools.client.model.CreateBookPayment; -import org.openapitools.client.model.CreatePushToCardPayment; -import org.openapitools.client.model.CreatePushToCardPaymentAttributes; -import org.openapitools.client.model.CreateWirePayment; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -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 com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import org.openapitools.client.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreatePaymentData extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(CreatePaymentData.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreatePaymentData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreatePaymentData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterCreateAchPayment = gson.getDelegateAdapter(this, TypeToken.get(CreateAchPayment.class)); - final TypeAdapter adapterCreateAchPaymentCounterparty = gson.getDelegateAdapter(this, TypeToken.get(CreateAchPaymentCounterparty.class)); - final TypeAdapter adapterCreateAchPaymentPlaid = gson.getDelegateAdapter(this, TypeToken.get(CreateAchPaymentPlaid.class)); - final TypeAdapter adapterCreateBookPayment = gson.getDelegateAdapter(this, TypeToken.get(CreateBookPayment.class)); - final TypeAdapter adapterCreateWirePayment = gson.getDelegateAdapter(this, TypeToken.get(CreateWirePayment.class)); - final TypeAdapter adapterCreateBillPayment = gson.getDelegateAdapter(this, TypeToken.get(CreateBillPayment.class)); - final TypeAdapter adapterCreatePushToCardPayment = gson.getDelegateAdapter(this, TypeToken.get(CreatePushToCardPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreatePaymentData value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `CreateAchPayment` - if (value.getActualInstance() instanceof CreateAchPayment) { - JsonElement element = adapterCreateAchPayment.toJsonTree((CreateAchPayment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateAchPaymentCounterparty` - if (value.getActualInstance() instanceof CreateAchPaymentCounterparty) { - JsonElement element = adapterCreateAchPaymentCounterparty.toJsonTree((CreateAchPaymentCounterparty)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateAchPaymentPlaid` - if (value.getActualInstance() instanceof CreateAchPaymentPlaid) { - JsonElement element = adapterCreateAchPaymentPlaid.toJsonTree((CreateAchPaymentPlaid)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateBookPayment` - if (value.getActualInstance() instanceof CreateBookPayment) { - JsonElement element = adapterCreateBookPayment.toJsonTree((CreateBookPayment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateWirePayment` - if (value.getActualInstance() instanceof CreateWirePayment) { - JsonElement element = adapterCreateWirePayment.toJsonTree((CreateWirePayment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateBillPayment` - if (value.getActualInstance() instanceof CreateBillPayment) { - JsonElement element = adapterCreateBillPayment.toJsonTree((CreateBillPayment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreatePushToCardPayment` - if (value.getActualInstance() instanceof CreatePushToCardPayment) { - JsonElement element = adapterCreatePushToCardPayment.toJsonTree((CreatePushToCardPayment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment"); - } - - @Override - public CreatePaymentData read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize CreateAchPayment - try { - // validate the JSON object to see if any exception is thrown - CreateAchPayment.validateJsonElement(jsonElement); - actualAdapter = adapterCreateAchPayment; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateAchPayment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateAchPayment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateAchPayment'", e); - } - // deserialize CreateAchPaymentCounterparty - try { - // validate the JSON object to see if any exception is thrown - CreateAchPaymentCounterparty.validateJsonElement(jsonElement); - actualAdapter = adapterCreateAchPaymentCounterparty; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateAchPaymentCounterparty'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateAchPaymentCounterparty failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateAchPaymentCounterparty'", e); - } - // deserialize CreateAchPaymentPlaid - try { - // validate the JSON object to see if any exception is thrown - CreateAchPaymentPlaid.validateJsonElement(jsonElement); - actualAdapter = adapterCreateAchPaymentPlaid; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateAchPaymentPlaid'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateAchPaymentPlaid failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateAchPaymentPlaid'", e); - } - // deserialize CreateBookPayment - try { - // validate the JSON object to see if any exception is thrown - CreateBookPayment.validateJsonElement(jsonElement); - actualAdapter = adapterCreateBookPayment; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateBookPayment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateBookPayment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateBookPayment'", e); - } - // deserialize CreateWirePayment - try { - // validate the JSON object to see if any exception is thrown - CreateWirePayment.validateJsonElement(jsonElement); - actualAdapter = adapterCreateWirePayment; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateWirePayment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateWirePayment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateWirePayment'", e); - } - // deserialize CreateBillPayment - try { - // validate the JSON object to see if any exception is thrown - CreateBillPayment.validateJsonElement(jsonElement); - actualAdapter = adapterCreateBillPayment; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateBillPayment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateBillPayment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateBillPayment'", e); - } - // deserialize CreatePushToCardPayment - try { - // validate the JSON object to see if any exception is thrown - CreatePushToCardPayment.validateJsonElement(jsonElement); - actualAdapter = adapterCreatePushToCardPayment; - match++; - log.log(Level.FINER, "Input data matches schema 'CreatePushToCardPayment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreatePushToCardPayment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreatePushToCardPayment'", e); - } - - if (match == 1) { - CreatePaymentData ret = new CreatePaymentData(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for CreatePaymentData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public CreatePaymentData() { - super("oneOf", Boolean.FALSE); - } - - public CreatePaymentData(CreateAchPayment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreatePaymentData(CreateAchPaymentCounterparty o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreatePaymentData(CreateAchPaymentPlaid o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreatePaymentData(CreateBillPayment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreatePaymentData(CreateBookPayment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreatePaymentData(CreatePushToCardPayment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreatePaymentData(CreateWirePayment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("CreateAchPayment", CreateAchPayment.class); - schemas.put("CreateAchPaymentCounterparty", CreateAchPaymentCounterparty.class); - schemas.put("CreateAchPaymentPlaid", CreateAchPaymentPlaid.class); - schemas.put("CreateBookPayment", CreateBookPayment.class); - schemas.put("CreateWirePayment", CreateWirePayment.class); - schemas.put("CreateBillPayment", CreateBillPayment.class); - schemas.put("CreatePushToCardPayment", CreatePushToCardPayment.class); - } - - @Override - public Map> getSchemas() { - return CreatePaymentData.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof CreateAchPayment) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateAchPaymentCounterparty) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateAchPaymentPlaid) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateBookPayment) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateWirePayment) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateBillPayment) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreatePushToCardPayment) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment"); - } - - /** - * Get the actual instance, which can be the following: - * CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment - * - * @return The actual instance (CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `CreateAchPayment`. If the actual instance is not `CreateAchPayment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateAchPayment` - * @throws ClassCastException if the instance is not `CreateAchPayment` - */ - public CreateAchPayment getCreateAchPayment() throws ClassCastException { - return (CreateAchPayment)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateAchPaymentCounterparty`. If the actual instance is not `CreateAchPaymentCounterparty`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateAchPaymentCounterparty` - * @throws ClassCastException if the instance is not `CreateAchPaymentCounterparty` - */ - public CreateAchPaymentCounterparty getCreateAchPaymentCounterparty() throws ClassCastException { - return (CreateAchPaymentCounterparty)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateAchPaymentPlaid`. If the actual instance is not `CreateAchPaymentPlaid`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateAchPaymentPlaid` - * @throws ClassCastException if the instance is not `CreateAchPaymentPlaid` - */ - public CreateAchPaymentPlaid getCreateAchPaymentPlaid() throws ClassCastException { - return (CreateAchPaymentPlaid)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateBookPayment`. If the actual instance is not `CreateBookPayment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateBookPayment` - * @throws ClassCastException if the instance is not `CreateBookPayment` - */ - public CreateBookPayment getCreateBookPayment() throws ClassCastException { - return (CreateBookPayment)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateWirePayment`. If the actual instance is not `CreateWirePayment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateWirePayment` - * @throws ClassCastException if the instance is not `CreateWirePayment` - */ - public CreateWirePayment getCreateWirePayment() throws ClassCastException { - return (CreateWirePayment)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateBillPayment`. If the actual instance is not `CreateBillPayment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateBillPayment` - * @throws ClassCastException if the instance is not `CreateBillPayment` - */ - public CreateBillPayment getCreateBillPayment() throws ClassCastException { - return (CreateBillPayment)super.getActualInstance(); - } - /** - * Get the actual instance of `CreatePushToCardPayment`. If the actual instance is not `CreatePushToCardPayment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreatePushToCardPayment` - * @throws ClassCastException if the instance is not `CreatePushToCardPayment` - */ - public CreatePushToCardPayment getCreatePushToCardPayment() throws ClassCastException { - return (CreatePushToCardPayment)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreatePaymentData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with CreateAchPayment - try { - CreateAchPayment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateAchPayment failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateAchPaymentCounterparty - try { - CreateAchPaymentCounterparty.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateAchPaymentCounterparty failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateAchPaymentPlaid - try { - CreateAchPaymentPlaid.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateAchPaymentPlaid failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateBookPayment - try { - CreateBookPayment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateBookPayment failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateWirePayment - try { - CreateWirePayment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateWirePayment failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateBillPayment - try { - CreateBillPayment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateBillPayment failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreatePushToCardPayment - try { - CreatePushToCardPayment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreatePushToCardPayment failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for CreatePaymentData with oneOf schemas: CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of CreatePaymentData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreatePaymentData - * @throws IOException if the JSON string is invalid with respect to CreatePaymentData - */ - public static CreatePaymentData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreatePaymentData.class); - } - - /** - * Convert an instance of CreatePaymentData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreatePlaidCounterparty.java b/src/main/java/org/openapitools/client/model/CreatePlaidCounterparty.java deleted file mode 100644 index ce9efcbc..00000000 --- a/src/main/java/org/openapitools/client/model/CreatePlaidCounterparty.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateCounterpartyRelationships; -import org.openapitools.client.model.CreatePlaidCounterpartyAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreatePlaidCounterparty - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreatePlaidCounterparty { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreatePlaidCounterpartyAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateCounterpartyRelationships relationships; - - public CreatePlaidCounterparty() { - } - - public CreatePlaidCounterparty type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreatePlaidCounterparty attributes(CreatePlaidCounterpartyAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreatePlaidCounterpartyAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreatePlaidCounterpartyAttributes attributes) { - this.attributes = attributes; - } - - - public CreatePlaidCounterparty relationships(CreateCounterpartyRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateCounterpartyRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateCounterpartyRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePlaidCounterparty createPlaidCounterparty = (CreatePlaidCounterparty) o; - return Objects.equals(this.type, createPlaidCounterparty.type) && - Objects.equals(this.attributes, createPlaidCounterparty.attributes) && - Objects.equals(this.relationships, createPlaidCounterparty.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreatePlaidCounterparty {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreatePlaidCounterparty - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreatePlaidCounterparty.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreatePlaidCounterparty is not found in the empty JSON string", CreatePlaidCounterparty.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreatePlaidCounterparty.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreatePlaidCounterparty` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreatePlaidCounterparty.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreatePlaidCounterpartyAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateCounterpartyRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreatePlaidCounterparty.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreatePlaidCounterparty' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreatePlaidCounterparty.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreatePlaidCounterparty value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreatePlaidCounterparty read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreatePlaidCounterparty given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreatePlaidCounterparty - * @throws IOException if the JSON string is invalid with respect to CreatePlaidCounterparty - */ - public static CreatePlaidCounterparty fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreatePlaidCounterparty.class); - } - - /** - * Convert an instance of CreatePlaidCounterparty to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreatePlaidCounterpartyAttributes.java b/src/main/java/org/openapitools/client/model/CreatePlaidCounterpartyAttributes.java deleted file mode 100644 index 7037ecb0..00000000 --- a/src/main/java/org/openapitools/client/model/CreatePlaidCounterpartyAttributes.java +++ /dev/null @@ -1,495 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreatePlaidCounterpartyAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreatePlaidCounterpartyAttributes { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - BUSINESS("Business"), - - PERSON("Person"), - - UNKNOWN("Unknown"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_VERIFY_NAME = "verifyName"; - @SerializedName(SERIALIZED_NAME_VERIFY_NAME) - private Boolean verifyName = false; - - public static final String SERIALIZED_NAME_PLAID_PROCESSOR_TOKEN = "plaidProcessorToken"; - @SerializedName(SERIALIZED_NAME_PLAID_PROCESSOR_TOKEN) - private String plaidProcessorToken; - - /** - * Gets or Sets permissions - */ - @JsonAdapter(PermissionsEnum.Adapter.class) - public enum PermissionsEnum { - CREDITONLY("CreditOnly"), - - DEBITONLY("DebitOnly"), - - CREDITANDDEBIT("CreditAndDebit"); - - private String value; - - PermissionsEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PermissionsEnum fromValue(String value) { - for (PermissionsEnum b : PermissionsEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PermissionsEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PermissionsEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PermissionsEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; - @SerializedName(SERIALIZED_NAME_PERMISSIONS) - private PermissionsEnum permissions; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public CreatePlaidCounterpartyAttributes() { - } - - public CreatePlaidCounterpartyAttributes type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CreatePlaidCounterpartyAttributes name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public CreatePlaidCounterpartyAttributes verifyName(Boolean verifyName) { - - this.verifyName = verifyName; - return this; - } - - /** - * Get verifyName - * @return verifyName - **/ - @javax.annotation.Nullable - public Boolean getVerifyName() { - return verifyName; - } - - - public void setVerifyName(Boolean verifyName) { - this.verifyName = verifyName; - } - - - public CreatePlaidCounterpartyAttributes plaidProcessorToken(String plaidProcessorToken) { - - this.plaidProcessorToken = plaidProcessorToken; - return this; - } - - /** - * Get plaidProcessorToken - * @return plaidProcessorToken - **/ - @javax.annotation.Nonnull - public String getPlaidProcessorToken() { - return plaidProcessorToken; - } - - - public void setPlaidProcessorToken(String plaidProcessorToken) { - this.plaidProcessorToken = plaidProcessorToken; - } - - - public CreatePlaidCounterpartyAttributes permissions(PermissionsEnum permissions) { - - this.permissions = permissions; - return this; - } - - /** - * Get permissions - * @return permissions - **/ - @javax.annotation.Nullable - public PermissionsEnum getPermissions() { - return permissions; - } - - - public void setPermissions(PermissionsEnum permissions) { - this.permissions = permissions; - } - - - public CreatePlaidCounterpartyAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreatePlaidCounterpartyAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePlaidCounterpartyAttributes createPlaidCounterpartyAttributes = (CreatePlaidCounterpartyAttributes) o; - return Objects.equals(this.type, createPlaidCounterpartyAttributes.type) && - Objects.equals(this.name, createPlaidCounterpartyAttributes.name) && - Objects.equals(this.verifyName, createPlaidCounterpartyAttributes.verifyName) && - Objects.equals(this.plaidProcessorToken, createPlaidCounterpartyAttributes.plaidProcessorToken) && - Objects.equals(this.permissions, createPlaidCounterpartyAttributes.permissions) && - Objects.equals(this.tags, createPlaidCounterpartyAttributes.tags) && - Objects.equals(this.idempotencyKey, createPlaidCounterpartyAttributes.idempotencyKey); - } - - @Override - public int hashCode() { - return Objects.hash(type, name, verifyName, plaidProcessorToken, permissions, tags, idempotencyKey); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreatePlaidCounterpartyAttributes {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" verifyName: ").append(toIndentedString(verifyName)).append("\n"); - sb.append(" plaidProcessorToken: ").append(toIndentedString(plaidProcessorToken)).append("\n"); - sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("name"); - openapiFields.add("verifyName"); - openapiFields.add("plaidProcessorToken"); - openapiFields.add("permissions"); - openapiFields.add("tags"); - openapiFields.add("idempotencyKey"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("plaidProcessorToken"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreatePlaidCounterpartyAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreatePlaidCounterpartyAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreatePlaidCounterpartyAttributes is not found in the empty JSON string", CreatePlaidCounterpartyAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreatePlaidCounterpartyAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreatePlaidCounterpartyAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreatePlaidCounterpartyAttributes.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if (!jsonObj.get("plaidProcessorToken").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plaidProcessorToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plaidProcessorToken").toString())); - } - if ((jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonNull()) && !jsonObj.get("permissions").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `permissions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("permissions").toString())); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreatePlaidCounterpartyAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreatePlaidCounterpartyAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreatePlaidCounterpartyAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreatePlaidCounterpartyAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreatePlaidCounterpartyAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreatePlaidCounterpartyAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreatePlaidCounterpartyAttributes - * @throws IOException if the JSON string is invalid with respect to CreatePlaidCounterpartyAttributes - */ - public static CreatePlaidCounterpartyAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreatePlaidCounterpartyAttributes.class); - } - - /** - * Convert an instance of CreatePlaidCounterpartyAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreatePowerOfAttorneyAgent.java b/src/main/java/org/openapitools/client/model/CreatePowerOfAttorneyAgent.java deleted file mode 100644 index 715e22ab..00000000 --- a/src/main/java/org/openapitools/client/model/CreatePowerOfAttorneyAgent.java +++ /dev/null @@ -1,542 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.Arrays; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.EvaluationParams; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Phone; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreatePowerOfAttorneyAgent - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreatePowerOfAttorneyAgent { - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_MATRICULA_CONSULAR = "matriculaConsular"; - @SerializedName(SERIALIZED_NAME_MATRICULA_CONSULAR) - private String matriculaConsular; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public static final String SERIALIZED_NAME_JWT_SUBJECT = "jwtSubject"; - @SerializedName(SERIALIZED_NAME_JWT_SUBJECT) - private String jwtSubject; - - public static final String SERIALIZED_NAME_EVALUATION_PARAMS = "evaluationParams"; - @SerializedName(SERIALIZED_NAME_EVALUATION_PARAMS) - private EvaluationParams evaluationParams; - - public CreatePowerOfAttorneyAgent() { - } - - public CreatePowerOfAttorneyAgent fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nonnull - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public CreatePowerOfAttorneyAgent email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nonnull - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public CreatePowerOfAttorneyAgent phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nonnull - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public CreatePowerOfAttorneyAgent ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public CreatePowerOfAttorneyAgent passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public CreatePowerOfAttorneyAgent nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public CreatePowerOfAttorneyAgent matriculaConsular(String matriculaConsular) { - - this.matriculaConsular = matriculaConsular; - return this; - } - - /** - * Get matriculaConsular - * @return matriculaConsular - **/ - @javax.annotation.Nullable - public String getMatriculaConsular() { - return matriculaConsular; - } - - - public void setMatriculaConsular(String matriculaConsular) { - this.matriculaConsular = matriculaConsular; - } - - - public CreatePowerOfAttorneyAgent address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nonnull - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public CreatePowerOfAttorneyAgent dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nonnull - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public CreatePowerOfAttorneyAgent jwtSubject(String jwtSubject) { - - this.jwtSubject = jwtSubject; - return this; - } - - /** - * Get jwtSubject - * @return jwtSubject - **/ - @javax.annotation.Nullable - public String getJwtSubject() { - return jwtSubject; - } - - - public void setJwtSubject(String jwtSubject) { - this.jwtSubject = jwtSubject; - } - - - public CreatePowerOfAttorneyAgent evaluationParams(EvaluationParams evaluationParams) { - - this.evaluationParams = evaluationParams; - return this; - } - - /** - * Get evaluationParams - * @return evaluationParams - **/ - @javax.annotation.Nullable - public EvaluationParams getEvaluationParams() { - return evaluationParams; - } - - - public void setEvaluationParams(EvaluationParams evaluationParams) { - this.evaluationParams = evaluationParams; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePowerOfAttorneyAgent createPowerOfAttorneyAgent = (CreatePowerOfAttorneyAgent) o; - return Objects.equals(this.fullName, createPowerOfAttorneyAgent.fullName) && - Objects.equals(this.email, createPowerOfAttorneyAgent.email) && - Objects.equals(this.phone, createPowerOfAttorneyAgent.phone) && - Objects.equals(this.ssn, createPowerOfAttorneyAgent.ssn) && - Objects.equals(this.passport, createPowerOfAttorneyAgent.passport) && - Objects.equals(this.nationality, createPowerOfAttorneyAgent.nationality) && - Objects.equals(this.matriculaConsular, createPowerOfAttorneyAgent.matriculaConsular) && - Objects.equals(this.address, createPowerOfAttorneyAgent.address) && - Objects.equals(this.dateOfBirth, createPowerOfAttorneyAgent.dateOfBirth) && - Objects.equals(this.jwtSubject, createPowerOfAttorneyAgent.jwtSubject) && - Objects.equals(this.evaluationParams, createPowerOfAttorneyAgent.evaluationParams); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, jwtSubject, evaluationParams); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreatePowerOfAttorneyAgent {\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); - sb.append(" evaluationParams: ").append(toIndentedString(evaluationParams)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fullName"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("nationality"); - openapiFields.add("matriculaConsular"); - openapiFields.add("address"); - openapiFields.add("dateOfBirth"); - openapiFields.add("jwtSubject"); - openapiFields.add("evaluationParams"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("fullName"); - openapiRequiredFields.add("email"); - openapiRequiredFields.add("phone"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("dateOfBirth"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreatePowerOfAttorneyAgent - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreatePowerOfAttorneyAgent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreatePowerOfAttorneyAgent is not found in the empty JSON string", CreatePowerOfAttorneyAgent.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreatePowerOfAttorneyAgent.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreatePowerOfAttorneyAgent` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreatePowerOfAttorneyAgent.openapiRequiredFields) { - 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(); - // validate the required field `fullName` - FullName.validateJsonElement(jsonObj.get("fullName")); - if (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the required field `phone` - Phone.validateJsonElement(jsonObj.get("phone")); - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - if ((jsonObj.get("matriculaConsular") != null && !jsonObj.get("matriculaConsular").isJsonNull()) && !jsonObj.get("matriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `matriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("matriculaConsular").toString())); - } - // validate the required field `address` - Address.validateJsonElement(jsonObj.get("address")); - if ((jsonObj.get("jwtSubject") != null && !jsonObj.get("jwtSubject").isJsonNull()) && !jsonObj.get("jwtSubject").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `jwtSubject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jwtSubject").toString())); - } - // validate the optional field `evaluationParams` - if (jsonObj.get("evaluationParams") != null && !jsonObj.get("evaluationParams").isJsonNull()) { - EvaluationParams.validateJsonElement(jsonObj.get("evaluationParams")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreatePowerOfAttorneyAgent.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreatePowerOfAttorneyAgent' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreatePowerOfAttorneyAgent.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreatePowerOfAttorneyAgent value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreatePowerOfAttorneyAgent read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreatePowerOfAttorneyAgent given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreatePowerOfAttorneyAgent - * @throws IOException if the JSON string is invalid with respect to CreatePowerOfAttorneyAgent - */ - public static CreatePowerOfAttorneyAgent fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreatePowerOfAttorneyAgent.class); - } - - /** - * Convert an instance of CreatePowerOfAttorneyAgent to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreatePushToCardPayment.java b/src/main/java/org/openapitools/client/model/CreatePushToCardPayment.java deleted file mode 100644 index b3d989ba..00000000 --- a/src/main/java/org/openapitools/client/model/CreatePushToCardPayment.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateAchPaymentRelationships; -import org.openapitools.client.model.CreatePushToCardPaymentAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreatePushToCardPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreatePushToCardPayment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "pushToCardPayment"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreatePushToCardPaymentAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateAchPaymentRelationships relationships; - - public CreatePushToCardPayment() { - } - - public CreatePushToCardPayment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreatePushToCardPayment attributes(CreatePushToCardPaymentAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreatePushToCardPaymentAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreatePushToCardPaymentAttributes attributes) { - this.attributes = attributes; - } - - - public CreatePushToCardPayment relationships(CreateAchPaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateAchPaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateAchPaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePushToCardPayment createPushToCardPayment = (CreatePushToCardPayment) o; - return Objects.equals(this.type, createPushToCardPayment.type) && - Objects.equals(this.attributes, createPushToCardPayment.attributes) && - Objects.equals(this.relationships, createPushToCardPayment.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreatePushToCardPayment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreatePushToCardPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreatePushToCardPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreatePushToCardPayment is not found in the empty JSON string", CreatePushToCardPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreatePushToCardPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreatePushToCardPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreatePushToCardPayment.openapiRequiredFields) { - 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("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreatePushToCardPaymentAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateAchPaymentRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreatePushToCardPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreatePushToCardPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreatePushToCardPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreatePushToCardPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreatePushToCardPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreatePushToCardPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreatePushToCardPayment - * @throws IOException if the JSON string is invalid with respect to CreatePushToCardPayment - */ - public static CreatePushToCardPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreatePushToCardPayment.class); - } - - /** - * Convert an instance of CreatePushToCardPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreatePushToCardPaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreatePushToCardPaymentAttributes.java deleted file mode 100644 index 551ef853..00000000 --- a/src/main/java/org/openapitools/client/model/CreatePushToCardPaymentAttributes.java +++ /dev/null @@ -1,336 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreatePushToCardPaymentAttributesConfiguration; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreatePushToCardPaymentAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreatePushToCardPaymentAttributes { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_CONFIGURATION = "configuration"; - @SerializedName(SERIALIZED_NAME_CONFIGURATION) - private CreatePushToCardPaymentAttributesConfiguration _configuration; - - public CreatePushToCardPaymentAttributes() { - } - - public CreatePushToCardPaymentAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CreatePushToCardPaymentAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreatePushToCardPaymentAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreatePushToCardPaymentAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public CreatePushToCardPaymentAttributes _configuration(CreatePushToCardPaymentAttributesConfiguration _configuration) { - - this._configuration = _configuration; - return this; - } - - /** - * Get _configuration - * @return _configuration - **/ - @javax.annotation.Nonnull - public CreatePushToCardPaymentAttributesConfiguration getConfiguration() { - return _configuration; - } - - - public void setConfiguration(CreatePushToCardPaymentAttributesConfiguration _configuration) { - this._configuration = _configuration; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePushToCardPaymentAttributes createPushToCardPaymentAttributes = (CreatePushToCardPaymentAttributes) o; - return Objects.equals(this.amount, createPushToCardPaymentAttributes.amount) && - Objects.equals(this.idempotencyKey, createPushToCardPaymentAttributes.idempotencyKey) && - Objects.equals(this.tags, createPushToCardPaymentAttributes.tags) && - Objects.equals(this.description, createPushToCardPaymentAttributes.description) && - Objects.equals(this._configuration, createPushToCardPaymentAttributes._configuration); - } - - @Override - public int hashCode() { - return Objects.hash(amount, idempotencyKey, tags, description, _configuration); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreatePushToCardPaymentAttributes {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("idempotencyKey"); - openapiFields.add("tags"); - openapiFields.add("description"); - openapiFields.add("configuration"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("configuration"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreatePushToCardPaymentAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreatePushToCardPaymentAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreatePushToCardPaymentAttributes is not found in the empty JSON string", CreatePushToCardPaymentAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreatePushToCardPaymentAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreatePushToCardPaymentAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreatePushToCardPaymentAttributes.openapiRequiredFields) { - 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("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - // validate the required field `configuration` - CreatePushToCardPaymentAttributesConfiguration.validateJsonElement(jsonObj.get("configuration")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreatePushToCardPaymentAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreatePushToCardPaymentAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreatePushToCardPaymentAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreatePushToCardPaymentAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreatePushToCardPaymentAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreatePushToCardPaymentAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreatePushToCardPaymentAttributes - * @throws IOException if the JSON string is invalid with respect to CreatePushToCardPaymentAttributes - */ - public static CreatePushToCardPaymentAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreatePushToCardPaymentAttributes.class); - } - - /** - * Convert an instance of CreatePushToCardPaymentAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreatePushToCardPaymentAttributesConfiguration.java b/src/main/java/org/openapitools/client/model/CreatePushToCardPaymentAttributesConfiguration.java deleted file mode 100644 index 648f6484..00000000 --- a/src/main/java/org/openapitools/client/model/CreatePushToCardPaymentAttributesConfiguration.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Astra; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreatePushToCardPaymentAttributesConfiguration - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreatePushToCardPaymentAttributesConfiguration { - public static final String SERIALIZED_NAME_ASTRA = "astra"; - @SerializedName(SERIALIZED_NAME_ASTRA) - private Astra astra; - - public CreatePushToCardPaymentAttributesConfiguration() { - } - - public CreatePushToCardPaymentAttributesConfiguration astra(Astra astra) { - - this.astra = astra; - return this; - } - - /** - * Get astra - * @return astra - **/ - @javax.annotation.Nullable - public Astra getAstra() { - return astra; - } - - - public void setAstra(Astra astra) { - this.astra = astra; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatePushToCardPaymentAttributesConfiguration createPushToCardPaymentAttributesConfiguration = (CreatePushToCardPaymentAttributesConfiguration) o; - return Objects.equals(this.astra, createPushToCardPaymentAttributesConfiguration.astra); - } - - @Override - public int hashCode() { - return Objects.hash(astra); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreatePushToCardPaymentAttributesConfiguration {\n"); - sb.append(" astra: ").append(toIndentedString(astra)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("astra"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreatePushToCardPaymentAttributesConfiguration - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreatePushToCardPaymentAttributesConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreatePushToCardPaymentAttributesConfiguration is not found in the empty JSON string", CreatePushToCardPaymentAttributesConfiguration.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreatePushToCardPaymentAttributesConfiguration.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreatePushToCardPaymentAttributesConfiguration` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `astra` - if (jsonObj.get("astra") != null && !jsonObj.get("astra").isJsonNull()) { - Astra.validateJsonElement(jsonObj.get("astra")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreatePushToCardPaymentAttributesConfiguration.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreatePushToCardPaymentAttributesConfiguration' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreatePushToCardPaymentAttributesConfiguration.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreatePushToCardPaymentAttributesConfiguration value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreatePushToCardPaymentAttributesConfiguration read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreatePushToCardPaymentAttributesConfiguration given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreatePushToCardPaymentAttributesConfiguration - * @throws IOException if the JSON string is invalid with respect to CreatePushToCardPaymentAttributesConfiguration - */ - public static CreatePushToCardPaymentAttributesConfiguration fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreatePushToCardPaymentAttributesConfiguration.class); - } - - /** - * Convert an instance of CreatePushToCardPaymentAttributesConfiguration to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateRecurringCreditAchPayment.java b/src/main/java/org/openapitools/client/model/CreateRecurringCreditAchPayment.java deleted file mode 100644 index e5a7a6cc..00000000 --- a/src/main/java/org/openapitools/client/model/CreateRecurringCreditAchPayment.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateAchPaymentCounterpartyRelationships; -import org.openapitools.client.model.CreateRecurringCreditAchPaymentAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateRecurringCreditAchPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateRecurringCreditAchPayment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "recurringCreditAchPayment"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateRecurringCreditAchPaymentAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateAchPaymentCounterpartyRelationships relationships; - - public CreateRecurringCreditAchPayment() { - } - - public CreateRecurringCreditAchPayment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateRecurringCreditAchPayment attributes(CreateRecurringCreditAchPaymentAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateRecurringCreditAchPaymentAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateRecurringCreditAchPaymentAttributes attributes) { - this.attributes = attributes; - } - - - public CreateRecurringCreditAchPayment relationships(CreateAchPaymentCounterpartyRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateAchPaymentCounterpartyRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateAchPaymentCounterpartyRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateRecurringCreditAchPayment createRecurringCreditAchPayment = (CreateRecurringCreditAchPayment) o; - return Objects.equals(this.type, createRecurringCreditAchPayment.type) && - Objects.equals(this.attributes, createRecurringCreditAchPayment.attributes) && - Objects.equals(this.relationships, createRecurringCreditAchPayment.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateRecurringCreditAchPayment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateRecurringCreditAchPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateRecurringCreditAchPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRecurringCreditAchPayment is not found in the empty JSON string", CreateRecurringCreditAchPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateRecurringCreditAchPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRecurringCreditAchPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateRecurringCreditAchPayment.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateRecurringCreditAchPaymentAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateAchPaymentCounterpartyRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRecurringCreditAchPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRecurringCreditAchPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringCreditAchPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateRecurringCreditAchPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateRecurringCreditAchPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateRecurringCreditAchPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateRecurringCreditAchPayment - * @throws IOException if the JSON string is invalid with respect to CreateRecurringCreditAchPayment - */ - public static CreateRecurringCreditAchPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRecurringCreditAchPayment.class); - } - - /** - * Convert an instance of CreateRecurringCreditAchPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateRecurringCreditAchPaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreateRecurringCreditAchPaymentAttributes.java deleted file mode 100644 index 322d89cb..00000000 --- a/src/main/java/org/openapitools/client/model/CreateRecurringCreditAchPaymentAttributes.java +++ /dev/null @@ -1,368 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Schedule1; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateRecurringCreditAchPaymentAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateRecurringCreditAchPaymentAttributes { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_ADDENDA = "addenda"; - @SerializedName(SERIALIZED_NAME_ADDENDA) - private String addenda; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_SCHEDULE = "schedule"; - @SerializedName(SERIALIZED_NAME_SCHEDULE) - private Schedule1 schedule; - - public CreateRecurringCreditAchPaymentAttributes() { - } - - public CreateRecurringCreditAchPaymentAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CreateRecurringCreditAchPaymentAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public CreateRecurringCreditAchPaymentAttributes addenda(String addenda) { - - this.addenda = addenda; - return this; - } - - /** - * Get addenda - * @return addenda - **/ - @javax.annotation.Nullable - public String getAddenda() { - return addenda; - } - - - public void setAddenda(String addenda) { - this.addenda = addenda; - } - - - public CreateRecurringCreditAchPaymentAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateRecurringCreditAchPaymentAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateRecurringCreditAchPaymentAttributes schedule(Schedule1 schedule) { - - this.schedule = schedule; - return this; - } - - /** - * Get schedule - * @return schedule - **/ - @javax.annotation.Nonnull - public Schedule1 getSchedule() { - return schedule; - } - - - public void setSchedule(Schedule1 schedule) { - this.schedule = schedule; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateRecurringCreditAchPaymentAttributes createRecurringCreditAchPaymentAttributes = (CreateRecurringCreditAchPaymentAttributes) o; - return Objects.equals(this.amount, createRecurringCreditAchPaymentAttributes.amount) && - Objects.equals(this.description, createRecurringCreditAchPaymentAttributes.description) && - Objects.equals(this.addenda, createRecurringCreditAchPaymentAttributes.addenda) && - Objects.equals(this.idempotencyKey, createRecurringCreditAchPaymentAttributes.idempotencyKey) && - Objects.equals(this.tags, createRecurringCreditAchPaymentAttributes.tags) && - Objects.equals(this.schedule, createRecurringCreditAchPaymentAttributes.schedule); - } - - @Override - public int hashCode() { - return Objects.hash(amount, description, addenda, idempotencyKey, tags, schedule); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateRecurringCreditAchPaymentAttributes {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("description"); - openapiFields.add("addenda"); - openapiFields.add("idempotencyKey"); - openapiFields.add("tags"); - openapiFields.add("schedule"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("schedule"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateRecurringCreditAchPaymentAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateRecurringCreditAchPaymentAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRecurringCreditAchPaymentAttributes is not found in the empty JSON string", CreateRecurringCreditAchPaymentAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateRecurringCreditAchPaymentAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRecurringCreditAchPaymentAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateRecurringCreditAchPaymentAttributes.openapiRequiredFields) { - 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("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("addenda") != null && !jsonObj.get("addenda").isJsonNull()) && !jsonObj.get("addenda").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `addenda` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addenda").toString())); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - // validate the required field `schedule` - Schedule1.validateJsonElement(jsonObj.get("schedule")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRecurringCreditAchPaymentAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRecurringCreditAchPaymentAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringCreditAchPaymentAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateRecurringCreditAchPaymentAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateRecurringCreditAchPaymentAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateRecurringCreditAchPaymentAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateRecurringCreditAchPaymentAttributes - * @throws IOException if the JSON string is invalid with respect to CreateRecurringCreditAchPaymentAttributes - */ - public static CreateRecurringCreditAchPaymentAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRecurringCreditAchPaymentAttributes.class); - } - - /** - * Convert an instance of CreateRecurringCreditAchPaymentAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateRecurringCreditBookPayment.java b/src/main/java/org/openapitools/client/model/CreateRecurringCreditBookPayment.java deleted file mode 100644 index eb7680ee..00000000 --- a/src/main/java/org/openapitools/client/model/CreateRecurringCreditBookPayment.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateBookPaymentRelationships; -import org.openapitools.client.model.CreateRecurringCreditBookPaymentAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateRecurringCreditBookPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateRecurringCreditBookPayment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "recurringCreditBookPayment"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateRecurringCreditBookPaymentAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateBookPaymentRelationships relationships; - - public CreateRecurringCreditBookPayment() { - } - - public CreateRecurringCreditBookPayment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateRecurringCreditBookPayment attributes(CreateRecurringCreditBookPaymentAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateRecurringCreditBookPaymentAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateRecurringCreditBookPaymentAttributes attributes) { - this.attributes = attributes; - } - - - public CreateRecurringCreditBookPayment relationships(CreateBookPaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateBookPaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateBookPaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateRecurringCreditBookPayment createRecurringCreditBookPayment = (CreateRecurringCreditBookPayment) o; - return Objects.equals(this.type, createRecurringCreditBookPayment.type) && - Objects.equals(this.attributes, createRecurringCreditBookPayment.attributes) && - Objects.equals(this.relationships, createRecurringCreditBookPayment.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateRecurringCreditBookPayment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateRecurringCreditBookPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateRecurringCreditBookPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRecurringCreditBookPayment is not found in the empty JSON string", CreateRecurringCreditBookPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateRecurringCreditBookPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRecurringCreditBookPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateRecurringCreditBookPayment.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateRecurringCreditBookPaymentAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateBookPaymentRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRecurringCreditBookPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRecurringCreditBookPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringCreditBookPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateRecurringCreditBookPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateRecurringCreditBookPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateRecurringCreditBookPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateRecurringCreditBookPayment - * @throws IOException if the JSON string is invalid with respect to CreateRecurringCreditBookPayment - */ - public static CreateRecurringCreditBookPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRecurringCreditBookPayment.class); - } - - /** - * Convert an instance of CreateRecurringCreditBookPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateRecurringCreditBookPaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreateRecurringCreditBookPaymentAttributes.java deleted file mode 100644 index 9df4f965..00000000 --- a/src/main/java/org/openapitools/client/model/CreateRecurringCreditBookPaymentAttributes.java +++ /dev/null @@ -1,368 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Schedule1; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateRecurringCreditBookPaymentAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateRecurringCreditBookPaymentAttributes { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_TRANSACTION_SUMMARY_OVERRIDE = "transactionSummaryOverride"; - @SerializedName(SERIALIZED_NAME_TRANSACTION_SUMMARY_OVERRIDE) - private String transactionSummaryOverride; - - public static final String SERIALIZED_NAME_SCHEDULE = "schedule"; - @SerializedName(SERIALIZED_NAME_SCHEDULE) - private Schedule1 schedule; - - public CreateRecurringCreditBookPaymentAttributes() { - } - - public CreateRecurringCreditBookPaymentAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CreateRecurringCreditBookPaymentAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public CreateRecurringCreditBookPaymentAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateRecurringCreditBookPaymentAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateRecurringCreditBookPaymentAttributes transactionSummaryOverride(String transactionSummaryOverride) { - - this.transactionSummaryOverride = transactionSummaryOverride; - return this; - } - - /** - * Get transactionSummaryOverride - * @return transactionSummaryOverride - **/ - @javax.annotation.Nullable - public String getTransactionSummaryOverride() { - return transactionSummaryOverride; - } - - - public void setTransactionSummaryOverride(String transactionSummaryOverride) { - this.transactionSummaryOverride = transactionSummaryOverride; - } - - - public CreateRecurringCreditBookPaymentAttributes schedule(Schedule1 schedule) { - - this.schedule = schedule; - return this; - } - - /** - * Get schedule - * @return schedule - **/ - @javax.annotation.Nonnull - public Schedule1 getSchedule() { - return schedule; - } - - - public void setSchedule(Schedule1 schedule) { - this.schedule = schedule; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateRecurringCreditBookPaymentAttributes createRecurringCreditBookPaymentAttributes = (CreateRecurringCreditBookPaymentAttributes) o; - return Objects.equals(this.amount, createRecurringCreditBookPaymentAttributes.amount) && - Objects.equals(this.description, createRecurringCreditBookPaymentAttributes.description) && - Objects.equals(this.idempotencyKey, createRecurringCreditBookPaymentAttributes.idempotencyKey) && - Objects.equals(this.tags, createRecurringCreditBookPaymentAttributes.tags) && - Objects.equals(this.transactionSummaryOverride, createRecurringCreditBookPaymentAttributes.transactionSummaryOverride) && - Objects.equals(this.schedule, createRecurringCreditBookPaymentAttributes.schedule); - } - - @Override - public int hashCode() { - return Objects.hash(amount, description, idempotencyKey, tags, transactionSummaryOverride, schedule); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateRecurringCreditBookPaymentAttributes {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" transactionSummaryOverride: ").append(toIndentedString(transactionSummaryOverride)).append("\n"); - sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("description"); - openapiFields.add("idempotencyKey"); - openapiFields.add("tags"); - openapiFields.add("transactionSummaryOverride"); - openapiFields.add("schedule"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("schedule"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateRecurringCreditBookPaymentAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateRecurringCreditBookPaymentAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRecurringCreditBookPaymentAttributes is not found in the empty JSON string", CreateRecurringCreditBookPaymentAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateRecurringCreditBookPaymentAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRecurringCreditBookPaymentAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateRecurringCreditBookPaymentAttributes.openapiRequiredFields) { - 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("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - if ((jsonObj.get("transactionSummaryOverride") != null && !jsonObj.get("transactionSummaryOverride").isJsonNull()) && !jsonObj.get("transactionSummaryOverride").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transactionSummaryOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transactionSummaryOverride").toString())); - } - // validate the required field `schedule` - Schedule1.validateJsonElement(jsonObj.get("schedule")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRecurringCreditBookPaymentAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRecurringCreditBookPaymentAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringCreditBookPaymentAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateRecurringCreditBookPaymentAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateRecurringCreditBookPaymentAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateRecurringCreditBookPaymentAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateRecurringCreditBookPaymentAttributes - * @throws IOException if the JSON string is invalid with respect to CreateRecurringCreditBookPaymentAttributes - */ - public static CreateRecurringCreditBookPaymentAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRecurringCreditBookPaymentAttributes.class); - } - - /** - * Convert an instance of CreateRecurringCreditBookPaymentAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateRecurringDebitAchPayment.java b/src/main/java/org/openapitools/client/model/CreateRecurringDebitAchPayment.java deleted file mode 100644 index e615bc27..00000000 --- a/src/main/java/org/openapitools/client/model/CreateRecurringDebitAchPayment.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateAchPaymentCounterpartyRelationships; -import org.openapitools.client.model.CreateRecurringDebitAchPaymentAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateRecurringDebitAchPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateRecurringDebitAchPayment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "recurringDebitAchPayment"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateRecurringDebitAchPaymentAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateAchPaymentCounterpartyRelationships relationships; - - public CreateRecurringDebitAchPayment() { - } - - public CreateRecurringDebitAchPayment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateRecurringDebitAchPayment attributes(CreateRecurringDebitAchPaymentAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateRecurringDebitAchPaymentAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateRecurringDebitAchPaymentAttributes attributes) { - this.attributes = attributes; - } - - - public CreateRecurringDebitAchPayment relationships(CreateAchPaymentCounterpartyRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateAchPaymentCounterpartyRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateAchPaymentCounterpartyRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateRecurringDebitAchPayment createRecurringDebitAchPayment = (CreateRecurringDebitAchPayment) o; - return Objects.equals(this.type, createRecurringDebitAchPayment.type) && - Objects.equals(this.attributes, createRecurringDebitAchPayment.attributes) && - Objects.equals(this.relationships, createRecurringDebitAchPayment.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateRecurringDebitAchPayment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateRecurringDebitAchPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateRecurringDebitAchPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRecurringDebitAchPayment is not found in the empty JSON string", CreateRecurringDebitAchPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateRecurringDebitAchPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRecurringDebitAchPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateRecurringDebitAchPayment.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateRecurringDebitAchPaymentAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateAchPaymentCounterpartyRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRecurringDebitAchPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRecurringDebitAchPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringDebitAchPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateRecurringDebitAchPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateRecurringDebitAchPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateRecurringDebitAchPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateRecurringDebitAchPayment - * @throws IOException if the JSON string is invalid with respect to CreateRecurringDebitAchPayment - */ - public static CreateRecurringDebitAchPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRecurringDebitAchPayment.class); - } - - /** - * Convert an instance of CreateRecurringDebitAchPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateRecurringDebitAchPaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreateRecurringDebitAchPaymentAttributes.java deleted file mode 100644 index 33465b39..00000000 --- a/src/main/java/org/openapitools/client/model/CreateRecurringDebitAchPaymentAttributes.java +++ /dev/null @@ -1,453 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Schedule1; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateRecurringDebitAchPaymentAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateRecurringDebitAchPaymentAttributes { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_ADDENDA = "addenda"; - @SerializedName(SERIALIZED_NAME_ADDENDA) - private String addenda; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_SAME_DAY = "sameDay"; - @SerializedName(SERIALIZED_NAME_SAME_DAY) - private Boolean sameDay = false; - - public static final String SERIALIZED_NAME_VERIFY_COUNTERPARTY_BALANCE = "verifyCounterpartyBalance"; - @SerializedName(SERIALIZED_NAME_VERIFY_COUNTERPARTY_BALANCE) - private Boolean verifyCounterpartyBalance = false; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_SCHEDULE = "schedule"; - @SerializedName(SERIALIZED_NAME_SCHEDULE) - private Schedule1 schedule; - - public static final String SERIALIZED_NAME_CLEARING_DAYS_OVERRIDE = "clearingDaysOverride"; - @SerializedName(SERIALIZED_NAME_CLEARING_DAYS_OVERRIDE) - private Integer clearingDaysOverride; - - public CreateRecurringDebitAchPaymentAttributes() { - } - - public CreateRecurringDebitAchPaymentAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CreateRecurringDebitAchPaymentAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public CreateRecurringDebitAchPaymentAttributes addenda(String addenda) { - - this.addenda = addenda; - return this; - } - - /** - * Get addenda - * @return addenda - **/ - @javax.annotation.Nullable - public String getAddenda() { - return addenda; - } - - - public void setAddenda(String addenda) { - this.addenda = addenda; - } - - - public CreateRecurringDebitAchPaymentAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateRecurringDebitAchPaymentAttributes sameDay(Boolean sameDay) { - - this.sameDay = sameDay; - return this; - } - - /** - * Get sameDay - * @return sameDay - **/ - @javax.annotation.Nullable - public Boolean getSameDay() { - return sameDay; - } - - - public void setSameDay(Boolean sameDay) { - this.sameDay = sameDay; - } - - - public CreateRecurringDebitAchPaymentAttributes verifyCounterpartyBalance(Boolean verifyCounterpartyBalance) { - - this.verifyCounterpartyBalance = verifyCounterpartyBalance; - return this; - } - - /** - * Get verifyCounterpartyBalance - * @return verifyCounterpartyBalance - **/ - @javax.annotation.Nullable - public Boolean getVerifyCounterpartyBalance() { - return verifyCounterpartyBalance; - } - - - public void setVerifyCounterpartyBalance(Boolean verifyCounterpartyBalance) { - this.verifyCounterpartyBalance = verifyCounterpartyBalance; - } - - - public CreateRecurringDebitAchPaymentAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateRecurringDebitAchPaymentAttributes schedule(Schedule1 schedule) { - - this.schedule = schedule; - return this; - } - - /** - * Get schedule - * @return schedule - **/ - @javax.annotation.Nonnull - public Schedule1 getSchedule() { - return schedule; - } - - - public void setSchedule(Schedule1 schedule) { - this.schedule = schedule; - } - - - public CreateRecurringDebitAchPaymentAttributes clearingDaysOverride(Integer clearingDaysOverride) { - - this.clearingDaysOverride = clearingDaysOverride; - return this; - } - - /** - * Get clearingDaysOverride - * minimum: 0 - * @return clearingDaysOverride - **/ - @javax.annotation.Nullable - public Integer getClearingDaysOverride() { - return clearingDaysOverride; - } - - - public void setClearingDaysOverride(Integer clearingDaysOverride) { - this.clearingDaysOverride = clearingDaysOverride; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateRecurringDebitAchPaymentAttributes createRecurringDebitAchPaymentAttributes = (CreateRecurringDebitAchPaymentAttributes) o; - return Objects.equals(this.amount, createRecurringDebitAchPaymentAttributes.amount) && - Objects.equals(this.description, createRecurringDebitAchPaymentAttributes.description) && - Objects.equals(this.addenda, createRecurringDebitAchPaymentAttributes.addenda) && - Objects.equals(this.idempotencyKey, createRecurringDebitAchPaymentAttributes.idempotencyKey) && - Objects.equals(this.sameDay, createRecurringDebitAchPaymentAttributes.sameDay) && - Objects.equals(this.verifyCounterpartyBalance, createRecurringDebitAchPaymentAttributes.verifyCounterpartyBalance) && - Objects.equals(this.tags, createRecurringDebitAchPaymentAttributes.tags) && - Objects.equals(this.schedule, createRecurringDebitAchPaymentAttributes.schedule) && - Objects.equals(this.clearingDaysOverride, createRecurringDebitAchPaymentAttributes.clearingDaysOverride); - } - - @Override - public int hashCode() { - return Objects.hash(amount, description, addenda, idempotencyKey, sameDay, verifyCounterpartyBalance, tags, schedule, clearingDaysOverride); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateRecurringDebitAchPaymentAttributes {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" sameDay: ").append(toIndentedString(sameDay)).append("\n"); - sb.append(" verifyCounterpartyBalance: ").append(toIndentedString(verifyCounterpartyBalance)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); - sb.append(" clearingDaysOverride: ").append(toIndentedString(clearingDaysOverride)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("description"); - openapiFields.add("addenda"); - openapiFields.add("idempotencyKey"); - openapiFields.add("sameDay"); - openapiFields.add("verifyCounterpartyBalance"); - openapiFields.add("tags"); - openapiFields.add("schedule"); - openapiFields.add("clearingDaysOverride"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("schedule"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateRecurringDebitAchPaymentAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateRecurringDebitAchPaymentAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRecurringDebitAchPaymentAttributes is not found in the empty JSON string", CreateRecurringDebitAchPaymentAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateRecurringDebitAchPaymentAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRecurringDebitAchPaymentAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateRecurringDebitAchPaymentAttributes.openapiRequiredFields) { - 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("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("addenda") != null && !jsonObj.get("addenda").isJsonNull()) && !jsonObj.get("addenda").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `addenda` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addenda").toString())); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - // validate the required field `schedule` - Schedule1.validateJsonElement(jsonObj.get("schedule")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRecurringDebitAchPaymentAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRecurringDebitAchPaymentAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringDebitAchPaymentAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateRecurringDebitAchPaymentAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateRecurringDebitAchPaymentAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateRecurringDebitAchPaymentAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateRecurringDebitAchPaymentAttributes - * @throws IOException if the JSON string is invalid with respect to CreateRecurringDebitAchPaymentAttributes - */ - public static CreateRecurringDebitAchPaymentAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRecurringDebitAchPaymentAttributes.class); - } - - /** - * Convert an instance of CreateRecurringDebitAchPaymentAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateRecurringPayment.java b/src/main/java/org/openapitools/client/model/CreateRecurringPayment.java deleted file mode 100644 index 2616329b..00000000 --- a/src/main/java/org/openapitools/client/model/CreateRecurringPayment.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateRecurringPaymentData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateRecurringPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateRecurringPayment { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateRecurringPaymentData data; - - public CreateRecurringPayment() { - } - - public CreateRecurringPayment data(CreateRecurringPaymentData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public CreateRecurringPaymentData getData() { - return data; - } - - - public void setData(CreateRecurringPaymentData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateRecurringPayment createRecurringPayment = (CreateRecurringPayment) o; - return Objects.equals(this.data, createRecurringPayment.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateRecurringPayment {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateRecurringPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateRecurringPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRecurringPayment is not found in the empty JSON string", CreateRecurringPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateRecurringPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRecurringPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateRecurringPayment.openapiRequiredFields) { - 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(); - // validate the required field `data` - CreateRecurringPaymentData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRecurringPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRecurringPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateRecurringPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateRecurringPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateRecurringPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateRecurringPayment - * @throws IOException if the JSON string is invalid with respect to CreateRecurringPayment - */ - public static CreateRecurringPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRecurringPayment.class); - } - - /** - * Convert an instance of CreateRecurringPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateRecurringPaymentData.java b/src/main/java/org/openapitools/client/model/CreateRecurringPaymentData.java deleted file mode 100644 index ac6adbb7..00000000 --- a/src/main/java/org/openapitools/client/model/CreateRecurringPaymentData.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateBookPaymentRelationships; -import org.openapitools.client.model.CreateRecurringCreditAchPayment; -import org.openapitools.client.model.CreateRecurringCreditBookPayment; -import org.openapitools.client.model.CreateRecurringCreditBookPaymentAttributes; -import org.openapitools.client.model.CreateRecurringDebitAchPayment; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -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 com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import org.openapitools.client.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateRecurringPaymentData extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(CreateRecurringPaymentData.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRecurringPaymentData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRecurringPaymentData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterCreateRecurringCreditAchPayment = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringCreditAchPayment.class)); - final TypeAdapter adapterCreateRecurringDebitAchPayment = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringDebitAchPayment.class)); - final TypeAdapter adapterCreateRecurringCreditBookPayment = gson.getDelegateAdapter(this, TypeToken.get(CreateRecurringCreditBookPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateRecurringPaymentData value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `CreateRecurringCreditAchPayment` - if (value.getActualInstance() instanceof CreateRecurringCreditAchPayment) { - JsonElement element = adapterCreateRecurringCreditAchPayment.toJsonTree((CreateRecurringCreditAchPayment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateRecurringDebitAchPayment` - if (value.getActualInstance() instanceof CreateRecurringDebitAchPayment) { - JsonElement element = adapterCreateRecurringDebitAchPayment.toJsonTree((CreateRecurringDebitAchPayment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateRecurringCreditBookPayment` - if (value.getActualInstance() instanceof CreateRecurringCreditBookPayment) { - JsonElement element = adapterCreateRecurringCreditBookPayment.toJsonTree((CreateRecurringCreditBookPayment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CreateRecurringCreditAchPayment, CreateRecurringCreditBookPayment, CreateRecurringDebitAchPayment"); - } - - @Override - public CreateRecurringPaymentData read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize CreateRecurringCreditAchPayment - try { - // validate the JSON object to see if any exception is thrown - CreateRecurringCreditAchPayment.validateJsonElement(jsonElement); - actualAdapter = adapterCreateRecurringCreditAchPayment; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateRecurringCreditAchPayment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateRecurringCreditAchPayment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateRecurringCreditAchPayment'", e); - } - // deserialize CreateRecurringDebitAchPayment - try { - // validate the JSON object to see if any exception is thrown - CreateRecurringDebitAchPayment.validateJsonElement(jsonElement); - actualAdapter = adapterCreateRecurringDebitAchPayment; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateRecurringDebitAchPayment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateRecurringDebitAchPayment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateRecurringDebitAchPayment'", e); - } - // deserialize CreateRecurringCreditBookPayment - try { - // validate the JSON object to see if any exception is thrown - CreateRecurringCreditBookPayment.validateJsonElement(jsonElement); - actualAdapter = adapterCreateRecurringCreditBookPayment; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateRecurringCreditBookPayment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateRecurringCreditBookPayment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateRecurringCreditBookPayment'", e); - } - - if (match == 1) { - CreateRecurringPaymentData ret = new CreateRecurringPaymentData(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for CreateRecurringPaymentData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public CreateRecurringPaymentData() { - super("oneOf", Boolean.FALSE); - } - - public CreateRecurringPaymentData(CreateRecurringCreditAchPayment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreateRecurringPaymentData(CreateRecurringCreditBookPayment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreateRecurringPaymentData(CreateRecurringDebitAchPayment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("CreateRecurringCreditAchPayment", CreateRecurringCreditAchPayment.class); - schemas.put("CreateRecurringDebitAchPayment", CreateRecurringDebitAchPayment.class); - schemas.put("CreateRecurringCreditBookPayment", CreateRecurringCreditBookPayment.class); - } - - @Override - public Map> getSchemas() { - return CreateRecurringPaymentData.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * CreateRecurringCreditAchPayment, CreateRecurringCreditBookPayment, CreateRecurringDebitAchPayment - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof CreateRecurringCreditAchPayment) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateRecurringDebitAchPayment) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateRecurringCreditBookPayment) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be CreateRecurringCreditAchPayment, CreateRecurringCreditBookPayment, CreateRecurringDebitAchPayment"); - } - - /** - * Get the actual instance, which can be the following: - * CreateRecurringCreditAchPayment, CreateRecurringCreditBookPayment, CreateRecurringDebitAchPayment - * - * @return The actual instance (CreateRecurringCreditAchPayment, CreateRecurringCreditBookPayment, CreateRecurringDebitAchPayment) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `CreateRecurringCreditAchPayment`. If the actual instance is not `CreateRecurringCreditAchPayment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateRecurringCreditAchPayment` - * @throws ClassCastException if the instance is not `CreateRecurringCreditAchPayment` - */ - public CreateRecurringCreditAchPayment getCreateRecurringCreditAchPayment() throws ClassCastException { - return (CreateRecurringCreditAchPayment)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateRecurringDebitAchPayment`. If the actual instance is not `CreateRecurringDebitAchPayment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateRecurringDebitAchPayment` - * @throws ClassCastException if the instance is not `CreateRecurringDebitAchPayment` - */ - public CreateRecurringDebitAchPayment getCreateRecurringDebitAchPayment() throws ClassCastException { - return (CreateRecurringDebitAchPayment)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateRecurringCreditBookPayment`. If the actual instance is not `CreateRecurringCreditBookPayment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateRecurringCreditBookPayment` - * @throws ClassCastException if the instance is not `CreateRecurringCreditBookPayment` - */ - public CreateRecurringCreditBookPayment getCreateRecurringCreditBookPayment() throws ClassCastException { - return (CreateRecurringCreditBookPayment)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateRecurringPaymentData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with CreateRecurringCreditAchPayment - try { - CreateRecurringCreditAchPayment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateRecurringCreditAchPayment failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateRecurringDebitAchPayment - try { - CreateRecurringDebitAchPayment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateRecurringDebitAchPayment failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateRecurringCreditBookPayment - try { - CreateRecurringCreditBookPayment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateRecurringCreditBookPayment failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for CreateRecurringPaymentData with oneOf schemas: CreateRecurringCreditAchPayment, CreateRecurringCreditBookPayment, CreateRecurringDebitAchPayment. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of CreateRecurringPaymentData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateRecurringPaymentData - * @throws IOException if the JSON string is invalid with respect to CreateRecurringPaymentData - */ - public static CreateRecurringPaymentData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRecurringPaymentData.class); - } - - /** - * Convert an instance of CreateRecurringPaymentData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateRepayment.java b/src/main/java/org/openapitools/client/model/CreateRepayment.java deleted file mode 100644 index c1f353bd..00000000 --- a/src/main/java/org/openapitools/client/model/CreateRepayment.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateRepaymentData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateRepayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateRepayment { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateRepaymentData data; - - public CreateRepayment() { - } - - public CreateRepayment data(CreateRepaymentData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateRepaymentData getData() { - return data; - } - - - public void setData(CreateRepaymentData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateRepayment createRepayment = (CreateRepayment) o; - return Objects.equals(this.data, createRepayment.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateRepayment {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateRepayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateRepayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRepayment is not found in the empty JSON string", CreateRepayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateRepayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRepayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateRepaymentData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRepayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRepayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateRepayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateRepayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateRepayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateRepayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateRepayment - * @throws IOException if the JSON string is invalid with respect to CreateRepayment - */ - public static CreateRepayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRepayment.class); - } - - /** - * Convert an instance of CreateRepayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateRepaymentData.java b/src/main/java/org/openapitools/client/model/CreateRepaymentData.java deleted file mode 100644 index 42d4c382..00000000 --- a/src/main/java/org/openapitools/client/model/CreateRepaymentData.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateAchRepayment; -import org.openapitools.client.model.CreateBookRepayment; -import org.openapitools.client.model.CreateBookRepaymentAttributes; -import org.openapitools.client.model.CreateBookRepaymentRelationships; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -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 com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import org.openapitools.client.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateRepaymentData extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(CreateRepaymentData.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRepaymentData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRepaymentData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterCreateAchRepayment = gson.getDelegateAdapter(this, TypeToken.get(CreateAchRepayment.class)); - final TypeAdapter adapterCreateBookRepayment = gson.getDelegateAdapter(this, TypeToken.get(CreateBookRepayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateRepaymentData value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `CreateAchRepayment` - if (value.getActualInstance() instanceof CreateAchRepayment) { - JsonElement element = adapterCreateAchRepayment.toJsonTree((CreateAchRepayment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `CreateBookRepayment` - if (value.getActualInstance() instanceof CreateBookRepayment) { - JsonElement element = adapterCreateBookRepayment.toJsonTree((CreateBookRepayment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CreateAchRepayment, CreateBookRepayment"); - } - - @Override - public CreateRepaymentData read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize CreateAchRepayment - try { - // validate the JSON object to see if any exception is thrown - CreateAchRepayment.validateJsonElement(jsonElement); - actualAdapter = adapterCreateAchRepayment; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateAchRepayment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateAchRepayment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateAchRepayment'", e); - } - // deserialize CreateBookRepayment - try { - // validate the JSON object to see if any exception is thrown - CreateBookRepayment.validateJsonElement(jsonElement); - actualAdapter = adapterCreateBookRepayment; - match++; - log.log(Level.FINER, "Input data matches schema 'CreateBookRepayment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for CreateBookRepayment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'CreateBookRepayment'", e); - } - - if (match == 1) { - CreateRepaymentData ret = new CreateRepaymentData(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for CreateRepaymentData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public CreateRepaymentData() { - super("oneOf", Boolean.FALSE); - } - - public CreateRepaymentData(CreateAchRepayment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreateRepaymentData(CreateBookRepayment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("CreateAchRepayment", CreateAchRepayment.class); - schemas.put("CreateBookRepayment", CreateBookRepayment.class); - } - - @Override - public Map> getSchemas() { - return CreateRepaymentData.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * CreateAchRepayment, CreateBookRepayment - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof CreateAchRepayment) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof CreateBookRepayment) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be CreateAchRepayment, CreateBookRepayment"); - } - - /** - * Get the actual instance, which can be the following: - * CreateAchRepayment, CreateBookRepayment - * - * @return The actual instance (CreateAchRepayment, CreateBookRepayment) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `CreateAchRepayment`. If the actual instance is not `CreateAchRepayment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateAchRepayment` - * @throws ClassCastException if the instance is not `CreateAchRepayment` - */ - public CreateAchRepayment getCreateAchRepayment() throws ClassCastException { - return (CreateAchRepayment)super.getActualInstance(); - } - /** - * Get the actual instance of `CreateBookRepayment`. If the actual instance is not `CreateBookRepayment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `CreateBookRepayment` - * @throws ClassCastException if the instance is not `CreateBookRepayment` - */ - public CreateBookRepayment getCreateBookRepayment() throws ClassCastException { - return (CreateBookRepayment)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateRepaymentData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with CreateAchRepayment - try { - CreateAchRepayment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateAchRepayment failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with CreateBookRepayment - try { - CreateBookRepayment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for CreateBookRepayment failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for CreateRepaymentData with oneOf schemas: CreateAchRepayment, CreateBookRepayment. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of CreateRepaymentData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateRepaymentData - * @throws IOException if the JSON string is invalid with respect to CreateRepaymentData - */ - public static CreateRepaymentData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRepaymentData.class); - } - - /** - * Convert an instance of CreateRepaymentData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateReward.java b/src/main/java/org/openapitools/client/model/CreateReward.java deleted file mode 100644 index 7becfa74..00000000 --- a/src/main/java/org/openapitools/client/model/CreateReward.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateRewardData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateReward - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateReward { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateRewardData data; - - public CreateReward() { - } - - public CreateReward data(CreateRewardData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateRewardData getData() { - return data; - } - - - public void setData(CreateRewardData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateReward createReward = (CreateReward) o; - return Objects.equals(this.data, createReward.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateReward {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateReward - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateReward.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateReward is not found in the empty JSON string", CreateReward.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateReward.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateReward` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateRewardData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateReward.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateReward' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateReward.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateReward value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateReward read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateReward given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateReward - * @throws IOException if the JSON string is invalid with respect to CreateReward - */ - public static CreateReward fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateReward.class); - } - - /** - * Convert an instance of CreateReward to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateRewardData.java b/src/main/java/org/openapitools/client/model/CreateRewardData.java deleted file mode 100644 index fa3388a6..00000000 --- a/src/main/java/org/openapitools/client/model/CreateRewardData.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateRewardDataAttributes; -import org.openapitools.client.model.CreateRewardRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateRewardData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateRewardData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "reward"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateRewardDataAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateRewardRelationships relationships; - - public CreateRewardData() { - } - - public CreateRewardData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateRewardData attributes(CreateRewardDataAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateRewardDataAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateRewardDataAttributes attributes) { - this.attributes = attributes; - } - - - public CreateRewardData relationships(CreateRewardRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateRewardRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateRewardRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateRewardData createRewardData = (CreateRewardData) o; - return Objects.equals(this.type, createRewardData.type) && - Objects.equals(this.attributes, createRewardData.attributes) && - Objects.equals(this.relationships, createRewardData.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateRewardData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateRewardData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateRewardData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRewardData is not found in the empty JSON string", CreateRewardData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateRewardData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRewardData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateRewardData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateRewardDataAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateRewardRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRewardData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRewardData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateRewardData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateRewardData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateRewardData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateRewardData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateRewardData - * @throws IOException if the JSON string is invalid with respect to CreateRewardData - */ - public static CreateRewardData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRewardData.class); - } - - /** - * Convert an instance of CreateRewardData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateRewardDataAttributes.java b/src/main/java/org/openapitools/client/model/CreateRewardDataAttributes.java deleted file mode 100644 index f1775c56..00000000 --- a/src/main/java/org/openapitools/client/model/CreateRewardDataAttributes.java +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateRewardDataAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateRewardDataAttributes { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public CreateRewardDataAttributes() { - } - - public CreateRewardDataAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CreateRewardDataAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public CreateRewardDataAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateRewardDataAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateRewardDataAttributes createRewardDataAttributes = (CreateRewardDataAttributes) o; - return Objects.equals(this.amount, createRewardDataAttributes.amount) && - Objects.equals(this.description, createRewardDataAttributes.description) && - Objects.equals(this.idempotencyKey, createRewardDataAttributes.idempotencyKey) && - Objects.equals(this.tags, createRewardDataAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(amount, description, idempotencyKey, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateRewardDataAttributes {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("description"); - openapiFields.add("idempotencyKey"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateRewardDataAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateRewardDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRewardDataAttributes is not found in the empty JSON string", CreateRewardDataAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateRewardDataAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRewardDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateRewardDataAttributes.openapiRequiredFields) { - 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("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRewardDataAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRewardDataAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateRewardDataAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateRewardDataAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateRewardDataAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateRewardDataAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateRewardDataAttributes - * @throws IOException if the JSON string is invalid with respect to CreateRewardDataAttributes - */ - public static CreateRewardDataAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRewardDataAttributes.class); - } - - /** - * Convert an instance of CreateRewardDataAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateRewardRelationships.java b/src/main/java/org/openapitools/client/model/CreateRewardRelationships.java deleted file mode 100644 index 03f6f550..00000000 --- a/src/main/java/org/openapitools/client/model/CreateRewardRelationships.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReceivedPaymentRelationshipsReceivePaymentTransaction; -import org.openapitools.client.model.Relationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateRewardRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateRewardRelationships { - public static final String SERIALIZED_NAME_FUNDING_ACCOUNT = "fundingAccount"; - @SerializedName(SERIALIZED_NAME_FUNDING_ACCOUNT) - private Relationship fundingAccount; - - public static final String SERIALIZED_NAME_RECEIVING_ACCOUNT = "receivingAccount"; - @SerializedName(SERIALIZED_NAME_RECEIVING_ACCOUNT) - private Relationship receivingAccount; - - public static final String SERIALIZED_NAME_REWARDED_TRANSACTION = "rewardedTransaction"; - @SerializedName(SERIALIZED_NAME_REWARDED_TRANSACTION) - private ReceivedPaymentRelationshipsReceivePaymentTransaction rewardedTransaction; - - public CreateRewardRelationships() { - } - - public CreateRewardRelationships fundingAccount(Relationship fundingAccount) { - - this.fundingAccount = fundingAccount; - return this; - } - - /** - * Get fundingAccount - * @return fundingAccount - **/ - @javax.annotation.Nullable - public Relationship getFundingAccount() { - return fundingAccount; - } - - - public void setFundingAccount(Relationship fundingAccount) { - this.fundingAccount = fundingAccount; - } - - - public CreateRewardRelationships receivingAccount(Relationship receivingAccount) { - - this.receivingAccount = receivingAccount; - return this; - } - - /** - * Get receivingAccount - * @return receivingAccount - **/ - @javax.annotation.Nonnull - public Relationship getReceivingAccount() { - return receivingAccount; - } - - - public void setReceivingAccount(Relationship receivingAccount) { - this.receivingAccount = receivingAccount; - } - - - public CreateRewardRelationships rewardedTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction rewardedTransaction) { - - this.rewardedTransaction = rewardedTransaction; - return this; - } - - /** - * Get rewardedTransaction - * @return rewardedTransaction - **/ - @javax.annotation.Nullable - public ReceivedPaymentRelationshipsReceivePaymentTransaction getRewardedTransaction() { - return rewardedTransaction; - } - - - public void setRewardedTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction rewardedTransaction) { - this.rewardedTransaction = rewardedTransaction; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateRewardRelationships createRewardRelationships = (CreateRewardRelationships) o; - return Objects.equals(this.fundingAccount, createRewardRelationships.fundingAccount) && - Objects.equals(this.receivingAccount, createRewardRelationships.receivingAccount) && - Objects.equals(this.rewardedTransaction, createRewardRelationships.rewardedTransaction); - } - - @Override - public int hashCode() { - return Objects.hash(fundingAccount, receivingAccount, rewardedTransaction); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateRewardRelationships {\n"); - sb.append(" fundingAccount: ").append(toIndentedString(fundingAccount)).append("\n"); - sb.append(" receivingAccount: ").append(toIndentedString(receivingAccount)).append("\n"); - sb.append(" rewardedTransaction: ").append(toIndentedString(rewardedTransaction)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fundingAccount"); - openapiFields.add("receivingAccount"); - openapiFields.add("rewardedTransaction"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("receivingAccount"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateRewardRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateRewardRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRewardRelationships is not found in the empty JSON string", CreateRewardRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateRewardRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateRewardRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateRewardRelationships.openapiRequiredFields) { - 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(); - // validate the optional field `fundingAccount` - if (jsonObj.get("fundingAccount") != null && !jsonObj.get("fundingAccount").isJsonNull()) { - Relationship.validateJsonElement(jsonObj.get("fundingAccount")); - } - // validate the required field `receivingAccount` - Relationship.validateJsonElement(jsonObj.get("receivingAccount")); - // validate the optional field `rewardedTransaction` - if (jsonObj.get("rewardedTransaction") != null && !jsonObj.get("rewardedTransaction").isJsonNull()) { - ReceivedPaymentRelationshipsReceivePaymentTransaction.validateJsonElement(jsonObj.get("rewardedTransaction")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateRewardRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateRewardRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateRewardRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateRewardRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateRewardRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateRewardRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateRewardRelationships - * @throws IOException if the JSON string is invalid with respect to CreateRewardRelationships - */ - public static CreateRewardRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateRewardRelationships.class); - } - - /** - * Convert an instance of CreateRewardRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateSoleProprietorApplication.java b/src/main/java/org/openapitools/client/model/CreateSoleProprietorApplication.java deleted file mode 100644 index 6d102c42..00000000 --- a/src/main/java/org/openapitools/client/model/CreateSoleProprietorApplication.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateSoleProprietorApplicationAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateSoleProprietorApplication - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateSoleProprietorApplication { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "individualApplication"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateSoleProprietorApplicationAttributes attributes; - - public CreateSoleProprietorApplication() { - } - - public CreateSoleProprietorApplication type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateSoleProprietorApplication attributes(CreateSoleProprietorApplicationAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateSoleProprietorApplicationAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateSoleProprietorApplicationAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateSoleProprietorApplication createSoleProprietorApplication = (CreateSoleProprietorApplication) o; - return Objects.equals(this.type, createSoleProprietorApplication.type) && - Objects.equals(this.attributes, createSoleProprietorApplication.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateSoleProprietorApplication {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateSoleProprietorApplication - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateSoleProprietorApplication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateSoleProprietorApplication is not found in the empty JSON string", CreateSoleProprietorApplication.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateSoleProprietorApplication.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateSoleProprietorApplication` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateSoleProprietorApplication.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateSoleProprietorApplicationAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateSoleProprietorApplication.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateSoleProprietorApplication' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateSoleProprietorApplication.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateSoleProprietorApplication value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateSoleProprietorApplication read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateSoleProprietorApplication given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateSoleProprietorApplication - * @throws IOException if the JSON string is invalid with respect to CreateSoleProprietorApplication - */ - public static CreateSoleProprietorApplication fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateSoleProprietorApplication.class); - } - - /** - * Convert an instance of CreateSoleProprietorApplication to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateSoleProprietorApplicationAttributes.java b/src/main/java/org/openapitools/client/model/CreateSoleProprietorApplicationAttributes.java deleted file mode 100644 index 6294f25e..00000000 --- a/src/main/java/org/openapitools/client/model/CreateSoleProprietorApplicationAttributes.java +++ /dev/null @@ -1,1042 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.AnnualIncome; -import org.openapitools.client.model.BusinessVertical; -import org.openapitools.client.model.CreatePowerOfAttorneyAgent; -import org.openapitools.client.model.DeviceFingerprint; -import org.openapitools.client.model.EvaluationParams; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Industry; -import org.openapitools.client.model.Occupation; -import org.openapitools.client.model.Phone; -import org.openapitools.client.model.SoleProprietorshipAnnualRevenue; -import org.openapitools.client.model.SoleProprietorshipNumberOfEmployees; -import org.openapitools.client.model.SourceOfIncome; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateSoleProprietorApplicationAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateSoleProprietorApplicationAttributes { - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_MATRICULA_CONSULAR = "matriculaConsular"; - @SerializedName(SERIALIZED_NAME_MATRICULA_CONSULAR) - private String matriculaConsular; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public static final String SERIALIZED_NAME_DBA = "dba"; - @SerializedName(SERIALIZED_NAME_DBA) - private String dba; - - public static final String SERIALIZED_NAME_EIN = "ein"; - @SerializedName(SERIALIZED_NAME_EIN) - private String ein; - - public static final String SERIALIZED_NAME_IP = "ip"; - @SerializedName(SERIALIZED_NAME_IP) - private String ip; - - public static final String SERIALIZED_NAME_SOLE_PROPRIETORSHIP = "soleProprietorship"; - @SerializedName(SERIALIZED_NAME_SOLE_PROPRIETORSHIP) - private Boolean soleProprietorship = false; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_DEVICE_FINGERPRINTS = "deviceFingerprints"; - @SerializedName(SERIALIZED_NAME_DEVICE_FINGERPRINTS) - private List deviceFingerprints; - - public static final String SERIALIZED_NAME_JWT_SUBJECT = "jwtSubject"; - @SerializedName(SERIALIZED_NAME_JWT_SUBJECT) - private String jwtSubject; - - public static final String SERIALIZED_NAME_POWER_OF_ATTORNEY_AGENT = "powerOfAttorneyAgent"; - @SerializedName(SERIALIZED_NAME_POWER_OF_ATTORNEY_AGENT) - private CreatePowerOfAttorneyAgent powerOfAttorneyAgent; - - public static final String SERIALIZED_NAME_INDUSTRY = "industry"; - @SerializedName(SERIALIZED_NAME_INDUSTRY) - private Industry industry; - - public static final String SERIALIZED_NAME_EVALUATION_PARAMS = "evaluationParams"; - @SerializedName(SERIALIZED_NAME_EVALUATION_PARAMS) - private EvaluationParams evaluationParams; - - public static final String SERIALIZED_NAME_OCCUPATION = "occupation"; - @SerializedName(SERIALIZED_NAME_OCCUPATION) - private Occupation occupation; - - public static final String SERIALIZED_NAME_ANNUAL_INCOME = "annualIncome"; - @SerializedName(SERIALIZED_NAME_ANNUAL_INCOME) - private AnnualIncome annualIncome; - - public static final String SERIALIZED_NAME_SOURCE_OF_INCOME = "sourceOfIncome"; - @SerializedName(SERIALIZED_NAME_SOURCE_OF_INCOME) - private SourceOfIncome sourceOfIncome; - - public static final String SERIALIZED_NAME_ANNUAL_REVENUE = "annualRevenue"; - @SerializedName(SERIALIZED_NAME_ANNUAL_REVENUE) - private SoleProprietorshipAnnualRevenue annualRevenue; - - public static final String SERIALIZED_NAME_NUMBER_OF_EMPLOYEES = "numberOfEmployees"; - @SerializedName(SERIALIZED_NAME_NUMBER_OF_EMPLOYEES) - private SoleProprietorshipNumberOfEmployees numberOfEmployees; - - public static final String SERIALIZED_NAME_BUSINESS_VERTICAL = "businessVertical"; - @SerializedName(SERIALIZED_NAME_BUSINESS_VERTICAL) - private BusinessVertical businessVertical; - - public static final String SERIALIZED_NAME_WEBSITE = "website"; - @SerializedName(SERIALIZED_NAME_WEBSITE) - private String website; - - public CreateSoleProprietorApplicationAttributes() { - } - - public CreateSoleProprietorApplicationAttributes fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nonnull - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public CreateSoleProprietorApplicationAttributes email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nonnull - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public CreateSoleProprietorApplicationAttributes phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nonnull - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public CreateSoleProprietorApplicationAttributes ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public CreateSoleProprietorApplicationAttributes passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public CreateSoleProprietorApplicationAttributes nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public CreateSoleProprietorApplicationAttributes matriculaConsular(String matriculaConsular) { - - this.matriculaConsular = matriculaConsular; - return this; - } - - /** - * Get matriculaConsular - * @return matriculaConsular - **/ - @javax.annotation.Nullable - public String getMatriculaConsular() { - return matriculaConsular; - } - - - public void setMatriculaConsular(String matriculaConsular) { - this.matriculaConsular = matriculaConsular; - } - - - public CreateSoleProprietorApplicationAttributes address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nonnull - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public CreateSoleProprietorApplicationAttributes dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nonnull - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public CreateSoleProprietorApplicationAttributes dba(String dba) { - - this.dba = dba; - return this; - } - - /** - * Get dba - * @return dba - **/ - @javax.annotation.Nullable - public String getDba() { - return dba; - } - - - public void setDba(String dba) { - this.dba = dba; - } - - - public CreateSoleProprietorApplicationAttributes ein(String ein) { - - this.ein = ein; - return this; - } - - /** - * Get ein - * @return ein - **/ - @javax.annotation.Nullable - public String getEin() { - return ein; - } - - - public void setEin(String ein) { - this.ein = ein; - } - - - public CreateSoleProprietorApplicationAttributes ip(String ip) { - - this.ip = ip; - return this; - } - - /** - * Get ip - * @return ip - **/ - @javax.annotation.Nullable - public String getIp() { - return ip; - } - - - public void setIp(String ip) { - this.ip = ip; - } - - - public CreateSoleProprietorApplicationAttributes soleProprietorship(Boolean soleProprietorship) { - - this.soleProprietorship = soleProprietorship; - return this; - } - - /** - * Get soleProprietorship - * @return soleProprietorship - **/ - @javax.annotation.Nullable - public Boolean getSoleProprietorship() { - return soleProprietorship; - } - - - public void setSoleProprietorship(Boolean soleProprietorship) { - this.soleProprietorship = soleProprietorship; - } - - - public CreateSoleProprietorApplicationAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateSoleProprietorApplicationAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateSoleProprietorApplicationAttributes deviceFingerprints(List deviceFingerprints) { - - this.deviceFingerprints = deviceFingerprints; - return this; - } - - public CreateSoleProprietorApplicationAttributes addDeviceFingerprintsItem(DeviceFingerprint deviceFingerprintsItem) { - if (this.deviceFingerprints == null) { - this.deviceFingerprints = new ArrayList<>(); - } - this.deviceFingerprints.add(deviceFingerprintsItem); - return this; - } - - /** - * Get deviceFingerprints - * @return deviceFingerprints - **/ - @javax.annotation.Nullable - public List getDeviceFingerprints() { - return deviceFingerprints; - } - - - public void setDeviceFingerprints(List deviceFingerprints) { - this.deviceFingerprints = deviceFingerprints; - } - - - public CreateSoleProprietorApplicationAttributes jwtSubject(String jwtSubject) { - - this.jwtSubject = jwtSubject; - return this; - } - - /** - * Get jwtSubject - * @return jwtSubject - **/ - @javax.annotation.Nullable - public String getJwtSubject() { - return jwtSubject; - } - - - public void setJwtSubject(String jwtSubject) { - this.jwtSubject = jwtSubject; - } - - - public CreateSoleProprietorApplicationAttributes powerOfAttorneyAgent(CreatePowerOfAttorneyAgent powerOfAttorneyAgent) { - - this.powerOfAttorneyAgent = powerOfAttorneyAgent; - return this; - } - - /** - * Get powerOfAttorneyAgent - * @return powerOfAttorneyAgent - **/ - @javax.annotation.Nullable - public CreatePowerOfAttorneyAgent getPowerOfAttorneyAgent() { - return powerOfAttorneyAgent; - } - - - public void setPowerOfAttorneyAgent(CreatePowerOfAttorneyAgent powerOfAttorneyAgent) { - this.powerOfAttorneyAgent = powerOfAttorneyAgent; - } - - - public CreateSoleProprietorApplicationAttributes industry(Industry industry) { - - this.industry = industry; - return this; - } - - /** - * Get industry - * @return industry - **/ - @javax.annotation.Nullable - public Industry getIndustry() { - return industry; - } - - - public void setIndustry(Industry industry) { - this.industry = industry; - } - - - public CreateSoleProprietorApplicationAttributes evaluationParams(EvaluationParams evaluationParams) { - - this.evaluationParams = evaluationParams; - return this; - } - - /** - * Get evaluationParams - * @return evaluationParams - **/ - @javax.annotation.Nullable - public EvaluationParams getEvaluationParams() { - return evaluationParams; - } - - - public void setEvaluationParams(EvaluationParams evaluationParams) { - this.evaluationParams = evaluationParams; - } - - - public CreateSoleProprietorApplicationAttributes occupation(Occupation occupation) { - - this.occupation = occupation; - return this; - } - - /** - * Get occupation - * @return occupation - **/ - @javax.annotation.Nullable - public Occupation getOccupation() { - return occupation; - } - - - public void setOccupation(Occupation occupation) { - this.occupation = occupation; - } - - - public CreateSoleProprietorApplicationAttributes annualIncome(AnnualIncome annualIncome) { - - this.annualIncome = annualIncome; - return this; - } - - /** - * Get annualIncome - * @return annualIncome - **/ - @javax.annotation.Nullable - public AnnualIncome getAnnualIncome() { - return annualIncome; - } - - - public void setAnnualIncome(AnnualIncome annualIncome) { - this.annualIncome = annualIncome; - } - - - public CreateSoleProprietorApplicationAttributes sourceOfIncome(SourceOfIncome sourceOfIncome) { - - this.sourceOfIncome = sourceOfIncome; - return this; - } - - /** - * Get sourceOfIncome - * @return sourceOfIncome - **/ - @javax.annotation.Nullable - public SourceOfIncome getSourceOfIncome() { - return sourceOfIncome; - } - - - public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { - this.sourceOfIncome = sourceOfIncome; - } - - - public CreateSoleProprietorApplicationAttributes annualRevenue(SoleProprietorshipAnnualRevenue annualRevenue) { - - this.annualRevenue = annualRevenue; - return this; - } - - /** - * Get annualRevenue - * @return annualRevenue - **/ - @javax.annotation.Nullable - public SoleProprietorshipAnnualRevenue getAnnualRevenue() { - return annualRevenue; - } - - - public void setAnnualRevenue(SoleProprietorshipAnnualRevenue annualRevenue) { - this.annualRevenue = annualRevenue; - } - - - public CreateSoleProprietorApplicationAttributes numberOfEmployees(SoleProprietorshipNumberOfEmployees numberOfEmployees) { - - this.numberOfEmployees = numberOfEmployees; - return this; - } - - /** - * Get numberOfEmployees - * @return numberOfEmployees - **/ - @javax.annotation.Nullable - public SoleProprietorshipNumberOfEmployees getNumberOfEmployees() { - return numberOfEmployees; - } - - - public void setNumberOfEmployees(SoleProprietorshipNumberOfEmployees numberOfEmployees) { - this.numberOfEmployees = numberOfEmployees; - } - - - public CreateSoleProprietorApplicationAttributes businessVertical(BusinessVertical businessVertical) { - - this.businessVertical = businessVertical; - return this; - } - - /** - * Get businessVertical - * @return businessVertical - **/ - @javax.annotation.Nullable - public BusinessVertical getBusinessVertical() { - return businessVertical; - } - - - public void setBusinessVertical(BusinessVertical businessVertical) { - this.businessVertical = businessVertical; - } - - - public CreateSoleProprietorApplicationAttributes website(String website) { - - this.website = website; - return this; - } - - /** - * Get website - * @return website - **/ - @javax.annotation.Nullable - public String getWebsite() { - return website; - } - - - public void setWebsite(String website) { - this.website = website; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateSoleProprietorApplicationAttributes createSoleProprietorApplicationAttributes = (CreateSoleProprietorApplicationAttributes) o; - return Objects.equals(this.fullName, createSoleProprietorApplicationAttributes.fullName) && - Objects.equals(this.email, createSoleProprietorApplicationAttributes.email) && - Objects.equals(this.phone, createSoleProprietorApplicationAttributes.phone) && - Objects.equals(this.ssn, createSoleProprietorApplicationAttributes.ssn) && - Objects.equals(this.passport, createSoleProprietorApplicationAttributes.passport) && - Objects.equals(this.nationality, createSoleProprietorApplicationAttributes.nationality) && - Objects.equals(this.matriculaConsular, createSoleProprietorApplicationAttributes.matriculaConsular) && - Objects.equals(this.address, createSoleProprietorApplicationAttributes.address) && - Objects.equals(this.dateOfBirth, createSoleProprietorApplicationAttributes.dateOfBirth) && - Objects.equals(this.dba, createSoleProprietorApplicationAttributes.dba) && - Objects.equals(this.ein, createSoleProprietorApplicationAttributes.ein) && - Objects.equals(this.ip, createSoleProprietorApplicationAttributes.ip) && - Objects.equals(this.soleProprietorship, createSoleProprietorApplicationAttributes.soleProprietorship) && - Objects.equals(this.tags, createSoleProprietorApplicationAttributes.tags) && - Objects.equals(this.idempotencyKey, createSoleProprietorApplicationAttributes.idempotencyKey) && - Objects.equals(this.deviceFingerprints, createSoleProprietorApplicationAttributes.deviceFingerprints) && - Objects.equals(this.jwtSubject, createSoleProprietorApplicationAttributes.jwtSubject) && - Objects.equals(this.powerOfAttorneyAgent, createSoleProprietorApplicationAttributes.powerOfAttorneyAgent) && - Objects.equals(this.industry, createSoleProprietorApplicationAttributes.industry) && - Objects.equals(this.evaluationParams, createSoleProprietorApplicationAttributes.evaluationParams) && - Objects.equals(this.occupation, createSoleProprietorApplicationAttributes.occupation) && - Objects.equals(this.annualIncome, createSoleProprietorApplicationAttributes.annualIncome) && - Objects.equals(this.sourceOfIncome, createSoleProprietorApplicationAttributes.sourceOfIncome) && - Objects.equals(this.annualRevenue, createSoleProprietorApplicationAttributes.annualRevenue) && - Objects.equals(this.numberOfEmployees, createSoleProprietorApplicationAttributes.numberOfEmployees) && - Objects.equals(this.businessVertical, createSoleProprietorApplicationAttributes.businessVertical) && - Objects.equals(this.website, createSoleProprietorApplicationAttributes.website); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, dba, ein, ip, soleProprietorship, tags, idempotencyKey, deviceFingerprints, jwtSubject, powerOfAttorneyAgent, industry, evaluationParams, occupation, annualIncome, sourceOfIncome, annualRevenue, numberOfEmployees, businessVertical, website); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateSoleProprietorApplicationAttributes {\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" dba: ").append(toIndentedString(dba)).append("\n"); - sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); - sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); - sb.append(" soleProprietorship: ").append(toIndentedString(soleProprietorship)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" deviceFingerprints: ").append(toIndentedString(deviceFingerprints)).append("\n"); - sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); - sb.append(" powerOfAttorneyAgent: ").append(toIndentedString(powerOfAttorneyAgent)).append("\n"); - sb.append(" industry: ").append(toIndentedString(industry)).append("\n"); - sb.append(" evaluationParams: ").append(toIndentedString(evaluationParams)).append("\n"); - sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); - sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); - sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); - sb.append(" annualRevenue: ").append(toIndentedString(annualRevenue)).append("\n"); - sb.append(" numberOfEmployees: ").append(toIndentedString(numberOfEmployees)).append("\n"); - sb.append(" businessVertical: ").append(toIndentedString(businessVertical)).append("\n"); - sb.append(" website: ").append(toIndentedString(website)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fullName"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("nationality"); - openapiFields.add("matriculaConsular"); - openapiFields.add("address"); - openapiFields.add("dateOfBirth"); - openapiFields.add("dba"); - openapiFields.add("ein"); - openapiFields.add("ip"); - openapiFields.add("soleProprietorship"); - openapiFields.add("tags"); - openapiFields.add("idempotencyKey"); - openapiFields.add("deviceFingerprints"); - openapiFields.add("jwtSubject"); - openapiFields.add("powerOfAttorneyAgent"); - openapiFields.add("industry"); - openapiFields.add("evaluationParams"); - openapiFields.add("occupation"); - openapiFields.add("annualIncome"); - openapiFields.add("sourceOfIncome"); - openapiFields.add("annualRevenue"); - openapiFields.add("numberOfEmployees"); - openapiFields.add("businessVertical"); - openapiFields.add("website"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("fullName"); - openapiRequiredFields.add("email"); - openapiRequiredFields.add("phone"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("dateOfBirth"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateSoleProprietorApplicationAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateSoleProprietorApplicationAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateSoleProprietorApplicationAttributes is not found in the empty JSON string", CreateSoleProprietorApplicationAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateSoleProprietorApplicationAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateSoleProprietorApplicationAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateSoleProprietorApplicationAttributes.openapiRequiredFields) { - 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(); - // validate the required field `fullName` - FullName.validateJsonElement(jsonObj.get("fullName")); - if (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the required field `phone` - Phone.validateJsonElement(jsonObj.get("phone")); - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - if ((jsonObj.get("matriculaConsular") != null && !jsonObj.get("matriculaConsular").isJsonNull()) && !jsonObj.get("matriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `matriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("matriculaConsular").toString())); - } - // validate the required field `address` - Address.validateJsonElement(jsonObj.get("address")); - if ((jsonObj.get("dba") != null && !jsonObj.get("dba").isJsonNull()) && !jsonObj.get("dba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dba").toString())); - } - if ((jsonObj.get("ein") != null && !jsonObj.get("ein").isJsonNull()) && !jsonObj.get("ein").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ein` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ein").toString())); - } - if ((jsonObj.get("ip") != null && !jsonObj.get("ip").isJsonNull()) && !jsonObj.get("ip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip").toString())); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - if (jsonObj.get("deviceFingerprints") != null && !jsonObj.get("deviceFingerprints").isJsonNull()) { - JsonArray jsonArraydeviceFingerprints = jsonObj.getAsJsonArray("deviceFingerprints"); - if (jsonArraydeviceFingerprints != null) { - // ensure the json data is an array - if (!jsonObj.get("deviceFingerprints").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `deviceFingerprints` to be an array in the JSON string but got `%s`", jsonObj.get("deviceFingerprints").toString())); - } - - // validate the optional field `deviceFingerprints` (array) - for (int i = 0; i < jsonArraydeviceFingerprints.size(); i++) { - DeviceFingerprint.validateJsonElement(jsonArraydeviceFingerprints.get(i)); - }; - } - } - if ((jsonObj.get("jwtSubject") != null && !jsonObj.get("jwtSubject").isJsonNull()) && !jsonObj.get("jwtSubject").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `jwtSubject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jwtSubject").toString())); - } - // validate the optional field `powerOfAttorneyAgent` - if (jsonObj.get("powerOfAttorneyAgent") != null && !jsonObj.get("powerOfAttorneyAgent").isJsonNull()) { - CreatePowerOfAttorneyAgent.validateJsonElement(jsonObj.get("powerOfAttorneyAgent")); - } - // validate the optional field `evaluationParams` - if (jsonObj.get("evaluationParams") != null && !jsonObj.get("evaluationParams").isJsonNull()) { - EvaluationParams.validateJsonElement(jsonObj.get("evaluationParams")); - } - if ((jsonObj.get("website") != null && !jsonObj.get("website").isJsonNull()) && !jsonObj.get("website").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `website` to be a primitive type in the JSON string but got `%s`", jsonObj.get("website").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateSoleProprietorApplicationAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateSoleProprietorApplicationAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateSoleProprietorApplicationAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateSoleProprietorApplicationAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateSoleProprietorApplicationAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateSoleProprietorApplicationAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateSoleProprietorApplicationAttributes - * @throws IOException if the JSON string is invalid with respect to CreateSoleProprietorApplicationAttributes - */ - public static CreateSoleProprietorApplicationAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateSoleProprietorApplicationAttributes.class); - } - - /** - * Convert an instance of CreateSoleProprietorApplicationAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateStopPayment.java b/src/main/java/org/openapitools/client/model/CreateStopPayment.java deleted file mode 100644 index 7fa92fc8..00000000 --- a/src/main/java/org/openapitools/client/model/CreateStopPayment.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.StopPayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateStopPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateStopPayment { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private StopPayment data; - - public CreateStopPayment() { - } - - public CreateStopPayment data(StopPayment data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public StopPayment getData() { - return data; - } - - - public void setData(StopPayment data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateStopPayment createStopPayment = (CreateStopPayment) o; - return Objects.equals(this.data, createStopPayment.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateStopPayment {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateStopPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateStopPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateStopPayment is not found in the empty JSON string", CreateStopPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateStopPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateStopPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateStopPayment.openapiRequiredFields) { - 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(); - // validate the required field `data` - StopPayment.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateStopPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateStopPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateStopPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateStopPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateStopPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateStopPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateStopPayment - * @throws IOException if the JSON string is invalid with respect to CreateStopPayment - */ - public static CreateStopPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateStopPayment.class); - } - - /** - * Convert an instance of CreateStopPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateTrustApplication.java b/src/main/java/org/openapitools/client/model/CreateTrustApplication.java deleted file mode 100644 index 4f64c4f6..00000000 --- a/src/main/java/org/openapitools/client/model/CreateTrustApplication.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateTrustApplicationAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateTrustApplication - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateTrustApplication { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "trustApplication"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateTrustApplicationAttributes attributes; - - public CreateTrustApplication() { - } - - public CreateTrustApplication type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateTrustApplication attributes(CreateTrustApplicationAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateTrustApplicationAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateTrustApplicationAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateTrustApplication createTrustApplication = (CreateTrustApplication) o; - return Objects.equals(this.type, createTrustApplication.type) && - Objects.equals(this.attributes, createTrustApplication.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateTrustApplication {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateTrustApplication - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateTrustApplication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateTrustApplication is not found in the empty JSON string", CreateTrustApplication.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateTrustApplication.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateTrustApplication` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateTrustApplication.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateTrustApplicationAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateTrustApplication.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateTrustApplication' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateTrustApplication.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateTrustApplication value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateTrustApplication read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateTrustApplication given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateTrustApplication - * @throws IOException if the JSON string is invalid with respect to CreateTrustApplication - */ - public static CreateTrustApplication fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateTrustApplication.class); - } - - /** - * Convert an instance of CreateTrustApplication to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateTrustApplicationAttributes.java b/src/main/java/org/openapitools/client/model/CreateTrustApplicationAttributes.java deleted file mode 100644 index 8f21b26b..00000000 --- a/src/main/java/org/openapitools/client/model/CreateTrustApplicationAttributes.java +++ /dev/null @@ -1,747 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Beneficiary; -import org.openapitools.client.model.DeviceFingerprint; -import org.openapitools.client.model.Grantor; -import org.openapitools.client.model.TrustContact; -import org.openapitools.client.model.Trustee; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateTrustApplicationAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateTrustApplicationAttributes { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_STATE_OF_INCORPORATION = "stateOfIncorporation"; - @SerializedName(SERIALIZED_NAME_STATE_OF_INCORPORATION) - private String stateOfIncorporation; - - /** - * Gets or Sets revocability - */ - @JsonAdapter(RevocabilityEnum.Adapter.class) - public enum RevocabilityEnum { - REVOCABLE("Revocable"), - - IRREVOCABLE("Irrevocable"); - - private String value; - - RevocabilityEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static RevocabilityEnum fromValue(String value) { - for (RevocabilityEnum b : RevocabilityEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final RevocabilityEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public RevocabilityEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return RevocabilityEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_REVOCABILITY = "revocability"; - @SerializedName(SERIALIZED_NAME_REVOCABILITY) - private RevocabilityEnum revocability; - - /** - * Gets or Sets sourceOfFunds - */ - @JsonAdapter(SourceOfFundsEnum.Adapter.class) - public enum SourceOfFundsEnum { - INHERITANCE("Inheritance"), - - SALARY("Salary"), - - SAVINGS("Savings"), - - INVESTMENTRETURNS("InvestmentReturns"), - - GIFTS("Gifts"); - - private String value; - - SourceOfFundsEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static SourceOfFundsEnum fromValue(String value) { - for (SourceOfFundsEnum b : SourceOfFundsEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final SourceOfFundsEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public SourceOfFundsEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return SourceOfFundsEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_SOURCE_OF_FUNDS = "sourceOfFunds"; - @SerializedName(SERIALIZED_NAME_SOURCE_OF_FUNDS) - private SourceOfFundsEnum sourceOfFunds; - - public static final String SERIALIZED_NAME_TAX_ID = "taxId"; - @SerializedName(SERIALIZED_NAME_TAX_ID) - private String taxId; - - public static final String SERIALIZED_NAME_GRANTOR = "grantor"; - @SerializedName(SERIALIZED_NAME_GRANTOR) - private Grantor grantor; - - public static final String SERIALIZED_NAME_TRUSTEES = "trustees"; - @SerializedName(SERIALIZED_NAME_TRUSTEES) - private List trustees = new ArrayList<>(); - - public static final String SERIALIZED_NAME_BENEFICIARIES = "beneficiaries"; - @SerializedName(SERIALIZED_NAME_BENEFICIARIES) - private List beneficiaries = new ArrayList<>(); - - public static final String SERIALIZED_NAME_CONTACT = "contact"; - @SerializedName(SERIALIZED_NAME_CONTACT) - private TrustContact contact; - - public static final String SERIALIZED_NAME_IP = "ip"; - @SerializedName(SERIALIZED_NAME_IP) - private String ip; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_DEVICE_FINGERPRINTS = "deviceFingerprints"; - @SerializedName(SERIALIZED_NAME_DEVICE_FINGERPRINTS) - private List deviceFingerprints; - - public CreateTrustApplicationAttributes() { - } - - public CreateTrustApplicationAttributes name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public CreateTrustApplicationAttributes stateOfIncorporation(String stateOfIncorporation) { - - this.stateOfIncorporation = stateOfIncorporation; - return this; - } - - /** - * Get stateOfIncorporation - * @return stateOfIncorporation - **/ - @javax.annotation.Nonnull - public String getStateOfIncorporation() { - return stateOfIncorporation; - } - - - public void setStateOfIncorporation(String stateOfIncorporation) { - this.stateOfIncorporation = stateOfIncorporation; - } - - - public CreateTrustApplicationAttributes revocability(RevocabilityEnum revocability) { - - this.revocability = revocability; - return this; - } - - /** - * Get revocability - * @return revocability - **/ - @javax.annotation.Nonnull - public RevocabilityEnum getRevocability() { - return revocability; - } - - - public void setRevocability(RevocabilityEnum revocability) { - this.revocability = revocability; - } - - - public CreateTrustApplicationAttributes sourceOfFunds(SourceOfFundsEnum sourceOfFunds) { - - this.sourceOfFunds = sourceOfFunds; - return this; - } - - /** - * Get sourceOfFunds - * @return sourceOfFunds - **/ - @javax.annotation.Nonnull - public SourceOfFundsEnum getSourceOfFunds() { - return sourceOfFunds; - } - - - public void setSourceOfFunds(SourceOfFundsEnum sourceOfFunds) { - this.sourceOfFunds = sourceOfFunds; - } - - - public CreateTrustApplicationAttributes taxId(String taxId) { - - this.taxId = taxId; - return this; - } - - /** - * Get taxId - * @return taxId - **/ - @javax.annotation.Nonnull - public String getTaxId() { - return taxId; - } - - - public void setTaxId(String taxId) { - this.taxId = taxId; - } - - - public CreateTrustApplicationAttributes grantor(Grantor grantor) { - - this.grantor = grantor; - return this; - } - - /** - * Get grantor - * @return grantor - **/ - @javax.annotation.Nonnull - public Grantor getGrantor() { - return grantor; - } - - - public void setGrantor(Grantor grantor) { - this.grantor = grantor; - } - - - public CreateTrustApplicationAttributes trustees(List trustees) { - - this.trustees = trustees; - return this; - } - - public CreateTrustApplicationAttributes addTrusteesItem(Trustee trusteesItem) { - if (this.trustees == null) { - this.trustees = new ArrayList<>(); - } - this.trustees.add(trusteesItem); - return this; - } - - /** - * Get trustees - * @return trustees - **/ - @javax.annotation.Nonnull - public List getTrustees() { - return trustees; - } - - - public void setTrustees(List trustees) { - this.trustees = trustees; - } - - - public CreateTrustApplicationAttributes beneficiaries(List beneficiaries) { - - this.beneficiaries = beneficiaries; - return this; - } - - public CreateTrustApplicationAttributes addBeneficiariesItem(Beneficiary beneficiariesItem) { - if (this.beneficiaries == null) { - this.beneficiaries = new ArrayList<>(); - } - this.beneficiaries.add(beneficiariesItem); - return this; - } - - /** - * Get beneficiaries - * @return beneficiaries - **/ - @javax.annotation.Nonnull - public List getBeneficiaries() { - return beneficiaries; - } - - - public void setBeneficiaries(List beneficiaries) { - this.beneficiaries = beneficiaries; - } - - - public CreateTrustApplicationAttributes contact(TrustContact contact) { - - this.contact = contact; - return this; - } - - /** - * Get contact - * @return contact - **/ - @javax.annotation.Nonnull - public TrustContact getContact() { - return contact; - } - - - public void setContact(TrustContact contact) { - this.contact = contact; - } - - - public CreateTrustApplicationAttributes ip(String ip) { - - this.ip = ip; - return this; - } - - /** - * Get ip - * @return ip - **/ - @javax.annotation.Nullable - public String getIp() { - return ip; - } - - - public void setIp(String ip) { - this.ip = ip; - } - - - public CreateTrustApplicationAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreateTrustApplicationAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateTrustApplicationAttributes deviceFingerprints(List deviceFingerprints) { - - this.deviceFingerprints = deviceFingerprints; - return this; - } - - public CreateTrustApplicationAttributes addDeviceFingerprintsItem(DeviceFingerprint deviceFingerprintsItem) { - if (this.deviceFingerprints == null) { - this.deviceFingerprints = new ArrayList<>(); - } - this.deviceFingerprints.add(deviceFingerprintsItem); - return this; - } - - /** - * Get deviceFingerprints - * @return deviceFingerprints - **/ - @javax.annotation.Nullable - public List getDeviceFingerprints() { - return deviceFingerprints; - } - - - public void setDeviceFingerprints(List deviceFingerprints) { - this.deviceFingerprints = deviceFingerprints; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateTrustApplicationAttributes createTrustApplicationAttributes = (CreateTrustApplicationAttributes) o; - return Objects.equals(this.name, createTrustApplicationAttributes.name) && - Objects.equals(this.stateOfIncorporation, createTrustApplicationAttributes.stateOfIncorporation) && - Objects.equals(this.revocability, createTrustApplicationAttributes.revocability) && - Objects.equals(this.sourceOfFunds, createTrustApplicationAttributes.sourceOfFunds) && - Objects.equals(this.taxId, createTrustApplicationAttributes.taxId) && - Objects.equals(this.grantor, createTrustApplicationAttributes.grantor) && - Objects.equals(this.trustees, createTrustApplicationAttributes.trustees) && - Objects.equals(this.beneficiaries, createTrustApplicationAttributes.beneficiaries) && - Objects.equals(this.contact, createTrustApplicationAttributes.contact) && - Objects.equals(this.ip, createTrustApplicationAttributes.ip) && - Objects.equals(this.tags, createTrustApplicationAttributes.tags) && - Objects.equals(this.idempotencyKey, createTrustApplicationAttributes.idempotencyKey) && - Objects.equals(this.deviceFingerprints, createTrustApplicationAttributes.deviceFingerprints); - } - - @Override - public int hashCode() { - return Objects.hash(name, stateOfIncorporation, revocability, sourceOfFunds, taxId, grantor, trustees, beneficiaries, contact, ip, tags, idempotencyKey, deviceFingerprints); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateTrustApplicationAttributes {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" stateOfIncorporation: ").append(toIndentedString(stateOfIncorporation)).append("\n"); - sb.append(" revocability: ").append(toIndentedString(revocability)).append("\n"); - sb.append(" sourceOfFunds: ").append(toIndentedString(sourceOfFunds)).append("\n"); - sb.append(" taxId: ").append(toIndentedString(taxId)).append("\n"); - sb.append(" grantor: ").append(toIndentedString(grantor)).append("\n"); - sb.append(" trustees: ").append(toIndentedString(trustees)).append("\n"); - sb.append(" beneficiaries: ").append(toIndentedString(beneficiaries)).append("\n"); - sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); - sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" deviceFingerprints: ").append(toIndentedString(deviceFingerprints)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("stateOfIncorporation"); - openapiFields.add("revocability"); - openapiFields.add("sourceOfFunds"); - openapiFields.add("taxId"); - openapiFields.add("grantor"); - openapiFields.add("trustees"); - openapiFields.add("beneficiaries"); - openapiFields.add("contact"); - openapiFields.add("ip"); - openapiFields.add("tags"); - openapiFields.add("idempotencyKey"); - openapiFields.add("deviceFingerprints"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("stateOfIncorporation"); - openapiRequiredFields.add("revocability"); - openapiRequiredFields.add("sourceOfFunds"); - openapiRequiredFields.add("taxId"); - openapiRequiredFields.add("grantor"); - openapiRequiredFields.add("trustees"); - openapiRequiredFields.add("beneficiaries"); - openapiRequiredFields.add("contact"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateTrustApplicationAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateTrustApplicationAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateTrustApplicationAttributes is not found in the empty JSON string", CreateTrustApplicationAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateTrustApplicationAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateTrustApplicationAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateTrustApplicationAttributes.openapiRequiredFields) { - 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("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if (!jsonObj.get("stateOfIncorporation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `stateOfIncorporation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stateOfIncorporation").toString())); - } - if (!jsonObj.get("revocability").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `revocability` to be a primitive type in the JSON string but got `%s`", jsonObj.get("revocability").toString())); - } - if (!jsonObj.get("sourceOfFunds").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sourceOfFunds` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sourceOfFunds").toString())); - } - if (!jsonObj.get("taxId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `taxId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxId").toString())); - } - // validate the required field `grantor` - Grantor.validateJsonElement(jsonObj.get("grantor")); - // ensure the json data is an array - if (!jsonObj.get("trustees").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `trustees` to be an array in the JSON string but got `%s`", jsonObj.get("trustees").toString())); - } - - JsonArray jsonArraytrustees = jsonObj.getAsJsonArray("trustees"); - // validate the required field `trustees` (array) - for (int i = 0; i < jsonArraytrustees.size(); i++) { - Trustee.validateJsonElement(jsonArraytrustees.get(i)); - }; - // ensure the json data is an array - if (!jsonObj.get("beneficiaries").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `beneficiaries` to be an array in the JSON string but got `%s`", jsonObj.get("beneficiaries").toString())); - } - - JsonArray jsonArraybeneficiaries = jsonObj.getAsJsonArray("beneficiaries"); - // validate the required field `beneficiaries` (array) - for (int i = 0; i < jsonArraybeneficiaries.size(); i++) { - Beneficiary.validateJsonElement(jsonArraybeneficiaries.get(i)); - }; - // validate the required field `contact` - TrustContact.validateJsonElement(jsonObj.get("contact")); - if ((jsonObj.get("ip") != null && !jsonObj.get("ip").isJsonNull()) && !jsonObj.get("ip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip").toString())); - } - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - if (jsonObj.get("deviceFingerprints") != null && !jsonObj.get("deviceFingerprints").isJsonNull()) { - JsonArray jsonArraydeviceFingerprints = jsonObj.getAsJsonArray("deviceFingerprints"); - if (jsonArraydeviceFingerprints != null) { - // ensure the json data is an array - if (!jsonObj.get("deviceFingerprints").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `deviceFingerprints` to be an array in the JSON string but got `%s`", jsonObj.get("deviceFingerprints").toString())); - } - - // validate the optional field `deviceFingerprints` (array) - for (int i = 0; i < jsonArraydeviceFingerprints.size(); i++) { - DeviceFingerprint.validateJsonElement(jsonArraydeviceFingerprints.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateTrustApplicationAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateTrustApplicationAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateTrustApplicationAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateTrustApplicationAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateTrustApplicationAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateTrustApplicationAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateTrustApplicationAttributes - * @throws IOException if the JSON string is invalid with respect to CreateTrustApplicationAttributes - */ - public static CreateTrustApplicationAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateTrustApplicationAttributes.class); - } - - /** - * Convert an instance of CreateTrustApplicationAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateWebhook.java b/src/main/java/org/openapitools/client/model/CreateWebhook.java deleted file mode 100644 index ec1edc22..00000000 --- a/src/main/java/org/openapitools/client/model/CreateWebhook.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateWebhookData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateWebhook - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateWebhook { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CreateWebhookData data; - - public CreateWebhook() { - } - - public CreateWebhook data(CreateWebhookData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CreateWebhookData getData() { - return data; - } - - - public void setData(CreateWebhookData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateWebhook createWebhook = (CreateWebhook) o; - return Objects.equals(this.data, createWebhook.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateWebhook {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateWebhook - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateWebhook.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateWebhook is not found in the empty JSON string", CreateWebhook.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateWebhook.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateWebhook` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CreateWebhookData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateWebhook.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateWebhook' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateWebhook.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateWebhook value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateWebhook read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateWebhook given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateWebhook - * @throws IOException if the JSON string is invalid with respect to CreateWebhook - */ - public static CreateWebhook fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateWebhook.class); - } - - /** - * Convert an instance of CreateWebhook to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateWebhookData.java b/src/main/java/org/openapitools/client/model/CreateWebhookData.java deleted file mode 100644 index e9c790cb..00000000 --- a/src/main/java/org/openapitools/client/model/CreateWebhookData.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateWebhookDataAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateWebhookData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateWebhookData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "webhook"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateWebhookDataAttributes attributes; - - public CreateWebhookData() { - } - - public CreateWebhookData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateWebhookData attributes(CreateWebhookDataAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public CreateWebhookDataAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateWebhookDataAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateWebhookData createWebhookData = (CreateWebhookData) o; - return Objects.equals(this.type, createWebhookData.type) && - Objects.equals(this.attributes, createWebhookData.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateWebhookData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateWebhookData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateWebhookData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateWebhookData is not found in the empty JSON string", CreateWebhookData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateWebhookData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateWebhookData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - CreateWebhookDataAttributes.validateJsonElement(jsonObj.get("attributes")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateWebhookData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateWebhookData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateWebhookData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateWebhookData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateWebhookData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateWebhookData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateWebhookData - * @throws IOException if the JSON string is invalid with respect to CreateWebhookData - */ - public static CreateWebhookData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateWebhookData.class); - } - - /** - * Convert an instance of CreateWebhookData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateWebhookDataAttributes.java b/src/main/java/org/openapitools/client/model/CreateWebhookDataAttributes.java deleted file mode 100644 index 1ad99277..00000000 --- a/src/main/java/org/openapitools/client/model/CreateWebhookDataAttributes.java +++ /dev/null @@ -1,497 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateWebhookDataAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateWebhookDataAttributes { - public static final String SERIALIZED_NAME_LABEL = "label"; - @SerializedName(SERIALIZED_NAME_LABEL) - private String label; - - public static final String SERIALIZED_NAME_URL = "url"; - @SerializedName(SERIALIZED_NAME_URL) - private String url; - - public static final String SERIALIZED_NAME_TOKEN = "token"; - @SerializedName(SERIALIZED_NAME_TOKEN) - private String token; - - /** - * Gets or Sets contentType - */ - @JsonAdapter(ContentTypeEnum.Adapter.class) - public enum ContentTypeEnum { - JSON("Json"), - - JSONAPI("JsonAPI"); - - private String value; - - ContentTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ContentTypeEnum fromValue(String value) { - for (ContentTypeEnum b : ContentTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ContentTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ContentTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ContentTypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_CONTENT_TYPE = "contentType"; - @SerializedName(SERIALIZED_NAME_CONTENT_TYPE) - private ContentTypeEnum contentType; - - public static final String SERIALIZED_NAME_DELIVERY_MODE = "deliveryMode"; - @SerializedName(SERIALIZED_NAME_DELIVERY_MODE) - private String deliveryMode; - - public static final String SERIALIZED_NAME_INCLUDE_RESOURCES = "includeResources"; - @SerializedName(SERIALIZED_NAME_INCLUDE_RESOURCES) - private Boolean includeResources; - - /** - * Gets or Sets subscriptionType - */ - @JsonAdapter(SubscriptionTypeEnum.Adapter.class) - public enum SubscriptionTypeEnum { - ALL("All"), - - ONLYAUTHORIZATIONREQUEST("OnlyAuthorizationRequest"); - - private String value; - - SubscriptionTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static SubscriptionTypeEnum fromValue(String value) { - for (SubscriptionTypeEnum b : SubscriptionTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final SubscriptionTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public SubscriptionTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return SubscriptionTypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_SUBSCRIPTION_TYPE = "subscriptionType"; - @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_TYPE) - private SubscriptionTypeEnum subscriptionType; - - public CreateWebhookDataAttributes() { - } - - public CreateWebhookDataAttributes label(String label) { - - this.label = label; - return this; - } - - /** - * Get label - * @return label - **/ - @javax.annotation.Nonnull - public String getLabel() { - return label; - } - - - public void setLabel(String label) { - this.label = label; - } - - - public CreateWebhookDataAttributes url(String url) { - - this.url = url; - return this; - } - - /** - * Get url - * @return url - **/ - @javax.annotation.Nonnull - public String getUrl() { - return url; - } - - - public void setUrl(String url) { - this.url = url; - } - - - public CreateWebhookDataAttributes token(String token) { - - this.token = token; - return this; - } - - /** - * Get token - * @return token - **/ - @javax.annotation.Nonnull - public String getToken() { - return token; - } - - - public void setToken(String token) { - this.token = token; - } - - - public CreateWebhookDataAttributes contentType(ContentTypeEnum contentType) { - - this.contentType = contentType; - return this; - } - - /** - * Get contentType - * @return contentType - **/ - @javax.annotation.Nonnull - public ContentTypeEnum getContentType() { - return contentType; - } - - - public void setContentType(ContentTypeEnum contentType) { - this.contentType = contentType; - } - - - public CreateWebhookDataAttributes deliveryMode(String deliveryMode) { - - this.deliveryMode = deliveryMode; - return this; - } - - /** - * Get deliveryMode - * @return deliveryMode - **/ - @javax.annotation.Nonnull - public String getDeliveryMode() { - return deliveryMode; - } - - - public void setDeliveryMode(String deliveryMode) { - this.deliveryMode = deliveryMode; - } - - - public CreateWebhookDataAttributes includeResources(Boolean includeResources) { - - this.includeResources = includeResources; - return this; - } - - /** - * Get includeResources - * @return includeResources - **/ - @javax.annotation.Nullable - public Boolean getIncludeResources() { - return includeResources; - } - - - public void setIncludeResources(Boolean includeResources) { - this.includeResources = includeResources; - } - - - public CreateWebhookDataAttributes subscriptionType(SubscriptionTypeEnum subscriptionType) { - - this.subscriptionType = subscriptionType; - return this; - } - - /** - * Get subscriptionType - * @return subscriptionType - **/ - @javax.annotation.Nullable - public SubscriptionTypeEnum getSubscriptionType() { - return subscriptionType; - } - - - public void setSubscriptionType(SubscriptionTypeEnum subscriptionType) { - this.subscriptionType = subscriptionType; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateWebhookDataAttributes createWebhookDataAttributes = (CreateWebhookDataAttributes) o; - return Objects.equals(this.label, createWebhookDataAttributes.label) && - Objects.equals(this.url, createWebhookDataAttributes.url) && - Objects.equals(this.token, createWebhookDataAttributes.token) && - Objects.equals(this.contentType, createWebhookDataAttributes.contentType) && - Objects.equals(this.deliveryMode, createWebhookDataAttributes.deliveryMode) && - Objects.equals(this.includeResources, createWebhookDataAttributes.includeResources) && - Objects.equals(this.subscriptionType, createWebhookDataAttributes.subscriptionType); - } - - @Override - public int hashCode() { - return Objects.hash(label, url, token, contentType, deliveryMode, includeResources, subscriptionType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateWebhookDataAttributes {\n"); - sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" url: ").append(toIndentedString(url)).append("\n"); - sb.append(" token: ").append(toIndentedString(token)).append("\n"); - sb.append(" contentType: ").append(toIndentedString(contentType)).append("\n"); - sb.append(" deliveryMode: ").append(toIndentedString(deliveryMode)).append("\n"); - sb.append(" includeResources: ").append(toIndentedString(includeResources)).append("\n"); - sb.append(" subscriptionType: ").append(toIndentedString(subscriptionType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("label"); - openapiFields.add("url"); - openapiFields.add("token"); - openapiFields.add("contentType"); - openapiFields.add("deliveryMode"); - openapiFields.add("includeResources"); - openapiFields.add("subscriptionType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("label"); - openapiRequiredFields.add("url"); - openapiRequiredFields.add("token"); - openapiRequiredFields.add("contentType"); - openapiRequiredFields.add("deliveryMode"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateWebhookDataAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateWebhookDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateWebhookDataAttributes is not found in the empty JSON string", CreateWebhookDataAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateWebhookDataAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateWebhookDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateWebhookDataAttributes.openapiRequiredFields) { - 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("label").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); - } - if (!jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); - } - if (!jsonObj.get("token").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); - } - if (!jsonObj.get("contentType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contentType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentType").toString())); - } - if (!jsonObj.get("deliveryMode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `deliveryMode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deliveryMode").toString())); - } - if ((jsonObj.get("subscriptionType") != null && !jsonObj.get("subscriptionType").isJsonNull()) && !jsonObj.get("subscriptionType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `subscriptionType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subscriptionType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateWebhookDataAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateWebhookDataAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateWebhookDataAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateWebhookDataAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateWebhookDataAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateWebhookDataAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateWebhookDataAttributes - * @throws IOException if the JSON string is invalid with respect to CreateWebhookDataAttributes - */ - public static CreateWebhookDataAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateWebhookDataAttributes.class); - } - - /** - * Convert an instance of CreateWebhookDataAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateWirePayment.java b/src/main/java/org/openapitools/client/model/CreateWirePayment.java deleted file mode 100644 index 8ad75628..00000000 --- a/src/main/java/org/openapitools/client/model/CreateWirePayment.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreateAchPaymentRelationships; -import org.openapitools.client.model.CreateWirePaymentAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateWirePayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateWirePayment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "wirePayment"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreateWirePaymentAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreateAchPaymentRelationships relationships; - - public CreateWirePayment() { - } - - public CreateWirePayment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CreateWirePayment attributes(CreateWirePaymentAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreateWirePaymentAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreateWirePaymentAttributes attributes) { - this.attributes = attributes; - } - - - public CreateWirePayment relationships(CreateAchPaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreateAchPaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreateAchPaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateWirePayment createWirePayment = (CreateWirePayment) o; - return Objects.equals(this.type, createWirePayment.type) && - Objects.equals(this.attributes, createWirePayment.attributes) && - Objects.equals(this.relationships, createWirePayment.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateWirePayment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateWirePayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateWirePayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateWirePayment is not found in the empty JSON string", CreateWirePayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateWirePayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateWirePayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateWirePayment.openapiRequiredFields) { - 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("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CreateWirePaymentAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - CreateAchPaymentRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateWirePayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateWirePayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateWirePayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateWirePayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateWirePayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateWirePayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateWirePayment - * @throws IOException if the JSON string is invalid with respect to CreateWirePayment - */ - public static CreateWirePayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateWirePayment.class); - } - - /** - * Convert an instance of CreateWirePayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreateWirePaymentAttributes.java b/src/main/java/org/openapitools/client/model/CreateWirePaymentAttributes.java deleted file mode 100644 index 70455d6c..00000000 --- a/src/main/java/org/openapitools/client/model/CreateWirePaymentAttributes.java +++ /dev/null @@ -1,412 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.WireCounterparty; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreateWirePaymentAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateWirePaymentAttributes { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_COUNTERPARTY = "counterparty"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY) - private WireCounterparty counterparty; - - public static final String SERIALIZED_NAME_IDEMPOTENCY_KEY = "idempotencyKey"; - @SerializedName(SERIALIZED_NAME_IDEMPOTENCY_KEY) - private String idempotencyKey; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public CreateWirePaymentAttributes() { - } - - public CreateWirePaymentAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public CreateWirePaymentAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nullable - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public CreateWirePaymentAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public CreateWirePaymentAttributes counterparty(WireCounterparty counterparty) { - - this.counterparty = counterparty; - return this; - } - - /** - * Get counterparty - * @return counterparty - **/ - @javax.annotation.Nonnull - public WireCounterparty getCounterparty() { - return counterparty; - } - - - public void setCounterparty(WireCounterparty counterparty) { - this.counterparty = counterparty; - } - - - public CreateWirePaymentAttributes idempotencyKey(String idempotencyKey) { - - this.idempotencyKey = idempotencyKey; - return this; - } - - /** - * Get idempotencyKey - * @return idempotencyKey - **/ - @javax.annotation.Nullable - public String getIdempotencyKey() { - return idempotencyKey; - } - - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - - public CreateWirePaymentAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateWirePaymentAttributes createWirePaymentAttributes = (CreateWirePaymentAttributes) o; - return Objects.equals(this.amount, createWirePaymentAttributes.amount) && - Objects.equals(this.direction, createWirePaymentAttributes.direction) && - Objects.equals(this.description, createWirePaymentAttributes.description) && - Objects.equals(this.counterparty, createWirePaymentAttributes.counterparty) && - Objects.equals(this.idempotencyKey, createWirePaymentAttributes.idempotencyKey) && - Objects.equals(this.tags, createWirePaymentAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(amount, direction, description, counterparty, idempotencyKey, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateWirePaymentAttributes {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); - sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("direction"); - openapiFields.add("description"); - openapiFields.add("counterparty"); - openapiFields.add("idempotencyKey"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("counterparty"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateWirePaymentAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateWirePaymentAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateWirePaymentAttributes is not found in the empty JSON string", CreateWirePaymentAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateWirePaymentAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateWirePaymentAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateWirePaymentAttributes.openapiRequiredFields) { - 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("direction") != null && !jsonObj.get("direction").isJsonNull()) && !jsonObj.get("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - // validate the required field `counterparty` - WireCounterparty.validateJsonElement(jsonObj.get("counterparty")); - if ((jsonObj.get("idempotencyKey") != null && !jsonObj.get("idempotencyKey").isJsonNull()) && !jsonObj.get("idempotencyKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `idempotencyKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idempotencyKey").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateWirePaymentAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateWirePaymentAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateWirePaymentAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateWirePaymentAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateWirePaymentAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateWirePaymentAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateWirePaymentAttributes - * @throws IOException if the JSON string is invalid with respect to CreateWirePaymentAttributes - */ - public static CreateWirePaymentAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateWirePaymentAttributes.class); - } - - /** - * Convert an instance of CreateWirePaymentAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreditAccount.java b/src/main/java/org/openapitools/client/model/CreditAccount.java deleted file mode 100644 index ff6cbe50..00000000 --- a/src/main/java/org/openapitools/client/model/CreditAccount.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Account; -import org.openapitools.client.model.CreditAccountAllOfAttributes; -import org.openapitools.client.model.CreditAccountRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreditAccount - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreditAccount extends Account { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreditAccountAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CreditAccountRelationships relationships; - - public CreditAccount() { - this.type = this.getClass().getSimpleName(); - } - - public CreditAccount attributes(CreditAccountAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreditAccountAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreditAccountAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public CreditAccount relationships(CreditAccountRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CreditAccountRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CreditAccountRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreditAccount creditAccount = (CreditAccount) o; - return Objects.equals(this.attributes, creditAccount.attributes) && - Objects.equals(this.relationships, creditAccount.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreditAccount {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreditAccount - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreditAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreditAccount is not found in the empty JSON string", CreditAccount.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreditAccount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreditAccount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreditAccount.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreditAccount.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreditAccount' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreditAccount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreditAccount value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreditAccount read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreditAccount given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreditAccount - * @throws IOException if the JSON string is invalid with respect to CreditAccount - */ - public static CreditAccount fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreditAccount.class); - } - - /** - * Convert an instance of CreditAccount to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreditAccountAllOfAttributes.java b/src/main/java/org/openapitools/client/model/CreditAccountAllOfAttributes.java deleted file mode 100644 index 9327b595..00000000 --- a/src/main/java/org/openapitools/client/model/CreditAccountAllOfAttributes.java +++ /dev/null @@ -1,797 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreditAccountAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreditAccountAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_CREDIT_TERMS = "creditTerms"; - @SerializedName(SERIALIZED_NAME_CREDIT_TERMS) - private String creditTerms; - - public static final String SERIALIZED_NAME_CURRENCY = "currency"; - @SerializedName(SERIALIZED_NAME_CURRENCY) - private String currency = "USD"; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_HOLD = "hold"; - @SerializedName(SERIALIZED_NAME_HOLD) - private Integer hold; - - public static final String SERIALIZED_NAME_AVAILABLE = "available"; - @SerializedName(SERIALIZED_NAME_AVAILABLE) - private Integer available; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - OPEN("Open"), - - CLOSED("Closed"), - - FROZEN("Frozen"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - /** - * Gets or Sets closeReason - */ - @JsonAdapter(CloseReasonEnum.Adapter.class) - public enum CloseReasonEnum { - BYCUSTOMER("ByCustomer"), - - FRAUD("Fraud"), - - OVERDUE("Overdue"); - - private String value; - - CloseReasonEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static CloseReasonEnum fromValue(String value) { - for (CloseReasonEnum b : CloseReasonEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final CloseReasonEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public CloseReasonEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return CloseReasonEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_CLOSE_REASON = "closeReason"; - @SerializedName(SERIALIZED_NAME_CLOSE_REASON) - private CloseReasonEnum closeReason; - - /** - * Gets or Sets fraudReason - */ - @JsonAdapter(FraudReasonEnum.Adapter.class) - public enum FraudReasonEnum { - ACHACTIVITY("ACHActivity"), - - CARDACTIVITY("CardActivity"), - - CHECKACTIVITY("CheckActivity"), - - APPLICATIONHISTORY("ApplicationHistory"), - - ACCOUNTACTIVITY("AccountActivity"), - - CLIENTIDENTIFIED("ClientIdentified"), - - IDENTITYTHEFT("IdentityTheft"), - - LINKEDTOFRAUDULENTCUSTOMER("LinkedToFraudulentCustomer"); - - private String value; - - FraudReasonEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FraudReasonEnum fromValue(String value) { - for (FraudReasonEnum b : FraudReasonEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FraudReasonEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FraudReasonEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FraudReasonEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_FRAUD_REASON = "fraudReason"; - @SerializedName(SERIALIZED_NAME_FRAUD_REASON) - private FraudReasonEnum fraudReason; - - public static final String SERIALIZED_NAME_CLOSE_REASON_TEXT = "closeReasonText"; - @SerializedName(SERIALIZED_NAME_CLOSE_REASON_TEXT) - private String closeReasonText; - - public static final String SERIALIZED_NAME_FREEZE_REASON = "freezeReason"; - @SerializedName(SERIALIZED_NAME_FREEZE_REASON) - private String freezeReason; - - public static final String SERIALIZED_NAME_CREDIT_LIMIT = "creditLimit"; - @SerializedName(SERIALIZED_NAME_CREDIT_LIMIT) - private Integer creditLimit; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public CreditAccountAllOfAttributes() { - } - - public CreditAccountAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public CreditAccountAllOfAttributes name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public CreditAccountAllOfAttributes creditTerms(String creditTerms) { - - this.creditTerms = creditTerms; - return this; - } - - /** - * Get creditTerms - * @return creditTerms - **/ - @javax.annotation.Nonnull - public String getCreditTerms() { - return creditTerms; - } - - - public void setCreditTerms(String creditTerms) { - this.creditTerms = creditTerms; - } - - - public CreditAccountAllOfAttributes currency(String currency) { - - this.currency = currency; - return this; - } - - /** - * Get currency - * @return currency - **/ - @javax.annotation.Nonnull - public String getCurrency() { - return currency; - } - - - public void setCurrency(String currency) { - this.currency = currency; - } - - - public CreditAccountAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public CreditAccountAllOfAttributes hold(Integer hold) { - - this.hold = hold; - return this; - } - - /** - * Get hold - * @return hold - **/ - @javax.annotation.Nonnull - public Integer getHold() { - return hold; - } - - - public void setHold(Integer hold) { - this.hold = hold; - } - - - public CreditAccountAllOfAttributes available(Integer available) { - - this.available = available; - return this; - } - - /** - * Get available - * @return available - **/ - @javax.annotation.Nonnull - public Integer getAvailable() { - return available; - } - - - public void setAvailable(Integer available) { - this.available = available; - } - - - public CreditAccountAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nonnull - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public CreditAccountAllOfAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public CreditAccountAllOfAttributes closeReason(CloseReasonEnum closeReason) { - - this.closeReason = closeReason; - return this; - } - - /** - * Get closeReason - * @return closeReason - **/ - @javax.annotation.Nullable - public CloseReasonEnum getCloseReason() { - return closeReason; - } - - - public void setCloseReason(CloseReasonEnum closeReason) { - this.closeReason = closeReason; - } - - - public CreditAccountAllOfAttributes fraudReason(FraudReasonEnum fraudReason) { - - this.fraudReason = fraudReason; - return this; - } - - /** - * Get fraudReason - * @return fraudReason - **/ - @javax.annotation.Nullable - public FraudReasonEnum getFraudReason() { - return fraudReason; - } - - - public void setFraudReason(FraudReasonEnum fraudReason) { - this.fraudReason = fraudReason; - } - - - public CreditAccountAllOfAttributes closeReasonText(String closeReasonText) { - - this.closeReasonText = closeReasonText; - return this; - } - - /** - * Get closeReasonText - * @return closeReasonText - **/ - @javax.annotation.Nullable - public String getCloseReasonText() { - return closeReasonText; - } - - - public void setCloseReasonText(String closeReasonText) { - this.closeReasonText = closeReasonText; - } - - - public CreditAccountAllOfAttributes freezeReason(String freezeReason) { - - this.freezeReason = freezeReason; - return this; - } - - /** - * Get freezeReason - * @return freezeReason - **/ - @javax.annotation.Nullable - public String getFreezeReason() { - return freezeReason; - } - - - public void setFreezeReason(String freezeReason) { - this.freezeReason = freezeReason; - } - - - public CreditAccountAllOfAttributes creditLimit(Integer creditLimit) { - - this.creditLimit = creditLimit; - return this; - } - - /** - * Get creditLimit - * minimum: 0 - * @return creditLimit - **/ - @javax.annotation.Nonnull - public Integer getCreditLimit() { - return creditLimit; - } - - - public void setCreditLimit(Integer creditLimit) { - this.creditLimit = creditLimit; - } - - - public CreditAccountAllOfAttributes updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreditAccountAllOfAttributes creditAccountAllOfAttributes = (CreditAccountAllOfAttributes) o; - return Objects.equals(this.createdAt, creditAccountAllOfAttributes.createdAt) && - Objects.equals(this.name, creditAccountAllOfAttributes.name) && - Objects.equals(this.creditTerms, creditAccountAllOfAttributes.creditTerms) && - Objects.equals(this.currency, creditAccountAllOfAttributes.currency) && - Objects.equals(this.balance, creditAccountAllOfAttributes.balance) && - Objects.equals(this.hold, creditAccountAllOfAttributes.hold) && - Objects.equals(this.available, creditAccountAllOfAttributes.available) && - Objects.equals(this.tags, creditAccountAllOfAttributes.tags) && - Objects.equals(this.status, creditAccountAllOfAttributes.status) && - Objects.equals(this.closeReason, creditAccountAllOfAttributes.closeReason) && - Objects.equals(this.fraudReason, creditAccountAllOfAttributes.fraudReason) && - Objects.equals(this.closeReasonText, creditAccountAllOfAttributes.closeReasonText) && - Objects.equals(this.freezeReason, creditAccountAllOfAttributes.freezeReason) && - Objects.equals(this.creditLimit, creditAccountAllOfAttributes.creditLimit) && - Objects.equals(this.updatedAt, creditAccountAllOfAttributes.updatedAt); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, name, creditTerms, currency, balance, hold, available, tags, status, closeReason, fraudReason, closeReasonText, freezeReason, creditLimit, updatedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreditAccountAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" creditTerms: ").append(toIndentedString(creditTerms)).append("\n"); - sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" hold: ").append(toIndentedString(hold)).append("\n"); - sb.append(" available: ").append(toIndentedString(available)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" closeReason: ").append(toIndentedString(closeReason)).append("\n"); - sb.append(" fraudReason: ").append(toIndentedString(fraudReason)).append("\n"); - sb.append(" closeReasonText: ").append(toIndentedString(closeReasonText)).append("\n"); - sb.append(" freezeReason: ").append(toIndentedString(freezeReason)).append("\n"); - sb.append(" creditLimit: ").append(toIndentedString(creditLimit)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("name"); - openapiFields.add("creditTerms"); - openapiFields.add("currency"); - openapiFields.add("balance"); - openapiFields.add("hold"); - openapiFields.add("available"); - openapiFields.add("tags"); - openapiFields.add("status"); - openapiFields.add("closeReason"); - openapiFields.add("fraudReason"); - openapiFields.add("closeReasonText"); - openapiFields.add("freezeReason"); - openapiFields.add("creditLimit"); - openapiFields.add("updatedAt"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("creditTerms"); - openapiRequiredFields.add("currency"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("hold"); - openapiRequiredFields.add("available"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("creditLimit"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreditAccountAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreditAccountAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreditAccountAllOfAttributes is not found in the empty JSON string", CreditAccountAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreditAccountAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreditAccountAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreditAccountAllOfAttributes.openapiRequiredFields) { - 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("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if (!jsonObj.get("creditTerms").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `creditTerms` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creditTerms").toString())); - } - if (!jsonObj.get("currency").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currency").toString())); - } - if (!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())); - } - if ((jsonObj.get("closeReason") != null && !jsonObj.get("closeReason").isJsonNull()) && !jsonObj.get("closeReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `closeReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("closeReason").toString())); - } - if ((jsonObj.get("fraudReason") != null && !jsonObj.get("fraudReason").isJsonNull()) && !jsonObj.get("fraudReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fraudReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fraudReason").toString())); - } - if ((jsonObj.get("closeReasonText") != null && !jsonObj.get("closeReasonText").isJsonNull()) && !jsonObj.get("closeReasonText").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `closeReasonText` to be a primitive type in the JSON string but got `%s`", jsonObj.get("closeReasonText").toString())); - } - if ((jsonObj.get("freezeReason") != null && !jsonObj.get("freezeReason").isJsonNull()) && !jsonObj.get("freezeReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `freezeReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("freezeReason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreditAccountAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreditAccountAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreditAccountAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreditAccountAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreditAccountAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreditAccountAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreditAccountAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to CreditAccountAllOfAttributes - */ - public static CreditAccountAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreditAccountAllOfAttributes.class); - } - - /** - * Convert an instance of CreditAccountAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreditAccountRelationships.java b/src/main/java/org/openapitools/client/model/CreditAccountRelationships.java deleted file mode 100644 index 8aa73fac..00000000 --- a/src/main/java/org/openapitools/client/model/CreditAccountRelationships.java +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CustomerLinkage; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreditAccountRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreditAccountRelationships { - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private CustomerLinkage customer; - - public CreditAccountRelationships() { - } - - public CreditAccountRelationships customer(CustomerLinkage customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nonnull - public CustomerLinkage getCustomer() { - return customer; - } - - - public void setCustomer(CustomerLinkage customer) { - this.customer = customer; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the CreditAccountRelationships instance itself - */ - public CreditAccountRelationships putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreditAccountRelationships creditAccountRelationships = (CreditAccountRelationships) o; - return Objects.equals(this.customer, creditAccountRelationships.customer)&& - Objects.equals(this.additionalProperties, creditAccountRelationships.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(customer, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreditAccountRelationships {\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("customer"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("customer"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreditAccountRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreditAccountRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreditAccountRelationships is not found in the empty JSON string", CreditAccountRelationships.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreditAccountRelationships.openapiRequiredFields) { - 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(); - // validate the required field `customer` - CustomerLinkage.validateJsonElement(jsonObj.get("customer")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreditAccountRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreditAccountRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreditAccountRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreditAccountRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public CreditAccountRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - CreditAccountRelationships instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreditAccountRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreditAccountRelationships - * @throws IOException if the JSON string is invalid with respect to CreditAccountRelationships - */ - public static CreditAccountRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreditAccountRelationships.class); - } - - /** - * Convert an instance of CreditAccountRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreditLimits.java b/src/main/java/org/openapitools/client/model/CreditLimits.java deleted file mode 100644 index f0f3540e..00000000 --- a/src/main/java/org/openapitools/client/model/CreditLimits.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CreditLimitsAllOfAttributes; -import org.openapitools.client.model.Limits1; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreditLimits - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreditLimits extends Limits1 { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CreditLimitsAllOfAttributes attributes; - - public CreditLimits() { - this.type = this.getClass().getSimpleName(); - } - - public CreditLimits attributes(CreditLimitsAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CreditLimitsAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CreditLimitsAllOfAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreditLimits creditLimits = (CreditLimits) o; - return Objects.equals(this.attributes, creditLimits.attributes) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreditLimits {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreditLimits - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreditLimits.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreditLimits is not found in the empty JSON string", CreditLimits.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreditLimits.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreditLimits` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreditLimits.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreditLimits.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreditLimits' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreditLimits.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreditLimits value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreditLimits read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreditLimits given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreditLimits - * @throws IOException if the JSON string is invalid with respect to CreditLimits - */ - public static CreditLimits fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreditLimits.class); - } - - /** - * Convert an instance of CreditLimits to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CreditLimitsAllOfAttributes.java b/src/main/java/org/openapitools/client/model/CreditLimitsAllOfAttributes.java deleted file mode 100644 index 91946b13..00000000 --- a/src/main/java/org/openapitools/client/model/CreditLimitsAllOfAttributes.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.DepositLimitsAllOfAttributesCard; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CreditLimitsAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreditLimitsAllOfAttributes { - public static final String SERIALIZED_NAME_CARD = "card"; - @SerializedName(SERIALIZED_NAME_CARD) - private DepositLimitsAllOfAttributesCard card; - - public CreditLimitsAllOfAttributes() { - } - - public CreditLimitsAllOfAttributes card(DepositLimitsAllOfAttributesCard card) { - - this.card = card; - return this; - } - - /** - * Get card - * @return card - **/ - @javax.annotation.Nonnull - public DepositLimitsAllOfAttributesCard getCard() { - return card; - } - - - public void setCard(DepositLimitsAllOfAttributesCard card) { - this.card = card; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreditLimitsAllOfAttributes creditLimitsAllOfAttributes = (CreditLimitsAllOfAttributes) o; - return Objects.equals(this.card, creditLimitsAllOfAttributes.card); - } - - @Override - public int hashCode() { - return Objects.hash(card); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreditLimitsAllOfAttributes {\n"); - sb.append(" card: ").append(toIndentedString(card)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("card"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("card"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreditLimitsAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreditLimitsAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreditLimitsAllOfAttributes is not found in the empty JSON string", CreditLimitsAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreditLimitsAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreditLimitsAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreditLimitsAllOfAttributes.openapiRequiredFields) { - 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(); - // validate the required field `card` - DepositLimitsAllOfAttributesCard.validateJsonElement(jsonObj.get("card")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreditLimitsAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreditLimitsAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreditLimitsAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreditLimitsAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreditLimitsAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreditLimitsAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreditLimitsAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to CreditLimitsAllOfAttributes - */ - public static CreditLimitsAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreditLimitsAllOfAttributes.class); - } - - /** - * Convert an instance of CreditLimitsAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Customer.java b/src/main/java/org/openapitools/client/model/Customer.java deleted file mode 100644 index bc4f7315..00000000 --- a/src/main/java/org/openapitools/client/model/Customer.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Customer - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Customer { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - protected String type; - - public Customer() { - this.type = this.getClass().getSimpleName(); - } - - public Customer id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public Customer type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Customer customer = (Customer) o; - return Objects.equals(this.id, customer.id) && - Objects.equals(this.type, customer.type); - } - - @Override - public int hashCode() { - return Objects.hash(id, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Customer {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Customer - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Customer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Customer is not found in the empty JSON string", Customer.openapiRequiredFields.toString())); - } - } - - String discriminatorValue = jsonElement.getAsJsonObject().get("type").getAsString(); - switch (discriminatorValue) { - case "businessCustomer": - BusinessCustomer.validateJsonElement(jsonElement); - break; - case "individualCustomer": - IndividualCustomer.validateJsonElement(jsonElement); - break; - case "trustCustomer": - TrustCustomer.validateJsonElement(jsonElement); - break; - default: - throw new IllegalArgumentException(String.format("The value of the `type` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); - } - } - - - /** - * Create an instance of Customer given an JSON string - * - * @param jsonString JSON string - * @return An instance of Customer - * @throws IOException if the JSON string is invalid with respect to Customer - */ - public static Customer fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Customer.class); - } - - /** - * Convert an instance of Customer to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CustomerLinkage.java b/src/main/java/org/openapitools/client/model/CustomerLinkage.java deleted file mode 100644 index 0fccbdb1..00000000 --- a/src/main/java/org/openapitools/client/model/CustomerLinkage.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CustomerLinkageData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CustomerLinkage - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CustomerLinkage { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CustomerLinkageData data; - - public CustomerLinkage() { - } - - public CustomerLinkage data(CustomerLinkageData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public CustomerLinkageData getData() { - return data; - } - - - public void setData(CustomerLinkageData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CustomerLinkage customerLinkage = (CustomerLinkage) o; - return Objects.equals(this.data, customerLinkage.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CustomerLinkage {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CustomerLinkage - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CustomerLinkage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerLinkage is not found in the empty JSON string", CustomerLinkage.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CustomerLinkage.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CustomerLinkage` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomerLinkage.openapiRequiredFields) { - 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(); - // validate the required field `data` - CustomerLinkageData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CustomerLinkage.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CustomerLinkage' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CustomerLinkage.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CustomerLinkage value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CustomerLinkage read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CustomerLinkage given an JSON string - * - * @param jsonString JSON string - * @return An instance of CustomerLinkage - * @throws IOException if the JSON string is invalid with respect to CustomerLinkage - */ - public static CustomerLinkage fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CustomerLinkage.class); - } - - /** - * Convert an instance of CustomerLinkage to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CustomerLinkageData.java b/src/main/java/org/openapitools/client/model/CustomerLinkageData.java deleted file mode 100644 index 8c815cd2..00000000 --- a/src/main/java/org/openapitools/client/model/CustomerLinkageData.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CustomerLinkageData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CustomerLinkageData { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - CUSTOMER("customer"), - - BUSINESSCUSTOMER("businessCustomer"), - - INDIVIDUALCUSTOMER("individualCustomer"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public CustomerLinkageData() { - } - - public CustomerLinkageData type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public CustomerLinkageData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CustomerLinkageData customerLinkageData = (CustomerLinkageData) o; - return Objects.equals(this.type, customerLinkageData.type) && - Objects.equals(this.id, customerLinkageData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CustomerLinkageData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CustomerLinkageData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CustomerLinkageData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerLinkageData is not found in the empty JSON string", CustomerLinkageData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CustomerLinkageData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CustomerLinkageData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomerLinkageData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CustomerLinkageData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CustomerLinkageData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CustomerLinkageData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CustomerLinkageData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CustomerLinkageData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CustomerLinkageData given an JSON string - * - * @param jsonString JSON string - * @return An instance of CustomerLinkageData - * @throws IOException if the JSON string is invalid with respect to CustomerLinkageData - */ - public static CustomerLinkageData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CustomerLinkageData.class); - } - - /** - * Convert an instance of CustomerLinkageData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CustomerRelationship.java b/src/main/java/org/openapitools/client/model/CustomerRelationship.java deleted file mode 100644 index 5a8a1995..00000000 --- a/src/main/java/org/openapitools/client/model/CustomerRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReceivedPaymentRelationshipsCustomerData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CustomerRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CustomerRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ReceivedPaymentRelationshipsCustomerData data; - - public CustomerRelationship() { - } - - public CustomerRelationship data(ReceivedPaymentRelationshipsCustomerData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public ReceivedPaymentRelationshipsCustomerData getData() { - return data; - } - - - public void setData(ReceivedPaymentRelationshipsCustomerData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CustomerRelationship customerRelationship = (CustomerRelationship) o; - return Objects.equals(this.data, customerRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CustomerRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CustomerRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CustomerRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerRelationship is not found in the empty JSON string", CustomerRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CustomerRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CustomerRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomerRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - ReceivedPaymentRelationshipsCustomerData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CustomerRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CustomerRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CustomerRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CustomerRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CustomerRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CustomerRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of CustomerRelationship - * @throws IOException if the JSON string is invalid with respect to CustomerRelationship - */ - public static CustomerRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CustomerRelationship.class); - } - - /** - * Convert an instance of CustomerRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CustomerRelationships.java b/src/main/java/org/openapitools/client/model/CustomerRelationships.java deleted file mode 100644 index 3872391e..00000000 --- a/src/main/java/org/openapitools/client/model/CustomerRelationships.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.OrgRelationship; -import org.openapitools.client.model.Relationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CustomerRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CustomerRelationships { - public static final String SERIALIZED_NAME_ORG = "org"; - @SerializedName(SERIALIZED_NAME_ORG) - private OrgRelationship org; - - public static final String SERIALIZED_NAME_APPLICATION = "application"; - @SerializedName(SERIALIZED_NAME_APPLICATION) - private Relationship application; - - public CustomerRelationships() { - } - - public CustomerRelationships org(OrgRelationship org) { - - this.org = org; - return this; - } - - /** - * Get org - * @return org - **/ - @javax.annotation.Nullable - public OrgRelationship getOrg() { - return org; - } - - - public void setOrg(OrgRelationship org) { - this.org = org; - } - - - public CustomerRelationships application(Relationship application) { - - this.application = application; - return this; - } - - /** - * Get application - * @return application - **/ - @javax.annotation.Nullable - public Relationship getApplication() { - return application; - } - - - public void setApplication(Relationship application) { - this.application = application; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CustomerRelationships customerRelationships = (CustomerRelationships) o; - return Objects.equals(this.org, customerRelationships.org) && - Objects.equals(this.application, customerRelationships.application); - } - - @Override - public int hashCode() { - return Objects.hash(org, application); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CustomerRelationships {\n"); - sb.append(" org: ").append(toIndentedString(org)).append("\n"); - sb.append(" application: ").append(toIndentedString(application)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("org"); - openapiFields.add("application"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CustomerRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CustomerRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerRelationships is not found in the empty JSON string", CustomerRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CustomerRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CustomerRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `org` - if (jsonObj.get("org") != null && !jsonObj.get("org").isJsonNull()) { - OrgRelationship.validateJsonElement(jsonObj.get("org")); - } - // validate the optional field `application` - if (jsonObj.get("application") != null && !jsonObj.get("application").isJsonNull()) { - Relationship.validateJsonElement(jsonObj.get("application")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CustomerRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CustomerRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CustomerRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CustomerRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CustomerRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CustomerRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of CustomerRelationships - * @throws IOException if the JSON string is invalid with respect to CustomerRelationships - */ - public static CustomerRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CustomerRelationships.class); - } - - /** - * Convert an instance of CustomerRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CustomerRepaymentReturnedTransaction.java b/src/main/java/org/openapitools/client/model/CustomerRepaymentReturnedTransaction.java deleted file mode 100644 index 3b67cdbd..00000000 --- a/src/main/java/org/openapitools/client/model/CustomerRepaymentReturnedTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.FeeTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CustomerRepaymentReturnedTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CustomerRepaymentReturnedTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private FeeTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public CustomerRepaymentReturnedTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public CustomerRepaymentReturnedTransaction attributes(FeeTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public FeeTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(FeeTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public CustomerRepaymentReturnedTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CustomerRepaymentReturnedTransaction customerRepaymentReturnedTransaction = (CustomerRepaymentReturnedTransaction) o; - return Objects.equals(this.attributes, customerRepaymentReturnedTransaction.attributes) && - Objects.equals(this.relationships, customerRepaymentReturnedTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CustomerRepaymentReturnedTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CustomerRepaymentReturnedTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CustomerRepaymentReturnedTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerRepaymentReturnedTransaction is not found in the empty JSON string", CustomerRepaymentReturnedTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CustomerRepaymentReturnedTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CustomerRepaymentReturnedTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomerRepaymentReturnedTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CustomerRepaymentReturnedTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CustomerRepaymentReturnedTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CustomerRepaymentReturnedTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CustomerRepaymentReturnedTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CustomerRepaymentReturnedTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CustomerRepaymentReturnedTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of CustomerRepaymentReturnedTransaction - * @throws IOException if the JSON string is invalid with respect to CustomerRepaymentReturnedTransaction - */ - public static CustomerRepaymentReturnedTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CustomerRepaymentReturnedTransaction.class); - } - - /** - * Convert an instance of CustomerRepaymentReturnedTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CustomerRepaymentTransaction.java b/src/main/java/org/openapitools/client/model/CustomerRepaymentTransaction.java deleted file mode 100644 index fb3586bb..00000000 --- a/src/main/java/org/openapitools/client/model/CustomerRepaymentTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.FeeTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CustomerRepaymentTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CustomerRepaymentTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private FeeTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public CustomerRepaymentTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public CustomerRepaymentTransaction attributes(FeeTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public FeeTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(FeeTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public CustomerRepaymentTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CustomerRepaymentTransaction customerRepaymentTransaction = (CustomerRepaymentTransaction) o; - return Objects.equals(this.attributes, customerRepaymentTransaction.attributes) && - Objects.equals(this.relationships, customerRepaymentTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CustomerRepaymentTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CustomerRepaymentTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CustomerRepaymentTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerRepaymentTransaction is not found in the empty JSON string", CustomerRepaymentTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CustomerRepaymentTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CustomerRepaymentTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomerRepaymentTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CustomerRepaymentTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CustomerRepaymentTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CustomerRepaymentTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CustomerRepaymentTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CustomerRepaymentTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CustomerRepaymentTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of CustomerRepaymentTransaction - * @throws IOException if the JSON string is invalid with respect to CustomerRepaymentTransaction - */ - public static CustomerRepaymentTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CustomerRepaymentTransaction.class); - } - - /** - * Convert an instance of CustomerRepaymentTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CustomerToken.java b/src/main/java/org/openapitools/client/model/CustomerToken.java deleted file mode 100644 index b7066393..00000000 --- a/src/main/java/org/openapitools/client/model/CustomerToken.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CustomerTokenAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CustomerToken - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CustomerToken { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "customerToken"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CustomerTokenAttributes attributes; - - public CustomerToken() { - } - - public CustomerToken type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CustomerToken attributes(CustomerTokenAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CustomerTokenAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CustomerTokenAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CustomerToken customerToken = (CustomerToken) o; - return Objects.equals(this.type, customerToken.type) && - Objects.equals(this.attributes, customerToken.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CustomerToken {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CustomerToken - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CustomerToken.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerToken is not found in the empty JSON string", CustomerToken.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CustomerToken.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CustomerToken` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomerToken.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CustomerTokenAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CustomerToken.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CustomerToken' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CustomerToken.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CustomerToken value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CustomerToken read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CustomerToken given an JSON string - * - * @param jsonString JSON string - * @return An instance of CustomerToken - * @throws IOException if the JSON string is invalid with respect to CustomerToken - */ - public static CustomerToken fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CustomerToken.class); - } - - /** - * Convert an instance of CustomerToken to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CustomerTokenAttributes.java b/src/main/java/org/openapitools/client/model/CustomerTokenAttributes.java deleted file mode 100644 index a4b73997..00000000 --- a/src/main/java/org/openapitools/client/model/CustomerTokenAttributes.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CustomerTokenAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CustomerTokenAttributes { - public static final String SERIALIZED_NAME_TOKEN = "token"; - @SerializedName(SERIALIZED_NAME_TOKEN) - private String token; - - public static final String SERIALIZED_NAME_EXPIRES_IN = "expiresIn"; - @SerializedName(SERIALIZED_NAME_EXPIRES_IN) - private Integer expiresIn; - - public CustomerTokenAttributes() { - } - - public CustomerTokenAttributes token(String token) { - - this.token = token; - return this; - } - - /** - * Get token - * @return token - **/ - @javax.annotation.Nullable - public String getToken() { - return token; - } - - - public void setToken(String token) { - this.token = token; - } - - - public CustomerTokenAttributes expiresIn(Integer expiresIn) { - - this.expiresIn = expiresIn; - return this; - } - - /** - * Get expiresIn - * @return expiresIn - **/ - @javax.annotation.Nullable - public Integer getExpiresIn() { - return expiresIn; - } - - - public void setExpiresIn(Integer expiresIn) { - this.expiresIn = expiresIn; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CustomerTokenAttributes customerTokenAttributes = (CustomerTokenAttributes) o; - return Objects.equals(this.token, customerTokenAttributes.token) && - Objects.equals(this.expiresIn, customerTokenAttributes.expiresIn); - } - - @Override - public int hashCode() { - return Objects.hash(token, expiresIn); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CustomerTokenAttributes {\n"); - sb.append(" token: ").append(toIndentedString(token)).append("\n"); - sb.append(" expiresIn: ").append(toIndentedString(expiresIn)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("token"); - openapiFields.add("expiresIn"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CustomerTokenAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CustomerTokenAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerTokenAttributes is not found in the empty JSON string", CustomerTokenAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CustomerTokenAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CustomerTokenAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("token") != null && !jsonObj.get("token").isJsonNull()) && !jsonObj.get("token").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CustomerTokenAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CustomerTokenAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CustomerTokenAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CustomerTokenAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CustomerTokenAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CustomerTokenAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CustomerTokenAttributes - * @throws IOException if the JSON string is invalid with respect to CustomerTokenAttributes - */ - public static CustomerTokenAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CustomerTokenAttributes.class); - } - - /** - * Convert an instance of CustomerTokenAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CustomerTokenVerification.java b/src/main/java/org/openapitools/client/model/CustomerTokenVerification.java deleted file mode 100644 index 1e8ffdc2..00000000 --- a/src/main/java/org/openapitools/client/model/CustomerTokenVerification.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CustomerTokenVerificationAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CustomerTokenVerification - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CustomerTokenVerification { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "customerTokenVerification"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CustomerTokenVerificationAttributes attributes; - - public CustomerTokenVerification() { - } - - public CustomerTokenVerification type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public CustomerTokenVerification attributes(CustomerTokenVerificationAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CustomerTokenVerificationAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CustomerTokenVerificationAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CustomerTokenVerification customerTokenVerification = (CustomerTokenVerification) o; - return Objects.equals(this.type, customerTokenVerification.type) && - Objects.equals(this.attributes, customerTokenVerification.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CustomerTokenVerification {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CustomerTokenVerification - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CustomerTokenVerification.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerTokenVerification is not found in the empty JSON string", CustomerTokenVerification.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CustomerTokenVerification.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CustomerTokenVerification` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomerTokenVerification.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - CustomerTokenVerificationAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CustomerTokenVerification.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CustomerTokenVerification' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CustomerTokenVerification.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CustomerTokenVerification value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CustomerTokenVerification read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CustomerTokenVerification given an JSON string - * - * @param jsonString JSON string - * @return An instance of CustomerTokenVerification - * @throws IOException if the JSON string is invalid with respect to CustomerTokenVerification - */ - public static CustomerTokenVerification fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CustomerTokenVerification.class); - } - - /** - * Convert an instance of CustomerTokenVerification to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CustomerTokenVerificationAttributes.java b/src/main/java/org/openapitools/client/model/CustomerTokenVerificationAttributes.java deleted file mode 100644 index 49a3bec5..00000000 --- a/src/main/java/org/openapitools/client/model/CustomerTokenVerificationAttributes.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CustomerTokenVerificationAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CustomerTokenVerificationAttributes { - public static final String SERIALIZED_NAME_VERIFICATION_TOKEN = "verificationToken"; - @SerializedName(SERIALIZED_NAME_VERIFICATION_TOKEN) - private String verificationToken; - - public CustomerTokenVerificationAttributes() { - } - - public CustomerTokenVerificationAttributes verificationToken(String verificationToken) { - - this.verificationToken = verificationToken; - return this; - } - - /** - * Get verificationToken - * @return verificationToken - **/ - @javax.annotation.Nullable - public String getVerificationToken() { - return verificationToken; - } - - - public void setVerificationToken(String verificationToken) { - this.verificationToken = verificationToken; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CustomerTokenVerificationAttributes customerTokenVerificationAttributes = (CustomerTokenVerificationAttributes) o; - return Objects.equals(this.verificationToken, customerTokenVerificationAttributes.verificationToken); - } - - @Override - public int hashCode() { - return Objects.hash(verificationToken); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CustomerTokenVerificationAttributes {\n"); - sb.append(" verificationToken: ").append(toIndentedString(verificationToken)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("verificationToken"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CustomerTokenVerificationAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CustomerTokenVerificationAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerTokenVerificationAttributes is not found in the empty JSON string", CustomerTokenVerificationAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CustomerTokenVerificationAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CustomerTokenVerificationAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("verificationToken") != null && !jsonObj.get("verificationToken").isJsonNull()) && !jsonObj.get("verificationToken").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `verificationToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("verificationToken").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CustomerTokenVerificationAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CustomerTokenVerificationAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CustomerTokenVerificationAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CustomerTokenVerificationAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CustomerTokenVerificationAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CustomerTokenVerificationAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of CustomerTokenVerificationAttributes - * @throws IOException if the JSON string is invalid with respect to CustomerTokenVerificationAttributes - */ - public static CustomerTokenVerificationAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CustomerTokenVerificationAttributes.class); - } - - /** - * Convert an instance of CustomerTokenVerificationAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CustomersRelationship.java b/src/main/java/org/openapitools/client/model/CustomersRelationship.java deleted file mode 100644 index 24b9cbfb..00000000 --- a/src/main/java/org/openapitools/client/model/CustomersRelationship.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.CustomersRelationshipDataInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CustomersRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CustomersRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public CustomersRelationship() { - } - - public CustomersRelationship data(List data) { - - this.data = data; - return this; - } - - public CustomersRelationship addDataItem(CustomersRelationshipDataInner dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CustomersRelationship customersRelationship = (CustomersRelationship) o; - return Objects.equals(this.data, customersRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CustomersRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CustomersRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CustomersRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CustomersRelationship is not found in the empty JSON string", CustomersRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CustomersRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CustomersRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - CustomersRelationshipDataInner.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CustomersRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CustomersRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CustomersRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CustomersRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CustomersRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CustomersRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of CustomersRelationship - * @throws IOException if the JSON string is invalid with respect to CustomersRelationship - */ - public static CustomersRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CustomersRelationship.class); - } - - /** - * Convert an instance of CustomersRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/CustomersRelationshipDataInner.java b/src/main/java/org/openapitools/client/model/CustomersRelationshipDataInner.java deleted file mode 100644 index 1e80258a..00000000 --- a/src/main/java/org/openapitools/client/model/CustomersRelationshipDataInner.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CustomersRelationshipDataInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CustomersRelationshipDataInner { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "customer"; - - public CustomersRelationshipDataInner() { - } - - public CustomersRelationshipDataInner id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public CustomersRelationshipDataInner type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CustomersRelationshipDataInner customersRelationshipDataInner = (CustomersRelationshipDataInner) o; - return Objects.equals(this.id, customersRelationshipDataInner.id) && - Objects.equals(this.type, customersRelationshipDataInner.type); - } - - @Override - public int hashCode() { - return Objects.hash(id, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CustomersRelationshipDataInner {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CustomersRelationshipDataInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CustomersRelationshipDataInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CustomersRelationshipDataInner is not found in the empty JSON string", CustomersRelationshipDataInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CustomersRelationshipDataInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CustomersRelationshipDataInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - 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())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CustomersRelationshipDataInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CustomersRelationshipDataInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CustomersRelationshipDataInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CustomersRelationshipDataInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CustomersRelationshipDataInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CustomersRelationshipDataInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of CustomersRelationshipDataInner - * @throws IOException if the JSON string is invalid with respect to CustomersRelationshipDataInner - */ - public static CustomersRelationshipDataInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CustomersRelationshipDataInner.class); - } - - /** - * Convert an instance of CustomersRelationshipDataInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DeclineAuthorizationRequest.java b/src/main/java/org/openapitools/client/model/DeclineAuthorizationRequest.java deleted file mode 100644 index 90e8448f..00000000 --- a/src/main/java/org/openapitools/client/model/DeclineAuthorizationRequest.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DeclineAuthorizationRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeclineAuthorizationRequest { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private DeclineAuthorizationRequest data; - - public DeclineAuthorizationRequest() { - } - - public DeclineAuthorizationRequest data(DeclineAuthorizationRequest data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public DeclineAuthorizationRequest getData() { - return data; - } - - - public void setData(DeclineAuthorizationRequest data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeclineAuthorizationRequest declineAuthorizationRequest = (DeclineAuthorizationRequest) o; - return Objects.equals(this.data, declineAuthorizationRequest.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeclineAuthorizationRequest {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeclineAuthorizationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeclineAuthorizationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeclineAuthorizationRequest is not found in the empty JSON string", DeclineAuthorizationRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DeclineAuthorizationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeclineAuthorizationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - DeclineAuthorizationRequest.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeclineAuthorizationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeclineAuthorizationRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeclineAuthorizationRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeclineAuthorizationRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeclineAuthorizationRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeclineAuthorizationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeclineAuthorizationRequest - * @throws IOException if the JSON string is invalid with respect to DeclineAuthorizationRequest - */ - public static DeclineAuthorizationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeclineAuthorizationRequest.class); - } - - /** - * Convert an instance of DeclineAuthorizationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DeclineAuthorizationRequestAttributes.java b/src/main/java/org/openapitools/client/model/DeclineAuthorizationRequestAttributes.java deleted file mode 100644 index 17b083f7..00000000 --- a/src/main/java/org/openapitools/client/model/DeclineAuthorizationRequestAttributes.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DeclineAuthorizationRequestAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeclineAuthorizationRequestAttributes { - /** - * Gets or Sets reason - */ - @JsonAdapter(ReasonEnum.Adapter.class) - public enum ReasonEnum { - ACCOUNTCLOSED("AccountClosed"), - - CARDEXCEEDSAMOUNTLIMIT("CardExceedsAmountLimit"), - - DONOTHONOR("DoNotHonor"), - - INSUFFICIENTFUNDS("InsufficientFunds"), - - INVALIDMERCHANT("InvalidMerchant"), - - REFERTOCARDISSUER("ReferToCardIssuer"), - - RESTRICTEDCARD("RestrictedCard"), - - TRANSACTIONNOTPERMITTEDTOCARDHOLDER("TransactionNotPermittedToCardholder"); - - private String value; - - ReasonEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ReasonEnum fromValue(String value) { - for (ReasonEnum b : ReasonEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ReasonEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ReasonEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ReasonEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_REASON = "reason"; - @SerializedName(SERIALIZED_NAME_REASON) - private ReasonEnum reason; - - public DeclineAuthorizationRequestAttributes() { - } - - public DeclineAuthorizationRequestAttributes reason(ReasonEnum reason) { - - this.reason = reason; - return this; - } - - /** - * Get reason - * @return reason - **/ - @javax.annotation.Nullable - public ReasonEnum getReason() { - return reason; - } - - - public void setReason(ReasonEnum reason) { - this.reason = reason; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeclineAuthorizationRequestAttributes declineAuthorizationRequestAttributes = (DeclineAuthorizationRequestAttributes) o; - return Objects.equals(this.reason, declineAuthorizationRequestAttributes.reason); - } - - @Override - public int hashCode() { - return Objects.hash(reason); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeclineAuthorizationRequestAttributes {\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("reason"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeclineAuthorizationRequestAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeclineAuthorizationRequestAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeclineAuthorizationRequestAttributes is not found in the empty JSON string", DeclineAuthorizationRequestAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DeclineAuthorizationRequestAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeclineAuthorizationRequestAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeclineAuthorizationRequestAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeclineAuthorizationRequestAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeclineAuthorizationRequestAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeclineAuthorizationRequestAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeclineAuthorizationRequestAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeclineAuthorizationRequestAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeclineAuthorizationRequestAttributes - * @throws IOException if the JSON string is invalid with respect to DeclineAuthorizationRequestAttributes - */ - public static DeclineAuthorizationRequestAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeclineAuthorizationRequestAttributes.class); - } - - /** - * Convert an instance of DeclineAuthorizationRequestAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DepositAccount.java b/src/main/java/org/openapitools/client/model/DepositAccount.java deleted file mode 100644 index 146bfb2e..00000000 --- a/src/main/java/org/openapitools/client/model/DepositAccount.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Account; -import org.openapitools.client.model.DepositAccountAllOfAttributes; -import org.openapitools.client.model.DepositAccountRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DepositAccount - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DepositAccount extends Account { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private DepositAccountAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private DepositAccountRelationships relationships; - - public DepositAccount() { - this.type = this.getClass().getSimpleName(); - } - - public DepositAccount attributes(DepositAccountAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public DepositAccountAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(DepositAccountAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public DepositAccount relationships(DepositAccountRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public DepositAccountRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(DepositAccountRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DepositAccount depositAccount = (DepositAccount) o; - return Objects.equals(this.attributes, depositAccount.attributes) && - Objects.equals(this.relationships, depositAccount.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DepositAccount {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DepositAccount - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DepositAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DepositAccount is not found in the empty JSON string", DepositAccount.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DepositAccount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DepositAccount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DepositAccount.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DepositAccount.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DepositAccount' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DepositAccount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DepositAccount value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DepositAccount read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DepositAccount given an JSON string - * - * @param jsonString JSON string - * @return An instance of DepositAccount - * @throws IOException if the JSON string is invalid with respect to DepositAccount - */ - public static DepositAccount fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DepositAccount.class); - } - - /** - * Convert an instance of DepositAccount to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DepositAccountAllOfAttributes.java b/src/main/java/org/openapitools/client/model/DepositAccountAllOfAttributes.java deleted file mode 100644 index 046dc8d4..00000000 --- a/src/main/java/org/openapitools/client/model/DepositAccountAllOfAttributes.java +++ /dev/null @@ -1,1027 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.DepositAccountAllOfAttributesSecondaryAccountNumber; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DepositAccountAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DepositAccountAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_DEPOSIT_PRODUCT = "depositProduct"; - @SerializedName(SERIALIZED_NAME_DEPOSIT_PRODUCT) - private String depositProduct; - - public static final String SERIALIZED_NAME_ROUTING_NUMBER = "routingNumber"; - @SerializedName(SERIALIZED_NAME_ROUTING_NUMBER) - private String routingNumber; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_SECONDARY_ACCOUNT_NUMBER = "secondaryAccountNumber"; - @SerializedName(SERIALIZED_NAME_SECONDARY_ACCOUNT_NUMBER) - private DepositAccountAllOfAttributesSecondaryAccountNumber secondaryAccountNumber; - - public static final String SERIALIZED_NAME_CURRENCY = "currency"; - @SerializedName(SERIALIZED_NAME_CURRENCY) - private String currency = "USD"; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_OVERDRAFT_LIMIT = "overdraftLimit"; - @SerializedName(SERIALIZED_NAME_OVERDRAFT_LIMIT) - private Integer overdraftLimit; - - public static final String SERIALIZED_NAME_HOLD = "hold"; - @SerializedName(SERIALIZED_NAME_HOLD) - private Integer hold; - - public static final String SERIALIZED_NAME_AVAILABLE = "available"; - @SerializedName(SERIALIZED_NAME_AVAILABLE) - private Integer available; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - OPEN("Open"), - - CLOSED("Closed"), - - FROZEN("Frozen"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - /** - * Gets or Sets closeReason - */ - @JsonAdapter(CloseReasonEnum.Adapter.class) - public enum CloseReasonEnum { - BYCUSTOMER("ByCustomer"), - - FRAUD("Fraud"); - - private String value; - - CloseReasonEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static CloseReasonEnum fromValue(String value) { - for (CloseReasonEnum b : CloseReasonEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final CloseReasonEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public CloseReasonEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return CloseReasonEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_CLOSE_REASON = "closeReason"; - @SerializedName(SERIALIZED_NAME_CLOSE_REASON) - private CloseReasonEnum closeReason; - - /** - * Gets or Sets fraudReason - */ - @JsonAdapter(FraudReasonEnum.Adapter.class) - public enum FraudReasonEnum { - ACHACTIVITY("ACHActivity"), - - CARDACTIVITY("CardActivity"), - - CHECKACTIVITY("CheckActivity"), - - APPLICATIONHISTORY("ApplicationHistory"), - - ACCOUNTACTIVITY("AccountActivity"), - - CLIENTIDENTIFIED("ClientIdentified"), - - IDENTITYTHEFT("IdentityTheft"), - - LINKEDTOFRAUDULENTCUSTOMER("LinkedToFraudulentCustomer"); - - private String value; - - FraudReasonEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FraudReasonEnum fromValue(String value) { - for (FraudReasonEnum b : FraudReasonEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FraudReasonEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FraudReasonEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FraudReasonEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_FRAUD_REASON = "fraudReason"; - @SerializedName(SERIALIZED_NAME_FRAUD_REASON) - private FraudReasonEnum fraudReason; - - public static final String SERIALIZED_NAME_CLOSE_REASON_TEXT = "closeReasonText"; - @SerializedName(SERIALIZED_NAME_CLOSE_REASON_TEXT) - private String closeReasonText; - - public static final String SERIALIZED_NAME_FREEZE_REASON = "freezeReason"; - @SerializedName(SERIALIZED_NAME_FREEZE_REASON) - private String freezeReason; - - public static final String SERIALIZED_NAME_MASKED_ACCOUNT_NUMBER = "maskedAccountNumber"; - @SerializedName(SERIALIZED_NAME_MASKED_ACCOUNT_NUMBER) - private String maskedAccountNumber; - - public static final String SERIALIZED_NAME_IS_OVERDRAWN_WITHIN_LIMIT = "isOverdrawnWithinLimit"; - @SerializedName(SERIALIZED_NAME_IS_OVERDRAWN_WITHIN_LIMIT) - private Boolean isOverdrawnWithinLimit; - - /** - * Gets or Sets dacaStatus - */ - @JsonAdapter(DacaStatusEnum.Adapter.class) - public enum DacaStatusEnum { - ACTIVATED("Activated"), - - ENTERED("Entered"); - - private String value; - - DacaStatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DacaStatusEnum fromValue(String value) { - for (DacaStatusEnum b : DacaStatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DacaStatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DacaStatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DacaStatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DACA_STATUS = "dacaStatus"; - @SerializedName(SERIALIZED_NAME_DACA_STATUS) - private DacaStatusEnum dacaStatus; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public DepositAccountAllOfAttributes() { - } - - public DepositAccountAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public DepositAccountAllOfAttributes name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public DepositAccountAllOfAttributes depositProduct(String depositProduct) { - - this.depositProduct = depositProduct; - return this; - } - - /** - * Get depositProduct - * @return depositProduct - **/ - @javax.annotation.Nonnull - public String getDepositProduct() { - return depositProduct; - } - - - public void setDepositProduct(String depositProduct) { - this.depositProduct = depositProduct; - } - - - public DepositAccountAllOfAttributes routingNumber(String routingNumber) { - - this.routingNumber = routingNumber; - return this; - } - - /** - * Get routingNumber - * @return routingNumber - **/ - @javax.annotation.Nonnull - public String getRoutingNumber() { - return routingNumber; - } - - - public void setRoutingNumber(String routingNumber) { - this.routingNumber = routingNumber; - } - - - public DepositAccountAllOfAttributes accountNumber(String accountNumber) { - - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - **/ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public DepositAccountAllOfAttributes secondaryAccountNumber(DepositAccountAllOfAttributesSecondaryAccountNumber secondaryAccountNumber) { - - this.secondaryAccountNumber = secondaryAccountNumber; - return this; - } - - /** - * Get secondaryAccountNumber - * @return secondaryAccountNumber - **/ - @javax.annotation.Nullable - public DepositAccountAllOfAttributesSecondaryAccountNumber getSecondaryAccountNumber() { - return secondaryAccountNumber; - } - - - public void setSecondaryAccountNumber(DepositAccountAllOfAttributesSecondaryAccountNumber secondaryAccountNumber) { - this.secondaryAccountNumber = secondaryAccountNumber; - } - - - public DepositAccountAllOfAttributes currency(String currency) { - - this.currency = currency; - return this; - } - - /** - * Get currency - * @return currency - **/ - @javax.annotation.Nonnull - public String getCurrency() { - return currency; - } - - - public void setCurrency(String currency) { - this.currency = currency; - } - - - public DepositAccountAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public DepositAccountAllOfAttributes overdraftLimit(Integer overdraftLimit) { - - this.overdraftLimit = overdraftLimit; - return this; - } - - /** - * Get overdraftLimit - * minimum: 0 - * @return overdraftLimit - **/ - @javax.annotation.Nullable - public Integer getOverdraftLimit() { - return overdraftLimit; - } - - - public void setOverdraftLimit(Integer overdraftLimit) { - this.overdraftLimit = overdraftLimit; - } - - - public DepositAccountAllOfAttributes hold(Integer hold) { - - this.hold = hold; - return this; - } - - /** - * Get hold - * @return hold - **/ - @javax.annotation.Nonnull - public Integer getHold() { - return hold; - } - - - public void setHold(Integer hold) { - this.hold = hold; - } - - - public DepositAccountAllOfAttributes available(Integer available) { - - this.available = available; - return this; - } - - /** - * Get available - * @return available - **/ - @javax.annotation.Nonnull - public Integer getAvailable() { - return available; - } - - - public void setAvailable(Integer available) { - this.available = available; - } - - - public DepositAccountAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nonnull - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public DepositAccountAllOfAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public DepositAccountAllOfAttributes closeReason(CloseReasonEnum closeReason) { - - this.closeReason = closeReason; - return this; - } - - /** - * Get closeReason - * @return closeReason - **/ - @javax.annotation.Nullable - public CloseReasonEnum getCloseReason() { - return closeReason; - } - - - public void setCloseReason(CloseReasonEnum closeReason) { - this.closeReason = closeReason; - } - - - public DepositAccountAllOfAttributes fraudReason(FraudReasonEnum fraudReason) { - - this.fraudReason = fraudReason; - return this; - } - - /** - * Get fraudReason - * @return fraudReason - **/ - @javax.annotation.Nullable - public FraudReasonEnum getFraudReason() { - return fraudReason; - } - - - public void setFraudReason(FraudReasonEnum fraudReason) { - this.fraudReason = fraudReason; - } - - - public DepositAccountAllOfAttributes closeReasonText(String closeReasonText) { - - this.closeReasonText = closeReasonText; - return this; - } - - /** - * Get closeReasonText - * @return closeReasonText - **/ - @javax.annotation.Nullable - public String getCloseReasonText() { - return closeReasonText; - } - - - public void setCloseReasonText(String closeReasonText) { - this.closeReasonText = closeReasonText; - } - - - public DepositAccountAllOfAttributes freezeReason(String freezeReason) { - - this.freezeReason = freezeReason; - return this; - } - - /** - * Get freezeReason - * @return freezeReason - **/ - @javax.annotation.Nullable - public String getFreezeReason() { - return freezeReason; - } - - - public void setFreezeReason(String freezeReason) { - this.freezeReason = freezeReason; - } - - - public DepositAccountAllOfAttributes maskedAccountNumber(String maskedAccountNumber) { - - this.maskedAccountNumber = maskedAccountNumber; - return this; - } - - /** - * Get maskedAccountNumber - * @return maskedAccountNumber - **/ - @javax.annotation.Nullable - public String getMaskedAccountNumber() { - return maskedAccountNumber; - } - - - public void setMaskedAccountNumber(String maskedAccountNumber) { - this.maskedAccountNumber = maskedAccountNumber; - } - - - public DepositAccountAllOfAttributes isOverdrawnWithinLimit(Boolean isOverdrawnWithinLimit) { - - this.isOverdrawnWithinLimit = isOverdrawnWithinLimit; - return this; - } - - /** - * Get isOverdrawnWithinLimit - * @return isOverdrawnWithinLimit - **/ - @javax.annotation.Nullable - public Boolean getIsOverdrawnWithinLimit() { - return isOverdrawnWithinLimit; - } - - - public void setIsOverdrawnWithinLimit(Boolean isOverdrawnWithinLimit) { - this.isOverdrawnWithinLimit = isOverdrawnWithinLimit; - } - - - public DepositAccountAllOfAttributes dacaStatus(DacaStatusEnum dacaStatus) { - - this.dacaStatus = dacaStatus; - return this; - } - - /** - * Get dacaStatus - * @return dacaStatus - **/ - @javax.annotation.Nullable - public DacaStatusEnum getDacaStatus() { - return dacaStatus; - } - - - public void setDacaStatus(DacaStatusEnum dacaStatus) { - this.dacaStatus = dacaStatus; - } - - - public DepositAccountAllOfAttributes updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DepositAccountAllOfAttributes depositAccountAllOfAttributes = (DepositAccountAllOfAttributes) o; - return Objects.equals(this.createdAt, depositAccountAllOfAttributes.createdAt) && - Objects.equals(this.name, depositAccountAllOfAttributes.name) && - Objects.equals(this.depositProduct, depositAccountAllOfAttributes.depositProduct) && - Objects.equals(this.routingNumber, depositAccountAllOfAttributes.routingNumber) && - Objects.equals(this.accountNumber, depositAccountAllOfAttributes.accountNumber) && - Objects.equals(this.secondaryAccountNumber, depositAccountAllOfAttributes.secondaryAccountNumber) && - Objects.equals(this.currency, depositAccountAllOfAttributes.currency) && - Objects.equals(this.balance, depositAccountAllOfAttributes.balance) && - Objects.equals(this.overdraftLimit, depositAccountAllOfAttributes.overdraftLimit) && - Objects.equals(this.hold, depositAccountAllOfAttributes.hold) && - Objects.equals(this.available, depositAccountAllOfAttributes.available) && - Objects.equals(this.tags, depositAccountAllOfAttributes.tags) && - Objects.equals(this.status, depositAccountAllOfAttributes.status) && - Objects.equals(this.closeReason, depositAccountAllOfAttributes.closeReason) && - Objects.equals(this.fraudReason, depositAccountAllOfAttributes.fraudReason) && - Objects.equals(this.closeReasonText, depositAccountAllOfAttributes.closeReasonText) && - Objects.equals(this.freezeReason, depositAccountAllOfAttributes.freezeReason) && - Objects.equals(this.maskedAccountNumber, depositAccountAllOfAttributes.maskedAccountNumber) && - Objects.equals(this.isOverdrawnWithinLimit, depositAccountAllOfAttributes.isOverdrawnWithinLimit) && - Objects.equals(this.dacaStatus, depositAccountAllOfAttributes.dacaStatus) && - Objects.equals(this.updatedAt, depositAccountAllOfAttributes.updatedAt); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, name, depositProduct, routingNumber, accountNumber, secondaryAccountNumber, currency, balance, overdraftLimit, hold, available, tags, status, closeReason, fraudReason, closeReasonText, freezeReason, maskedAccountNumber, isOverdrawnWithinLimit, dacaStatus, updatedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DepositAccountAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" depositProduct: ").append(toIndentedString(depositProduct)).append("\n"); - sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" secondaryAccountNumber: ").append(toIndentedString(secondaryAccountNumber)).append("\n"); - sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" overdraftLimit: ").append(toIndentedString(overdraftLimit)).append("\n"); - sb.append(" hold: ").append(toIndentedString(hold)).append("\n"); - sb.append(" available: ").append(toIndentedString(available)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" closeReason: ").append(toIndentedString(closeReason)).append("\n"); - sb.append(" fraudReason: ").append(toIndentedString(fraudReason)).append("\n"); - sb.append(" closeReasonText: ").append(toIndentedString(closeReasonText)).append("\n"); - sb.append(" freezeReason: ").append(toIndentedString(freezeReason)).append("\n"); - sb.append(" maskedAccountNumber: ").append(toIndentedString(maskedAccountNumber)).append("\n"); - sb.append(" isOverdrawnWithinLimit: ").append(toIndentedString(isOverdrawnWithinLimit)).append("\n"); - sb.append(" dacaStatus: ").append(toIndentedString(dacaStatus)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("name"); - openapiFields.add("depositProduct"); - openapiFields.add("routingNumber"); - openapiFields.add("accountNumber"); - openapiFields.add("secondaryAccountNumber"); - openapiFields.add("currency"); - openapiFields.add("balance"); - openapiFields.add("overdraftLimit"); - openapiFields.add("hold"); - openapiFields.add("available"); - openapiFields.add("tags"); - openapiFields.add("status"); - openapiFields.add("closeReason"); - openapiFields.add("fraudReason"); - openapiFields.add("closeReasonText"); - openapiFields.add("freezeReason"); - openapiFields.add("maskedAccountNumber"); - openapiFields.add("isOverdrawnWithinLimit"); - openapiFields.add("dacaStatus"); - openapiFields.add("updatedAt"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("depositProduct"); - openapiRequiredFields.add("routingNumber"); - openapiRequiredFields.add("currency"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("hold"); - openapiRequiredFields.add("available"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("status"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DepositAccountAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DepositAccountAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DepositAccountAllOfAttributes is not found in the empty JSON string", DepositAccountAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DepositAccountAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DepositAccountAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DepositAccountAllOfAttributes.openapiRequiredFields) { - 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("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if (!jsonObj.get("depositProduct").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `depositProduct` to be a primitive type in the JSON string but got `%s`", jsonObj.get("depositProduct").toString())); - } - if (!jsonObj.get("routingNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `routingNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("routingNumber").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - // validate the optional field `secondaryAccountNumber` - if (jsonObj.get("secondaryAccountNumber") != null && !jsonObj.get("secondaryAccountNumber").isJsonNull()) { - DepositAccountAllOfAttributesSecondaryAccountNumber.validateJsonElement(jsonObj.get("secondaryAccountNumber")); - } - if (!jsonObj.get("currency").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currency").toString())); - } - if (!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())); - } - if ((jsonObj.get("closeReason") != null && !jsonObj.get("closeReason").isJsonNull()) && !jsonObj.get("closeReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `closeReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("closeReason").toString())); - } - if ((jsonObj.get("fraudReason") != null && !jsonObj.get("fraudReason").isJsonNull()) && !jsonObj.get("fraudReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fraudReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fraudReason").toString())); - } - if ((jsonObj.get("closeReasonText") != null && !jsonObj.get("closeReasonText").isJsonNull()) && !jsonObj.get("closeReasonText").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `closeReasonText` to be a primitive type in the JSON string but got `%s`", jsonObj.get("closeReasonText").toString())); - } - if ((jsonObj.get("freezeReason") != null && !jsonObj.get("freezeReason").isJsonNull()) && !jsonObj.get("freezeReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `freezeReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("freezeReason").toString())); - } - if ((jsonObj.get("maskedAccountNumber") != null && !jsonObj.get("maskedAccountNumber").isJsonNull()) && !jsonObj.get("maskedAccountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedAccountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedAccountNumber").toString())); - } - if ((jsonObj.get("dacaStatus") != null && !jsonObj.get("dacaStatus").isJsonNull()) && !jsonObj.get("dacaStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dacaStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dacaStatus").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DepositAccountAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DepositAccountAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DepositAccountAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DepositAccountAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DepositAccountAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DepositAccountAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of DepositAccountAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to DepositAccountAllOfAttributes - */ - public static DepositAccountAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DepositAccountAllOfAttributes.class); - } - - /** - * Convert an instance of DepositAccountAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DepositAccountAllOfAttributesSecondaryAccountNumber.java b/src/main/java/org/openapitools/client/model/DepositAccountAllOfAttributesSecondaryAccountNumber.java deleted file mode 100644 index 4affb22c..00000000 --- a/src/main/java/org/openapitools/client/model/DepositAccountAllOfAttributesSecondaryAccountNumber.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DepositAccountAllOfAttributesSecondaryAccountNumber - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DepositAccountAllOfAttributesSecondaryAccountNumber { - public static final String SERIALIZED_NAME_ROUTING_NUMBER = "routingNumber"; - @SerializedName(SERIALIZED_NAME_ROUTING_NUMBER) - private String routingNumber; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public DepositAccountAllOfAttributesSecondaryAccountNumber() { - } - - public DepositAccountAllOfAttributesSecondaryAccountNumber routingNumber(String routingNumber) { - - this.routingNumber = routingNumber; - return this; - } - - /** - * Get routingNumber - * @return routingNumber - **/ - @javax.annotation.Nonnull - public String getRoutingNumber() { - return routingNumber; - } - - - public void setRoutingNumber(String routingNumber) { - this.routingNumber = routingNumber; - } - - - public DepositAccountAllOfAttributesSecondaryAccountNumber accountNumber(String accountNumber) { - - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - **/ - @javax.annotation.Nonnull - public String getAccountNumber() { - return accountNumber; - } - - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DepositAccountAllOfAttributesSecondaryAccountNumber depositAccountAllOfAttributesSecondaryAccountNumber = (DepositAccountAllOfAttributesSecondaryAccountNumber) o; - return Objects.equals(this.routingNumber, depositAccountAllOfAttributesSecondaryAccountNumber.routingNumber) && - Objects.equals(this.accountNumber, depositAccountAllOfAttributesSecondaryAccountNumber.accountNumber); - } - - @Override - public int hashCode() { - return Objects.hash(routingNumber, accountNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DepositAccountAllOfAttributesSecondaryAccountNumber {\n"); - sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("routingNumber"); - openapiFields.add("accountNumber"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("routingNumber"); - openapiRequiredFields.add("accountNumber"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DepositAccountAllOfAttributesSecondaryAccountNumber - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DepositAccountAllOfAttributesSecondaryAccountNumber.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DepositAccountAllOfAttributesSecondaryAccountNumber is not found in the empty JSON string", DepositAccountAllOfAttributesSecondaryAccountNumber.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DepositAccountAllOfAttributesSecondaryAccountNumber.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DepositAccountAllOfAttributesSecondaryAccountNumber` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DepositAccountAllOfAttributesSecondaryAccountNumber.openapiRequiredFields) { - 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("routingNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `routingNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("routingNumber").toString())); - } - if (!jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DepositAccountAllOfAttributesSecondaryAccountNumber.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DepositAccountAllOfAttributesSecondaryAccountNumber' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DepositAccountAllOfAttributesSecondaryAccountNumber.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DepositAccountAllOfAttributesSecondaryAccountNumber value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DepositAccountAllOfAttributesSecondaryAccountNumber read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DepositAccountAllOfAttributesSecondaryAccountNumber given an JSON string - * - * @param jsonString JSON string - * @return An instance of DepositAccountAllOfAttributesSecondaryAccountNumber - * @throws IOException if the JSON string is invalid with respect to DepositAccountAllOfAttributesSecondaryAccountNumber - */ - public static DepositAccountAllOfAttributesSecondaryAccountNumber fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DepositAccountAllOfAttributesSecondaryAccountNumber.class); - } - - /** - * Convert an instance of DepositAccountAllOfAttributesSecondaryAccountNumber to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DepositAccountRelationships.java b/src/main/java/org/openapitools/client/model/DepositAccountRelationships.java deleted file mode 100644 index e94d833a..00000000 --- a/src/main/java/org/openapitools/client/model/DepositAccountRelationships.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CustomerLinkage; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DepositAccountRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DepositAccountRelationships { - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private CustomerLinkage customer; - - public DepositAccountRelationships() { - } - - public DepositAccountRelationships customer(CustomerLinkage customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nullable - public CustomerLinkage getCustomer() { - return customer; - } - - - public void setCustomer(CustomerLinkage customer) { - this.customer = customer; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DepositAccountRelationships instance itself - */ - public DepositAccountRelationships putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DepositAccountRelationships depositAccountRelationships = (DepositAccountRelationships) o; - return Objects.equals(this.customer, depositAccountRelationships.customer)&& - Objects.equals(this.additionalProperties, depositAccountRelationships.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(customer, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DepositAccountRelationships {\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("customer"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DepositAccountRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DepositAccountRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DepositAccountRelationships is not found in the empty JSON string", DepositAccountRelationships.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `customer` - if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { - CustomerLinkage.validateJsonElement(jsonObj.get("customer")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DepositAccountRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DepositAccountRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DepositAccountRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DepositAccountRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DepositAccountRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - DepositAccountRelationships instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DepositAccountRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of DepositAccountRelationships - * @throws IOException if the JSON string is invalid with respect to DepositAccountRelationships - */ - public static DepositAccountRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DepositAccountRelationships.class); - } - - /** - * Convert an instance of DepositAccountRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DepositLimits.java b/src/main/java/org/openapitools/client/model/DepositLimits.java deleted file mode 100644 index f701318d..00000000 --- a/src/main/java/org/openapitools/client/model/DepositLimits.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.DepositLimitsAllOfAttributes; -import org.openapitools.client.model.Limits1; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DepositLimits - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DepositLimits extends Limits1 { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private DepositLimitsAllOfAttributes attributes; - - public DepositLimits() { - this.type = this.getClass().getSimpleName(); - } - - public DepositLimits attributes(DepositLimitsAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public DepositLimitsAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(DepositLimitsAllOfAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DepositLimits depositLimits = (DepositLimits) o; - return Objects.equals(this.attributes, depositLimits.attributes) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DepositLimits {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DepositLimits - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DepositLimits.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DepositLimits is not found in the empty JSON string", DepositLimits.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DepositLimits.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DepositLimits` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DepositLimits.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DepositLimits.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DepositLimits' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DepositLimits.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DepositLimits value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DepositLimits read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DepositLimits given an JSON string - * - * @param jsonString JSON string - * @return An instance of DepositLimits - * @throws IOException if the JSON string is invalid with respect to DepositLimits - */ - public static DepositLimits fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DepositLimits.class); - } - - /** - * Convert an instance of DepositLimits to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributes.java b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributes.java deleted file mode 100644 index 289519af..00000000 --- a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributes.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.DepositLimitsAllOfAttributesAch; -import org.openapitools.client.model.DepositLimitsAllOfAttributesCard; -import org.openapitools.client.model.DepositLimitsAllOfAttributesCheckDeposit; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DepositLimitsAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DepositLimitsAllOfAttributes { - public static final String SERIALIZED_NAME_ACH = "ach"; - @SerializedName(SERIALIZED_NAME_ACH) - private DepositLimitsAllOfAttributesAch ach; - - public static final String SERIALIZED_NAME_CARD = "card"; - @SerializedName(SERIALIZED_NAME_CARD) - private DepositLimitsAllOfAttributesCard card; - - public static final String SERIALIZED_NAME_CHECK_DEPOSIT = "checkDeposit"; - @SerializedName(SERIALIZED_NAME_CHECK_DEPOSIT) - private DepositLimitsAllOfAttributesCheckDeposit checkDeposit; - - public DepositLimitsAllOfAttributes() { - } - - public DepositLimitsAllOfAttributes ach(DepositLimitsAllOfAttributesAch ach) { - - this.ach = ach; - return this; - } - - /** - * Get ach - * @return ach - **/ - @javax.annotation.Nonnull - public DepositLimitsAllOfAttributesAch getAch() { - return ach; - } - - - public void setAch(DepositLimitsAllOfAttributesAch ach) { - this.ach = ach; - } - - - public DepositLimitsAllOfAttributes card(DepositLimitsAllOfAttributesCard card) { - - this.card = card; - return this; - } - - /** - * Get card - * @return card - **/ - @javax.annotation.Nonnull - public DepositLimitsAllOfAttributesCard getCard() { - return card; - } - - - public void setCard(DepositLimitsAllOfAttributesCard card) { - this.card = card; - } - - - public DepositLimitsAllOfAttributes checkDeposit(DepositLimitsAllOfAttributesCheckDeposit checkDeposit) { - - this.checkDeposit = checkDeposit; - return this; - } - - /** - * Get checkDeposit - * @return checkDeposit - **/ - @javax.annotation.Nonnull - public DepositLimitsAllOfAttributesCheckDeposit getCheckDeposit() { - return checkDeposit; - } - - - public void setCheckDeposit(DepositLimitsAllOfAttributesCheckDeposit checkDeposit) { - this.checkDeposit = checkDeposit; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DepositLimitsAllOfAttributes depositLimitsAllOfAttributes = (DepositLimitsAllOfAttributes) o; - return Objects.equals(this.ach, depositLimitsAllOfAttributes.ach) && - Objects.equals(this.card, depositLimitsAllOfAttributes.card) && - Objects.equals(this.checkDeposit, depositLimitsAllOfAttributes.checkDeposit); - } - - @Override - public int hashCode() { - return Objects.hash(ach, card, checkDeposit); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DepositLimitsAllOfAttributes {\n"); - sb.append(" ach: ").append(toIndentedString(ach)).append("\n"); - sb.append(" card: ").append(toIndentedString(card)).append("\n"); - sb.append(" checkDeposit: ").append(toIndentedString(checkDeposit)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ach"); - openapiFields.add("card"); - openapiFields.add("checkDeposit"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ach"); - openapiRequiredFields.add("card"); - openapiRequiredFields.add("checkDeposit"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DepositLimitsAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DepositLimitsAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DepositLimitsAllOfAttributes is not found in the empty JSON string", DepositLimitsAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DepositLimitsAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DepositLimitsAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DepositLimitsAllOfAttributes.openapiRequiredFields) { - 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(); - // validate the required field `ach` - DepositLimitsAllOfAttributesAch.validateJsonElement(jsonObj.get("ach")); - // validate the required field `card` - DepositLimitsAllOfAttributesCard.validateJsonElement(jsonObj.get("card")); - // validate the required field `checkDeposit` - DepositLimitsAllOfAttributesCheckDeposit.validateJsonElement(jsonObj.get("checkDeposit")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DepositLimitsAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DepositLimitsAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DepositLimitsAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DepositLimitsAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DepositLimitsAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DepositLimitsAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of DepositLimitsAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to DepositLimitsAllOfAttributes - */ - public static DepositLimitsAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DepositLimitsAllOfAttributes.class); - } - - /** - * Convert an instance of DepositLimitsAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAch.java b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAch.java deleted file mode 100644 index 8c802cc0..00000000 --- a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAch.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.DepositLimitsAllOfAttributesAchLimits; -import org.openapitools.client.model.DepositLimitsAllOfAttributesAchTotalsDaily; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DepositLimitsAllOfAttributesAch - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DepositLimitsAllOfAttributesAch { - public static final String SERIALIZED_NAME_LIMITS = "limits"; - @SerializedName(SERIALIZED_NAME_LIMITS) - private DepositLimitsAllOfAttributesAchLimits limits; - - public static final String SERIALIZED_NAME_TOTALS_DAILY = "totalsDaily"; - @SerializedName(SERIALIZED_NAME_TOTALS_DAILY) - private DepositLimitsAllOfAttributesAchTotalsDaily totalsDaily; - - public static final String SERIALIZED_NAME_TOTALS_MONTHLY = "totalsMonthly"; - @SerializedName(SERIALIZED_NAME_TOTALS_MONTHLY) - private DepositLimitsAllOfAttributesAchTotalsDaily totalsMonthly; - - public DepositLimitsAllOfAttributesAch() { - } - - public DepositLimitsAllOfAttributesAch limits(DepositLimitsAllOfAttributesAchLimits limits) { - - this.limits = limits; - return this; - } - - /** - * Get limits - * @return limits - **/ - @javax.annotation.Nonnull - public DepositLimitsAllOfAttributesAchLimits getLimits() { - return limits; - } - - - public void setLimits(DepositLimitsAllOfAttributesAchLimits limits) { - this.limits = limits; - } - - - public DepositLimitsAllOfAttributesAch totalsDaily(DepositLimitsAllOfAttributesAchTotalsDaily totalsDaily) { - - this.totalsDaily = totalsDaily; - return this; - } - - /** - * Get totalsDaily - * @return totalsDaily - **/ - @javax.annotation.Nonnull - public DepositLimitsAllOfAttributesAchTotalsDaily getTotalsDaily() { - return totalsDaily; - } - - - public void setTotalsDaily(DepositLimitsAllOfAttributesAchTotalsDaily totalsDaily) { - this.totalsDaily = totalsDaily; - } - - - public DepositLimitsAllOfAttributesAch totalsMonthly(DepositLimitsAllOfAttributesAchTotalsDaily totalsMonthly) { - - this.totalsMonthly = totalsMonthly; - return this; - } - - /** - * Get totalsMonthly - * @return totalsMonthly - **/ - @javax.annotation.Nonnull - public DepositLimitsAllOfAttributesAchTotalsDaily getTotalsMonthly() { - return totalsMonthly; - } - - - public void setTotalsMonthly(DepositLimitsAllOfAttributesAchTotalsDaily totalsMonthly) { - this.totalsMonthly = totalsMonthly; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DepositLimitsAllOfAttributesAch depositLimitsAllOfAttributesAch = (DepositLimitsAllOfAttributesAch) o; - return Objects.equals(this.limits, depositLimitsAllOfAttributesAch.limits) && - Objects.equals(this.totalsDaily, depositLimitsAllOfAttributesAch.totalsDaily) && - Objects.equals(this.totalsMonthly, depositLimitsAllOfAttributesAch.totalsMonthly); - } - - @Override - public int hashCode() { - return Objects.hash(limits, totalsDaily, totalsMonthly); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DepositLimitsAllOfAttributesAch {\n"); - sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); - sb.append(" totalsDaily: ").append(toIndentedString(totalsDaily)).append("\n"); - sb.append(" totalsMonthly: ").append(toIndentedString(totalsMonthly)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("limits"); - openapiFields.add("totalsDaily"); - openapiFields.add("totalsMonthly"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("limits"); - openapiRequiredFields.add("totalsDaily"); - openapiRequiredFields.add("totalsMonthly"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DepositLimitsAllOfAttributesAch - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DepositLimitsAllOfAttributesAch.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DepositLimitsAllOfAttributesAch is not found in the empty JSON string", DepositLimitsAllOfAttributesAch.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DepositLimitsAllOfAttributesAch.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DepositLimitsAllOfAttributesAch` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DepositLimitsAllOfAttributesAch.openapiRequiredFields) { - 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(); - // validate the required field `limits` - DepositLimitsAllOfAttributesAchLimits.validateJsonElement(jsonObj.get("limits")); - // validate the required field `totalsDaily` - DepositLimitsAllOfAttributesAchTotalsDaily.validateJsonElement(jsonObj.get("totalsDaily")); - // validate the required field `totalsMonthly` - DepositLimitsAllOfAttributesAchTotalsDaily.validateJsonElement(jsonObj.get("totalsMonthly")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DepositLimitsAllOfAttributesAch.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DepositLimitsAllOfAttributesAch' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DepositLimitsAllOfAttributesAch.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DepositLimitsAllOfAttributesAch value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DepositLimitsAllOfAttributesAch read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DepositLimitsAllOfAttributesAch given an JSON string - * - * @param jsonString JSON string - * @return An instance of DepositLimitsAllOfAttributesAch - * @throws IOException if the JSON string is invalid with respect to DepositLimitsAllOfAttributesAch - */ - public static DepositLimitsAllOfAttributesAch fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DepositLimitsAllOfAttributesAch.class); - } - - /** - * Convert an instance of DepositLimitsAllOfAttributesAch to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAchLimits.java b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAchLimits.java deleted file mode 100644 index 2bfbfdea..00000000 --- a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAchLimits.java +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.math.BigDecimal; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DepositLimitsAllOfAttributesAchLimits - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DepositLimitsAllOfAttributesAchLimits { - public static final String SERIALIZED_NAME_DAILY_DEBIT = "dailyDebit"; - @SerializedName(SERIALIZED_NAME_DAILY_DEBIT) - private BigDecimal dailyDebit; - - public static final String SERIALIZED_NAME_DAILY_CREDIT = "dailyCredit"; - @SerializedName(SERIALIZED_NAME_DAILY_CREDIT) - private BigDecimal dailyCredit; - - public static final String SERIALIZED_NAME_MONTHLY_DEBIT = "monthlyDebit"; - @SerializedName(SERIALIZED_NAME_MONTHLY_DEBIT) - private BigDecimal monthlyDebit; - - public static final String SERIALIZED_NAME_MONTHLY_DEBIT_SOFT = "monthlyDebitSoft"; - @SerializedName(SERIALIZED_NAME_MONTHLY_DEBIT_SOFT) - private BigDecimal monthlyDebitSoft; - - public static final String SERIALIZED_NAME_DAILY_DEBIT_SOFT = "dailyDebitSoft"; - @SerializedName(SERIALIZED_NAME_DAILY_DEBIT_SOFT) - private BigDecimal dailyDebitSoft; - - public static final String SERIALIZED_NAME_MONTHLY_CREDIT = "monthlyCredit"; - @SerializedName(SERIALIZED_NAME_MONTHLY_CREDIT) - private BigDecimal monthlyCredit; - - public DepositLimitsAllOfAttributesAchLimits() { - } - - public DepositLimitsAllOfAttributesAchLimits dailyDebit(BigDecimal dailyDebit) { - - this.dailyDebit = dailyDebit; - return this; - } - - /** - * Get dailyDebit - * @return dailyDebit - **/ - @javax.annotation.Nonnull - public BigDecimal getDailyDebit() { - return dailyDebit; - } - - - public void setDailyDebit(BigDecimal dailyDebit) { - this.dailyDebit = dailyDebit; - } - - - public DepositLimitsAllOfAttributesAchLimits dailyCredit(BigDecimal dailyCredit) { - - this.dailyCredit = dailyCredit; - return this; - } - - /** - * Get dailyCredit - * @return dailyCredit - **/ - @javax.annotation.Nonnull - public BigDecimal getDailyCredit() { - return dailyCredit; - } - - - public void setDailyCredit(BigDecimal dailyCredit) { - this.dailyCredit = dailyCredit; - } - - - public DepositLimitsAllOfAttributesAchLimits monthlyDebit(BigDecimal monthlyDebit) { - - this.monthlyDebit = monthlyDebit; - return this; - } - - /** - * Get monthlyDebit - * @return monthlyDebit - **/ - @javax.annotation.Nonnull - public BigDecimal getMonthlyDebit() { - return monthlyDebit; - } - - - public void setMonthlyDebit(BigDecimal monthlyDebit) { - this.monthlyDebit = monthlyDebit; - } - - - public DepositLimitsAllOfAttributesAchLimits monthlyDebitSoft(BigDecimal monthlyDebitSoft) { - - this.monthlyDebitSoft = monthlyDebitSoft; - return this; - } - - /** - * Get monthlyDebitSoft - * @return monthlyDebitSoft - **/ - @javax.annotation.Nullable - public BigDecimal getMonthlyDebitSoft() { - return monthlyDebitSoft; - } - - - public void setMonthlyDebitSoft(BigDecimal monthlyDebitSoft) { - this.monthlyDebitSoft = monthlyDebitSoft; - } - - - public DepositLimitsAllOfAttributesAchLimits dailyDebitSoft(BigDecimal dailyDebitSoft) { - - this.dailyDebitSoft = dailyDebitSoft; - return this; - } - - /** - * Get dailyDebitSoft - * @return dailyDebitSoft - **/ - @javax.annotation.Nullable - public BigDecimal getDailyDebitSoft() { - return dailyDebitSoft; - } - - - public void setDailyDebitSoft(BigDecimal dailyDebitSoft) { - this.dailyDebitSoft = dailyDebitSoft; - } - - - public DepositLimitsAllOfAttributesAchLimits monthlyCredit(BigDecimal monthlyCredit) { - - this.monthlyCredit = monthlyCredit; - return this; - } - - /** - * Get monthlyCredit - * @return monthlyCredit - **/ - @javax.annotation.Nonnull - public BigDecimal getMonthlyCredit() { - return monthlyCredit; - } - - - public void setMonthlyCredit(BigDecimal monthlyCredit) { - this.monthlyCredit = monthlyCredit; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DepositLimitsAllOfAttributesAchLimits depositLimitsAllOfAttributesAchLimits = (DepositLimitsAllOfAttributesAchLimits) o; - return Objects.equals(this.dailyDebit, depositLimitsAllOfAttributesAchLimits.dailyDebit) && - Objects.equals(this.dailyCredit, depositLimitsAllOfAttributesAchLimits.dailyCredit) && - Objects.equals(this.monthlyDebit, depositLimitsAllOfAttributesAchLimits.monthlyDebit) && - Objects.equals(this.monthlyDebitSoft, depositLimitsAllOfAttributesAchLimits.monthlyDebitSoft) && - Objects.equals(this.dailyDebitSoft, depositLimitsAllOfAttributesAchLimits.dailyDebitSoft) && - Objects.equals(this.monthlyCredit, depositLimitsAllOfAttributesAchLimits.monthlyCredit); - } - - @Override - public int hashCode() { - return Objects.hash(dailyDebit, dailyCredit, monthlyDebit, monthlyDebitSoft, dailyDebitSoft, monthlyCredit); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DepositLimitsAllOfAttributesAchLimits {\n"); - sb.append(" dailyDebit: ").append(toIndentedString(dailyDebit)).append("\n"); - sb.append(" dailyCredit: ").append(toIndentedString(dailyCredit)).append("\n"); - sb.append(" monthlyDebit: ").append(toIndentedString(monthlyDebit)).append("\n"); - sb.append(" monthlyDebitSoft: ").append(toIndentedString(monthlyDebitSoft)).append("\n"); - sb.append(" dailyDebitSoft: ").append(toIndentedString(dailyDebitSoft)).append("\n"); - sb.append(" monthlyCredit: ").append(toIndentedString(monthlyCredit)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("dailyDebit"); - openapiFields.add("dailyCredit"); - openapiFields.add("monthlyDebit"); - openapiFields.add("monthlyDebitSoft"); - openapiFields.add("dailyDebitSoft"); - openapiFields.add("monthlyCredit"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("dailyDebit"); - openapiRequiredFields.add("dailyCredit"); - openapiRequiredFields.add("monthlyDebit"); - openapiRequiredFields.add("monthlyCredit"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DepositLimitsAllOfAttributesAchLimits - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DepositLimitsAllOfAttributesAchLimits.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DepositLimitsAllOfAttributesAchLimits is not found in the empty JSON string", DepositLimitsAllOfAttributesAchLimits.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DepositLimitsAllOfAttributesAchLimits.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DepositLimitsAllOfAttributesAchLimits` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DepositLimitsAllOfAttributesAchLimits.openapiRequiredFields) { - 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 { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DepositLimitsAllOfAttributesAchLimits.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DepositLimitsAllOfAttributesAchLimits' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DepositLimitsAllOfAttributesAchLimits.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DepositLimitsAllOfAttributesAchLimits value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DepositLimitsAllOfAttributesAchLimits read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DepositLimitsAllOfAttributesAchLimits given an JSON string - * - * @param jsonString JSON string - * @return An instance of DepositLimitsAllOfAttributesAchLimits - * @throws IOException if the JSON string is invalid with respect to DepositLimitsAllOfAttributesAchLimits - */ - public static DepositLimitsAllOfAttributesAchLimits fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DepositLimitsAllOfAttributesAchLimits.class); - } - - /** - * Convert an instance of DepositLimitsAllOfAttributesAchLimits to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAchTotalsDaily.java b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAchTotalsDaily.java deleted file mode 100644 index f972ff5a..00000000 --- a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesAchTotalsDaily.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.math.BigDecimal; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DepositLimitsAllOfAttributesAchTotalsDaily - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DepositLimitsAllOfAttributesAchTotalsDaily { - public static final String SERIALIZED_NAME_DEBITS = "debits"; - @SerializedName(SERIALIZED_NAME_DEBITS) - private BigDecimal debits; - - public static final String SERIALIZED_NAME_CREDITS = "credits"; - @SerializedName(SERIALIZED_NAME_CREDITS) - private BigDecimal credits; - - public DepositLimitsAllOfAttributesAchTotalsDaily() { - } - - public DepositLimitsAllOfAttributesAchTotalsDaily debits(BigDecimal debits) { - - this.debits = debits; - return this; - } - - /** - * Get debits - * @return debits - **/ - @javax.annotation.Nonnull - public BigDecimal getDebits() { - return debits; - } - - - public void setDebits(BigDecimal debits) { - this.debits = debits; - } - - - public DepositLimitsAllOfAttributesAchTotalsDaily credits(BigDecimal credits) { - - this.credits = credits; - return this; - } - - /** - * Get credits - * @return credits - **/ - @javax.annotation.Nonnull - public BigDecimal getCredits() { - return credits; - } - - - public void setCredits(BigDecimal credits) { - this.credits = credits; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DepositLimitsAllOfAttributesAchTotalsDaily depositLimitsAllOfAttributesAchTotalsDaily = (DepositLimitsAllOfAttributesAchTotalsDaily) o; - return Objects.equals(this.debits, depositLimitsAllOfAttributesAchTotalsDaily.debits) && - Objects.equals(this.credits, depositLimitsAllOfAttributesAchTotalsDaily.credits); - } - - @Override - public int hashCode() { - return Objects.hash(debits, credits); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DepositLimitsAllOfAttributesAchTotalsDaily {\n"); - sb.append(" debits: ").append(toIndentedString(debits)).append("\n"); - sb.append(" credits: ").append(toIndentedString(credits)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("debits"); - openapiFields.add("credits"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("debits"); - openapiRequiredFields.add("credits"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DepositLimitsAllOfAttributesAchTotalsDaily - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DepositLimitsAllOfAttributesAchTotalsDaily.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DepositLimitsAllOfAttributesAchTotalsDaily is not found in the empty JSON string", DepositLimitsAllOfAttributesAchTotalsDaily.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DepositLimitsAllOfAttributesAchTotalsDaily.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DepositLimitsAllOfAttributesAchTotalsDaily` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DepositLimitsAllOfAttributesAchTotalsDaily.openapiRequiredFields) { - 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 { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DepositLimitsAllOfAttributesAchTotalsDaily.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DepositLimitsAllOfAttributesAchTotalsDaily' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DepositLimitsAllOfAttributesAchTotalsDaily.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DepositLimitsAllOfAttributesAchTotalsDaily value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DepositLimitsAllOfAttributesAchTotalsDaily read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DepositLimitsAllOfAttributesAchTotalsDaily given an JSON string - * - * @param jsonString JSON string - * @return An instance of DepositLimitsAllOfAttributesAchTotalsDaily - * @throws IOException if the JSON string is invalid with respect to DepositLimitsAllOfAttributesAchTotalsDaily - */ - public static DepositLimitsAllOfAttributesAchTotalsDaily fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DepositLimitsAllOfAttributesAchTotalsDaily.class); - } - - /** - * Convert an instance of DepositLimitsAllOfAttributesAchTotalsDaily to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCard.java b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCard.java deleted file mode 100644 index 745f94a1..00000000 --- a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCard.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.DepositLimitsAllOfAttributesCardLimits; -import org.openapitools.client.model.DepositLimitsAllOfAttributesCardTotalsDaily; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DepositLimitsAllOfAttributesCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DepositLimitsAllOfAttributesCard { - public static final String SERIALIZED_NAME_LIMITS = "limits"; - @SerializedName(SERIALIZED_NAME_LIMITS) - private DepositLimitsAllOfAttributesCardLimits limits; - - public static final String SERIALIZED_NAME_TOTALS_DAILY = "totalsDaily"; - @SerializedName(SERIALIZED_NAME_TOTALS_DAILY) - private DepositLimitsAllOfAttributesCardTotalsDaily totalsDaily; - - public DepositLimitsAllOfAttributesCard() { - } - - public DepositLimitsAllOfAttributesCard limits(DepositLimitsAllOfAttributesCardLimits limits) { - - this.limits = limits; - return this; - } - - /** - * Get limits - * @return limits - **/ - @javax.annotation.Nonnull - public DepositLimitsAllOfAttributesCardLimits getLimits() { - return limits; - } - - - public void setLimits(DepositLimitsAllOfAttributesCardLimits limits) { - this.limits = limits; - } - - - public DepositLimitsAllOfAttributesCard totalsDaily(DepositLimitsAllOfAttributesCardTotalsDaily totalsDaily) { - - this.totalsDaily = totalsDaily; - return this; - } - - /** - * Get totalsDaily - * @return totalsDaily - **/ - @javax.annotation.Nonnull - public DepositLimitsAllOfAttributesCardTotalsDaily getTotalsDaily() { - return totalsDaily; - } - - - public void setTotalsDaily(DepositLimitsAllOfAttributesCardTotalsDaily totalsDaily) { - this.totalsDaily = totalsDaily; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DepositLimitsAllOfAttributesCard depositLimitsAllOfAttributesCard = (DepositLimitsAllOfAttributesCard) o; - return Objects.equals(this.limits, depositLimitsAllOfAttributesCard.limits) && - Objects.equals(this.totalsDaily, depositLimitsAllOfAttributesCard.totalsDaily); - } - - @Override - public int hashCode() { - return Objects.hash(limits, totalsDaily); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DepositLimitsAllOfAttributesCard {\n"); - sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); - sb.append(" totalsDaily: ").append(toIndentedString(totalsDaily)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("limits"); - openapiFields.add("totalsDaily"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("limits"); - openapiRequiredFields.add("totalsDaily"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DepositLimitsAllOfAttributesCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DepositLimitsAllOfAttributesCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DepositLimitsAllOfAttributesCard is not found in the empty JSON string", DepositLimitsAllOfAttributesCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DepositLimitsAllOfAttributesCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DepositLimitsAllOfAttributesCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DepositLimitsAllOfAttributesCard.openapiRequiredFields) { - 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(); - // validate the required field `limits` - DepositLimitsAllOfAttributesCardLimits.validateJsonElement(jsonObj.get("limits")); - // validate the required field `totalsDaily` - DepositLimitsAllOfAttributesCardTotalsDaily.validateJsonElement(jsonObj.get("totalsDaily")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DepositLimitsAllOfAttributesCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DepositLimitsAllOfAttributesCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DepositLimitsAllOfAttributesCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DepositLimitsAllOfAttributesCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DepositLimitsAllOfAttributesCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DepositLimitsAllOfAttributesCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of DepositLimitsAllOfAttributesCard - * @throws IOException if the JSON string is invalid with respect to DepositLimitsAllOfAttributesCard - */ - public static DepositLimitsAllOfAttributesCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DepositLimitsAllOfAttributesCard.class); - } - - /** - * Convert an instance of DepositLimitsAllOfAttributesCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCardLimits.java b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCardLimits.java deleted file mode 100644 index 9ea235db..00000000 --- a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCardLimits.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.math.BigDecimal; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DepositLimitsAllOfAttributesCardLimits - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DepositLimitsAllOfAttributesCardLimits { - public static final String SERIALIZED_NAME_DAILY_WITHDRAWAL = "dailyWithdrawal"; - @SerializedName(SERIALIZED_NAME_DAILY_WITHDRAWAL) - private BigDecimal dailyWithdrawal; - - public static final String SERIALIZED_NAME_DAILY_DEPOSIT = "dailyDeposit"; - @SerializedName(SERIALIZED_NAME_DAILY_DEPOSIT) - private BigDecimal dailyDeposit; - - public static final String SERIALIZED_NAME_DAILY_PURCHASE = "dailyPurchase"; - @SerializedName(SERIALIZED_NAME_DAILY_PURCHASE) - private BigDecimal dailyPurchase; - - public static final String SERIALIZED_NAME_DAILY_CARD_TRANSACTION = "dailyCardTransaction"; - @SerializedName(SERIALIZED_NAME_DAILY_CARD_TRANSACTION) - private BigDecimal dailyCardTransaction; - - public DepositLimitsAllOfAttributesCardLimits() { - } - - public DepositLimitsAllOfAttributesCardLimits dailyWithdrawal(BigDecimal dailyWithdrawal) { - - this.dailyWithdrawal = dailyWithdrawal; - return this; - } - - /** - * Get dailyWithdrawal - * @return dailyWithdrawal - **/ - @javax.annotation.Nonnull - public BigDecimal getDailyWithdrawal() { - return dailyWithdrawal; - } - - - public void setDailyWithdrawal(BigDecimal dailyWithdrawal) { - this.dailyWithdrawal = dailyWithdrawal; - } - - - public DepositLimitsAllOfAttributesCardLimits dailyDeposit(BigDecimal dailyDeposit) { - - this.dailyDeposit = dailyDeposit; - return this; - } - - /** - * Get dailyDeposit - * @return dailyDeposit - **/ - @javax.annotation.Nonnull - public BigDecimal getDailyDeposit() { - return dailyDeposit; - } - - - public void setDailyDeposit(BigDecimal dailyDeposit) { - this.dailyDeposit = dailyDeposit; - } - - - public DepositLimitsAllOfAttributesCardLimits dailyPurchase(BigDecimal dailyPurchase) { - - this.dailyPurchase = dailyPurchase; - return this; - } - - /** - * Get dailyPurchase - * @return dailyPurchase - **/ - @javax.annotation.Nonnull - public BigDecimal getDailyPurchase() { - return dailyPurchase; - } - - - public void setDailyPurchase(BigDecimal dailyPurchase) { - this.dailyPurchase = dailyPurchase; - } - - - public DepositLimitsAllOfAttributesCardLimits dailyCardTransaction(BigDecimal dailyCardTransaction) { - - this.dailyCardTransaction = dailyCardTransaction; - return this; - } - - /** - * Get dailyCardTransaction - * @return dailyCardTransaction - **/ - @javax.annotation.Nonnull - public BigDecimal getDailyCardTransaction() { - return dailyCardTransaction; - } - - - public void setDailyCardTransaction(BigDecimal dailyCardTransaction) { - this.dailyCardTransaction = dailyCardTransaction; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DepositLimitsAllOfAttributesCardLimits depositLimitsAllOfAttributesCardLimits = (DepositLimitsAllOfAttributesCardLimits) o; - return Objects.equals(this.dailyWithdrawal, depositLimitsAllOfAttributesCardLimits.dailyWithdrawal) && - Objects.equals(this.dailyDeposit, depositLimitsAllOfAttributesCardLimits.dailyDeposit) && - Objects.equals(this.dailyPurchase, depositLimitsAllOfAttributesCardLimits.dailyPurchase) && - Objects.equals(this.dailyCardTransaction, depositLimitsAllOfAttributesCardLimits.dailyCardTransaction); - } - - @Override - public int hashCode() { - return Objects.hash(dailyWithdrawal, dailyDeposit, dailyPurchase, dailyCardTransaction); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DepositLimitsAllOfAttributesCardLimits {\n"); - sb.append(" dailyWithdrawal: ").append(toIndentedString(dailyWithdrawal)).append("\n"); - sb.append(" dailyDeposit: ").append(toIndentedString(dailyDeposit)).append("\n"); - sb.append(" dailyPurchase: ").append(toIndentedString(dailyPurchase)).append("\n"); - sb.append(" dailyCardTransaction: ").append(toIndentedString(dailyCardTransaction)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("dailyWithdrawal"); - openapiFields.add("dailyDeposit"); - openapiFields.add("dailyPurchase"); - openapiFields.add("dailyCardTransaction"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("dailyWithdrawal"); - openapiRequiredFields.add("dailyDeposit"); - openapiRequiredFields.add("dailyPurchase"); - openapiRequiredFields.add("dailyCardTransaction"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DepositLimitsAllOfAttributesCardLimits - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DepositLimitsAllOfAttributesCardLimits.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DepositLimitsAllOfAttributesCardLimits is not found in the empty JSON string", DepositLimitsAllOfAttributesCardLimits.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DepositLimitsAllOfAttributesCardLimits.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DepositLimitsAllOfAttributesCardLimits` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DepositLimitsAllOfAttributesCardLimits.openapiRequiredFields) { - 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 { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DepositLimitsAllOfAttributesCardLimits.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DepositLimitsAllOfAttributesCardLimits' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DepositLimitsAllOfAttributesCardLimits.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DepositLimitsAllOfAttributesCardLimits value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DepositLimitsAllOfAttributesCardLimits read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DepositLimitsAllOfAttributesCardLimits given an JSON string - * - * @param jsonString JSON string - * @return An instance of DepositLimitsAllOfAttributesCardLimits - * @throws IOException if the JSON string is invalid with respect to DepositLimitsAllOfAttributesCardLimits - */ - public static DepositLimitsAllOfAttributesCardLimits fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DepositLimitsAllOfAttributesCardLimits.class); - } - - /** - * Convert an instance of DepositLimitsAllOfAttributesCardLimits to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCardTotalsDaily.java b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCardTotalsDaily.java deleted file mode 100644 index a5751f5c..00000000 --- a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCardTotalsDaily.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.math.BigDecimal; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DepositLimitsAllOfAttributesCardTotalsDaily - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DepositLimitsAllOfAttributesCardTotalsDaily { - public static final String SERIALIZED_NAME_WITHDRAWALS = "withdrawals"; - @SerializedName(SERIALIZED_NAME_WITHDRAWALS) - private BigDecimal withdrawals; - - public static final String SERIALIZED_NAME_DEPOSITS = "deposits"; - @SerializedName(SERIALIZED_NAME_DEPOSITS) - private BigDecimal deposits; - - public static final String SERIALIZED_NAME_PURCHASES = "purchases"; - @SerializedName(SERIALIZED_NAME_PURCHASES) - private BigDecimal purchases; - - public static final String SERIALIZED_NAME_CARD_TRANSACTIONS = "cardTransactions"; - @SerializedName(SERIALIZED_NAME_CARD_TRANSACTIONS) - private BigDecimal cardTransactions; - - public DepositLimitsAllOfAttributesCardTotalsDaily() { - } - - public DepositLimitsAllOfAttributesCardTotalsDaily withdrawals(BigDecimal withdrawals) { - - this.withdrawals = withdrawals; - return this; - } - - /** - * Get withdrawals - * @return withdrawals - **/ - @javax.annotation.Nonnull - public BigDecimal getWithdrawals() { - return withdrawals; - } - - - public void setWithdrawals(BigDecimal withdrawals) { - this.withdrawals = withdrawals; - } - - - public DepositLimitsAllOfAttributesCardTotalsDaily deposits(BigDecimal deposits) { - - this.deposits = deposits; - return this; - } - - /** - * Get deposits - * @return deposits - **/ - @javax.annotation.Nonnull - public BigDecimal getDeposits() { - return deposits; - } - - - public void setDeposits(BigDecimal deposits) { - this.deposits = deposits; - } - - - public DepositLimitsAllOfAttributesCardTotalsDaily purchases(BigDecimal purchases) { - - this.purchases = purchases; - return this; - } - - /** - * Get purchases - * @return purchases - **/ - @javax.annotation.Nonnull - public BigDecimal getPurchases() { - return purchases; - } - - - public void setPurchases(BigDecimal purchases) { - this.purchases = purchases; - } - - - public DepositLimitsAllOfAttributesCardTotalsDaily cardTransactions(BigDecimal cardTransactions) { - - this.cardTransactions = cardTransactions; - return this; - } - - /** - * Get cardTransactions - * @return cardTransactions - **/ - @javax.annotation.Nonnull - public BigDecimal getCardTransactions() { - return cardTransactions; - } - - - public void setCardTransactions(BigDecimal cardTransactions) { - this.cardTransactions = cardTransactions; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DepositLimitsAllOfAttributesCardTotalsDaily depositLimitsAllOfAttributesCardTotalsDaily = (DepositLimitsAllOfAttributesCardTotalsDaily) o; - return Objects.equals(this.withdrawals, depositLimitsAllOfAttributesCardTotalsDaily.withdrawals) && - Objects.equals(this.deposits, depositLimitsAllOfAttributesCardTotalsDaily.deposits) && - Objects.equals(this.purchases, depositLimitsAllOfAttributesCardTotalsDaily.purchases) && - Objects.equals(this.cardTransactions, depositLimitsAllOfAttributesCardTotalsDaily.cardTransactions); - } - - @Override - public int hashCode() { - return Objects.hash(withdrawals, deposits, purchases, cardTransactions); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DepositLimitsAllOfAttributesCardTotalsDaily {\n"); - sb.append(" withdrawals: ").append(toIndentedString(withdrawals)).append("\n"); - sb.append(" deposits: ").append(toIndentedString(deposits)).append("\n"); - sb.append(" purchases: ").append(toIndentedString(purchases)).append("\n"); - sb.append(" cardTransactions: ").append(toIndentedString(cardTransactions)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("withdrawals"); - openapiFields.add("deposits"); - openapiFields.add("purchases"); - openapiFields.add("cardTransactions"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("withdrawals"); - openapiRequiredFields.add("deposits"); - openapiRequiredFields.add("purchases"); - openapiRequiredFields.add("cardTransactions"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DepositLimitsAllOfAttributesCardTotalsDaily - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DepositLimitsAllOfAttributesCardTotalsDaily.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DepositLimitsAllOfAttributesCardTotalsDaily is not found in the empty JSON string", DepositLimitsAllOfAttributesCardTotalsDaily.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DepositLimitsAllOfAttributesCardTotalsDaily.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DepositLimitsAllOfAttributesCardTotalsDaily` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DepositLimitsAllOfAttributesCardTotalsDaily.openapiRequiredFields) { - 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 { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DepositLimitsAllOfAttributesCardTotalsDaily.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DepositLimitsAllOfAttributesCardTotalsDaily' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DepositLimitsAllOfAttributesCardTotalsDaily.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DepositLimitsAllOfAttributesCardTotalsDaily value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DepositLimitsAllOfAttributesCardTotalsDaily read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DepositLimitsAllOfAttributesCardTotalsDaily given an JSON string - * - * @param jsonString JSON string - * @return An instance of DepositLimitsAllOfAttributesCardTotalsDaily - * @throws IOException if the JSON string is invalid with respect to DepositLimitsAllOfAttributesCardTotalsDaily - */ - public static DepositLimitsAllOfAttributesCardTotalsDaily fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DepositLimitsAllOfAttributesCardTotalsDaily.class); - } - - /** - * Convert an instance of DepositLimitsAllOfAttributesCardTotalsDaily to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCheckDeposit.java b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCheckDeposit.java deleted file mode 100644 index c5328fb2..00000000 --- a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCheckDeposit.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.math.BigDecimal; -import java.util.Arrays; -import org.openapitools.client.model.DepositLimitsAllOfAttributesCheckDepositLimits; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DepositLimitsAllOfAttributesCheckDeposit - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DepositLimitsAllOfAttributesCheckDeposit { - public static final String SERIALIZED_NAME_LIMITS = "limits"; - @SerializedName(SERIALIZED_NAME_LIMITS) - private DepositLimitsAllOfAttributesCheckDepositLimits limits; - - public static final String SERIALIZED_NAME_TOTALS_DAILY = "totalsDaily"; - @SerializedName(SERIALIZED_NAME_TOTALS_DAILY) - private BigDecimal totalsDaily; - - public static final String SERIALIZED_NAME_TOTALS_MONTHLY = "totalsMonthly"; - @SerializedName(SERIALIZED_NAME_TOTALS_MONTHLY) - private BigDecimal totalsMonthly; - - public DepositLimitsAllOfAttributesCheckDeposit() { - } - - public DepositLimitsAllOfAttributesCheckDeposit limits(DepositLimitsAllOfAttributesCheckDepositLimits limits) { - - this.limits = limits; - return this; - } - - /** - * Get limits - * @return limits - **/ - @javax.annotation.Nonnull - public DepositLimitsAllOfAttributesCheckDepositLimits getLimits() { - return limits; - } - - - public void setLimits(DepositLimitsAllOfAttributesCheckDepositLimits limits) { - this.limits = limits; - } - - - public DepositLimitsAllOfAttributesCheckDeposit totalsDaily(BigDecimal totalsDaily) { - - this.totalsDaily = totalsDaily; - return this; - } - - /** - * Get totalsDaily - * @return totalsDaily - **/ - @javax.annotation.Nonnull - public BigDecimal getTotalsDaily() { - return totalsDaily; - } - - - public void setTotalsDaily(BigDecimal totalsDaily) { - this.totalsDaily = totalsDaily; - } - - - public DepositLimitsAllOfAttributesCheckDeposit totalsMonthly(BigDecimal totalsMonthly) { - - this.totalsMonthly = totalsMonthly; - return this; - } - - /** - * Get totalsMonthly - * @return totalsMonthly - **/ - @javax.annotation.Nonnull - public BigDecimal getTotalsMonthly() { - return totalsMonthly; - } - - - public void setTotalsMonthly(BigDecimal totalsMonthly) { - this.totalsMonthly = totalsMonthly; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DepositLimitsAllOfAttributesCheckDeposit depositLimitsAllOfAttributesCheckDeposit = (DepositLimitsAllOfAttributesCheckDeposit) o; - return Objects.equals(this.limits, depositLimitsAllOfAttributesCheckDeposit.limits) && - Objects.equals(this.totalsDaily, depositLimitsAllOfAttributesCheckDeposit.totalsDaily) && - Objects.equals(this.totalsMonthly, depositLimitsAllOfAttributesCheckDeposit.totalsMonthly); - } - - @Override - public int hashCode() { - return Objects.hash(limits, totalsDaily, totalsMonthly); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DepositLimitsAllOfAttributesCheckDeposit {\n"); - sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); - sb.append(" totalsDaily: ").append(toIndentedString(totalsDaily)).append("\n"); - sb.append(" totalsMonthly: ").append(toIndentedString(totalsMonthly)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("limits"); - openapiFields.add("totalsDaily"); - openapiFields.add("totalsMonthly"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("limits"); - openapiRequiredFields.add("totalsDaily"); - openapiRequiredFields.add("totalsMonthly"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DepositLimitsAllOfAttributesCheckDeposit - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DepositLimitsAllOfAttributesCheckDeposit.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DepositLimitsAllOfAttributesCheckDeposit is not found in the empty JSON string", DepositLimitsAllOfAttributesCheckDeposit.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DepositLimitsAllOfAttributesCheckDeposit.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DepositLimitsAllOfAttributesCheckDeposit` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DepositLimitsAllOfAttributesCheckDeposit.openapiRequiredFields) { - 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(); - // validate the required field `limits` - DepositLimitsAllOfAttributesCheckDepositLimits.validateJsonElement(jsonObj.get("limits")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DepositLimitsAllOfAttributesCheckDeposit.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DepositLimitsAllOfAttributesCheckDeposit' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DepositLimitsAllOfAttributesCheckDeposit.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DepositLimitsAllOfAttributesCheckDeposit value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DepositLimitsAllOfAttributesCheckDeposit read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DepositLimitsAllOfAttributesCheckDeposit given an JSON string - * - * @param jsonString JSON string - * @return An instance of DepositLimitsAllOfAttributesCheckDeposit - * @throws IOException if the JSON string is invalid with respect to DepositLimitsAllOfAttributesCheckDeposit - */ - public static DepositLimitsAllOfAttributesCheckDeposit fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DepositLimitsAllOfAttributesCheckDeposit.class); - } - - /** - * Convert an instance of DepositLimitsAllOfAttributesCheckDeposit to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCheckDepositLimits.java b/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCheckDepositLimits.java deleted file mode 100644 index a6796e61..00000000 --- a/src/main/java/org/openapitools/client/model/DepositLimitsAllOfAttributesCheckDepositLimits.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.math.BigDecimal; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DepositLimitsAllOfAttributesCheckDepositLimits - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DepositLimitsAllOfAttributesCheckDepositLimits { - public static final String SERIALIZED_NAME_DAILY = "daily"; - @SerializedName(SERIALIZED_NAME_DAILY) - private BigDecimal daily; - - public static final String SERIALIZED_NAME_MONTHLY = "monthly"; - @SerializedName(SERIALIZED_NAME_MONTHLY) - private BigDecimal monthly; - - public static final String SERIALIZED_NAME_DAILY_SOFT = "dailySoft"; - @SerializedName(SERIALIZED_NAME_DAILY_SOFT) - private BigDecimal dailySoft; - - public static final String SERIALIZED_NAME_MONTHLY_SOFT = "monthlySoft"; - @SerializedName(SERIALIZED_NAME_MONTHLY_SOFT) - private BigDecimal monthlySoft; - - public DepositLimitsAllOfAttributesCheckDepositLimits() { - } - - public DepositLimitsAllOfAttributesCheckDepositLimits daily(BigDecimal daily) { - - this.daily = daily; - return this; - } - - /** - * Get daily - * @return daily - **/ - @javax.annotation.Nonnull - public BigDecimal getDaily() { - return daily; - } - - - public void setDaily(BigDecimal daily) { - this.daily = daily; - } - - - public DepositLimitsAllOfAttributesCheckDepositLimits monthly(BigDecimal monthly) { - - this.monthly = monthly; - return this; - } - - /** - * Get monthly - * @return monthly - **/ - @javax.annotation.Nonnull - public BigDecimal getMonthly() { - return monthly; - } - - - public void setMonthly(BigDecimal monthly) { - this.monthly = monthly; - } - - - public DepositLimitsAllOfAttributesCheckDepositLimits dailySoft(BigDecimal dailySoft) { - - this.dailySoft = dailySoft; - return this; - } - - /** - * Get dailySoft - * @return dailySoft - **/ - @javax.annotation.Nonnull - public BigDecimal getDailySoft() { - return dailySoft; - } - - - public void setDailySoft(BigDecimal dailySoft) { - this.dailySoft = dailySoft; - } - - - public DepositLimitsAllOfAttributesCheckDepositLimits monthlySoft(BigDecimal monthlySoft) { - - this.monthlySoft = monthlySoft; - return this; - } - - /** - * Get monthlySoft - * @return monthlySoft - **/ - @javax.annotation.Nonnull - public BigDecimal getMonthlySoft() { - return monthlySoft; - } - - - public void setMonthlySoft(BigDecimal monthlySoft) { - this.monthlySoft = monthlySoft; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DepositLimitsAllOfAttributesCheckDepositLimits depositLimitsAllOfAttributesCheckDepositLimits = (DepositLimitsAllOfAttributesCheckDepositLimits) o; - return Objects.equals(this.daily, depositLimitsAllOfAttributesCheckDepositLimits.daily) && - Objects.equals(this.monthly, depositLimitsAllOfAttributesCheckDepositLimits.monthly) && - Objects.equals(this.dailySoft, depositLimitsAllOfAttributesCheckDepositLimits.dailySoft) && - Objects.equals(this.monthlySoft, depositLimitsAllOfAttributesCheckDepositLimits.monthlySoft); - } - - @Override - public int hashCode() { - return Objects.hash(daily, monthly, dailySoft, monthlySoft); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DepositLimitsAllOfAttributesCheckDepositLimits {\n"); - sb.append(" daily: ").append(toIndentedString(daily)).append("\n"); - sb.append(" monthly: ").append(toIndentedString(monthly)).append("\n"); - sb.append(" dailySoft: ").append(toIndentedString(dailySoft)).append("\n"); - sb.append(" monthlySoft: ").append(toIndentedString(monthlySoft)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("daily"); - openapiFields.add("monthly"); - openapiFields.add("dailySoft"); - openapiFields.add("monthlySoft"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("daily"); - openapiRequiredFields.add("monthly"); - openapiRequiredFields.add("dailySoft"); - openapiRequiredFields.add("monthlySoft"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DepositLimitsAllOfAttributesCheckDepositLimits - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DepositLimitsAllOfAttributesCheckDepositLimits.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DepositLimitsAllOfAttributesCheckDepositLimits is not found in the empty JSON string", DepositLimitsAllOfAttributesCheckDepositLimits.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DepositLimitsAllOfAttributesCheckDepositLimits.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DepositLimitsAllOfAttributesCheckDepositLimits` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DepositLimitsAllOfAttributesCheckDepositLimits.openapiRequiredFields) { - 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 { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DepositLimitsAllOfAttributesCheckDepositLimits.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DepositLimitsAllOfAttributesCheckDepositLimits' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DepositLimitsAllOfAttributesCheckDepositLimits.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DepositLimitsAllOfAttributesCheckDepositLimits value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DepositLimitsAllOfAttributesCheckDepositLimits read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DepositLimitsAllOfAttributesCheckDepositLimits given an JSON string - * - * @param jsonString JSON string - * @return An instance of DepositLimitsAllOfAttributesCheckDepositLimits - * @throws IOException if the JSON string is invalid with respect to DepositLimitsAllOfAttributesCheckDepositLimits - */ - public static DepositLimitsAllOfAttributesCheckDepositLimits fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DepositLimitsAllOfAttributesCheckDepositLimits.class); - } - - /** - * Convert an instance of DepositLimitsAllOfAttributesCheckDepositLimits to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DeviceFingerprint.java b/src/main/java/org/openapitools/client/model/DeviceFingerprint.java deleted file mode 100644 index 57ee6be8..00000000 --- a/src/main/java/org/openapitools/client/model/DeviceFingerprint.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DeviceFingerprint - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeviceFingerprint { - /** - * Gets or Sets provider - */ - @JsonAdapter(ProviderEnum.Adapter.class) - public enum ProviderEnum { - IOVATION("iovation"); - - private String value; - - ProviderEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ProviderEnum fromValue(String value) { - for (ProviderEnum b : ProviderEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ProviderEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ProviderEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ProviderEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_PROVIDER = "provider"; - @SerializedName(SERIALIZED_NAME_PROVIDER) - private ProviderEnum provider; - - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) - private String value; - - public DeviceFingerprint() { - } - - public DeviceFingerprint provider(ProviderEnum provider) { - - this.provider = provider; - return this; - } - - /** - * Get provider - * @return provider - **/ - @javax.annotation.Nonnull - public ProviderEnum getProvider() { - return provider; - } - - - public void setProvider(ProviderEnum provider) { - this.provider = provider; - } - - - public DeviceFingerprint value(String value) { - - this.value = value; - return this; - } - - /** - * Get value - * @return value - **/ - @javax.annotation.Nonnull - public String getValue() { - return value; - } - - - public void setValue(String value) { - this.value = value; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeviceFingerprint deviceFingerprint = (DeviceFingerprint) o; - return Objects.equals(this.provider, deviceFingerprint.provider) && - Objects.equals(this.value, deviceFingerprint.value); - } - - @Override - public int hashCode() { - return Objects.hash(provider, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeviceFingerprint {\n"); - sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("provider"); - openapiFields.add("value"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("provider"); - openapiRequiredFields.add("value"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceFingerprint - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeviceFingerprint.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceFingerprint is not found in the empty JSON string", DeviceFingerprint.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DeviceFingerprint.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeviceFingerprint` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeviceFingerprint.openapiRequiredFields) { - 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("provider").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `provider` to be a primitive type in the JSON string but got `%s`", jsonObj.get("provider").toString())); - } - if (!jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceFingerprint.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceFingerprint' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceFingerprint.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeviceFingerprint value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeviceFingerprint read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeviceFingerprint given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeviceFingerprint - * @throws IOException if the JSON string is invalid with respect to DeviceFingerprint - */ - public static DeviceFingerprint fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceFingerprint.class); - } - - /** - * Convert an instance of DeviceFingerprint to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DishonoredAchTransaction.java b/src/main/java/org/openapitools/client/model/DishonoredAchTransaction.java deleted file mode 100644 index 7ea7954d..00000000 --- a/src/main/java/org/openapitools/client/model/DishonoredAchTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.DishonoredAchTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DishonoredAchTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DishonoredAchTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private DishonoredAchTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public DishonoredAchTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public DishonoredAchTransaction attributes(DishonoredAchTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public DishonoredAchTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(DishonoredAchTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public DishonoredAchTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DishonoredAchTransaction dishonoredAchTransaction = (DishonoredAchTransaction) o; - return Objects.equals(this.attributes, dishonoredAchTransaction.attributes) && - Objects.equals(this.relationships, dishonoredAchTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DishonoredAchTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DishonoredAchTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DishonoredAchTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DishonoredAchTransaction is not found in the empty JSON string", DishonoredAchTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DishonoredAchTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DishonoredAchTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DishonoredAchTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DishonoredAchTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DishonoredAchTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DishonoredAchTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DishonoredAchTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DishonoredAchTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DishonoredAchTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of DishonoredAchTransaction - * @throws IOException if the JSON string is invalid with respect to DishonoredAchTransaction - */ - public static DishonoredAchTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DishonoredAchTransaction.class); - } - - /** - * Convert an instance of DishonoredAchTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DishonoredAchTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/DishonoredAchTransactionAllOfAttributes.java deleted file mode 100644 index 8ac55f6d..00000000 --- a/src/main/java/org/openapitools/client/model/DishonoredAchTransactionAllOfAttributes.java +++ /dev/null @@ -1,631 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DishonoredAchTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DishonoredAchTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; - @SerializedName(SERIALIZED_NAME_COMPANY_NAME) - private String companyName; - - public static final String SERIALIZED_NAME_COUNTERPARTY_NAME = "counterpartyName"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_NAME) - private String counterpartyName; - - public static final String SERIALIZED_NAME_COUNTERPARTY_ROUTING_NUMBER = "counterpartyRoutingNumber"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_ROUTING_NUMBER) - private String counterpartyRoutingNumber; - - public static final String SERIALIZED_NAME_TRACE_NUMBER = "traceNumber"; - @SerializedName(SERIALIZED_NAME_TRACE_NUMBER) - private String traceNumber; - - public static final String SERIALIZED_NAME_REASON = "reason"; - @SerializedName(SERIALIZED_NAME_REASON) - private String reason; - - public static final String SERIALIZED_NAME_SEC_CODE = "secCode"; - @SerializedName(SERIALIZED_NAME_SEC_CODE) - private String secCode; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public DishonoredAchTransactionAllOfAttributes() { - } - - public DishonoredAchTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public DishonoredAchTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public DishonoredAchTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public DishonoredAchTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public DishonoredAchTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public DishonoredAchTransactionAllOfAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public DishonoredAchTransactionAllOfAttributes companyName(String companyName) { - - this.companyName = companyName; - return this; - } - - /** - * Get companyName - * @return companyName - **/ - @javax.annotation.Nonnull - public String getCompanyName() { - return companyName; - } - - - public void setCompanyName(String companyName) { - this.companyName = companyName; - } - - - public DishonoredAchTransactionAllOfAttributes counterpartyName(String counterpartyName) { - - this.counterpartyName = counterpartyName; - return this; - } - - /** - * Get counterpartyName - * @return counterpartyName - **/ - @javax.annotation.Nullable - public String getCounterpartyName() { - return counterpartyName; - } - - - public void setCounterpartyName(String counterpartyName) { - this.counterpartyName = counterpartyName; - } - - - public DishonoredAchTransactionAllOfAttributes counterpartyRoutingNumber(String counterpartyRoutingNumber) { - - this.counterpartyRoutingNumber = counterpartyRoutingNumber; - return this; - } - - /** - * Get counterpartyRoutingNumber - * @return counterpartyRoutingNumber - **/ - @javax.annotation.Nonnull - public String getCounterpartyRoutingNumber() { - return counterpartyRoutingNumber; - } - - - public void setCounterpartyRoutingNumber(String counterpartyRoutingNumber) { - this.counterpartyRoutingNumber = counterpartyRoutingNumber; - } - - - public DishonoredAchTransactionAllOfAttributes traceNumber(String traceNumber) { - - this.traceNumber = traceNumber; - return this; - } - - /** - * Get traceNumber - * @return traceNumber - **/ - @javax.annotation.Nullable - public String getTraceNumber() { - return traceNumber; - } - - - public void setTraceNumber(String traceNumber) { - this.traceNumber = traceNumber; - } - - - public DishonoredAchTransactionAllOfAttributes reason(String reason) { - - this.reason = reason; - return this; - } - - /** - * Get reason - * @return reason - **/ - @javax.annotation.Nullable - public String getReason() { - return reason; - } - - - public void setReason(String reason) { - this.reason = reason; - } - - - public DishonoredAchTransactionAllOfAttributes secCode(String secCode) { - - this.secCode = secCode; - return this; - } - - /** - * Get secCode - * @return secCode - **/ - @javax.annotation.Nullable - public String getSecCode() { - return secCode; - } - - - public void setSecCode(String secCode) { - this.secCode = secCode; - } - - - public DishonoredAchTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DishonoredAchTransactionAllOfAttributes dishonoredAchTransactionAllOfAttributes = (DishonoredAchTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, dishonoredAchTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, dishonoredAchTransactionAllOfAttributes.direction) && - Objects.equals(this.amount, dishonoredAchTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, dishonoredAchTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, dishonoredAchTransactionAllOfAttributes.summary) && - Objects.equals(this.description, dishonoredAchTransactionAllOfAttributes.description) && - Objects.equals(this.companyName, dishonoredAchTransactionAllOfAttributes.companyName) && - Objects.equals(this.counterpartyName, dishonoredAchTransactionAllOfAttributes.counterpartyName) && - Objects.equals(this.counterpartyRoutingNumber, dishonoredAchTransactionAllOfAttributes.counterpartyRoutingNumber) && - Objects.equals(this.traceNumber, dishonoredAchTransactionAllOfAttributes.traceNumber) && - Objects.equals(this.reason, dishonoredAchTransactionAllOfAttributes.reason) && - Objects.equals(this.secCode, dishonoredAchTransactionAllOfAttributes.secCode) && - Objects.equals(this.tags, dishonoredAchTransactionAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, amount, balance, summary, description, companyName, counterpartyName, counterpartyRoutingNumber, traceNumber, reason, secCode, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DishonoredAchTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); - sb.append(" counterpartyName: ").append(toIndentedString(counterpartyName)).append("\n"); - sb.append(" counterpartyRoutingNumber: ").append(toIndentedString(counterpartyRoutingNumber)).append("\n"); - sb.append(" traceNumber: ").append(toIndentedString(traceNumber)).append("\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append(" secCode: ").append(toIndentedString(secCode)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("description"); - openapiFields.add("companyName"); - openapiFields.add("counterpartyName"); - openapiFields.add("counterpartyRoutingNumber"); - openapiFields.add("traceNumber"); - openapiFields.add("reason"); - openapiFields.add("secCode"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("companyName"); - openapiRequiredFields.add("counterpartyRoutingNumber"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DishonoredAchTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DishonoredAchTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DishonoredAchTransactionAllOfAttributes is not found in the empty JSON string", DishonoredAchTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DishonoredAchTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DishonoredAchTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DishonoredAchTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if (!jsonObj.get("companyName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); - } - if ((jsonObj.get("counterpartyName") != null && !jsonObj.get("counterpartyName").isJsonNull()) && !jsonObj.get("counterpartyName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `counterpartyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("counterpartyName").toString())); - } - if (!jsonObj.get("counterpartyRoutingNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `counterpartyRoutingNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("counterpartyRoutingNumber").toString())); - } - if ((jsonObj.get("traceNumber") != null && !jsonObj.get("traceNumber").isJsonNull()) && !jsonObj.get("traceNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `traceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("traceNumber").toString())); - } - if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); - } - if ((jsonObj.get("secCode") != null && !jsonObj.get("secCode").isJsonNull()) && !jsonObj.get("secCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `secCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secCode").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DishonoredAchTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DishonoredAchTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DishonoredAchTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DishonoredAchTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DishonoredAchTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DishonoredAchTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of DishonoredAchTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to DishonoredAchTransactionAllOfAttributes - */ - public static DishonoredAchTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DishonoredAchTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of DishonoredAchTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Dispute.java b/src/main/java/org/openapitools/client/model/Dispute.java deleted file mode 100644 index 1d4632b1..00000000 --- a/src/main/java/org/openapitools/client/model/Dispute.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.DisputeAttributes; -import org.openapitools.client.model.DisputeRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Dispute - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Dispute { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "dispute"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private DisputeAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private DisputeRelationships relationships; - - public Dispute() { - } - - public Dispute type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public Dispute id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public Dispute attributes(DisputeAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public DisputeAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(DisputeAttributes attributes) { - this.attributes = attributes; - } - - - public Dispute relationships(DisputeRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public DisputeRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(DisputeRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Dispute dispute = (Dispute) o; - return Objects.equals(this.type, dispute.type) && - Objects.equals(this.id, dispute.id) && - Objects.equals(this.attributes, dispute.attributes) && - Objects.equals(this.relationships, dispute.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Dispute {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Dispute - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Dispute.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Dispute is not found in the empty JSON string", Dispute.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Dispute.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Dispute` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Dispute.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - DisputeAttributes.validateJsonElement(jsonObj.get("attributes")); - } - // validate the required field `relationships` - DisputeRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Dispute.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Dispute' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Dispute.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Dispute value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Dispute read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Dispute given an JSON string - * - * @param jsonString JSON string - * @return An instance of Dispute - * @throws IOException if the JSON string is invalid with respect to Dispute - */ - public static Dispute fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Dispute.class); - } - - /** - * Convert an instance of Dispute to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DisputeAttributes.java b/src/main/java/org/openapitools/client/model/DisputeAttributes.java deleted file mode 100644 index c0b4a26c..00000000 --- a/src/main/java/org/openapitools/client/model/DisputeAttributes.java +++ /dev/null @@ -1,533 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.DisputeAttributesStatusHistoryInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DisputeAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DisputeAttributes { - /** - * Gets or Sets source - */ - @JsonAdapter(SourceEnum.Adapter.class) - public enum SourceEnum { - DEBITCARD("DebitCard"), - - ACH("ACH"); - - private String value; - - SourceEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static SourceEnum fromValue(String value) { - for (SourceEnum b : SourceEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final SourceEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public SourceEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return SourceEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_SOURCE = "source"; - @SerializedName(SERIALIZED_NAME_SOURCE) - private SourceEnum source; - - public static final String SERIALIZED_NAME_EXTERNAL_ID = "externalId"; - @SerializedName(SERIALIZED_NAME_EXTERNAL_ID) - private String externalId; - - public static final String SERIALIZED_NAME_LINK = "link"; - @SerializedName(SERIALIZED_NAME_LINK) - private String link; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_STATUS_HISTORY = "statusHistory"; - @SerializedName(SERIALIZED_NAME_STATUS_HISTORY) - private List statusHistory; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_DECISION_REASON = "decisionReason"; - @SerializedName(SERIALIZED_NAME_DECISION_REASON) - private String decisionReason; - - public DisputeAttributes() { - } - - public DisputeAttributes source(SourceEnum source) { - - this.source = source; - return this; - } - - /** - * Get source - * @return source - **/ - @javax.annotation.Nonnull - public SourceEnum getSource() { - return source; - } - - - public void setSource(SourceEnum source) { - this.source = source; - } - - - public DisputeAttributes externalId(String externalId) { - - this.externalId = externalId; - return this; - } - - /** - * Get externalId - * @return externalId - **/ - @javax.annotation.Nonnull - public String getExternalId() { - return externalId; - } - - - public void setExternalId(String externalId) { - this.externalId = externalId; - } - - - public DisputeAttributes link(String link) { - - this.link = link; - return this; - } - - /** - * Get link - * @return link - **/ - @javax.annotation.Nullable - public String getLink() { - return link; - } - - - public void setLink(String link) { - this.link = link; - } - - - public DisputeAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public DisputeAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public DisputeAttributes status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public DisputeAttributes statusHistory(List statusHistory) { - - this.statusHistory = statusHistory; - return this; - } - - public DisputeAttributes addStatusHistoryItem(DisputeAttributesStatusHistoryInner statusHistoryItem) { - if (this.statusHistory == null) { - this.statusHistory = new ArrayList<>(); - } - this.statusHistory.add(statusHistoryItem); - return this; - } - - /** - * Get statusHistory - * @return statusHistory - **/ - @javax.annotation.Nullable - public List getStatusHistory() { - return statusHistory; - } - - - public void setStatusHistory(List statusHistory) { - this.statusHistory = statusHistory; - } - - - public DisputeAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public DisputeAttributes decisionReason(String decisionReason) { - - this.decisionReason = decisionReason; - return this; - } - - /** - * Get decisionReason - * @return decisionReason - **/ - @javax.annotation.Nullable - public String getDecisionReason() { - return decisionReason; - } - - - public void setDecisionReason(String decisionReason) { - this.decisionReason = decisionReason; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DisputeAttributes disputeAttributes = (DisputeAttributes) o; - return Objects.equals(this.source, disputeAttributes.source) && - Objects.equals(this.externalId, disputeAttributes.externalId) && - Objects.equals(this.link, disputeAttributes.link) && - Objects.equals(this.description, disputeAttributes.description) && - Objects.equals(this.amount, disputeAttributes.amount) && - Objects.equals(this.status, disputeAttributes.status) && - Objects.equals(this.statusHistory, disputeAttributes.statusHistory) && - Objects.equals(this.createdAt, disputeAttributes.createdAt) && - Objects.equals(this.decisionReason, disputeAttributes.decisionReason); - } - - @Override - public int hashCode() { - return Objects.hash(source, externalId, link, description, amount, status, statusHistory, createdAt, decisionReason); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DisputeAttributes {\n"); - sb.append(" source: ").append(toIndentedString(source)).append("\n"); - sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); - sb.append(" link: ").append(toIndentedString(link)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" statusHistory: ").append(toIndentedString(statusHistory)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" decisionReason: ").append(toIndentedString(decisionReason)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("source"); - openapiFields.add("externalId"); - openapiFields.add("link"); - openapiFields.add("description"); - openapiFields.add("amount"); - openapiFields.add("status"); - openapiFields.add("statusHistory"); - openapiFields.add("createdAt"); - openapiFields.add("decisionReason"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("source"); - openapiRequiredFields.add("externalId"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("createdAt"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DisputeAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DisputeAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DisputeAttributes is not found in the empty JSON string", DisputeAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DisputeAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DisputeAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DisputeAttributes.openapiRequiredFields) { - 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("source").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `source` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source").toString())); - } - if (!jsonObj.get("externalId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `externalId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("externalId").toString())); - } - if ((jsonObj.get("link") != null && !jsonObj.get("link").isJsonNull()) && !jsonObj.get("link").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `link` to be a primitive type in the JSON string but got `%s`", jsonObj.get("link").toString())); - } - if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if (!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())); - } - if (jsonObj.get("statusHistory") != null && !jsonObj.get("statusHistory").isJsonNull()) { - JsonArray jsonArraystatusHistory = jsonObj.getAsJsonArray("statusHistory"); - if (jsonArraystatusHistory != null) { - // ensure the json data is an array - if (!jsonObj.get("statusHistory").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `statusHistory` to be an array in the JSON string but got `%s`", jsonObj.get("statusHistory").toString())); - } - - // validate the optional field `statusHistory` (array) - for (int i = 0; i < jsonArraystatusHistory.size(); i++) { - DisputeAttributesStatusHistoryInner.validateJsonElement(jsonArraystatusHistory.get(i)); - }; - } - } - if ((jsonObj.get("decisionReason") != null && !jsonObj.get("decisionReason").isJsonNull()) && !jsonObj.get("decisionReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `decisionReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("decisionReason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DisputeAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DisputeAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DisputeAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DisputeAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DisputeAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DisputeAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of DisputeAttributes - * @throws IOException if the JSON string is invalid with respect to DisputeAttributes - */ - public static DisputeAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DisputeAttributes.class); - } - - /** - * Convert an instance of DisputeAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DisputeAttributesStatusHistoryInner.java b/src/main/java/org/openapitools/client/model/DisputeAttributesStatusHistoryInner.java deleted file mode 100644 index 59d4a4b7..00000000 --- a/src/main/java/org/openapitools/client/model/DisputeAttributesStatusHistoryInner.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DisputeAttributesStatusHistoryInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DisputeAttributesStatusHistoryInner { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public DisputeAttributesStatusHistoryInner() { - } - - public DisputeAttributesStatusHistoryInner type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public DisputeAttributesStatusHistoryInner updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DisputeAttributesStatusHistoryInner disputeAttributesStatusHistoryInner = (DisputeAttributesStatusHistoryInner) o; - return Objects.equals(this.type, disputeAttributesStatusHistoryInner.type) && - Objects.equals(this.updatedAt, disputeAttributesStatusHistoryInner.updatedAt); - } - - @Override - public int hashCode() { - return Objects.hash(type, updatedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DisputeAttributesStatusHistoryInner {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("updatedAt"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DisputeAttributesStatusHistoryInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DisputeAttributesStatusHistoryInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DisputeAttributesStatusHistoryInner is not found in the empty JSON string", DisputeAttributesStatusHistoryInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DisputeAttributesStatusHistoryInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DisputeAttributesStatusHistoryInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DisputeAttributesStatusHistoryInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DisputeAttributesStatusHistoryInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DisputeAttributesStatusHistoryInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DisputeAttributesStatusHistoryInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DisputeAttributesStatusHistoryInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DisputeAttributesStatusHistoryInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of DisputeAttributesStatusHistoryInner - * @throws IOException if the JSON string is invalid with respect to DisputeAttributesStatusHistoryInner - */ - public static DisputeAttributesStatusHistoryInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DisputeAttributesStatusHistoryInner.class); - } - - /** - * Convert an instance of DisputeAttributesStatusHistoryInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DisputeRelationships.java b/src/main/java/org/openapitools/client/model/DisputeRelationships.java deleted file mode 100644 index 25dfa0c1..00000000 --- a/src/main/java/org/openapitools/client/model/DisputeRelationships.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Relationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DisputeRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DisputeRelationships { - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private Relationship customer; - - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private Relationship account; - - public static final String SERIALIZED_NAME_TRANSACTION = "transaction"; - @SerializedName(SERIALIZED_NAME_TRANSACTION) - private Relationship transaction; - - public DisputeRelationships() { - } - - public DisputeRelationships customer(Relationship customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nonnull - public Relationship getCustomer() { - return customer; - } - - - public void setCustomer(Relationship customer) { - this.customer = customer; - } - - - public DisputeRelationships account(Relationship account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public Relationship getAccount() { - return account; - } - - - public void setAccount(Relationship account) { - this.account = account; - } - - - public DisputeRelationships transaction(Relationship transaction) { - - this.transaction = transaction; - return this; - } - - /** - * Get transaction - * @return transaction - **/ - @javax.annotation.Nonnull - public Relationship getTransaction() { - return transaction; - } - - - public void setTransaction(Relationship transaction) { - this.transaction = transaction; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DisputeRelationships disputeRelationships = (DisputeRelationships) o; - return Objects.equals(this.customer, disputeRelationships.customer) && - Objects.equals(this.account, disputeRelationships.account) && - Objects.equals(this.transaction, disputeRelationships.transaction); - } - - @Override - public int hashCode() { - return Objects.hash(customer, account, transaction); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DisputeRelationships {\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" transaction: ").append(toIndentedString(transaction)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("customer"); - openapiFields.add("account"); - openapiFields.add("transaction"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("customer"); - openapiRequiredFields.add("account"); - openapiRequiredFields.add("transaction"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DisputeRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DisputeRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DisputeRelationships is not found in the empty JSON string", DisputeRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DisputeRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DisputeRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DisputeRelationships.openapiRequiredFields) { - 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(); - // validate the required field `customer` - Relationship.validateJsonElement(jsonObj.get("customer")); - // validate the required field `account` - Relationship.validateJsonElement(jsonObj.get("account")); - // validate the required field `transaction` - Relationship.validateJsonElement(jsonObj.get("transaction")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DisputeRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DisputeRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DisputeRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DisputeRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DisputeRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DisputeRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of DisputeRelationships - * @throws IOException if the JSON string is invalid with respect to DisputeRelationships - */ - public static DisputeRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DisputeRelationships.class); - } - - /** - * Convert an instance of DisputeRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DisputeSettlementTransaction.java b/src/main/java/org/openapitools/client/model/DisputeSettlementTransaction.java deleted file mode 100644 index ece1fd89..00000000 --- a/src/main/java/org/openapitools/client/model/DisputeSettlementTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.FeeTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DisputeSettlementTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DisputeSettlementTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private FeeTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public DisputeSettlementTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public DisputeSettlementTransaction attributes(FeeTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public FeeTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(FeeTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public DisputeSettlementTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DisputeSettlementTransaction disputeSettlementTransaction = (DisputeSettlementTransaction) o; - return Objects.equals(this.attributes, disputeSettlementTransaction.attributes) && - Objects.equals(this.relationships, disputeSettlementTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DisputeSettlementTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DisputeSettlementTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DisputeSettlementTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DisputeSettlementTransaction is not found in the empty JSON string", DisputeSettlementTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DisputeSettlementTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DisputeSettlementTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DisputeSettlementTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DisputeSettlementTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DisputeSettlementTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DisputeSettlementTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DisputeSettlementTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DisputeSettlementTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DisputeSettlementTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of DisputeSettlementTransaction - * @throws IOException if the JSON string is invalid with respect to DisputeSettlementTransaction - */ - public static DisputeSettlementTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DisputeSettlementTransaction.class); - } - - /** - * Convert an instance of DisputeSettlementTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DisputeTransaction.java b/src/main/java/org/openapitools/client/model/DisputeTransaction.java deleted file mode 100644 index 2d6d27c6..00000000 --- a/src/main/java/org/openapitools/client/model/DisputeTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.DisputeTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DisputeTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DisputeTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private DisputeTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public DisputeTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public DisputeTransaction attributes(DisputeTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public DisputeTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(DisputeTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public DisputeTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DisputeTransaction disputeTransaction = (DisputeTransaction) o; - return Objects.equals(this.attributes, disputeTransaction.attributes) && - Objects.equals(this.relationships, disputeTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DisputeTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DisputeTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DisputeTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DisputeTransaction is not found in the empty JSON string", DisputeTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DisputeTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DisputeTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DisputeTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DisputeTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DisputeTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DisputeTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DisputeTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DisputeTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DisputeTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of DisputeTransaction - * @throws IOException if the JSON string is invalid with respect to DisputeTransaction - */ - public static DisputeTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DisputeTransaction.class); - } - - /** - * Convert an instance of DisputeTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DisputeTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/DisputeTransactionAllOfAttributes.java deleted file mode 100644 index cfb0b20e..00000000 --- a/src/main/java/org/openapitools/client/model/DisputeTransactionAllOfAttributes.java +++ /dev/null @@ -1,475 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DisputeTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DisputeTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_REASON = "reason"; - @SerializedName(SERIALIZED_NAME_REASON) - private String reason; - - public static final String SERIALIZED_NAME_DISPUTE_ID = "disputeId"; - @SerializedName(SERIALIZED_NAME_DISPUTE_ID) - private String disputeId; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public DisputeTransactionAllOfAttributes() { - } - - public DisputeTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public DisputeTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public DisputeTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public DisputeTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public DisputeTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public DisputeTransactionAllOfAttributes reason(String reason) { - - this.reason = reason; - return this; - } - - /** - * Get reason - * @return reason - **/ - @javax.annotation.Nonnull - public String getReason() { - return reason; - } - - - public void setReason(String reason) { - this.reason = reason; - } - - - public DisputeTransactionAllOfAttributes disputeId(String disputeId) { - - this.disputeId = disputeId; - return this; - } - - /** - * Get disputeId - * @return disputeId - **/ - @javax.annotation.Nonnull - public String getDisputeId() { - return disputeId; - } - - - public void setDisputeId(String disputeId) { - this.disputeId = disputeId; - } - - - public DisputeTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DisputeTransactionAllOfAttributes disputeTransactionAllOfAttributes = (DisputeTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, disputeTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, disputeTransactionAllOfAttributes.direction) && - Objects.equals(this.amount, disputeTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, disputeTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, disputeTransactionAllOfAttributes.summary) && - Objects.equals(this.reason, disputeTransactionAllOfAttributes.reason) && - Objects.equals(this.disputeId, disputeTransactionAllOfAttributes.disputeId) && - Objects.equals(this.tags, disputeTransactionAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, amount, balance, summary, reason, disputeId, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DisputeTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append(" disputeId: ").append(toIndentedString(disputeId)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("reason"); - openapiFields.add("disputeId"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - openapiRequiredFields.add("reason"); - openapiRequiredFields.add("disputeId"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DisputeTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DisputeTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DisputeTransactionAllOfAttributes is not found in the empty JSON string", DisputeTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DisputeTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DisputeTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DisputeTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - if (!jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); - } - if (!jsonObj.get("disputeId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disputeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disputeId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DisputeTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DisputeTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DisputeTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DisputeTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DisputeTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DisputeTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of DisputeTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to DisputeTransactionAllOfAttributes - */ - public static DisputeTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DisputeTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of DisputeTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Document.java b/src/main/java/org/openapitools/client/model/Document.java deleted file mode 100644 index 0037de54..00000000 --- a/src/main/java/org/openapitools/client/model/Document.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.DocumentAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Document - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Document { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "document"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private DocumentAttributes attributes; - - public Document() { - } - - public Document type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public Document id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public Document attributes(DocumentAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public DocumentAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(DocumentAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Document document = (Document) o; - return Objects.equals(this.type, document.type) && - Objects.equals(this.id, document.id) && - Objects.equals(this.attributes, document.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Document {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Document - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Document.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Document is not found in the empty JSON string", Document.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Document.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Document` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Document.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - // validate the required field `attributes` - DocumentAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Document.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Document' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Document.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Document value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Document read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Document given an JSON string - * - * @param jsonString JSON string - * @return An instance of Document - * @throws IOException if the JSON string is invalid with respect to Document - */ - public static Document fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Document.class); - } - - /** - * Convert an instance of Document to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DocumentAttributes.java b/src/main/java/org/openapitools/client/model/DocumentAttributes.java deleted file mode 100644 index 14fa30b7..00000000 --- a/src/main/java/org/openapitools/client/model/DocumentAttributes.java +++ /dev/null @@ -1,802 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.Arrays; -import org.openapitools.client.model.Address; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DocumentAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DocumentAttributes { - public static final String SERIALIZED_NAME_DOCUMENT_TYPE = "documentType"; - @SerializedName(SERIALIZED_NAME_DOCUMENT_TYPE) - private String documentType; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_MATRICULA_CONSULAR = "matriculaConsular"; - @SerializedName(SERIALIZED_NAME_MATRICULA_CONSULAR) - private String matriculaConsular; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_DATE_OF_INCORPORATION = "dateOfIncorporation"; - @SerializedName(SERIALIZED_NAME_DATE_OF_INCORPORATION) - private LocalDate dateOfIncorporation; - - public static final String SERIALIZED_NAME_STATE_OF_INCORPORATION = "stateOfIncorporation"; - @SerializedName(SERIALIZED_NAME_STATE_OF_INCORPORATION) - private String stateOfIncorporation; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public static final String SERIALIZED_NAME_EIN = "ein"; - @SerializedName(SERIALIZED_NAME_EIN) - private String ein; - - public static final String SERIALIZED_NAME_REASON_CODE = "reasonCode"; - @SerializedName(SERIALIZED_NAME_REASON_CODE) - private String reasonCode; - - public static final String SERIALIZED_NAME_REASON = "reason"; - @SerializedName(SERIALIZED_NAME_REASON) - private String reason; - - public static final String SERIALIZED_NAME_EVALUATION_ID = "evaluationId"; - @SerializedName(SERIALIZED_NAME_EVALUATION_ID) - private String evaluationId; - - public static final String SERIALIZED_NAME_FRONT_DOCUMENT_ID = "frontDocumentId"; - @SerializedName(SERIALIZED_NAME_FRONT_DOCUMENT_ID) - private String frontDocumentId; - - public static final String SERIALIZED_NAME_BACK_DOCUMENT_ID = "backDocumentId"; - @SerializedName(SERIALIZED_NAME_BACK_DOCUMENT_ID) - private String backDocumentId; - - public static final String SERIALIZED_NAME_FRONT_DOCUMENT_STORE_ID = "frontDocumentStoreId"; - @SerializedName(SERIALIZED_NAME_FRONT_DOCUMENT_STORE_ID) - private String frontDocumentStoreId; - - public static final String SERIALIZED_NAME_BACK_DOCUMENT_STORE_ID = "backDocumentStoreId"; - @SerializedName(SERIALIZED_NAME_BACK_DOCUMENT_STORE_ID) - private String backDocumentStoreId; - - public DocumentAttributes() { - } - - public DocumentAttributes documentType(String documentType) { - - this.documentType = documentType; - return this; - } - - /** - * Get documentType - * @return documentType - **/ - @javax.annotation.Nullable - public String getDocumentType() { - return documentType; - } - - - public void setDocumentType(String documentType) { - this.documentType = documentType; - } - - - public DocumentAttributes status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public DocumentAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public DocumentAttributes nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public DocumentAttributes ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public DocumentAttributes passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public DocumentAttributes matriculaConsular(String matriculaConsular) { - - this.matriculaConsular = matriculaConsular; - return this; - } - - /** - * Get matriculaConsular - * @return matriculaConsular - **/ - @javax.annotation.Nullable - public String getMatriculaConsular() { - return matriculaConsular; - } - - - public void setMatriculaConsular(String matriculaConsular) { - this.matriculaConsular = matriculaConsular; - } - - - public DocumentAttributes name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public DocumentAttributes address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public DocumentAttributes dateOfIncorporation(LocalDate dateOfIncorporation) { - - this.dateOfIncorporation = dateOfIncorporation; - return this; - } - - /** - * Get dateOfIncorporation - * @return dateOfIncorporation - **/ - @javax.annotation.Nullable - public LocalDate getDateOfIncorporation() { - return dateOfIncorporation; - } - - - public void setDateOfIncorporation(LocalDate dateOfIncorporation) { - this.dateOfIncorporation = dateOfIncorporation; - } - - - public DocumentAttributes stateOfIncorporation(String stateOfIncorporation) { - - this.stateOfIncorporation = stateOfIncorporation; - return this; - } - - /** - * Get stateOfIncorporation - * @return stateOfIncorporation - **/ - @javax.annotation.Nullable - public String getStateOfIncorporation() { - return stateOfIncorporation; - } - - - public void setStateOfIncorporation(String stateOfIncorporation) { - this.stateOfIncorporation = stateOfIncorporation; - } - - - public DocumentAttributes dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nullable - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public DocumentAttributes ein(String ein) { - - this.ein = ein; - return this; - } - - /** - * Get ein - * @return ein - **/ - @javax.annotation.Nullable - public String getEin() { - return ein; - } - - - public void setEin(String ein) { - this.ein = ein; - } - - - public DocumentAttributes reasonCode(String reasonCode) { - - this.reasonCode = reasonCode; - return this; - } - - /** - * Get reasonCode - * @return reasonCode - **/ - @javax.annotation.Nullable - public String getReasonCode() { - return reasonCode; - } - - - public void setReasonCode(String reasonCode) { - this.reasonCode = reasonCode; - } - - - public DocumentAttributes reason(String reason) { - - this.reason = reason; - return this; - } - - /** - * Get reason - * @return reason - **/ - @javax.annotation.Nullable - public String getReason() { - return reason; - } - - - public void setReason(String reason) { - this.reason = reason; - } - - - public DocumentAttributes evaluationId(String evaluationId) { - - this.evaluationId = evaluationId; - return this; - } - - /** - * Get evaluationId - * @return evaluationId - **/ - @javax.annotation.Nullable - public String getEvaluationId() { - return evaluationId; - } - - - public void setEvaluationId(String evaluationId) { - this.evaluationId = evaluationId; - } - - - public DocumentAttributes frontDocumentId(String frontDocumentId) { - - this.frontDocumentId = frontDocumentId; - return this; - } - - /** - * Get frontDocumentId - * @return frontDocumentId - **/ - @javax.annotation.Nullable - public String getFrontDocumentId() { - return frontDocumentId; - } - - - public void setFrontDocumentId(String frontDocumentId) { - this.frontDocumentId = frontDocumentId; - } - - - public DocumentAttributes backDocumentId(String backDocumentId) { - - this.backDocumentId = backDocumentId; - return this; - } - - /** - * Get backDocumentId - * @return backDocumentId - **/ - @javax.annotation.Nullable - public String getBackDocumentId() { - return backDocumentId; - } - - - public void setBackDocumentId(String backDocumentId) { - this.backDocumentId = backDocumentId; - } - - - public DocumentAttributes frontDocumentStoreId(String frontDocumentStoreId) { - - this.frontDocumentStoreId = frontDocumentStoreId; - return this; - } - - /** - * Get frontDocumentStoreId - * @return frontDocumentStoreId - **/ - @javax.annotation.Nullable - public String getFrontDocumentStoreId() { - return frontDocumentStoreId; - } - - - public void setFrontDocumentStoreId(String frontDocumentStoreId) { - this.frontDocumentStoreId = frontDocumentStoreId; - } - - - public DocumentAttributes backDocumentStoreId(String backDocumentStoreId) { - - this.backDocumentStoreId = backDocumentStoreId; - return this; - } - - /** - * Get backDocumentStoreId - * @return backDocumentStoreId - **/ - @javax.annotation.Nullable - public String getBackDocumentStoreId() { - return backDocumentStoreId; - } - - - public void setBackDocumentStoreId(String backDocumentStoreId) { - this.backDocumentStoreId = backDocumentStoreId; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DocumentAttributes documentAttributes = (DocumentAttributes) o; - return Objects.equals(this.documentType, documentAttributes.documentType) && - Objects.equals(this.status, documentAttributes.status) && - Objects.equals(this.description, documentAttributes.description) && - Objects.equals(this.nationality, documentAttributes.nationality) && - Objects.equals(this.ssn, documentAttributes.ssn) && - Objects.equals(this.passport, documentAttributes.passport) && - Objects.equals(this.matriculaConsular, documentAttributes.matriculaConsular) && - Objects.equals(this.name, documentAttributes.name) && - Objects.equals(this.address, documentAttributes.address) && - Objects.equals(this.dateOfIncorporation, documentAttributes.dateOfIncorporation) && - Objects.equals(this.stateOfIncorporation, documentAttributes.stateOfIncorporation) && - Objects.equals(this.dateOfBirth, documentAttributes.dateOfBirth) && - Objects.equals(this.ein, documentAttributes.ein) && - Objects.equals(this.reasonCode, documentAttributes.reasonCode) && - Objects.equals(this.reason, documentAttributes.reason) && - Objects.equals(this.evaluationId, documentAttributes.evaluationId) && - Objects.equals(this.frontDocumentId, documentAttributes.frontDocumentId) && - Objects.equals(this.backDocumentId, documentAttributes.backDocumentId) && - Objects.equals(this.frontDocumentStoreId, documentAttributes.frontDocumentStoreId) && - Objects.equals(this.backDocumentStoreId, documentAttributes.backDocumentStoreId); - } - - @Override - public int hashCode() { - return Objects.hash(documentType, status, description, nationality, ssn, passport, matriculaConsular, name, address, dateOfIncorporation, stateOfIncorporation, dateOfBirth, ein, reasonCode, reason, evaluationId, frontDocumentId, backDocumentId, frontDocumentStoreId, backDocumentStoreId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DocumentAttributes {\n"); - sb.append(" documentType: ").append(toIndentedString(documentType)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" dateOfIncorporation: ").append(toIndentedString(dateOfIncorporation)).append("\n"); - sb.append(" stateOfIncorporation: ").append(toIndentedString(stateOfIncorporation)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); - sb.append(" reasonCode: ").append(toIndentedString(reasonCode)).append("\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); - sb.append(" frontDocumentId: ").append(toIndentedString(frontDocumentId)).append("\n"); - sb.append(" backDocumentId: ").append(toIndentedString(backDocumentId)).append("\n"); - sb.append(" frontDocumentStoreId: ").append(toIndentedString(frontDocumentStoreId)).append("\n"); - sb.append(" backDocumentStoreId: ").append(toIndentedString(backDocumentStoreId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("documentType"); - openapiFields.add("status"); - openapiFields.add("description"); - openapiFields.add("nationality"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("matriculaConsular"); - openapiFields.add("name"); - openapiFields.add("address"); - openapiFields.add("dateOfIncorporation"); - openapiFields.add("stateOfIncorporation"); - openapiFields.add("dateOfBirth"); - openapiFields.add("ein"); - openapiFields.add("reasonCode"); - openapiFields.add("reason"); - openapiFields.add("evaluationId"); - openapiFields.add("frontDocumentId"); - openapiFields.add("backDocumentId"); - openapiFields.add("frontDocumentStoreId"); - openapiFields.add("backDocumentStoreId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("status"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DocumentAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DocumentAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DocumentAttributes is not found in the empty JSON string", DocumentAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DocumentAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DocumentAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DocumentAttributes.openapiRequiredFields) { - 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("documentType") != null && !jsonObj.get("documentType").isJsonNull()) && !jsonObj.get("documentType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `documentType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("documentType").toString())); - } - if (!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())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("matriculaConsular") != null && !jsonObj.get("matriculaConsular").isJsonNull()) && !jsonObj.get("matriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `matriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("matriculaConsular").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("address")); - } - if ((jsonObj.get("stateOfIncorporation") != null && !jsonObj.get("stateOfIncorporation").isJsonNull()) && !jsonObj.get("stateOfIncorporation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `stateOfIncorporation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stateOfIncorporation").toString())); - } - if ((jsonObj.get("ein") != null && !jsonObj.get("ein").isJsonNull()) && !jsonObj.get("ein").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ein` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ein").toString())); - } - if ((jsonObj.get("reasonCode") != null && !jsonObj.get("reasonCode").isJsonNull()) && !jsonObj.get("reasonCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reasonCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reasonCode").toString())); - } - if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); - } - if ((jsonObj.get("evaluationId") != null && !jsonObj.get("evaluationId").isJsonNull()) && !jsonObj.get("evaluationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationId").toString())); - } - if ((jsonObj.get("frontDocumentId") != null && !jsonObj.get("frontDocumentId").isJsonNull()) && !jsonObj.get("frontDocumentId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `frontDocumentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("frontDocumentId").toString())); - } - if ((jsonObj.get("backDocumentId") != null && !jsonObj.get("backDocumentId").isJsonNull()) && !jsonObj.get("backDocumentId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `backDocumentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("backDocumentId").toString())); - } - if ((jsonObj.get("frontDocumentStoreId") != null && !jsonObj.get("frontDocumentStoreId").isJsonNull()) && !jsonObj.get("frontDocumentStoreId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `frontDocumentStoreId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("frontDocumentStoreId").toString())); - } - if ((jsonObj.get("backDocumentStoreId") != null && !jsonObj.get("backDocumentStoreId").isJsonNull()) && !jsonObj.get("backDocumentStoreId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `backDocumentStoreId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("backDocumentStoreId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DocumentAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DocumentAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DocumentAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DocumentAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DocumentAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DocumentAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of DocumentAttributes - * @throws IOException if the JSON string is invalid with respect to DocumentAttributes - */ - public static DocumentAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DocumentAttributes.class); - } - - /** - * Convert an instance of DocumentAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DocumentsRelationship.java b/src/main/java/org/openapitools/client/model/DocumentsRelationship.java deleted file mode 100644 index 64fffa46..00000000 --- a/src/main/java/org/openapitools/client/model/DocumentsRelationship.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.DocumentsRelationshipDataInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DocumentsRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DocumentsRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); - - public DocumentsRelationship() { - } - - public DocumentsRelationship data(List data) { - - this.data = data; - return this; - } - - public DocumentsRelationship addDataItem(DocumentsRelationshipDataInner dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DocumentsRelationship documentsRelationship = (DocumentsRelationship) o; - return Objects.equals(this.data, documentsRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DocumentsRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DocumentsRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DocumentsRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DocumentsRelationship is not found in the empty JSON string", DocumentsRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DocumentsRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DocumentsRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DocumentsRelationship.openapiRequiredFields) { - 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(); - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - DocumentsRelationshipDataInner.validateJsonElement(jsonArraydata.get(i)); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DocumentsRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DocumentsRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DocumentsRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DocumentsRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DocumentsRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DocumentsRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of DocumentsRelationship - * @throws IOException if the JSON string is invalid with respect to DocumentsRelationship - */ - public static DocumentsRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DocumentsRelationship.class); - } - - /** - * Convert an instance of DocumentsRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/DocumentsRelationshipDataInner.java b/src/main/java/org/openapitools/client/model/DocumentsRelationshipDataInner.java deleted file mode 100644 index 0e0db077..00000000 --- a/src/main/java/org/openapitools/client/model/DocumentsRelationshipDataInner.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DocumentsRelationshipDataInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DocumentsRelationshipDataInner { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "document"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public DocumentsRelationshipDataInner() { - } - - public DocumentsRelationshipDataInner type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public DocumentsRelationshipDataInner id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DocumentsRelationshipDataInner documentsRelationshipDataInner = (DocumentsRelationshipDataInner) o; - return Objects.equals(this.type, documentsRelationshipDataInner.type) && - Objects.equals(this.id, documentsRelationshipDataInner.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DocumentsRelationshipDataInner {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DocumentsRelationshipDataInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DocumentsRelationshipDataInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DocumentsRelationshipDataInner is not found in the empty JSON string", DocumentsRelationshipDataInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DocumentsRelationshipDataInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DocumentsRelationshipDataInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - 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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DocumentsRelationshipDataInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DocumentsRelationshipDataInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DocumentsRelationshipDataInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DocumentsRelationshipDataInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DocumentsRelationshipDataInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DocumentsRelationshipDataInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of DocumentsRelationshipDataInner - * @throws IOException if the JSON string is invalid with respect to DocumentsRelationshipDataInner - */ - public static DocumentsRelationshipDataInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DocumentsRelationshipDataInner.class); - } - - /** - * Convert an instance of DocumentsRelationshipDataInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/EntityType.java b/src/main/java/org/openapitools/client/model/EntityType.java deleted file mode 100644 index 3ff100d3..00000000 --- a/src/main/java/org/openapitools/client/model/EntityType.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets entityType - */ -@JsonAdapter(EntityType.Adapter.class) -public enum EntityType { - - CORPORATION("Corporation"), - - LLC("LLC"), - - PARTNERSHIP("Partnership"), - - PUBLICLYTRADEDCORPORATION("PubliclyTradedCorporation"), - - PRIVATELYHELDCORPORATION("PrivatelyHeldCorporation"), - - NOTFORPROFITORGANIZATION("NotForProfitOrganization"); - - private String value; - - EntityType(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static EntityType fromValue(String value) { - for (EntityType b : EntityType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final EntityType enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public EntityType read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return EntityType.fromValue(value); - } - } -} - diff --git a/src/main/java/org/openapitools/client/model/EvaluationParams.java b/src/main/java/org/openapitools/client/model/EvaluationParams.java deleted file mode 100644 index 21059129..00000000 --- a/src/main/java/org/openapitools/client/model/EvaluationParams.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * EvaluationParams - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class EvaluationParams { - /** - * Gets or Sets useSelfieVerification - */ - @JsonAdapter(UseSelfieVerificationEnum.Adapter.class) - public enum UseSelfieVerificationEnum { - NEVER("Never"), - - REPLACEIDENTIFICATION("ReplaceIdentification"), - - ALWAYS("Always"); - - private String value; - - UseSelfieVerificationEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static UseSelfieVerificationEnum fromValue(String value) { - for (UseSelfieVerificationEnum b : UseSelfieVerificationEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final UseSelfieVerificationEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public UseSelfieVerificationEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return UseSelfieVerificationEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_USE_SELFIE_VERIFICATION = "useSelfieVerification"; - @SerializedName(SERIALIZED_NAME_USE_SELFIE_VERIFICATION) - private UseSelfieVerificationEnum useSelfieVerification; - - public static final String SERIALIZED_NAME_REQUIRE_ID_VERIFICATION = "requireIdVerification"; - @SerializedName(SERIALIZED_NAME_REQUIRE_ID_VERIFICATION) - private Boolean requireIdVerification = false; - - public EvaluationParams() { - } - - public EvaluationParams useSelfieVerification(UseSelfieVerificationEnum useSelfieVerification) { - - this.useSelfieVerification = useSelfieVerification; - return this; - } - - /** - * Get useSelfieVerification - * @return useSelfieVerification - **/ - @javax.annotation.Nullable - public UseSelfieVerificationEnum getUseSelfieVerification() { - return useSelfieVerification; - } - - - public void setUseSelfieVerification(UseSelfieVerificationEnum useSelfieVerification) { - this.useSelfieVerification = useSelfieVerification; - } - - - public EvaluationParams requireIdVerification(Boolean requireIdVerification) { - - this.requireIdVerification = requireIdVerification; - return this; - } - - /** - * Get requireIdVerification - * @return requireIdVerification - **/ - @javax.annotation.Nullable - public Boolean getRequireIdVerification() { - return requireIdVerification; - } - - - public void setRequireIdVerification(Boolean requireIdVerification) { - this.requireIdVerification = requireIdVerification; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EvaluationParams evaluationParams = (EvaluationParams) o; - return Objects.equals(this.useSelfieVerification, evaluationParams.useSelfieVerification) && - Objects.equals(this.requireIdVerification, evaluationParams.requireIdVerification); - } - - @Override - public int hashCode() { - return Objects.hash(useSelfieVerification, requireIdVerification); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EvaluationParams {\n"); - sb.append(" useSelfieVerification: ").append(toIndentedString(useSelfieVerification)).append("\n"); - sb.append(" requireIdVerification: ").append(toIndentedString(requireIdVerification)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("useSelfieVerification"); - openapiFields.add("requireIdVerification"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to EvaluationParams - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!EvaluationParams.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EvaluationParams is not found in the empty JSON string", EvaluationParams.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!EvaluationParams.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EvaluationParams` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("useSelfieVerification") != null && !jsonObj.get("useSelfieVerification").isJsonNull()) && !jsonObj.get("useSelfieVerification").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `useSelfieVerification` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useSelfieVerification").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!EvaluationParams.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'EvaluationParams' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(EvaluationParams.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, EvaluationParams value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public EvaluationParams read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of EvaluationParams given an JSON string - * - * @param jsonString JSON string - * @return An instance of EvaluationParams - * @throws IOException if the JSON string is invalid with respect to EvaluationParams - */ - public static EvaluationParams fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, EvaluationParams.class); - } - - /** - * Convert an instance of EvaluationParams to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Event.java b/src/main/java/org/openapitools/client/model/Event.java deleted file mode 100644 index 49bd4dd2..00000000 --- a/src/main/java/org/openapitools/client/model/Event.java +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Event - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Event { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private Object attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private Object relationships; - - public Event() { - } - - public Event type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public Event id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public Event attributes(Object attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public Object getAttributes() { - return attributes; - } - - - public void setAttributes(Object attributes) { - this.attributes = attributes; - } - - - public Event relationships(Object relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public Object getRelationships() { - return relationships; - } - - - public void setRelationships(Object relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Event event = (Event) o; - return Objects.equals(this.type, event.type) && - Objects.equals(this.id, event.id) && - Objects.equals(this.attributes, event.attributes) && - Objects.equals(this.relationships, event.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Event {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Event - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Event.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Event is not found in the empty JSON string", Event.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Event.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Event` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Event.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Event.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Event' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Event.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Event value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Event read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Event given an JSON string - * - * @param jsonString JSON string - * @return An instance of Event - * @throws IOException if the JSON string is invalid with respect to Event - */ - public static Event fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Event.class); - } - - /** - * Convert an instance of Event to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter.java deleted file mode 100644 index 8f3bbd7a..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter.java +++ /dev/null @@ -1,405 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter { - public static final String SERIALIZED_NAME_QUERY = "query"; - @SerializedName(SERIALIZED_NAME_QUERY) - private String query; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - AWAITINGDOCUMENTS("AwaitingDocuments"), - - PENDINGREVIEW("PendingReview"), - - PENDING("Pending"), - - APPROVED("Approved"), - - DENIED("Denied"), - - CANCELED("Canceled"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private List status; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Map tags = new HashMap<>(); - - public ExecuteFilterParameter() { - } - - public ExecuteFilterParameter query(String query) { - - this.query = query; - return this; - } - - /** - * Get query - * @return query - **/ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - - public void setQuery(String query) { - this.query = query; - } - - - public ExecuteFilterParameter status(List status) { - - this.status = status; - return this; - } - - public ExecuteFilterParameter addStatusItem(StatusEnum statusItem) { - if (this.status == null) { - this.status = new ArrayList<>(); - } - this.status.add(statusItem); - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public List getStatus() { - return status; - } - - - public void setStatus(List status) { - this.status = status; - } - - - public ExecuteFilterParameter email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public ExecuteFilterParameter tags(Map tags) { - - this.tags = tags; - return this; - } - - public ExecuteFilterParameter putTagsItem(String key, String tagsItem) { - if (this.tags == null) { - this.tags = new HashMap<>(); - } - this.tags.put(key, tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Map getTags() { - return tags; - } - - - public void setTags(Map tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter executeFilterParameter = (ExecuteFilterParameter) o; - return Objects.equals(this.query, executeFilterParameter.query) && - Objects.equals(this.status, executeFilterParameter.status) && - Objects.equals(this.email, executeFilterParameter.email) && - Objects.equals(this.tags, executeFilterParameter.tags); - } - - @Override - public int hashCode() { - return Objects.hash(query, status, email, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("query"); - openapiFields.add("status"); - openapiFields.add("email"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter is not found in the empty JSON string", ExecuteFilterParameter.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("query") != null && !jsonObj.get("query").isJsonNull()) && !jsonObj.get("query").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `query` to be a primitive type in the JSON string but got `%s`", jsonObj.get("query").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull() && !jsonObj.get("status").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be an array in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter - */ - public static ExecuteFilterParameter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter.class); - } - - /** - * Convert an instance of ExecuteFilterParameter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams(){ - List params = new ArrayList<>(); - - if(this.query != null){ - params.add(new Pair("filter[query]", this.query)); - } - - if(this.email != null){ - params.add(new Pair("filter[email]", this.email)); - } - - if(this.status != null){ - int i=0; - for (StatusEnum s:this.status) { - params.add(new Pair(String.format("filter[status][%s]", i), s.getValue())); - i++; - } - } - - if(this.tags != null){ - String tagsAsString = this.tags.keySet().stream() - .map(key -> key + ":" + this.tags.get(key)) - .collect(Collectors.joining(", ", "{", "}")); - params.add(new Pair("filter[tags]", tagsAsString)); - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter1.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter1.java deleted file mode 100644 index 5e3ac5e4..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter1.java +++ /dev/null @@ -1,397 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter1 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter1 { - public static final String SERIALIZED_NAME_QUERY = "query"; - @SerializedName(SERIALIZED_NAME_QUERY) - private String query; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - PENDING("Pending"), - - APPROVED("Approved"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private List status; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Map tags = new HashMap<>(); - - public ExecuteFilterParameter1() { - } - - public ExecuteFilterParameter1 query(String query) { - - this.query = query; - return this; - } - - /** - * Get query - * @return query - **/ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - - public void setQuery(String query) { - this.query = query; - } - - - public ExecuteFilterParameter1 status(List status) { - - this.status = status; - return this; - } - - public ExecuteFilterParameter1 addStatusItem(StatusEnum statusItem) { - if (this.status == null) { - this.status = new ArrayList<>(); - } - this.status.add(statusItem); - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public List getStatus() { - return status; - } - - - public void setStatus(List status) { - this.status = status; - } - - - public ExecuteFilterParameter1 email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public ExecuteFilterParameter1 tags(Map tags) { - - this.tags = tags; - return this; - } - - public ExecuteFilterParameter1 putTagsItem(String key, String tagsItem) { - if (this.tags == null) { - this.tags = new HashMap<>(); - } - this.tags.put(key, tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Map getTags() { - return tags; - } - - - public void setTags(Map tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter1 executeFilterParameter1 = (ExecuteFilterParameter1) o; - return Objects.equals(this.query, executeFilterParameter1.query) && - Objects.equals(this.status, executeFilterParameter1.status) && - Objects.equals(this.email, executeFilterParameter1.email) && - Objects.equals(this.tags, executeFilterParameter1.tags); - } - - @Override - public int hashCode() { - return Objects.hash(query, status, email, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter1 {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("query"); - openapiFields.add("status"); - openapiFields.add("email"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter1 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter1 is not found in the empty JSON string", ExecuteFilterParameter1.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter1.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter1` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("query") != null && !jsonObj.get("query").isJsonNull()) && !jsonObj.get("query").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `query` to be a primitive type in the JSON string but got `%s`", jsonObj.get("query").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull() && !jsonObj.get("status").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be an array in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter1.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter1' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter1.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter1 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter1 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter1 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter1 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter1 - */ - public static ExecuteFilterParameter1 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter1.class); - } - - /** - * Convert an instance of ExecuteFilterParameter1 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams(){ - List params = new ArrayList<>(); - - if(this.query != null){ - params.add(new Pair("filter[query]", this.query)); - } - - if(this.email != null){ - params.add(new Pair("filter[email]", this.email)); - } - - if(this.status != null){ - int i=0; - for (StatusEnum s:this.status) { - params.add(new Pair(String.format("filter[status][%s]", i), s.getValue())); - i++; - } - } - - if(this.tags != null){ - String tagsAsString = this.tags.keySet().stream() - .map(key -> key + ":" + this.tags.get(key)) - .collect(Collectors.joining(", ", "{", "}")); - params.add(new Pair("filter[tags]", tagsAsString)); - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter10.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter10.java deleted file mode 100644 index 69fdb5fb..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter10.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.*; - -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 com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter10 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter10 { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_CUSTOMER_ID = "customerId"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_ID) - private String customerId; - - public static final String SERIALIZED_NAME_PERIOD = "period"; - @SerializedName(SERIALIZED_NAME_PERIOD) - private String period; - - public ExecuteFilterParameter10() { - } - - public ExecuteFilterParameter10 accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * Get accountId - * @return accountId - **/ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - - public ExecuteFilterParameter10 customerId(String customerId) { - - this.customerId = customerId; - return this; - } - - /** - * Get customerId - * @return customerId - **/ - @javax.annotation.Nullable - public String getCustomerId() { - return customerId; - } - - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - - public ExecuteFilterParameter10 period(String period) { - - this.period = period; - return this; - } - - /** - * Get period - * @return period - **/ - @javax.annotation.Nullable - public String getPeriod() { - return period; - } - - - public void setPeriod(String period) { - this.period = period; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter10 executeFilterParameter10 = (ExecuteFilterParameter10) o; - return Objects.equals(this.accountId, executeFilterParameter10.accountId) && - Objects.equals(this.customerId, executeFilterParameter10.customerId) && - Objects.equals(this.period, executeFilterParameter10.period); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, customerId, period); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter10 {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" period: ").append(toIndentedString(period)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("customerId"); - openapiFields.add("period"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter10 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter10.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter10 is not found in the empty JSON string", ExecuteFilterParameter10.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter10.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter10` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); - } - if ((jsonObj.get("customerId") != null && !jsonObj.get("customerId").isJsonNull()) && !jsonObj.get("customerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `customerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerId").toString())); - } - if ((jsonObj.get("period") != null && !jsonObj.get("period").isJsonNull()) && !jsonObj.get("period").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `period` to be a primitive type in the JSON string but got `%s`", jsonObj.get("period").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter10.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter10' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter10.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter10 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter10 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter10 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter10 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter10 - */ - public static ExecuteFilterParameter10 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter10.class); - } - - /** - * Convert an instance of ExecuteFilterParameter10 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams() { - List params = new ArrayList<>(); - - if (this.accountId != null) { - params.add(new Pair("filter[accountId]", this.accountId)); - } - - if (this.customerId != null) { - params.add(new Pair("filter[customerId]", this.customerId)); - } - - if (this.period != null) { - params.add(new Pair("filter[period]", this.period)); - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter11.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter11.java deleted file mode 100644 index 0e436796..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter11.java +++ /dev/null @@ -1,505 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.*; - -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 com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.Map; -import java.util.stream.Collectors; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter11 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter11 { - public static final String SERIALIZED_NAME_TRANSACTION_ID = "transactionId"; - @SerializedName(SERIALIZED_NAME_TRANSACTION_ID) - private String transactionId; - - public static final String SERIALIZED_NAME_REWARDED_TRANSACTION_ID = "rewardedTransactionId"; - @SerializedName(SERIALIZED_NAME_REWARDED_TRANSACTION_ID) - private String rewardedTransactionId; - - public static final String SERIALIZED_NAME_RECEIVING_ACCOUNT_ID = "receivingAccountId"; - @SerializedName(SERIALIZED_NAME_RECEIVING_ACCOUNT_ID) - private String receivingAccountId; - - public static final String SERIALIZED_NAME_CUSTOMER_ID = "customerId"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_ID) - private String customerId; - - public static final String SERIALIZED_NAME_CARD_ID = "cardId"; - @SerializedName(SERIALIZED_NAME_CARD_ID) - private String cardId; - - public static final String SERIALIZED_NAME_SINCE = "since"; - @SerializedName(SERIALIZED_NAME_SINCE) - private String since; - - public static final String SERIALIZED_NAME_UNTIL = "until"; - @SerializedName(SERIALIZED_NAME_UNTIL) - private String until; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Map tags = new HashMap<>(); - - public ExecuteFilterParameter11() { - } - - public ExecuteFilterParameter11 transactionId(String transactionId) { - - this.transactionId = transactionId; - return this; - } - - /** - * Get transactionId - * @return transactionId - **/ - @javax.annotation.Nullable - public String getTransactionId() { - return transactionId; - } - - - public void setTransactionId(String transactionId) { - this.transactionId = transactionId; - } - - - public ExecuteFilterParameter11 rewardedTransactionId(String rewardedTransactionId) { - - this.rewardedTransactionId = rewardedTransactionId; - return this; - } - - /** - * Get rewardedTransactionId - * @return rewardedTransactionId - **/ - @javax.annotation.Nullable - public String getRewardedTransactionId() { - return rewardedTransactionId; - } - - - public void setRewardedTransactionId(String rewardedTransactionId) { - this.rewardedTransactionId = rewardedTransactionId; - } - - - public ExecuteFilterParameter11 receivingAccountId(String receivingAccountId) { - - this.receivingAccountId = receivingAccountId; - return this; - } - - /** - * Get receivingAccountId - * @return receivingAccountId - **/ - @javax.annotation.Nullable - public String getReceivingAccountId() { - return receivingAccountId; - } - - - public void setReceivingAccountId(String receivingAccountId) { - this.receivingAccountId = receivingAccountId; - } - - - public ExecuteFilterParameter11 customerId(String customerId) { - - this.customerId = customerId; - return this; - } - - /** - * Get customerId - * @return customerId - **/ - @javax.annotation.Nullable - public String getCustomerId() { - return customerId; - } - - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - - public ExecuteFilterParameter11 cardId(String cardId) { - - this.cardId = cardId; - return this; - } - - /** - * Get cardId - * @return cardId - **/ - @javax.annotation.Nullable - public String getCardId() { - return cardId; - } - - - public void setCardId(String cardId) { - this.cardId = cardId; - } - - - public ExecuteFilterParameter11 since(String since) { - - this.since = since; - return this; - } - - /** - * Get since - * @return since - **/ - @javax.annotation.Nullable - public String getSince() { - return since; - } - - - public void setSince(String since) { - this.since = since; - } - - - public ExecuteFilterParameter11 until(String until) { - - this.until = until; - return this; - } - - /** - * Get until - * @return until - **/ - @javax.annotation.Nullable - public String getUntil() { - return until; - } - - - public void setUntil(String until) { - this.until = until; - } - - - public ExecuteFilterParameter11 status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public ExecuteFilterParameter11 tags(Map tags) { - - this.tags = tags; - return this; - } - - public ExecuteFilterParameter11 putTagsItem(String key, String tagsItem) { - if (this.tags == null) { - this.tags = new HashMap<>(); - } - this.tags.put(key, tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Map getTags() { - return tags; - } - - - public void setTags(Map tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter11 executeFilterParameter11 = (ExecuteFilterParameter11) o; - return Objects.equals(this.transactionId, executeFilterParameter11.transactionId) && - Objects.equals(this.rewardedTransactionId, executeFilterParameter11.rewardedTransactionId) && - Objects.equals(this.receivingAccountId, executeFilterParameter11.receivingAccountId) && - Objects.equals(this.customerId, executeFilterParameter11.customerId) && - Objects.equals(this.cardId, executeFilterParameter11.cardId) && - Objects.equals(this.since, executeFilterParameter11.since) && - Objects.equals(this.until, executeFilterParameter11.until) && - Objects.equals(this.status, executeFilterParameter11.status) && - Objects.equals(this.tags, executeFilterParameter11.tags); - } - - @Override - public int hashCode() { - return Objects.hash(transactionId, rewardedTransactionId, receivingAccountId, customerId, cardId, since, until, status, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter11 {\n"); - sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); - sb.append(" rewardedTransactionId: ").append(toIndentedString(rewardedTransactionId)).append("\n"); - sb.append(" receivingAccountId: ").append(toIndentedString(receivingAccountId)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" cardId: ").append(toIndentedString(cardId)).append("\n"); - sb.append(" since: ").append(toIndentedString(since)).append("\n"); - sb.append(" until: ").append(toIndentedString(until)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("transactionId"); - openapiFields.add("rewardedTransactionId"); - openapiFields.add("receivingAccountId"); - openapiFields.add("customerId"); - openapiFields.add("cardId"); - openapiFields.add("since"); - openapiFields.add("until"); - openapiFields.add("status"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter11 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter11.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter11 is not found in the empty JSON string", ExecuteFilterParameter11.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter11.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter11` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("transactionId") != null && !jsonObj.get("transactionId").isJsonNull()) && !jsonObj.get("transactionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transactionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transactionId").toString())); - } - if ((jsonObj.get("rewardedTransactionId") != null && !jsonObj.get("rewardedTransactionId").isJsonNull()) && !jsonObj.get("rewardedTransactionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `rewardedTransactionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rewardedTransactionId").toString())); - } - if ((jsonObj.get("receivingAccountId") != null && !jsonObj.get("receivingAccountId").isJsonNull()) && !jsonObj.get("receivingAccountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `receivingAccountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("receivingAccountId").toString())); - } - if ((jsonObj.get("customerId") != null && !jsonObj.get("customerId").isJsonNull()) && !jsonObj.get("customerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `customerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerId").toString())); - } - if ((jsonObj.get("cardId") != null && !jsonObj.get("cardId").isJsonNull()) && !jsonObj.get("cardId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardId").toString())); - } - if ((jsonObj.get("since") != null && !jsonObj.get("since").isJsonNull()) && !jsonObj.get("since").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `since` to be a primitive type in the JSON string but got `%s`", jsonObj.get("since").toString())); - } - if ((jsonObj.get("until") != null && !jsonObj.get("until").isJsonNull()) && !jsonObj.get("until").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `until` to be a primitive type in the JSON string but got `%s`", jsonObj.get("until").toString())); - } - 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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter11.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter11' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter11.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter11 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter11 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter11 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter11 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter11 - */ - public static ExecuteFilterParameter11 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter11.class); - } - - /** - * Convert an instance of ExecuteFilterParameter11 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams(){ - List params = new ArrayList<>(); - - if(this.cardId != null){ - params.add(new Pair("filter[cardId]", this.cardId)); - } - - if(this.customerId != null){ - params.add(new Pair("filter[customerId]", this.customerId)); - } - - if(this.transactionId != null){ - params.add(new Pair("filter[transactionId]", this.transactionId)); - } - - if(this.since != null){ - params.add(new Pair("filter[since]", this.since)); - } - - if(this.until != null){ - params.add(new Pair("filter[until]", this.until)); - } - - if(this.status != null){ - params.add(new Pair("filter[status]", this.status)); - } - - if(this.receivingAccountId != null){ - params.add(new Pair("filter[receivingAccountId]", this.receivingAccountId)); - } - - if(this.rewardedTransactionId != null){ - params.add(new Pair("filter[rewardedTransactionId]", this.rewardedTransactionId)); - } - - if(this.tags != null){ - String tagsAsString = this.tags.keySet().stream() - .map(key -> key + ":" + this.tags.get(key)) - .collect(Collectors.joining(", ", "{", "}")); - params.add(new Pair("filter[tags]", tagsAsString)); - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter12.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter12.java deleted file mode 100644 index 4006f819..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter12.java +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter12 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter12 { - public static final String SERIALIZED_NAME_SINCE = "since"; - @SerializedName(SERIALIZED_NAME_SINCE) - private String since; - - public static final String SERIALIZED_NAME_UNTIL = "until"; - @SerializedName(SERIALIZED_NAME_UNTIL) - private String until; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private List type; - - public ExecuteFilterParameter12() { - } - - public ExecuteFilterParameter12 since(String since) { - - this.since = since; - return this; - } - - /** - * Get since - * @return since - **/ - @javax.annotation.Nullable - public String getSince() { - return since; - } - - - public void setSince(String since) { - this.since = since; - } - - - public ExecuteFilterParameter12 until(String until) { - - this.until = until; - return this; - } - - /** - * Get until - * @return until - **/ - @javax.annotation.Nullable - public String getUntil() { - return until; - } - - - public void setUntil(String until) { - this.until = until; - } - - - public ExecuteFilterParameter12 type(List type) { - - this.type = type; - return this; - } - - public ExecuteFilterParameter12 addTypeItem(String typeItem) { - if (this.type == null) { - this.type = new ArrayList<>(); - } - this.type.add(typeItem); - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public List getType() { - return type; - } - - - public void setType(List type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter12 executeFilterParameter12 = (ExecuteFilterParameter12) o; - return Objects.equals(this.since, executeFilterParameter12.since) && - Objects.equals(this.until, executeFilterParameter12.until) && - Objects.equals(this.type, executeFilterParameter12.type); - } - - @Override - public int hashCode() { - return Objects.hash(since, until, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter12 {\n"); - sb.append(" since: ").append(toIndentedString(since)).append("\n"); - sb.append(" until: ").append(toIndentedString(until)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("since"); - openapiFields.add("until"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter12 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter12.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter12 is not found in the empty JSON string", ExecuteFilterParameter12.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter12.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter12` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("since") != null && !jsonObj.get("since").isJsonNull()) && !jsonObj.get("since").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `since` to be a primitive type in the JSON string but got `%s`", jsonObj.get("since").toString())); - } - if ((jsonObj.get("until") != null && !jsonObj.get("until").isJsonNull()) && !jsonObj.get("until").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `until` to be a primitive type in the JSON string but got `%s`", jsonObj.get("until").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull() && !jsonObj.get("type").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be an array in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter12.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter12' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter12.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter12 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter12 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter12 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter12 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter12 - */ - public static ExecuteFilterParameter12 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter12.class); - } - - /** - * Convert an instance of ExecuteFilterParameter12 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams() { - List params = new ArrayList<>(); - - if (this.since != null) { - params.add(new Pair("filter[since]", this.since)); - } - - if (this.until != null) { - params.add(new Pair("filter[until]", this.until)); - } - - if (this.type != null) { - int i = 0; - for (String t : this.type) { - params.add(new Pair(String.format("filter[type][%s]", i), t)); - i++; - } - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter13.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter13.java deleted file mode 100644 index 6f8fa5a3..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter13.java +++ /dev/null @@ -1,407 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter13 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter13 { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_CUSTOMER_ID = "customerId"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_ID) - private String customerId; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Map tags = new HashMap<>(); - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - AWAITINGIMAGES("AwaitingImages"), - - AWAITINGFRONTIMAGE("AwaitingFrontImage"), - - AWAITINGBACKIMAGE("AwaitingBackImage"), - - PENDING("Pending"), - - PENDINGREVIEW("PendingReview"), - - REJECTED("Rejected"), - - CLEARING("Clearing"), - - SENT("Sent"), - - CANCELED("Canceled"), - - RETURNED("Returned"), - - AWAITINGCUSTOMERCONFIRMATION("AwaitingCustomerConfirmation"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private List status; - - public ExecuteFilterParameter13() { - } - - public ExecuteFilterParameter13 accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * Get accountId - * @return accountId - **/ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - - public ExecuteFilterParameter13 customerId(String customerId) { - - this.customerId = customerId; - return this; - } - - /** - * Get customerId - * @return customerId - **/ - @javax.annotation.Nullable - public String getCustomerId() { - return customerId; - } - - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - - public ExecuteFilterParameter13 tags(Map tags) { - - this.tags = tags; - return this; - } - - public ExecuteFilterParameter13 putTagsItem(String key, String tagsItem) { - if (this.tags == null) { - this.tags = new HashMap<>(); - } - this.tags.put(key, tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Map getTags() { - return tags; - } - - - public void setTags(Map tags) { - this.tags = tags; - } - - - public ExecuteFilterParameter13 status(List status) { - - this.status = status; - return this; - } - - public ExecuteFilterParameter13 addStatusItem(StatusEnum statusItem) { - if (this.status == null) { - this.status = new ArrayList<>(); - } - this.status.add(statusItem); - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public List getStatus() { - return status; - } - - - public void setStatus(List status) { - this.status = status; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter13 executeFilterParameter13 = (ExecuteFilterParameter13) o; - return Objects.equals(this.accountId, executeFilterParameter13.accountId) && - Objects.equals(this.customerId, executeFilterParameter13.customerId) && - Objects.equals(this.tags, executeFilterParameter13.tags) && - Objects.equals(this.status, executeFilterParameter13.status); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, customerId, tags, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter13 {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("customerId"); - openapiFields.add("tags"); - openapiFields.add("status"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter13 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter13.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter13 is not found in the empty JSON string", ExecuteFilterParameter13.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter13.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter13` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); - } - if ((jsonObj.get("customerId") != null && !jsonObj.get("customerId").isJsonNull()) && !jsonObj.get("customerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `customerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull() && !jsonObj.get("status").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be an array in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter13.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter13' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter13.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter13 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter13 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter13 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter13 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter13 - */ - public static ExecuteFilterParameter13 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter13.class); - } - - /** - * Convert an instance of ExecuteFilterParameter13 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - public List toParams() { - List params = new ArrayList<>(); - - if (this.accountId != null) { - params.add(new Pair("filter[accountId]", this.accountId)); - } - - if (this.customerId != null) { - params.add(new Pair("filter[customerId]", this.customerId)); - } - - - if (this.tags != null) { - String tagsAsString = this.tags.keySet().stream() - .map(key -> key + ":" + this.tags.get(key)) - .collect(Collectors.joining(", ", "{", "}")); - params.add(new Pair("filter[tags]", tagsAsString)); - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter14.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter14.java deleted file mode 100644 index 513e802b..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter14.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.*; - -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 com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter14 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter14 { - public static final String SERIALIZED_NAME_SINCE = "since"; - @SerializedName(SERIALIZED_NAME_SINCE) - private String since; - - public static final String SERIALIZED_NAME_UNTIL = "until"; - @SerializedName(SERIALIZED_NAME_UNTIL) - private String until; - - public static final String SERIALIZED_NAME_FROM_ID = "fromId"; - @SerializedName(SERIALIZED_NAME_FROM_ID) - private Integer fromId; - - public static final String SERIALIZED_NAME_TO_ID = "toId"; - @SerializedName(SERIALIZED_NAME_TO_ID) - private Integer toId; - - public ExecuteFilterParameter14() { - } - - public ExecuteFilterParameter14 since(String since) { - - this.since = since; - return this; - } - - /** - * Get since - * @return since - **/ - @javax.annotation.Nullable - public String getSince() { - return since; - } - - - public void setSince(String since) { - this.since = since; - } - - - public ExecuteFilterParameter14 until(String until) { - - this.until = until; - return this; - } - - /** - * Get until - * @return until - **/ - @javax.annotation.Nullable - public String getUntil() { - return until; - } - - - public void setUntil(String until) { - this.until = until; - } - - - public ExecuteFilterParameter14 fromId(Integer fromId) { - - this.fromId = fromId; - return this; - } - - /** - * Get fromId - * @return fromId - **/ - @javax.annotation.Nullable - public Integer getFromId() { - return fromId; - } - - - public void setFromId(Integer fromId) { - this.fromId = fromId; - } - - - public ExecuteFilterParameter14 toId(Integer toId) { - - this.toId = toId; - return this; - } - - /** - * Get toId - * @return toId - **/ - @javax.annotation.Nullable - public Integer getToId() { - return toId; - } - - - public void setToId(Integer toId) { - this.toId = toId; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter14 executeFilterParameter14 = (ExecuteFilterParameter14) o; - return Objects.equals(this.since, executeFilterParameter14.since) && - Objects.equals(this.until, executeFilterParameter14.until) && - Objects.equals(this.fromId, executeFilterParameter14.fromId) && - Objects.equals(this.toId, executeFilterParameter14.toId); - } - - @Override - public int hashCode() { - return Objects.hash(since, until, fromId, toId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter14 {\n"); - sb.append(" since: ").append(toIndentedString(since)).append("\n"); - sb.append(" until: ").append(toIndentedString(until)).append("\n"); - sb.append(" fromId: ").append(toIndentedString(fromId)).append("\n"); - sb.append(" toId: ").append(toIndentedString(toId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("since"); - openapiFields.add("until"); - openapiFields.add("fromId"); - openapiFields.add("toId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter14 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter14.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter14 is not found in the empty JSON string", ExecuteFilterParameter14.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter14.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter14` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("since") != null && !jsonObj.get("since").isJsonNull()) && !jsonObj.get("since").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `since` to be a primitive type in the JSON string but got `%s`", jsonObj.get("since").toString())); - } - if ((jsonObj.get("until") != null && !jsonObj.get("until").isJsonNull()) && !jsonObj.get("until").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `until` to be a primitive type in the JSON string but got `%s`", jsonObj.get("until").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter14.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter14' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter14.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter14 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter14 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter14 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter14 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter14 - */ - public static ExecuteFilterParameter14 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter14.class); - } - - /** - * Convert an instance of ExecuteFilterParameter14 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - public List toParams() { - List params = new ArrayList<>(); - - if (this.fromId != null) { - params.add(new Pair("filter[fromId]", this.fromId.toString())); - } - - if (this.toId != null) { - params.add(new Pair("filter[toId]", this.toId.toString())); - } - - if (this.since != null) { - params.add(new Pair("filter[since]", this.since)); - } - - if (this.until != null) { - params.add(new Pair("filter[until]", this.until)); - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter15.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter15.java deleted file mode 100644 index 0c33b2c0..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter15.java +++ /dev/null @@ -1,326 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.*; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -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 com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter15 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter15 { - public static final String SERIALIZED_NAME_COORDINATES = "coordinates"; - @SerializedName(SERIALIZED_NAME_COORDINATES) - private Object coordinates; - - public static final String SERIALIZED_NAME_SEARCH_RADIUS = "searchRadius"; - @SerializedName(SERIALIZED_NAME_SEARCH_RADIUS) - private Integer searchRadius; - - public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; - @SerializedName(SERIALIZED_NAME_POSTAL_CODE) - private String postalCode; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Object address; - - public ExecuteFilterParameter15() { - } - - public ExecuteFilterParameter15 coordinates(Object coordinates) { - - this.coordinates = coordinates; - return this; - } - - /** - * Get coordinates - * - * @return coordinates - **/ - @javax.annotation.Nullable - public Object getCoordinates() { - return coordinates; - } - - - public void setCoordinates(Object coordinates) { - this.coordinates = coordinates; - } - - - public ExecuteFilterParameter15 searchRadius(Integer searchRadius) { - - this.searchRadius = searchRadius; - return this; - } - - /** - * Get searchRadius - * - * @return searchRadius - **/ - @javax.annotation.Nullable - public Integer getSearchRadius() { - return searchRadius; - } - - - public void setSearchRadius(Integer searchRadius) { - this.searchRadius = searchRadius; - } - - - public ExecuteFilterParameter15 postalCode(String postalCode) { - - this.postalCode = postalCode; - return this; - } - - /** - * Get postalCode - * - * @return postalCode - **/ - @javax.annotation.Nullable - public String getPostalCode() { - return postalCode; - } - - - public void setPostalCode(String postalCode) { - this.postalCode = postalCode; - } - - - public ExecuteFilterParameter15 address(Object address) { - - this.address = address; - return this; - } - - /** - * Get address - * - * @return address - **/ - @javax.annotation.Nullable - public Object getAddress() { - return address; - } - - - public void setAddress(Object address) { - this.address = address; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter15 executeFilterParameter15 = (ExecuteFilterParameter15) o; - return Objects.equals(this.coordinates, executeFilterParameter15.coordinates) && - Objects.equals(this.searchRadius, executeFilterParameter15.searchRadius) && - Objects.equals(this.postalCode, executeFilterParameter15.postalCode) && - Objects.equals(this.address, executeFilterParameter15.address); - } - - @Override - public int hashCode() { - return Objects.hash(coordinates, searchRadius, postalCode, address); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter15 {\n"); - sb.append(" coordinates: ").append(toIndentedString(coordinates)).append("\n"); - sb.append(" searchRadius: ").append(toIndentedString(searchRadius)).append("\n"); - sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("coordinates"); - openapiFields.add("searchRadius"); - openapiFields.add("postalCode"); - openapiFields.add("address"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter15 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter15.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter15 is not found in the empty JSON string", ExecuteFilterParameter15.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter15.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter15` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter15.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter15' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter15.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter15 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter15 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter15 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter15 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter15 - */ - public static ExecuteFilterParameter15 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter15.class); - } - - /** - * Convert an instance of ExecuteFilterParameter15 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams() { - List params = new ArrayList<>(); - if (this.address != null) { - ObjectMapper objectMapper = new ObjectMapper(); - try { - String addressAsString = objectMapper.writeValueAsString(this.address); - params.add(new Pair("filter[address]", addressAsString)); - } catch (JsonProcessingException e) { - e.printStackTrace(); - } - } - - if (this.postalCode != null) { - params.add(new Pair("filter[postalCode]", this.postalCode)); - } - - if (this.searchRadius != null) { - params.add(new Pair("filter[searchRadius]", this.searchRadius.toString())); - } - - if (this.coordinates != null) { - ObjectMapper objectMapper = new ObjectMapper(); - try { - String coordinatesAsString = objectMapper.writeValueAsString(this.coordinates); - params.add(new Pair("filter[coordinates]", coordinatesAsString)); - } catch (JsonProcessingException e) { - e.printStackTrace(); - } - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter16.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter16.java deleted file mode 100644 index 54e7a99f..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter16.java +++ /dev/null @@ -1,716 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter16 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter16 { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_CUSTOMER_ID = "customerId"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_ID) - private String customerId; - - public static final String SERIALIZED_NAME_QUERY = "query"; - @SerializedName(SERIALIZED_NAME_QUERY) - private String query; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Map tags = new HashMap<>(); - - public static final String SERIALIZED_NAME_SINCE = "since"; - @SerializedName(SERIALIZED_NAME_SINCE) - private String since; - - public static final String SERIALIZED_NAME_UNTIL = "until"; - @SerializedName(SERIALIZED_NAME_UNTIL) - private String until; - - public static final String SERIALIZED_NAME_CARD_ID = "cardId"; - @SerializedName(SERIALIZED_NAME_CARD_ID) - private String cardId; - - public static final String SERIALIZED_NAME_EXCLUDE_FEES = "excludeFees"; - @SerializedName(SERIALIZED_NAME_EXCLUDE_FEES) - private Boolean excludeFees; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private List type; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - DEBIT("Debit"), - - CREDIT("Credit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private List direction; - - public static final String SERIALIZED_NAME_FROM_AMOUNT = "fromAmount"; - @SerializedName(SERIALIZED_NAME_FROM_AMOUNT) - private Integer fromAmount; - - public static final String SERIALIZED_NAME_TO_AMOUNT = "toAmount"; - @SerializedName(SERIALIZED_NAME_TO_AMOUNT) - private Integer toAmount; - - public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "accountType"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) - private String accountType; - - public ExecuteFilterParameter16() { - } - - public ExecuteFilterParameter16 accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * Get accountId - * @return accountId - **/ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - - public ExecuteFilterParameter16 customerId(String customerId) { - - this.customerId = customerId; - return this; - } - - /** - * Get customerId - * @return customerId - **/ - @javax.annotation.Nullable - public String getCustomerId() { - return customerId; - } - - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - - public ExecuteFilterParameter16 query(String query) { - - this.query = query; - return this; - } - - /** - * Get query - * @return query - **/ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - - public void setQuery(String query) { - this.query = query; - } - - - public ExecuteFilterParameter16 tags(Map tags) { - - this.tags = tags; - return this; - } - - public ExecuteFilterParameter16 putTagsItem(String key, String tagsItem) { - if (this.tags == null) { - this.tags = new HashMap<>(); - } - this.tags.put(key, tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Map getTags() { - return tags; - } - - - public void setTags(Map tags) { - this.tags = tags; - } - - - public ExecuteFilterParameter16 since(String since) { - - this.since = since; - return this; - } - - /** - * Get since - * @return since - **/ - @javax.annotation.Nullable - public String getSince() { - return since; - } - - - public void setSince(String since) { - this.since = since; - } - - - public ExecuteFilterParameter16 until(String until) { - - this.until = until; - return this; - } - - /** - * Get until - * @return until - **/ - @javax.annotation.Nullable - public String getUntil() { - return until; - } - - - public void setUntil(String until) { - this.until = until; - } - - - public ExecuteFilterParameter16 cardId(String cardId) { - - this.cardId = cardId; - return this; - } - - /** - * Get cardId - * @return cardId - **/ - @javax.annotation.Nullable - public String getCardId() { - return cardId; - } - - - public void setCardId(String cardId) { - this.cardId = cardId; - } - - - public ExecuteFilterParameter16 excludeFees(Boolean excludeFees) { - - this.excludeFees = excludeFees; - return this; - } - - /** - * Get excludeFees - * @return excludeFees - **/ - @javax.annotation.Nullable - public Boolean getExcludeFees() { - return excludeFees; - } - - - public void setExcludeFees(Boolean excludeFees) { - this.excludeFees = excludeFees; - } - - - public ExecuteFilterParameter16 type(List type) { - - this.type = type; - return this; - } - - public ExecuteFilterParameter16 addTypeItem(String typeItem) { - if (this.type == null) { - this.type = new ArrayList<>(); - } - this.type.add(typeItem); - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public List getType() { - return type; - } - - - public void setType(List type) { - this.type = type; - } - - - public ExecuteFilterParameter16 direction(List direction) { - - this.direction = direction; - return this; - } - - public ExecuteFilterParameter16 addDirectionItem(DirectionEnum directionItem) { - if (this.direction == null) { - this.direction = new ArrayList<>(); - } - this.direction.add(directionItem); - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nullable - public List getDirection() { - return direction; - } - - - public void setDirection(List direction) { - this.direction = direction; - } - - - public ExecuteFilterParameter16 fromAmount(Integer fromAmount) { - - this.fromAmount = fromAmount; - return this; - } - - /** - * Get fromAmount - * @return fromAmount - **/ - @javax.annotation.Nullable - public Integer getFromAmount() { - return fromAmount; - } - - - public void setFromAmount(Integer fromAmount) { - this.fromAmount = fromAmount; - } - - - public ExecuteFilterParameter16 toAmount(Integer toAmount) { - - this.toAmount = toAmount; - return this; - } - - /** - * Get toAmount - * @return toAmount - **/ - @javax.annotation.Nullable - public Integer getToAmount() { - return toAmount; - } - - - public void setToAmount(Integer toAmount) { - this.toAmount = toAmount; - } - - - public ExecuteFilterParameter16 accountType(String accountType) { - - this.accountType = accountType; - return this; - } - - /** - * Get accountType - * @return accountType - **/ - @javax.annotation.Nullable - public String getAccountType() { - return accountType; - } - - - public void setAccountType(String accountType) { - this.accountType = accountType; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter16 executeFilterParameter16 = (ExecuteFilterParameter16) o; - return Objects.equals(this.accountId, executeFilterParameter16.accountId) && - Objects.equals(this.customerId, executeFilterParameter16.customerId) && - Objects.equals(this.query, executeFilterParameter16.query) && - Objects.equals(this.tags, executeFilterParameter16.tags) && - Objects.equals(this.since, executeFilterParameter16.since) && - Objects.equals(this.until, executeFilterParameter16.until) && - Objects.equals(this.cardId, executeFilterParameter16.cardId) && - Objects.equals(this.excludeFees, executeFilterParameter16.excludeFees) && - Objects.equals(this.type, executeFilterParameter16.type) && - Objects.equals(this.direction, executeFilterParameter16.direction) && - Objects.equals(this.fromAmount, executeFilterParameter16.fromAmount) && - Objects.equals(this.toAmount, executeFilterParameter16.toAmount) && - Objects.equals(this.accountType, executeFilterParameter16.accountType); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, customerId, query, tags, since, until, cardId, excludeFees, type, direction, fromAmount, toAmount, accountType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter16 {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" since: ").append(toIndentedString(since)).append("\n"); - sb.append(" until: ").append(toIndentedString(until)).append("\n"); - sb.append(" cardId: ").append(toIndentedString(cardId)).append("\n"); - sb.append(" excludeFees: ").append(toIndentedString(excludeFees)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" fromAmount: ").append(toIndentedString(fromAmount)).append("\n"); - sb.append(" toAmount: ").append(toIndentedString(toAmount)).append("\n"); - sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("customerId"); - openapiFields.add("query"); - openapiFields.add("tags"); - openapiFields.add("since"); - openapiFields.add("until"); - openapiFields.add("cardId"); - openapiFields.add("excludeFees"); - openapiFields.add("type"); - openapiFields.add("direction"); - openapiFields.add("fromAmount"); - openapiFields.add("toAmount"); - openapiFields.add("accountType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter16 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter16.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter16 is not found in the empty JSON string", ExecuteFilterParameter16.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter16.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter16` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); - } - if ((jsonObj.get("customerId") != null && !jsonObj.get("customerId").isJsonNull()) && !jsonObj.get("customerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `customerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerId").toString())); - } - if ((jsonObj.get("query") != null && !jsonObj.get("query").isJsonNull()) && !jsonObj.get("query").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `query` to be a primitive type in the JSON string but got `%s`", jsonObj.get("query").toString())); - } - if ((jsonObj.get("since") != null && !jsonObj.get("since").isJsonNull()) && !jsonObj.get("since").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `since` to be a primitive type in the JSON string but got `%s`", jsonObj.get("since").toString())); - } - if ((jsonObj.get("until") != null && !jsonObj.get("until").isJsonNull()) && !jsonObj.get("until").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `until` to be a primitive type in the JSON string but got `%s`", jsonObj.get("until").toString())); - } - if ((jsonObj.get("cardId") != null && !jsonObj.get("cardId").isJsonNull()) && !jsonObj.get("cardId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull() && !jsonObj.get("type").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be an array in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull() && !jsonObj.get("direction").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be an array in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if ((jsonObj.get("accountType") != null && !jsonObj.get("accountType").isJsonNull()) && !jsonObj.get("accountType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter16.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter16' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter16.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter16 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter16 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter16 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter16 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter16 - */ - public static ExecuteFilterParameter16 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter16.class); - } - - /** - * Convert an instance of ExecuteFilterParameter16 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams() { - List params = new ArrayList<>(); - - if (this.cardId != null) { - params.add(new Pair("filter[cardId]", this.cardId)); - } - - if (this.customerId != null) { - params.add(new Pair("filter[customerId]", this.customerId)); - } - - if (this.accountId != null) { - params.add(new Pair("filter[accountId]", this.accountId)); - } - - if (this.since != null) { - params.add(new Pair("filter[since]", this.since)); - } - - if (this.until != null) { - params.add(new Pair("filter[until]", this.until)); - } - - if (this.type != null) { - int i = 0; - for (String t : this.type) { - params.add(new Pair(String.format("filter[type][%s]", i), t)); - i++; - } - } - - if (this.direction != null) { - int i = 0; - for (DirectionEnum d : this.direction) { - params.add(new Pair(String.format("filter[direction][%s]", i), d.getValue())); - i++; - } - } - - if (this.fromAmount != null) { - params.add(new Pair("filter[fromAmount]", this.fromAmount.toString())); - } - - if (this.toAmount != null) { - params.add(new Pair("filter[toAmount]", this.toAmount.toString())); - } - - if (this.query != null) { - params.add(new Pair("filter[query]", this.query)); - } - - if (this.accountType != null) { - params.add(new Pair("filter[accountType]", this.accountType)); - } - - if (this.excludeFees != null) { - params.add(new Pair("filter[excludeFees]", this.excludeFees.toString())); - } - - if (this.tags != null) { - String tagsAsString = this.tags.keySet().stream() - .map(key -> key + ":" + this.tags.get(key)) - .collect(Collectors.joining(", ", "{", "}")); - params.add(new Pair("filter[tags]", tagsAsString)); - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter17.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter17.java deleted file mode 100644 index 080827bd..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter17.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.*; - -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 com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter17 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter17 { - public static final String SERIALIZED_NAME_QUERY = "query"; - @SerializedName(SERIALIZED_NAME_QUERY) - private String query; - - public ExecuteFilterParameter17() { - } - - public ExecuteFilterParameter17 query(String query) { - - this.query = query; - return this; - } - - /** - * Get query - * @return query - **/ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - - public void setQuery(String query) { - this.query = query; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter17 executeFilterParameter17 = (ExecuteFilterParameter17) o; - return Objects.equals(this.query, executeFilterParameter17.query); - } - - @Override - public int hashCode() { - return Objects.hash(query); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter17 {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("query"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter17 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter17.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter17 is not found in the empty JSON string", ExecuteFilterParameter17.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter17.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter17` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("query") != null && !jsonObj.get("query").isJsonNull()) && !jsonObj.get("query").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `query` to be a primitive type in the JSON string but got `%s`", jsonObj.get("query").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter17.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter17' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter17.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter17 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter17 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter17 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter17 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter17 - */ - public static ExecuteFilterParameter17 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter17.class); - } - - /** - * Convert an instance of ExecuteFilterParameter17 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams() { - List params = new ArrayList<>(); - - if (this.query != null) { - params.add(new Pair("filter[query]", this.query)); - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter18.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter18.java deleted file mode 100644 index dc73b103..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter18.java +++ /dev/null @@ -1,487 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter18 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter18 { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_CREDIT_ACCOUNT_ID = "creditAccountId"; - @SerializedName(SERIALIZED_NAME_CREDIT_ACCOUNT_ID) - private String creditAccountId; - - public static final String SERIALIZED_NAME_CUSTOMER_ID = "customerId"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_ID) - private String customerId; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - PENDING("Pending"), - - PENDINGREVIEW("PendingReview"), - - RETURNED("Returned"), - - SENT("Sent"), - - REJECTED("Rejected"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private List status; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - ACHREPAYMENT("AchRepayment"), - - BOOKREPAYMENT("BookRepayment"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private List type; - - public ExecuteFilterParameter18() { - } - - public ExecuteFilterParameter18 accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * Get accountId - * @return accountId - **/ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - - public ExecuteFilterParameter18 creditAccountId(String creditAccountId) { - - this.creditAccountId = creditAccountId; - return this; - } - - /** - * Get creditAccountId - * @return creditAccountId - **/ - @javax.annotation.Nullable - public String getCreditAccountId() { - return creditAccountId; - } - - - public void setCreditAccountId(String creditAccountId) { - this.creditAccountId = creditAccountId; - } - - - public ExecuteFilterParameter18 customerId(String customerId) { - - this.customerId = customerId; - return this; - } - - /** - * Get customerId - * @return customerId - **/ - @javax.annotation.Nullable - public String getCustomerId() { - return customerId; - } - - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - - public ExecuteFilterParameter18 status(List status) { - - this.status = status; - return this; - } - - public ExecuteFilterParameter18 addStatusItem(StatusEnum statusItem) { - if (this.status == null) { - this.status = new ArrayList<>(); - } - this.status.add(statusItem); - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public List getStatus() { - return status; - } - - - public void setStatus(List status) { - this.status = status; - } - - - public ExecuteFilterParameter18 type(List type) { - - this.type = type; - return this; - } - - public ExecuteFilterParameter18 addTypeItem(TypeEnum typeItem) { - if (this.type == null) { - this.type = new ArrayList<>(); - } - this.type.add(typeItem); - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public List getType() { - return type; - } - - - public void setType(List type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter18 executeFilterParameter18 = (ExecuteFilterParameter18) o; - return Objects.equals(this.accountId, executeFilterParameter18.accountId) && - Objects.equals(this.creditAccountId, executeFilterParameter18.creditAccountId) && - Objects.equals(this.customerId, executeFilterParameter18.customerId) && - Objects.equals(this.status, executeFilterParameter18.status) && - Objects.equals(this.type, executeFilterParameter18.type); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, creditAccountId, customerId, status, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter18 {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" creditAccountId: ").append(toIndentedString(creditAccountId)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("creditAccountId"); - openapiFields.add("customerId"); - openapiFields.add("status"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter18 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter18.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter18 is not found in the empty JSON string", ExecuteFilterParameter18.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter18.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter18` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); - } - if ((jsonObj.get("creditAccountId") != null && !jsonObj.get("creditAccountId").isJsonNull()) && !jsonObj.get("creditAccountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `creditAccountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creditAccountId").toString())); - } - if ((jsonObj.get("customerId") != null && !jsonObj.get("customerId").isJsonNull()) && !jsonObj.get("customerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `customerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull() && !jsonObj.get("status").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be an array in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull() && !jsonObj.get("type").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be an array in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter18.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter18' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter18.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter18 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter18 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter18 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter18 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter18 - */ - public static ExecuteFilterParameter18 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter18.class); - } - - /** - * Convert an instance of ExecuteFilterParameter18 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams() { - List params = new ArrayList<>(); - - if (this.accountId != null) { - params.add(new Pair("filter[accountId]", this.accountId)); - } - - if (this.creditAccountId != null) { - params.add(new Pair("filter[creditAccountId]", this.creditAccountId)); - } - - if (this.customerId != null) { - params.add(new Pair("filter[customerId]", this.customerId)); - } - - if (this.status != null) { - int i = 0; - for (StatusEnum s : this.status) { - params.add(new Pair(String.format("filter[status][%s]", i), s.getValue())); - i++; - } - } - - if (this.type != null) { - int i = 0; - for (TypeEnum t : this.type) { - params.add(new Pair(String.format("filter[type][%s]", i), t.getValue())); - i++; - } - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter19.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter19.java deleted file mode 100644 index 6c65115d..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter19.java +++ /dev/null @@ -1,588 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter19 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter19 { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_CUSTOMER_ID = "customerId"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_ID) - private String customerId; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - NEW("New"), - - PENDING("Pending"), - - CANCELED("Canceled"), - - REJECTED("Rejected"), - - INDELIVERY("InDelivery"), - - INPRODUCTION("InProduction"), - - DELIVERED("Delivered"), - - RETURNEDTOSENDER("ReturnedToSender"), - - PENDING2("Pending"), - - PROCESSED("Processed"), - - PENDINGREVIEW("PendingReview"), - - MARKEDFORRETURN("MarkedForReturn"), - - RETURNED("Returned"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private List status; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Map tags = new HashMap<>(); - - public static final String SERIALIZED_NAME_SINCE = "since"; - @SerializedName(SERIALIZED_NAME_SINCE) - private String since; - - public static final String SERIALIZED_NAME_UNTIL = "until"; - @SerializedName(SERIALIZED_NAME_UNTIL) - private String until; - - public static final String SERIALIZED_NAME_FROM_AMOUNT = "fromAmount"; - @SerializedName(SERIALIZED_NAME_FROM_AMOUNT) - private Integer fromAmount; - - public static final String SERIALIZED_NAME_TO_AMOUNT = "toAmount"; - @SerializedName(SERIALIZED_NAME_TO_AMOUNT) - private Integer toAmount; - - public static final String SERIALIZED_NAME_CHECK_NUMBER = "checkNumber"; - @SerializedName(SERIALIZED_NAME_CHECK_NUMBER) - private String checkNumber; - - public ExecuteFilterParameter19() { - } - - public ExecuteFilterParameter19 accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * Get accountId - * @return accountId - **/ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - - public ExecuteFilterParameter19 customerId(String customerId) { - - this.customerId = customerId; - return this; - } - - /** - * Get customerId - * @return customerId - **/ - @javax.annotation.Nullable - public String getCustomerId() { - return customerId; - } - - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - - public ExecuteFilterParameter19 status(List status) { - - this.status = status; - return this; - } - - public ExecuteFilterParameter19 addStatusItem(StatusEnum statusItem) { - if (this.status == null) { - this.status = new ArrayList<>(); - } - this.status.add(statusItem); - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public List getStatus() { - return status; - } - - - public void setStatus(List status) { - this.status = status; - } - - - public ExecuteFilterParameter19 tags(Map tags) { - - this.tags = tags; - return this; - } - - public ExecuteFilterParameter19 putTagsItem(String key, String tagsItem) { - if (this.tags == null) { - this.tags = new HashMap<>(); - } - this.tags.put(key, tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Map getTags() { - return tags; - } - - - public void setTags(Map tags) { - this.tags = tags; - } - - - public ExecuteFilterParameter19 since(String since) { - - this.since = since; - return this; - } - - /** - * Get since - * @return since - **/ - @javax.annotation.Nullable - public String getSince() { - return since; - } - - - public void setSince(String since) { - this.since = since; - } - - - public ExecuteFilterParameter19 until(String until) { - - this.until = until; - return this; - } - - /** - * Get until - * @return until - **/ - @javax.annotation.Nullable - public String getUntil() { - return until; - } - - - public void setUntil(String until) { - this.until = until; - } - - - public ExecuteFilterParameter19 fromAmount(Integer fromAmount) { - - this.fromAmount = fromAmount; - return this; - } - - /** - * Get fromAmount - * @return fromAmount - **/ - @javax.annotation.Nullable - public Integer getFromAmount() { - return fromAmount; - } - - - public void setFromAmount(Integer fromAmount) { - this.fromAmount = fromAmount; - } - - - public ExecuteFilterParameter19 toAmount(Integer toAmount) { - - this.toAmount = toAmount; - return this; - } - - /** - * Get toAmount - * @return toAmount - **/ - @javax.annotation.Nullable - public Integer getToAmount() { - return toAmount; - } - - - public void setToAmount(Integer toAmount) { - this.toAmount = toAmount; - } - - - public ExecuteFilterParameter19 checkNumber(String checkNumber) { - - this.checkNumber = checkNumber; - return this; - } - - /** - * Get checkNumber - * @return checkNumber - **/ - @javax.annotation.Nullable - public String getCheckNumber() { - return checkNumber; - } - - - public void setCheckNumber(String checkNumber) { - this.checkNumber = checkNumber; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter19 executeFilterParameter19 = (ExecuteFilterParameter19) o; - return Objects.equals(this.accountId, executeFilterParameter19.accountId) && - Objects.equals(this.customerId, executeFilterParameter19.customerId) && - Objects.equals(this.status, executeFilterParameter19.status) && - Objects.equals(this.tags, executeFilterParameter19.tags) && - Objects.equals(this.since, executeFilterParameter19.since) && - Objects.equals(this.until, executeFilterParameter19.until) && - Objects.equals(this.fromAmount, executeFilterParameter19.fromAmount) && - Objects.equals(this.toAmount, executeFilterParameter19.toAmount) && - Objects.equals(this.checkNumber, executeFilterParameter19.checkNumber); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, customerId, status, tags, since, until, fromAmount, toAmount, checkNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter19 {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" since: ").append(toIndentedString(since)).append("\n"); - sb.append(" until: ").append(toIndentedString(until)).append("\n"); - sb.append(" fromAmount: ").append(toIndentedString(fromAmount)).append("\n"); - sb.append(" toAmount: ").append(toIndentedString(toAmount)).append("\n"); - sb.append(" checkNumber: ").append(toIndentedString(checkNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("customerId"); - openapiFields.add("status"); - openapiFields.add("tags"); - openapiFields.add("since"); - openapiFields.add("until"); - openapiFields.add("fromAmount"); - openapiFields.add("toAmount"); - openapiFields.add("checkNumber"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter19 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter19.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter19 is not found in the empty JSON string", ExecuteFilterParameter19.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter19.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter19` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); - } - if ((jsonObj.get("customerId") != null && !jsonObj.get("customerId").isJsonNull()) && !jsonObj.get("customerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `customerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull() && !jsonObj.get("status").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be an array in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - if ((jsonObj.get("since") != null && !jsonObj.get("since").isJsonNull()) && !jsonObj.get("since").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `since` to be a primitive type in the JSON string but got `%s`", jsonObj.get("since").toString())); - } - if ((jsonObj.get("until") != null && !jsonObj.get("until").isJsonNull()) && !jsonObj.get("until").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `until` to be a primitive type in the JSON string but got `%s`", jsonObj.get("until").toString())); - } - if ((jsonObj.get("checkNumber") != null && !jsonObj.get("checkNumber").isJsonNull()) && !jsonObj.get("checkNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `checkNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("checkNumber").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter19.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter19' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter19.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter19 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter19 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter19 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter19 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter19 - */ - public static ExecuteFilterParameter19 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter19.class); - } - - /** - * Convert an instance of ExecuteFilterParameter19 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams(){ - List params = new ArrayList<>(); - - if(this.accountId != null){ - params.add(new Pair("filter[accountId]", this.accountId)); - } - - if(this.customerId != null){ - params.add(new Pair("filter[customerId]", this.customerId)); - } - - if(this.since != null){ - params.add(new Pair("filter[since]", this.since)); - } - - if(this.until != null){ - params.add(new Pair("filter[until]", this.until)); - } - - if(this.checkNumber != null){ - params.add(new Pair("filter[checkNumber]", this.checkNumber)); - } - - if(this.fromAmount != null){ - params.add(new Pair("filter[fromAmount]", this.fromAmount.toString())); - } - - if(this.toAmount != null){ - params.add(new Pair("filter[toAmount]", this.toAmount.toString())); - } - - if(this.status != null){ - int i=0; - for (StatusEnum s:this.status) { - params.add(new Pair(String.format("filter[status][%s]", i), s.getValue())); - i++; - } - } - - if(this.tags != null){ - String tagsAsString = this.tags.keySet().stream() - .map(key -> key + ":" + this.tags.get(key)) - .collect(Collectors.joining(", ", "{", "}")); - params.add(new Pair("filter[tags]", tagsAsString)); - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter2.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter2.java deleted file mode 100644 index 01f5bed4..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter2.java +++ /dev/null @@ -1,524 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.math.BigDecimal; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter2 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter2 { - public static final String SERIALIZED_NAME_CUSTOMER_ID = "customerId"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_ID) - private String customerId; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - OPEN("Open"), - - FROZEN("Frozen"), - - CLOSED("Closed"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private List status; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - DEPOSIT("deposit"), - - CREDIT("credit"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private List type; - - public static final String SERIALIZED_NAME_FROM_BALANCE = "fromBalance"; - @SerializedName(SERIALIZED_NAME_FROM_BALANCE) - private BigDecimal fromBalance; - - public static final String SERIALIZED_NAME_TO_BALANCE = "toBalance"; - @SerializedName(SERIALIZED_NAME_TO_BALANCE) - private BigDecimal toBalance; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Map tags = new HashMap<>(); - - public ExecuteFilterParameter2() { - } - - public ExecuteFilterParameter2 customerId(String customerId) { - - this.customerId = customerId; - return this; - } - - /** - * Get customerId - * @return customerId - **/ - @javax.annotation.Nullable - public String getCustomerId() { - return customerId; - } - - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - - public ExecuteFilterParameter2 status(List status) { - - this.status = status; - return this; - } - - public ExecuteFilterParameter2 addStatusItem(StatusEnum statusItem) { - if (this.status == null) { - this.status = new ArrayList<>(); - } - this.status.add(statusItem); - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public List getStatus() { - return status; - } - - - public void setStatus(List status) { - this.status = status; - } - - - public ExecuteFilterParameter2 type(List type) { - - this.type = type; - return this; - } - - public ExecuteFilterParameter2 addTypeItem(TypeEnum typeItem) { - if (this.type == null) { - this.type = new ArrayList<>(); - } - this.type.add(typeItem); - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public List getType() { - return type; - } - - - public void setType(List type) { - this.type = type; - } - - - public ExecuteFilterParameter2 fromBalance(BigDecimal fromBalance) { - - this.fromBalance = fromBalance; - return this; - } - - /** - * Get fromBalance - * @return fromBalance - **/ - @javax.annotation.Nullable - public BigDecimal getFromBalance() { - return fromBalance; - } - - - public void setFromBalance(BigDecimal fromBalance) { - this.fromBalance = fromBalance; - } - - - public ExecuteFilterParameter2 toBalance(BigDecimal toBalance) { - - this.toBalance = toBalance; - return this; - } - - /** - * Get toBalance - * @return toBalance - **/ - @javax.annotation.Nullable - public BigDecimal getToBalance() { - return toBalance; - } - - - public void setToBalance(BigDecimal toBalance) { - this.toBalance = toBalance; - } - - - public ExecuteFilterParameter2 tags(Map tags) { - - this.tags = tags; - return this; - } - - public ExecuteFilterParameter2 putTagsItem(String key, String tagsItem) { - if (this.tags == null) { - this.tags = new HashMap<>(); - } - this.tags.put(key, tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Map getTags() { - return tags; - } - - - public void setTags(Map tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter2 executeFilterParameter2 = (ExecuteFilterParameter2) o; - return Objects.equals(this.customerId, executeFilterParameter2.customerId) && - Objects.equals(this.status, executeFilterParameter2.status) && - Objects.equals(this.type, executeFilterParameter2.type) && - Objects.equals(this.fromBalance, executeFilterParameter2.fromBalance) && - Objects.equals(this.toBalance, executeFilterParameter2.toBalance) && - Objects.equals(this.tags, executeFilterParameter2.tags); - } - - @Override - public int hashCode() { - return Objects.hash(customerId, status, type, fromBalance, toBalance, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter2 {\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" fromBalance: ").append(toIndentedString(fromBalance)).append("\n"); - sb.append(" toBalance: ").append(toIndentedString(toBalance)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("customerId"); - openapiFields.add("status"); - openapiFields.add("type"); - openapiFields.add("fromBalance"); - openapiFields.add("toBalance"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter2 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter2.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter2 is not found in the empty JSON string", ExecuteFilterParameter2.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter2.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter2` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("customerId") != null && !jsonObj.get("customerId").isJsonNull()) && !jsonObj.get("customerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `customerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull() && !jsonObj.get("status").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be an array in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull() && !jsonObj.get("type").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be an array in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter2.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter2' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter2.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter2 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter2 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter2 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter2 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter2 - */ - public static ExecuteFilterParameter2 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter2.class); - } - - /** - * Convert an instance of ExecuteFilterParameter2 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams(){ - List params = new ArrayList<>(); - - if(this.toBalance != null){ - params.add(new Pair("filter[toBalance]", this.toBalance.toString())); - } - - if(this.fromBalance != null){ - params.add(new Pair("filter[fromBalance]", this.fromBalance.toString())); - } - - if(this.customerId != null){ - params.add(new Pair("filter[customerId]", this.customerId)); - } - - if(this.type != null){ - int i=0; - for (TypeEnum t:this.type) { - params.add(new Pair(String.format("filter[type][%s]", i), t.getValue())); - i++; - } - } - - if(this.status != null){ - int i=0; - for (StatusEnum s:this.status) { - params.add(new Pair(String.format("filter[status][%s]", i), s.getValue())); - i++; - } - } - - if(this.tags != null){ - String tagsAsString = this.tags.keySet().stream() - .map(key -> key + ":" + this.tags.get(key)) - .collect(Collectors.joining(", ", "{", "}")); - params.add(new Pair("filter[tags]", tagsAsString)); - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter20.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter20.java deleted file mode 100644 index f5ab3778..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter20.java +++ /dev/null @@ -1,541 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter20 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter20 { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_CUSTOMER_ID = "customerId"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_ID) - private String customerId; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - ACTIVE("Active"), - - DISABLED("Disabled"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private List status; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Map tags = new HashMap<>(); - - public static final String SERIALIZED_NAME_SINCE = "since"; - @SerializedName(SERIALIZED_NAME_SINCE) - private String since; - - public static final String SERIALIZED_NAME_UNTIL = "until"; - @SerializedName(SERIALIZED_NAME_UNTIL) - private String until; - - public static final String SERIALIZED_NAME_FROM_AMOUNT = "fromAmount"; - @SerializedName(SERIALIZED_NAME_FROM_AMOUNT) - private Integer fromAmount; - - public static final String SERIALIZED_NAME_TO_AMOUNT = "toAmount"; - @SerializedName(SERIALIZED_NAME_TO_AMOUNT) - private Integer toAmount; - - public static final String SERIALIZED_NAME_CHECK_NUMBER = "checkNumber"; - @SerializedName(SERIALIZED_NAME_CHECK_NUMBER) - private String checkNumber; - - public ExecuteFilterParameter20() { - } - - public ExecuteFilterParameter20 accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * Get accountId - * @return accountId - **/ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - - public ExecuteFilterParameter20 customerId(String customerId) { - - this.customerId = customerId; - return this; - } - - /** - * Get customerId - * @return customerId - **/ - @javax.annotation.Nullable - public String getCustomerId() { - return customerId; - } - - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - - public ExecuteFilterParameter20 status(List status) { - - this.status = status; - return this; - } - - public ExecuteFilterParameter20 addStatusItem(StatusEnum statusItem) { - if (this.status == null) { - this.status = new ArrayList<>(); - } - this.status.add(statusItem); - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public List getStatus() { - return status; - } - - - public void setStatus(List status) { - this.status = status; - } - - - public ExecuteFilterParameter20 tags(Map tags) { - - this.tags = tags; - return this; - } - - public ExecuteFilterParameter20 putTagsItem(String key, String tagsItem) { - if (this.tags == null) { - this.tags = new HashMap<>(); - } - this.tags.put(key, tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Map getTags() { - return tags; - } - - - public void setTags(Map tags) { - this.tags = tags; - } - - - public ExecuteFilterParameter20 since(String since) { - - this.since = since; - return this; - } - - /** - * Get since - * @return since - **/ - @javax.annotation.Nullable - public String getSince() { - return since; - } - - - public void setSince(String since) { - this.since = since; - } - - - public ExecuteFilterParameter20 until(String until) { - - this.until = until; - return this; - } - - /** - * Get until - * @return until - **/ - @javax.annotation.Nullable - public String getUntil() { - return until; - } - - - public void setUntil(String until) { - this.until = until; - } - - - public ExecuteFilterParameter20 fromAmount(Integer fromAmount) { - - this.fromAmount = fromAmount; - return this; - } - - /** - * Get fromAmount - * @return fromAmount - **/ - @javax.annotation.Nullable - public Integer getFromAmount() { - return fromAmount; - } - - - public void setFromAmount(Integer fromAmount) { - this.fromAmount = fromAmount; - } - - - public ExecuteFilterParameter20 toAmount(Integer toAmount) { - - this.toAmount = toAmount; - return this; - } - - /** - * Get toAmount - * @return toAmount - **/ - @javax.annotation.Nullable - public Integer getToAmount() { - return toAmount; - } - - - public void setToAmount(Integer toAmount) { - this.toAmount = toAmount; - } - - - public ExecuteFilterParameter20 checkNumber(String checkNumber) { - - this.checkNumber = checkNumber; - return this; - } - - /** - * Get checkNumber - * @return checkNumber - **/ - @javax.annotation.Nullable - public String getCheckNumber() { - return checkNumber; - } - - - public void setCheckNumber(String checkNumber) { - this.checkNumber = checkNumber; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter20 executeFilterParameter20 = (ExecuteFilterParameter20) o; - return Objects.equals(this.accountId, executeFilterParameter20.accountId) && - Objects.equals(this.customerId, executeFilterParameter20.customerId) && - Objects.equals(this.status, executeFilterParameter20.status) && - Objects.equals(this.tags, executeFilterParameter20.tags) && - Objects.equals(this.since, executeFilterParameter20.since) && - Objects.equals(this.until, executeFilterParameter20.until) && - Objects.equals(this.fromAmount, executeFilterParameter20.fromAmount) && - Objects.equals(this.toAmount, executeFilterParameter20.toAmount) && - Objects.equals(this.checkNumber, executeFilterParameter20.checkNumber); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, customerId, status, tags, since, until, fromAmount, toAmount, checkNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter20 {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" since: ").append(toIndentedString(since)).append("\n"); - sb.append(" until: ").append(toIndentedString(until)).append("\n"); - sb.append(" fromAmount: ").append(toIndentedString(fromAmount)).append("\n"); - sb.append(" toAmount: ").append(toIndentedString(toAmount)).append("\n"); - sb.append(" checkNumber: ").append(toIndentedString(checkNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("customerId"); - openapiFields.add("status"); - openapiFields.add("tags"); - openapiFields.add("since"); - openapiFields.add("until"); - openapiFields.add("fromAmount"); - openapiFields.add("toAmount"); - openapiFields.add("checkNumber"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter20 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter20.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter20 is not found in the empty JSON string", ExecuteFilterParameter20.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter20.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter20` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); - } - if ((jsonObj.get("customerId") != null && !jsonObj.get("customerId").isJsonNull()) && !jsonObj.get("customerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `customerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull() && !jsonObj.get("status").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be an array in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - if ((jsonObj.get("since") != null && !jsonObj.get("since").isJsonNull()) && !jsonObj.get("since").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `since` to be a primitive type in the JSON string but got `%s`", jsonObj.get("since").toString())); - } - if ((jsonObj.get("until") != null && !jsonObj.get("until").isJsonNull()) && !jsonObj.get("until").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `until` to be a primitive type in the JSON string but got `%s`", jsonObj.get("until").toString())); - } - if ((jsonObj.get("checkNumber") != null && !jsonObj.get("checkNumber").isJsonNull()) && !jsonObj.get("checkNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `checkNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("checkNumber").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter20.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter20' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter20.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter20 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter20 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter20 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter20 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter20 - */ - public static ExecuteFilterParameter20 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter20.class); - } - - /** - * Convert an instance of ExecuteFilterParameter20 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - public List toParams(){ - List params = new ArrayList<>(); - - if(this.customerId != null){ - params.add(new Pair("filter[customerId]", this.customerId)); - } - - if(this.status != null){ - int i=0; - for (StatusEnum s:this.status) { - params.add(new Pair(String.format("filter[status][%s]", i), s.getValue())); - i++; - } - } - - if(this.tags != null){ - String tagsAsString = this.tags.keySet().stream() - .map(key -> key + ":" + this.tags.get(key)) - .collect(Collectors.joining(", ", "{", "}")); - params.add(new Pair("filter[tags]", tagsAsString)); - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter3.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter3.java deleted file mode 100644 index ecb5ed41..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter3.java +++ /dev/null @@ -1,397 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter3 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter3 { - public static final String SERIALIZED_NAME_QUERY = "query"; - @SerializedName(SERIALIZED_NAME_QUERY) - private String query; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - ACTIVE("Active"), - - ARCHIVED("Archived"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private List status; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Map tags = new HashMap<>(); - - public ExecuteFilterParameter3() { - } - - public ExecuteFilterParameter3 query(String query) { - - this.query = query; - return this; - } - - /** - * Get query - * @return query - **/ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - - public void setQuery(String query) { - this.query = query; - } - - - public ExecuteFilterParameter3 status(List status) { - - this.status = status; - return this; - } - - public ExecuteFilterParameter3 addStatusItem(StatusEnum statusItem) { - if (this.status == null) { - this.status = new ArrayList<>(); - } - this.status.add(statusItem); - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public List getStatus() { - return status; - } - - - public void setStatus(List status) { - this.status = status; - } - - - public ExecuteFilterParameter3 email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public ExecuteFilterParameter3 tags(Map tags) { - - this.tags = tags; - return this; - } - - public ExecuteFilterParameter3 putTagsItem(String key, String tagsItem) { - if (this.tags == null) { - this.tags = new HashMap<>(); - } - this.tags.put(key, tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Map getTags() { - return tags; - } - - - public void setTags(Map tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter3 executeFilterParameter3 = (ExecuteFilterParameter3) o; - return Objects.equals(this.query, executeFilterParameter3.query) && - Objects.equals(this.status, executeFilterParameter3.status) && - Objects.equals(this.email, executeFilterParameter3.email) && - Objects.equals(this.tags, executeFilterParameter3.tags); - } - - @Override - public int hashCode() { - return Objects.hash(query, status, email, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter3 {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("query"); - openapiFields.add("status"); - openapiFields.add("email"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter3 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter3.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter3 is not found in the empty JSON string", ExecuteFilterParameter3.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter3.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter3` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("query") != null && !jsonObj.get("query").isJsonNull()) && !jsonObj.get("query").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `query` to be a primitive type in the JSON string but got `%s`", jsonObj.get("query").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull() && !jsonObj.get("status").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be an array in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter3.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter3' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter3.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter3 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter3 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter3 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter3 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter3 - */ - public static ExecuteFilterParameter3 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter3.class); - } - - /** - * Convert an instance of ExecuteFilterParameter3 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams() { - List params = new ArrayList<>(); - - if (this.email != null) { - params.add(new Pair("filter[email]", this.email)); - } - - if (this.query != null) { - params.add(new Pair("filter[query]", this.query)); - } - - if (this.status != null) { - int i = 0; - for (StatusEnum s : this.status) { - params.add(new Pair(String.format("filter[status][%s]", i), s.getValue())); - i++; - } - } - - if (this.tags != null) { - String tagsAsString = this.tags.keySet().stream() - .map(key -> key + ":" + this.tags.get(key)) - .collect(Collectors.joining(", ", "{", "}")); - params.add(new Pair("filter[tags]", tagsAsString)); - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter4.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter4.java deleted file mode 100644 index da7e1cf0..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter4.java +++ /dev/null @@ -1,887 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter4 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter4 { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_CUSTOMER_ID = "customerId"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_ID) - private String customerId; - - public static final String SERIALIZED_NAME_COUNTERPARTY_ACCOUNT_ID = "counterpartyAccountId"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_ACCOUNT_ID) - private String counterpartyAccountId; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - REJECTED("Rejected"), - - PENDING("Pending"), - - CANCELED("Canceled"), - - PENDING_REVIEW("Pending Review"), - - CLEARING("Clearing"), - - SENT("Sent"), - - RETURNED("Returned"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private List status; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - ACHPAYMENT("AchPayment"), - - BOOKPAYMENT("BookPayment"), - - WIREPAYMENT("WirePayment"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private List type; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - DEBIT("Debit"), - - CREDIT("Credit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private List direction; - - public static final String SERIALIZED_NAME_SINCE = "since"; - @SerializedName(SERIALIZED_NAME_SINCE) - private String since; - - public static final String SERIALIZED_NAME_UNTIL = "until"; - @SerializedName(SERIALIZED_NAME_UNTIL) - private String until; - - public static final String SERIALIZED_NAME_FROM_AMOUNT = "fromAmount"; - @SerializedName(SERIALIZED_NAME_FROM_AMOUNT) - private Integer fromAmount; - - public static final String SERIALIZED_NAME_TO_AMOUNT = "toAmount"; - @SerializedName(SERIALIZED_NAME_TO_AMOUNT) - private Integer toAmount; - - public static final String SERIALIZED_NAME_RECURRING_PAYMENT_ID = "recurringPaymentId"; - @SerializedName(SERIALIZED_NAME_RECURRING_PAYMENT_ID) - private Integer recurringPaymentId; - - /** - * Gets or Sets feature - */ - @JsonAdapter(FeatureEnum.Adapter.class) - public enum FeatureEnum { - SAMEDAY("SameDay"), - - RECURRINGPAYMENT("RecurringPayment"); - - private String value; - - FeatureEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FeatureEnum fromValue(String value) { - for (FeatureEnum b : FeatureEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FeatureEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FeatureEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FeatureEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_FEATURE = "feature"; - @SerializedName(SERIALIZED_NAME_FEATURE) - private List feature; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Map tags = new HashMap<>(); - - public ExecuteFilterParameter4() { - } - - public ExecuteFilterParameter4 accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * Get accountId - * @return accountId - **/ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - - public ExecuteFilterParameter4 customerId(String customerId) { - - this.customerId = customerId; - return this; - } - - /** - * Get customerId - * @return customerId - **/ - @javax.annotation.Nullable - public String getCustomerId() { - return customerId; - } - - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - - public ExecuteFilterParameter4 counterpartyAccountId(String counterpartyAccountId) { - - this.counterpartyAccountId = counterpartyAccountId; - return this; - } - - /** - * Get counterpartyAccountId - * @return counterpartyAccountId - **/ - @javax.annotation.Nullable - public String getCounterpartyAccountId() { - return counterpartyAccountId; - } - - - public void setCounterpartyAccountId(String counterpartyAccountId) { - this.counterpartyAccountId = counterpartyAccountId; - } - - - public ExecuteFilterParameter4 status(List status) { - - this.status = status; - return this; - } - - public ExecuteFilterParameter4 addStatusItem(StatusEnum statusItem) { - if (this.status == null) { - this.status = new ArrayList<>(); - } - this.status.add(statusItem); - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public List getStatus() { - return status; - } - - - public void setStatus(List status) { - this.status = status; - } - - - public ExecuteFilterParameter4 type(List type) { - - this.type = type; - return this; - } - - public ExecuteFilterParameter4 addTypeItem(TypeEnum typeItem) { - if (this.type == null) { - this.type = new ArrayList<>(); - } - this.type.add(typeItem); - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public List getType() { - return type; - } - - - public void setType(List type) { - this.type = type; - } - - - public ExecuteFilterParameter4 direction(List direction) { - - this.direction = direction; - return this; - } - - public ExecuteFilterParameter4 addDirectionItem(DirectionEnum directionItem) { - if (this.direction == null) { - this.direction = new ArrayList<>(); - } - this.direction.add(directionItem); - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nullable - public List getDirection() { - return direction; - } - - - public void setDirection(List direction) { - this.direction = direction; - } - - - public ExecuteFilterParameter4 since(String since) { - - this.since = since; - return this; - } - - /** - * Get since - * @return since - **/ - @javax.annotation.Nullable - public String getSince() { - return since; - } - - - public void setSince(String since) { - this.since = since; - } - - - public ExecuteFilterParameter4 until(String until) { - - this.until = until; - return this; - } - - /** - * Get until - * @return until - **/ - @javax.annotation.Nullable - public String getUntil() { - return until; - } - - - public void setUntil(String until) { - this.until = until; - } - - - public ExecuteFilterParameter4 fromAmount(Integer fromAmount) { - - this.fromAmount = fromAmount; - return this; - } - - /** - * Get fromAmount - * @return fromAmount - **/ - @javax.annotation.Nullable - public Integer getFromAmount() { - return fromAmount; - } - - - public void setFromAmount(Integer fromAmount) { - this.fromAmount = fromAmount; - } - - - public ExecuteFilterParameter4 toAmount(Integer toAmount) { - - this.toAmount = toAmount; - return this; - } - - /** - * Get toAmount - * @return toAmount - **/ - @javax.annotation.Nullable - public Integer getToAmount() { - return toAmount; - } - - - public void setToAmount(Integer toAmount) { - this.toAmount = toAmount; - } - - - public ExecuteFilterParameter4 recurringPaymentId(Integer recurringPaymentId) { - - this.recurringPaymentId = recurringPaymentId; - return this; - } - - /** - * Get recurringPaymentId - * @return recurringPaymentId - **/ - @javax.annotation.Nullable - public Integer getRecurringPaymentId() { - return recurringPaymentId; - } - - - public void setRecurringPaymentId(Integer recurringPaymentId) { - this.recurringPaymentId = recurringPaymentId; - } - - - public ExecuteFilterParameter4 feature(List feature) { - - this.feature = feature; - return this; - } - - public ExecuteFilterParameter4 addFeatureItem(FeatureEnum featureItem) { - if (this.feature == null) { - this.feature = new ArrayList<>(); - } - this.feature.add(featureItem); - return this; - } - - /** - * Get feature - * @return feature - **/ - @javax.annotation.Nullable - public List getFeature() { - return feature; - } - - - public void setFeature(List feature) { - this.feature = feature; - } - - - public ExecuteFilterParameter4 tags(Map tags) { - - this.tags = tags; - return this; - } - - public ExecuteFilterParameter4 putTagsItem(String key, String tagsItem) { - if (this.tags == null) { - this.tags = new HashMap<>(); - } - this.tags.put(key, tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Map getTags() { - return tags; - } - - - public void setTags(Map tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter4 executeFilterParameter4 = (ExecuteFilterParameter4) o; - return Objects.equals(this.accountId, executeFilterParameter4.accountId) && - Objects.equals(this.customerId, executeFilterParameter4.customerId) && - Objects.equals(this.counterpartyAccountId, executeFilterParameter4.counterpartyAccountId) && - Objects.equals(this.status, executeFilterParameter4.status) && - Objects.equals(this.type, executeFilterParameter4.type) && - Objects.equals(this.direction, executeFilterParameter4.direction) && - Objects.equals(this.since, executeFilterParameter4.since) && - Objects.equals(this.until, executeFilterParameter4.until) && - Objects.equals(this.fromAmount, executeFilterParameter4.fromAmount) && - Objects.equals(this.toAmount, executeFilterParameter4.toAmount) && - Objects.equals(this.recurringPaymentId, executeFilterParameter4.recurringPaymentId) && - Objects.equals(this.feature, executeFilterParameter4.feature) && - Objects.equals(this.tags, executeFilterParameter4.tags); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, customerId, counterpartyAccountId, status, type, direction, since, until, fromAmount, toAmount, recurringPaymentId, feature, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter4 {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" counterpartyAccountId: ").append(toIndentedString(counterpartyAccountId)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" since: ").append(toIndentedString(since)).append("\n"); - sb.append(" until: ").append(toIndentedString(until)).append("\n"); - sb.append(" fromAmount: ").append(toIndentedString(fromAmount)).append("\n"); - sb.append(" toAmount: ").append(toIndentedString(toAmount)).append("\n"); - sb.append(" recurringPaymentId: ").append(toIndentedString(recurringPaymentId)).append("\n"); - sb.append(" feature: ").append(toIndentedString(feature)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("customerId"); - openapiFields.add("counterpartyAccountId"); - openapiFields.add("status"); - openapiFields.add("type"); - openapiFields.add("direction"); - openapiFields.add("since"); - openapiFields.add("until"); - openapiFields.add("fromAmount"); - openapiFields.add("toAmount"); - openapiFields.add("recurringPaymentId"); - openapiFields.add("feature"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter4 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter4.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter4 is not found in the empty JSON string", ExecuteFilterParameter4.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter4.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter4` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); - } - if ((jsonObj.get("customerId") != null && !jsonObj.get("customerId").isJsonNull()) && !jsonObj.get("customerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `customerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerId").toString())); - } - if ((jsonObj.get("counterpartyAccountId") != null && !jsonObj.get("counterpartyAccountId").isJsonNull()) && !jsonObj.get("counterpartyAccountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `counterpartyAccountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("counterpartyAccountId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull() && !jsonObj.get("status").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be an array in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull() && !jsonObj.get("type").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be an array in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull() && !jsonObj.get("direction").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be an array in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if ((jsonObj.get("since") != null && !jsonObj.get("since").isJsonNull()) && !jsonObj.get("since").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `since` to be a primitive type in the JSON string but got `%s`", jsonObj.get("since").toString())); - } - if ((jsonObj.get("until") != null && !jsonObj.get("until").isJsonNull()) && !jsonObj.get("until").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `until` to be a primitive type in the JSON string but got `%s`", jsonObj.get("until").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("feature") != null && !jsonObj.get("feature").isJsonNull() && !jsonObj.get("feature").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `feature` to be an array in the JSON string but got `%s`", jsonObj.get("feature").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter4.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter4' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter4.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter4 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter4 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter4 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter4 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter4 - */ - public static ExecuteFilterParameter4 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter4.class); - } - - /** - * Convert an instance of ExecuteFilterParameter4 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams() { - List params = new ArrayList<>(); - - if (this.accountId != null) { - params.add(new Pair("filter[accountId]", this.accountId)); - } - - if (this.counterpartyAccountId != null) { - params.add(new Pair("filter[counterpartyAccountId]", this.counterpartyAccountId)); - } - - if (this.customerId != null) { - params.add(new Pair("filter[customerId]", this.customerId)); - } - - if (this.fromAmount != null) { - params.add(new Pair("filter[fromAmount]", this.fromAmount.toString())); - } - - if (this.recurringPaymentId != null) { - params.add(new Pair("filter[recurringPaymentId]", this.recurringPaymentId.toString())); - } - - if (this.toAmount != null) { - params.add(new Pair("filter[toAmount]", this.toAmount.toString())); - } - - if (this.since != null) { - params.add(new Pair("filter[since]", this.since)); - } - - if (this.until != null) { - params.add(new Pair("filter[until]", this.until)); - } - - if (this.status != null) { - int i = 0; - for (StatusEnum s : this.status) { - params.add(new Pair(String.format("filter[status][%s]", i), s.getValue())); - i++; - } - } - - if (this.direction != null) { - int i = 0; - for (DirectionEnum d : this.direction) { - params.add(new Pair(String.format("filter[direction][%s]", i), d.getValue())); - i++; - } - } - - if (this.feature != null) { - int i = 0; - for (FeatureEnum f : this.feature) { - params.add(new Pair(String.format("filter[status][%s]", i), f.getValue())); - i++; - } - } - - if (this.tags != null) { - String tagsAsString = this.tags.keySet().stream() - .map(key -> key + ":" + this.tags.get(key)) - .collect(Collectors.joining(", ", "{", "}")); - params.add(new Pair("filter[tags]", tagsAsString)); - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter5.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter5.java deleted file mode 100644 index a5f33859..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter5.java +++ /dev/null @@ -1,434 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter5 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter5 { - public static final String SERIALIZED_NAME_CUSTOMER_ID = "customerId"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_ID) - private String customerId; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_ROUTING_NUMBER = "routingNumber"; - @SerializedName(SERIALIZED_NAME_ROUTING_NUMBER) - private String routingNumber; - - /** - * Gets or Sets permissions - */ - @JsonAdapter(PermissionsEnum.Adapter.class) - public enum PermissionsEnum { - CREDITONLY("CreditOnly"), - - DEBITONLY("DebitOnly"), - - CREDITANDDEBIT("CreditAndDebit"); - - private String value; - - PermissionsEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PermissionsEnum fromValue(String value) { - for (PermissionsEnum b : PermissionsEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PermissionsEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PermissionsEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PermissionsEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; - @SerializedName(SERIALIZED_NAME_PERMISSIONS) - private List permissions; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Map tags = new HashMap<>(); - - public ExecuteFilterParameter5() { - } - - public ExecuteFilterParameter5 customerId(String customerId) { - - this.customerId = customerId; - return this; - } - - /** - * Get customerId - * @return customerId - **/ - @javax.annotation.Nullable - public String getCustomerId() { - return customerId; - } - - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - - public ExecuteFilterParameter5 accountNumber(String accountNumber) { - - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - **/ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public ExecuteFilterParameter5 routingNumber(String routingNumber) { - - this.routingNumber = routingNumber; - return this; - } - - /** - * Get routingNumber - * @return routingNumber - **/ - @javax.annotation.Nullable - public String getRoutingNumber() { - return routingNumber; - } - - - public void setRoutingNumber(String routingNumber) { - this.routingNumber = routingNumber; - } - - - public ExecuteFilterParameter5 permissions(List permissions) { - - this.permissions = permissions; - return this; - } - - public ExecuteFilterParameter5 addPermissionsItem(PermissionsEnum permissionsItem) { - if (this.permissions == null) { - this.permissions = new ArrayList<>(); - } - this.permissions.add(permissionsItem); - return this; - } - - /** - * Get permissions - * @return permissions - **/ - @javax.annotation.Nullable - public List getPermissions() { - return permissions; - } - - - public void setPermissions(List permissions) { - this.permissions = permissions; - } - - - public ExecuteFilterParameter5 tags(Map tags) { - - this.tags = tags; - return this; - } - - public ExecuteFilterParameter5 putTagsItem(String key, String tagsItem) { - if (this.tags == null) { - this.tags = new HashMap<>(); - } - this.tags.put(key, tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Map getTags() { - return tags; - } - - - public void setTags(Map tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter5 executeFilterParameter5 = (ExecuteFilterParameter5) o; - return Objects.equals(this.customerId, executeFilterParameter5.customerId) && - Objects.equals(this.accountNumber, executeFilterParameter5.accountNumber) && - Objects.equals(this.routingNumber, executeFilterParameter5.routingNumber) && - Objects.equals(this.permissions, executeFilterParameter5.permissions) && - Objects.equals(this.tags, executeFilterParameter5.tags); - } - - @Override - public int hashCode() { - return Objects.hash(customerId, accountNumber, routingNumber, permissions, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter5 {\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); - sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("customerId"); - openapiFields.add("accountNumber"); - openapiFields.add("routingNumber"); - openapiFields.add("permissions"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter5 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter5.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter5 is not found in the empty JSON string", ExecuteFilterParameter5.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter5.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter5` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("customerId") != null && !jsonObj.get("customerId").isJsonNull()) && !jsonObj.get("customerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `customerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerId").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("routingNumber") != null && !jsonObj.get("routingNumber").isJsonNull()) && !jsonObj.get("routingNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `routingNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("routingNumber").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonNull() && !jsonObj.get("permissions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `permissions` to be an array in the JSON string but got `%s`", jsonObj.get("permissions").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter5.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter5' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter5.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter5 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter5 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter5 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter5 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter5 - */ - public static ExecuteFilterParameter5 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter5.class); - } - - /** - * Convert an instance of ExecuteFilterParameter5 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams() { - List params = new ArrayList<>(); - - if (this.accountNumber != null) { - params.add(new Pair("filter[accountNumber]", this.accountNumber)); - } - - if (this.customerId != null) { - params.add(new Pair("filter[customerId]", this.customerId)); - } - - if (this.routingNumber != null) { - params.add(new Pair("filter[routingNumber]", this.routingNumber)); - } - - if (this.permissions != null) { - int i = 0; - for (PermissionsEnum p : this.permissions) { - params.add(new Pair(String.format("filter[permissions][%s]", i), p.getValue())); - i++; - } - } - - if (this.tags != null) { - String tagsAsString = this.tags.keySet().stream() - .map(key -> key + ":" + this.tags.get(key)) - .collect(Collectors.joining(", ", "{", "}")); - params.add(new Pair("filter[tags]", tagsAsString)); - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter6.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter6.java deleted file mode 100644 index 3b98ef92..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter6.java +++ /dev/null @@ -1,541 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter6 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter6 { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_CUSTOMER_ID = "customerId"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_ID) - private String customerId; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private List status; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - RECURRINGCREDITACHPAYMENT("recurringCreditAchPayment"), - - RECURRINGDEBITACHPAYMENT("recurringDebitAchPayment"), - - RECURRINGCREDITBOOKPAYMENT("recurringCreditBookPayment"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private List type; - - public static final String SERIALIZED_NAME_FROM_START_TIME = "fromStartTime"; - @SerializedName(SERIALIZED_NAME_FROM_START_TIME) - private String fromStartTime; - - public static final String SERIALIZED_NAME_TO_START_TIME = "toStartTime"; - @SerializedName(SERIALIZED_NAME_TO_START_TIME) - private String toStartTime; - - public static final String SERIALIZED_NAME_FROM_END_TIME = "fromEndTime"; - @SerializedName(SERIALIZED_NAME_FROM_END_TIME) - private String fromEndTime; - - public static final String SERIALIZED_NAME_TO_END_TIME = "toEndTime"; - @SerializedName(SERIALIZED_NAME_TO_END_TIME) - private String toEndTime; - - public ExecuteFilterParameter6() { - } - - public ExecuteFilterParameter6 accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * Get accountId - * @return accountId - **/ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - - public ExecuteFilterParameter6 customerId(String customerId) { - - this.customerId = customerId; - return this; - } - - /** - * Get customerId - * @return customerId - **/ - @javax.annotation.Nullable - public String getCustomerId() { - return customerId; - } - - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - - public ExecuteFilterParameter6 status(List status) { - - this.status = status; - return this; - } - - public ExecuteFilterParameter6 addStatusItem(String statusItem) { - if (this.status == null) { - this.status = new ArrayList<>(); - } - this.status.add(statusItem); - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public List getStatus() { - return status; - } - - - public void setStatus(List status) { - this.status = status; - } - - - public ExecuteFilterParameter6 type(List type) { - - this.type = type; - return this; - } - - public ExecuteFilterParameter6 addTypeItem(TypeEnum typeItem) { - if (this.type == null) { - this.type = new ArrayList<>(); - } - this.type.add(typeItem); - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public List getType() { - return type; - } - - - public void setType(List type) { - this.type = type; - } - - - public ExecuteFilterParameter6 fromStartTime(String fromStartTime) { - - this.fromStartTime = fromStartTime; - return this; - } - - /** - * Get fromStartTime - * @return fromStartTime - **/ - @javax.annotation.Nullable - public String getFromStartTime() { - return fromStartTime; - } - - - public void setFromStartTime(String fromStartTime) { - this.fromStartTime = fromStartTime; - } - - - public ExecuteFilterParameter6 toStartTime(String toStartTime) { - - this.toStartTime = toStartTime; - return this; - } - - /** - * Get toStartTime - * @return toStartTime - **/ - @javax.annotation.Nullable - public String getToStartTime() { - return toStartTime; - } - - - public void setToStartTime(String toStartTime) { - this.toStartTime = toStartTime; - } - - - public ExecuteFilterParameter6 fromEndTime(String fromEndTime) { - - this.fromEndTime = fromEndTime; - return this; - } - - /** - * Get fromEndTime - * @return fromEndTime - **/ - @javax.annotation.Nullable - public String getFromEndTime() { - return fromEndTime; - } - - - public void setFromEndTime(String fromEndTime) { - this.fromEndTime = fromEndTime; - } - - - public ExecuteFilterParameter6 toEndTime(String toEndTime) { - - this.toEndTime = toEndTime; - return this; - } - - /** - * Get toEndTime - * @return toEndTime - **/ - @javax.annotation.Nullable - public String getToEndTime() { - return toEndTime; - } - - - public void setToEndTime(String toEndTime) { - this.toEndTime = toEndTime; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter6 executeFilterParameter6 = (ExecuteFilterParameter6) o; - return Objects.equals(this.accountId, executeFilterParameter6.accountId) && - Objects.equals(this.customerId, executeFilterParameter6.customerId) && - Objects.equals(this.status, executeFilterParameter6.status) && - Objects.equals(this.type, executeFilterParameter6.type) && - Objects.equals(this.fromStartTime, executeFilterParameter6.fromStartTime) && - Objects.equals(this.toStartTime, executeFilterParameter6.toStartTime) && - Objects.equals(this.fromEndTime, executeFilterParameter6.fromEndTime) && - Objects.equals(this.toEndTime, executeFilterParameter6.toEndTime); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, customerId, status, type, fromStartTime, toStartTime, fromEndTime, toEndTime); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter6 {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" fromStartTime: ").append(toIndentedString(fromStartTime)).append("\n"); - sb.append(" toStartTime: ").append(toIndentedString(toStartTime)).append("\n"); - sb.append(" fromEndTime: ").append(toIndentedString(fromEndTime)).append("\n"); - sb.append(" toEndTime: ").append(toIndentedString(toEndTime)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("customerId"); - openapiFields.add("status"); - openapiFields.add("type"); - openapiFields.add("fromStartTime"); - openapiFields.add("toStartTime"); - openapiFields.add("fromEndTime"); - openapiFields.add("toEndTime"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter6 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter6.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter6 is not found in the empty JSON string", ExecuteFilterParameter6.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter6.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter6` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); - } - if ((jsonObj.get("customerId") != null && !jsonObj.get("customerId").isJsonNull()) && !jsonObj.get("customerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `customerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull() && !jsonObj.get("status").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be an array in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull() && !jsonObj.get("type").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be an array in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("fromStartTime") != null && !jsonObj.get("fromStartTime").isJsonNull()) && !jsonObj.get("fromStartTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fromStartTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fromStartTime").toString())); - } - if ((jsonObj.get("toStartTime") != null && !jsonObj.get("toStartTime").isJsonNull()) && !jsonObj.get("toStartTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `toStartTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("toStartTime").toString())); - } - if ((jsonObj.get("fromEndTime") != null && !jsonObj.get("fromEndTime").isJsonNull()) && !jsonObj.get("fromEndTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fromEndTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fromEndTime").toString())); - } - if ((jsonObj.get("toEndTime") != null && !jsonObj.get("toEndTime").isJsonNull()) && !jsonObj.get("toEndTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `toEndTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("toEndTime").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter6.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter6' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter6.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter6 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter6 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter6 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter6 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter6 - */ - public static ExecuteFilterParameter6 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter6.class); - } - - /** - * Convert an instance of ExecuteFilterParameter6 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams() { - List params = new ArrayList<>(); - - if (this.accountId != null) { - params.add(new Pair("filter[accountId]", this.accountId)); - } - - if (this.customerId != null) { - params.add(new Pair("filter[customerId]", this.customerId)); - } - - if (this.fromEndTime != null) { - params.add(new Pair("filter[fromEndTime]", this.fromEndTime)); - } - - if (this.toEndTime != null) { - params.add(new Pair("filter[toEndTime]", this.toEndTime)); - } - - if (this.fromStartTime != null) { - params.add(new Pair("filter[fromStartTime]", this.fromStartTime)); - } - - if (this.toStartTime != null) { - params.add(new Pair("filter[toStartTime]", this.toStartTime)); - } - - if (this.type != null) { - int i = 0; - for (TypeEnum t : this.type) { - params.add(new Pair(String.format("filter[type][%s]", i), t.getValue())); - i++; - } - } - - if (this.status != null) { - int i = 0; - for (String s : this.status) { - params.add(new Pair(String.format("filter[status][%s]", i), s)); - i++; - } - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter7.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter7.java deleted file mode 100644 index 5ec189eb..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter7.java +++ /dev/null @@ -1,407 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter7 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter7 { - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - INACTIVE("Inactive"), - - ACTIVE("Active"), - - STOLEN("Stolen"), - - LOST("Lost"), - - FROZEN("Frozen"), - - CLOSEDBYCUSTOMER("ClosedByCustomer"), - - SUSPECTEDFRAUD("SuspectedFraud"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private List status; - - public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_CUSTOMER_ID = "customerId"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_ID) - private String customerId; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Map tags = new HashMap<>(); - - public ExecuteFilterParameter7() { - } - - public ExecuteFilterParameter7 status(List status) { - - this.status = status; - return this; - } - - public ExecuteFilterParameter7 addStatusItem(StatusEnum statusItem) { - if (this.status == null) { - this.status = new ArrayList<>(); - } - this.status.add(statusItem); - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public List getStatus() { - return status; - } - - - public void setStatus(List status) { - this.status = status; - } - - - public ExecuteFilterParameter7 accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * Get accountId - * @return accountId - **/ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - - public ExecuteFilterParameter7 customerId(String customerId) { - - this.customerId = customerId; - return this; - } - - /** - * Get customerId - * @return customerId - **/ - @javax.annotation.Nullable - public String getCustomerId() { - return customerId; - } - - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - - public ExecuteFilterParameter7 tags(Map tags) { - - this.tags = tags; - return this; - } - - public ExecuteFilterParameter7 putTagsItem(String key, String tagsItem) { - if (this.tags == null) { - this.tags = new HashMap<>(); - } - this.tags.put(key, tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Map getTags() { - return tags; - } - - - public void setTags(Map tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter7 executeFilterParameter7 = (ExecuteFilterParameter7) o; - return Objects.equals(this.status, executeFilterParameter7.status) && - Objects.equals(this.accountId, executeFilterParameter7.accountId) && - Objects.equals(this.customerId, executeFilterParameter7.customerId) && - Objects.equals(this.tags, executeFilterParameter7.tags); - } - - @Override - public int hashCode() { - return Objects.hash(status, accountId, customerId, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter7 {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("status"); - openapiFields.add("accountId"); - openapiFields.add("customerId"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter7 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter7.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter7 is not found in the empty JSON string", ExecuteFilterParameter7.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter7.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter7` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull() && !jsonObj.get("status").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be an array in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); - } - if ((jsonObj.get("customerId") != null && !jsonObj.get("customerId").isJsonNull()) && !jsonObj.get("customerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `customerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter7.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter7' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter7.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter7 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter7 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter7 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter7 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter7 - */ - public static ExecuteFilterParameter7 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter7.class); - } - - /** - * Convert an instance of ExecuteFilterParameter7 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams() { - List params = new ArrayList<>(); - - if (this.accountId != null) { - params.add(new Pair("filter[accountId]", this.accountId)); - } - - if (this.customerId != null) { - params.add(new Pair("filter[customerId]", this.customerId)); - } - - if (this.status != null) { - int i = 0; - for (StatusEnum s : this.status) { - params.add(new Pair(String.format("filter[status][%s]", i), s.getValue())); - i++; - } - } - - if (this.tags != null) { - String tagsAsString = this.tags.keySet().stream() - .map(key -> key + ":" + this.tags.get(key)) - .collect(Collectors.joining(", ", "{", "}")); - params.add(new Pair("filter[tags]", tagsAsString)); - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter8.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter8.java deleted file mode 100644 index 47cf3d5c..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter8.java +++ /dev/null @@ -1,639 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter8 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter8 { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "accountType"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) - private String accountType; - - public static final String SERIALIZED_NAME_CUSTOMER_ID = "customerId"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_ID) - private String customerId; - - public static final String SERIALIZED_NAME_CARD_ID = "cardId"; - @SerializedName(SERIALIZED_NAME_CARD_ID) - private String cardId; - - public static final String SERIALIZED_NAME_INCLUDE_NON_AUTHORIZED = "includeNonAuthorized"; - @SerializedName(SERIALIZED_NAME_INCLUDE_NON_AUTHORIZED) - private Boolean includeNonAuthorized; - - public static final String SERIALIZED_NAME_MERCHANT_CATEGORY_CODE = "merchantCategoryCode"; - @SerializedName(SERIALIZED_NAME_MERCHANT_CATEGORY_CODE) - private List merchantCategoryCode; - - public static final String SERIALIZED_NAME_SINCE = "since"; - @SerializedName(SERIALIZED_NAME_SINCE) - private String since; - - public static final String SERIALIZED_NAME_UNTIL = "until"; - @SerializedName(SERIALIZED_NAME_UNTIL) - private String until; - - public static final String SERIALIZED_NAME_FROM_AMOUNT = "fromAmount"; - @SerializedName(SERIALIZED_NAME_FROM_AMOUNT) - private Integer fromAmount; - - public static final String SERIALIZED_NAME_TO_AMOUNT = "toAmount"; - @SerializedName(SERIALIZED_NAME_TO_AMOUNT) - private Integer toAmount; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - AUTHORIZED("Authorized"), - - COMPLETED("Completed"), - - CANCELED("Canceled"), - - DECLINED("Declined"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private List status; - - public ExecuteFilterParameter8() { - } - - public ExecuteFilterParameter8 accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * Get accountId - * @return accountId - **/ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - - public ExecuteFilterParameter8 accountType(String accountType) { - - this.accountType = accountType; - return this; - } - - /** - * Get accountType - * @return accountType - **/ - @javax.annotation.Nullable - public String getAccountType() { - return accountType; - } - - - public void setAccountType(String accountType) { - this.accountType = accountType; - } - - - public ExecuteFilterParameter8 customerId(String customerId) { - - this.customerId = customerId; - return this; - } - - /** - * Get customerId - * @return customerId - **/ - @javax.annotation.Nullable - public String getCustomerId() { - return customerId; - } - - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - - public ExecuteFilterParameter8 cardId(String cardId) { - - this.cardId = cardId; - return this; - } - - /** - * Get cardId - * @return cardId - **/ - @javax.annotation.Nullable - public String getCardId() { - return cardId; - } - - - public void setCardId(String cardId) { - this.cardId = cardId; - } - - - public ExecuteFilterParameter8 includeNonAuthorized(Boolean includeNonAuthorized) { - - this.includeNonAuthorized = includeNonAuthorized; - return this; - } - - /** - * Get includeNonAuthorized - * @return includeNonAuthorized - **/ - @javax.annotation.Nullable - public Boolean getIncludeNonAuthorized() { - return includeNonAuthorized; - } - - - public void setIncludeNonAuthorized(Boolean includeNonAuthorized) { - this.includeNonAuthorized = includeNonAuthorized; - } - - - public ExecuteFilterParameter8 merchantCategoryCode(List merchantCategoryCode) { - - this.merchantCategoryCode = merchantCategoryCode; - return this; - } - - public ExecuteFilterParameter8 addMerchantCategoryCodeItem(String merchantCategoryCodeItem) { - if (this.merchantCategoryCode == null) { - this.merchantCategoryCode = new ArrayList<>(); - } - this.merchantCategoryCode.add(merchantCategoryCodeItem); - return this; - } - - /** - * Get merchantCategoryCode - * @return merchantCategoryCode - **/ - @javax.annotation.Nullable - public List getMerchantCategoryCode() { - return merchantCategoryCode; - } - - - public void setMerchantCategoryCode(List merchantCategoryCode) { - this.merchantCategoryCode = merchantCategoryCode; - } - - - public ExecuteFilterParameter8 since(String since) { - - this.since = since; - return this; - } - - /** - * Get since - * @return since - **/ - @javax.annotation.Nullable - public String getSince() { - return since; - } - - - public void setSince(String since) { - this.since = since; - } - - - public ExecuteFilterParameter8 until(String until) { - - this.until = until; - return this; - } - - /** - * Get until - * @return until - **/ - @javax.annotation.Nullable - public String getUntil() { - return until; - } - - - public void setUntil(String until) { - this.until = until; - } - - - public ExecuteFilterParameter8 fromAmount(Integer fromAmount) { - - this.fromAmount = fromAmount; - return this; - } - - /** - * Get fromAmount - * @return fromAmount - **/ - @javax.annotation.Nullable - public Integer getFromAmount() { - return fromAmount; - } - - - public void setFromAmount(Integer fromAmount) { - this.fromAmount = fromAmount; - } - - - public ExecuteFilterParameter8 toAmount(Integer toAmount) { - - this.toAmount = toAmount; - return this; - } - - /** - * Get toAmount - * @return toAmount - **/ - @javax.annotation.Nullable - public Integer getToAmount() { - return toAmount; - } - - - public void setToAmount(Integer toAmount) { - this.toAmount = toAmount; - } - - - public ExecuteFilterParameter8 status(List status) { - - this.status = status; - return this; - } - - public ExecuteFilterParameter8 addStatusItem(StatusEnum statusItem) { - if (this.status == null) { - this.status = new ArrayList<>(); - } - this.status.add(statusItem); - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public List getStatus() { - return status; - } - - - public void setStatus(List status) { - this.status = status; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter8 executeFilterParameter8 = (ExecuteFilterParameter8) o; - return Objects.equals(this.accountId, executeFilterParameter8.accountId) && - Objects.equals(this.accountType, executeFilterParameter8.accountType) && - Objects.equals(this.customerId, executeFilterParameter8.customerId) && - Objects.equals(this.cardId, executeFilterParameter8.cardId) && - Objects.equals(this.includeNonAuthorized, executeFilterParameter8.includeNonAuthorized) && - Objects.equals(this.merchantCategoryCode, executeFilterParameter8.merchantCategoryCode) && - Objects.equals(this.since, executeFilterParameter8.since) && - Objects.equals(this.until, executeFilterParameter8.until) && - Objects.equals(this.fromAmount, executeFilterParameter8.fromAmount) && - Objects.equals(this.toAmount, executeFilterParameter8.toAmount) && - Objects.equals(this.status, executeFilterParameter8.status); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, accountType, customerId, cardId, includeNonAuthorized, merchantCategoryCode, since, until, fromAmount, toAmount, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter8 {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" cardId: ").append(toIndentedString(cardId)).append("\n"); - sb.append(" includeNonAuthorized: ").append(toIndentedString(includeNonAuthorized)).append("\n"); - sb.append(" merchantCategoryCode: ").append(toIndentedString(merchantCategoryCode)).append("\n"); - sb.append(" since: ").append(toIndentedString(since)).append("\n"); - sb.append(" until: ").append(toIndentedString(until)).append("\n"); - sb.append(" fromAmount: ").append(toIndentedString(fromAmount)).append("\n"); - sb.append(" toAmount: ").append(toIndentedString(toAmount)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("accountType"); - openapiFields.add("customerId"); - openapiFields.add("cardId"); - openapiFields.add("includeNonAuthorized"); - openapiFields.add("merchantCategoryCode"); - openapiFields.add("since"); - openapiFields.add("until"); - openapiFields.add("fromAmount"); - openapiFields.add("toAmount"); - openapiFields.add("status"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter8 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter8.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter8 is not found in the empty JSON string", ExecuteFilterParameter8.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter8.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter8` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); - } - if ((jsonObj.get("accountType") != null && !jsonObj.get("accountType").isJsonNull()) && !jsonObj.get("accountType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountType").toString())); - } - if ((jsonObj.get("customerId") != null && !jsonObj.get("customerId").isJsonNull()) && !jsonObj.get("customerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `customerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerId").toString())); - } - if ((jsonObj.get("cardId") != null && !jsonObj.get("cardId").isJsonNull()) && !jsonObj.get("cardId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("merchantCategoryCode") != null && !jsonObj.get("merchantCategoryCode").isJsonNull() && !jsonObj.get("merchantCategoryCode").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `merchantCategoryCode` to be an array in the JSON string but got `%s`", jsonObj.get("merchantCategoryCode").toString())); - } - if ((jsonObj.get("since") != null && !jsonObj.get("since").isJsonNull()) && !jsonObj.get("since").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `since` to be a primitive type in the JSON string but got `%s`", jsonObj.get("since").toString())); - } - if ((jsonObj.get("until") != null && !jsonObj.get("until").isJsonNull()) && !jsonObj.get("until").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `until` to be a primitive type in the JSON string but got `%s`", jsonObj.get("until").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull() && !jsonObj.get("status").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be an array in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter8.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter8' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter8.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter8 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter8 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter8 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter8 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter8 - */ - public static ExecuteFilterParameter8 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter8.class); - } - - /** - * Convert an instance of ExecuteFilterParameter8 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams() { - List params = new ArrayList<>(); - - if (this.accountId != null) { - params.add(new Pair("filter[accountId]", this.accountId)); - } - - if (this.customerId != null) { - params.add(new Pair("filter[customerId]", this.customerId)); - } - - if (this.cardId != null) { - params.add(new Pair("filter[cardId]", this.cardId)); - } - - if (this.status != null) { - int i = 0; - for (StatusEnum s : this.status) { - params.add(new Pair(String.format("filter[status][%s]", i), s.getValue())); - i++; - } - } - - if (this.fromAmount != null) { - params.add(new Pair("filter[fromAmount]", this.fromAmount.toString())); - } - - if (this.toAmount != null) { - params.add(new Pair("filter[toAmount]", this.toAmount.toString())); - } - - if (this.includeNonAuthorized != null) { - params.add(new Pair("filter[includeNonAuthorized]", this.includeNonAuthorized.toString())); - } - - if (this.accountType != null) { - params.add(new Pair("filter[accountType]", this.accountType)); - } - - if (this.since != null) { - params.add(new Pair("filter[since]", this.since)); - } - - if (this.until != null) { - params.add(new Pair("filter[until]", this.until)); - } - - if (this.merchantCategoryCode != null) { - int i = 0; - for (String m : this.merchantCategoryCode) { - params.add(new Pair(String.format("filter[merchantCategoryCode][%s]", i), m)); - i++; - } - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter9.java b/src/main/java/org/openapitools/client/model/ExecuteFilterParameter9.java deleted file mode 100644 index b958fee6..00000000 --- a/src/main/java/org/openapitools/client/model/ExecuteFilterParameter9.java +++ /dev/null @@ -1,368 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ExecuteFilterParameter9 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExecuteFilterParameter9 { - public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private String accountId; - - public static final String SERIALIZED_NAME_CUSTOMER_ID = "customerId"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_ID) - private String customerId; - - public static final String SERIALIZED_NAME_MERCHANT_CATEGORY_CODE = "merchantCategoryCode"; - @SerializedName(SERIALIZED_NAME_MERCHANT_CATEGORY_CODE) - private List merchantCategoryCode; - - public static final String SERIALIZED_NAME_FROM_AMOUNT = "fromAmount"; - @SerializedName(SERIALIZED_NAME_FROM_AMOUNT) - private Integer fromAmount; - - public static final String SERIALIZED_NAME_TO_AMOUNT = "toAmount"; - @SerializedName(SERIALIZED_NAME_TO_AMOUNT) - private Integer toAmount; - - public ExecuteFilterParameter9() { - } - - public ExecuteFilterParameter9 accountId(String accountId) { - - this.accountId = accountId; - return this; - } - - /** - * Get accountId - * @return accountId - **/ - @javax.annotation.Nullable - public String getAccountId() { - return accountId; - } - - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - - public ExecuteFilterParameter9 customerId(String customerId) { - - this.customerId = customerId; - return this; - } - - /** - * Get customerId - * @return customerId - **/ - @javax.annotation.Nullable - public String getCustomerId() { - return customerId; - } - - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - - public ExecuteFilterParameter9 merchantCategoryCode(List merchantCategoryCode) { - - this.merchantCategoryCode = merchantCategoryCode; - return this; - } - - public ExecuteFilterParameter9 addMerchantCategoryCodeItem(String merchantCategoryCodeItem) { - if (this.merchantCategoryCode == null) { - this.merchantCategoryCode = new ArrayList<>(); - } - this.merchantCategoryCode.add(merchantCategoryCodeItem); - return this; - } - - /** - * Get merchantCategoryCode - * @return merchantCategoryCode - **/ - @javax.annotation.Nullable - public List getMerchantCategoryCode() { - return merchantCategoryCode; - } - - - public void setMerchantCategoryCode(List merchantCategoryCode) { - this.merchantCategoryCode = merchantCategoryCode; - } - - - public ExecuteFilterParameter9 fromAmount(Integer fromAmount) { - - this.fromAmount = fromAmount; - return this; - } - - /** - * Get fromAmount - * @return fromAmount - **/ - @javax.annotation.Nullable - public Integer getFromAmount() { - return fromAmount; - } - - - public void setFromAmount(Integer fromAmount) { - this.fromAmount = fromAmount; - } - - - public ExecuteFilterParameter9 toAmount(Integer toAmount) { - - this.toAmount = toAmount; - return this; - } - - /** - * Get toAmount - * @return toAmount - **/ - @javax.annotation.Nullable - public Integer getToAmount() { - return toAmount; - } - - - public void setToAmount(Integer toAmount) { - this.toAmount = toAmount; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExecuteFilterParameter9 executeFilterParameter9 = (ExecuteFilterParameter9) o; - return Objects.equals(this.accountId, executeFilterParameter9.accountId) && - Objects.equals(this.customerId, executeFilterParameter9.customerId) && - Objects.equals(this.merchantCategoryCode, executeFilterParameter9.merchantCategoryCode) && - Objects.equals(this.fromAmount, executeFilterParameter9.fromAmount) && - Objects.equals(this.toAmount, executeFilterParameter9.toAmount); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, customerId, merchantCategoryCode, fromAmount, toAmount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExecuteFilterParameter9 {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); - sb.append(" merchantCategoryCode: ").append(toIndentedString(merchantCategoryCode)).append("\n"); - sb.append(" fromAmount: ").append(toIndentedString(fromAmount)).append("\n"); - sb.append(" toAmount: ").append(toIndentedString(toAmount)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("customerId"); - openapiFields.add("merchantCategoryCode"); - openapiFields.add("fromAmount"); - openapiFields.add("toAmount"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ExecuteFilterParameter9 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ExecuteFilterParameter9.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExecuteFilterParameter9 is not found in the empty JSON string", ExecuteFilterParameter9.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExecuteFilterParameter9.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExecuteFilterParameter9` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); - } - if ((jsonObj.get("customerId") != null && !jsonObj.get("customerId").isJsonNull()) && !jsonObj.get("customerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `customerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("merchantCategoryCode") != null && !jsonObj.get("merchantCategoryCode").isJsonNull() && !jsonObj.get("merchantCategoryCode").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `merchantCategoryCode` to be an array in the JSON string but got `%s`", jsonObj.get("merchantCategoryCode").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExecuteFilterParameter9.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExecuteFilterParameter9' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExecuteFilterParameter9.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExecuteFilterParameter9 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExecuteFilterParameter9 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExecuteFilterParameter9 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExecuteFilterParameter9 - * @throws IOException if the JSON string is invalid with respect to ExecuteFilterParameter9 - */ - public static ExecuteFilterParameter9 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExecuteFilterParameter9.class); - } - - /** - * Convert an instance of ExecuteFilterParameter9 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams() { - List params = new ArrayList<>(); - - if (this.accountId != null) { - params.add(new Pair("filter[accountId]", this.accountId)); - } - - if (this.customerId != null) { - params.add(new Pair("filter[customerId]", this.customerId)); - } - - if (this.fromAmount != null) { - params.add(new Pair("filter[fromAmount]", this.fromAmount.toString())); - } - - if (this.toAmount != null) { - params.add(new Pair("filter[toAmount]", this.toAmount.toString())); - } - - if (this.merchantCategoryCode != null) { - int i = 0; - for (String m : this.merchantCategoryCode) { - params.add(new Pair(String.format("filter[merchantCategoryCode][%s]", i), m)); - i++; - } - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/Fee.java b/src/main/java/org/openapitools/client/model/Fee.java deleted file mode 100644 index 1b2ad18f..00000000 --- a/src/main/java/org/openapitools/client/model/Fee.java +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.FeeAttributes; -import org.openapitools.client.model.FeeRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Fee - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Fee { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "fee"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private FeeAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private FeeRelationships relationships; - - public Fee() { - } - - public Fee type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public Fee id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public Fee attributes(FeeAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public FeeAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(FeeAttributes attributes) { - this.attributes = attributes; - } - - - public Fee relationships(FeeRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public FeeRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(FeeRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Fee fee = (Fee) o; - return Objects.equals(this.type, fee.type) && - Objects.equals(this.id, fee.id) && - Objects.equals(this.attributes, fee.attributes) && - Objects.equals(this.relationships, fee.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Fee {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Fee - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Fee.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Fee is not found in the empty JSON string", Fee.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Fee.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Fee` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - 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())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - FeeAttributes.validateJsonElement(jsonObj.get("attributes")); - } - // validate the optional field `relationships` - if (jsonObj.get("relationships") != null && !jsonObj.get("relationships").isJsonNull()) { - FeeRelationships.validateJsonElement(jsonObj.get("relationships")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Fee.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Fee' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Fee.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Fee value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Fee read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Fee given an JSON string - * - * @param jsonString JSON string - * @return An instance of Fee - * @throws IOException if the JSON string is invalid with respect to Fee - */ - public static Fee fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Fee.class); - } - - /** - * Convert an instance of Fee to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/FeeAttributes.java b/src/main/java/org/openapitools/client/model/FeeAttributes.java deleted file mode 100644 index 2bf5a3c6..00000000 --- a/src/main/java/org/openapitools/client/model/FeeAttributes.java +++ /dev/null @@ -1,274 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * FeeAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FeeAttributes { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public FeeAttributes() { - } - - public FeeAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public FeeAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public FeeAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FeeAttributes feeAttributes = (FeeAttributes) o; - return Objects.equals(this.amount, feeAttributes.amount) && - Objects.equals(this.description, feeAttributes.description) && - Objects.equals(this.tags, feeAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(amount, description, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FeeAttributes {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("description"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FeeAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FeeAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FeeAttributes is not found in the empty JSON string", FeeAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FeeAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FeeAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FeeAttributes.openapiRequiredFields) { - 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("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FeeAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FeeAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FeeAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FeeAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FeeAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FeeAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of FeeAttributes - * @throws IOException if the JSON string is invalid with respect to FeeAttributes - */ - public static FeeAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FeeAttributes.class); - } - - /** - * Convert an instance of FeeAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/FeeRelationships.java b/src/main/java/org/openapitools/client/model/FeeRelationships.java deleted file mode 100644 index 617c7cb6..00000000 --- a/src/main/java/org/openapitools/client/model/FeeRelationships.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Relationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * FeeRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FeeRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private Relationship account; - - public FeeRelationships() { - } - - public FeeRelationships account(Relationship account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public Relationship getAccount() { - return account; - } - - - public void setAccount(Relationship account) { - this.account = account; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FeeRelationships feeRelationships = (FeeRelationships) o; - return Objects.equals(this.account, feeRelationships.account); - } - - @Override - public int hashCode() { - return Objects.hash(account); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FeeRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FeeRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FeeRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FeeRelationships is not found in the empty JSON string", FeeRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FeeRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FeeRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FeeRelationships.openapiRequiredFields) { - 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(); - // validate the required field `account` - Relationship.validateJsonElement(jsonObj.get("account")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FeeRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FeeRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FeeRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FeeRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FeeRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FeeRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of FeeRelationships - * @throws IOException if the JSON string is invalid with respect to FeeRelationships - */ - public static FeeRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FeeRelationships.class); - } - - /** - * Convert an instance of FeeRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/FeeTransaction.java b/src/main/java/org/openapitools/client/model/FeeTransaction.java deleted file mode 100644 index 81444cf4..00000000 --- a/src/main/java/org/openapitools/client/model/FeeTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.FeeTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * FeeTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FeeTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private FeeTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public FeeTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public FeeTransaction attributes(FeeTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public FeeTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(FeeTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public FeeTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FeeTransaction feeTransaction = (FeeTransaction) o; - return Objects.equals(this.attributes, feeTransaction.attributes) && - Objects.equals(this.relationships, feeTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FeeTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FeeTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FeeTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FeeTransaction is not found in the empty JSON string", FeeTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FeeTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FeeTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FeeTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FeeTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FeeTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FeeTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FeeTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FeeTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FeeTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of FeeTransaction - * @throws IOException if the JSON string is invalid with respect to FeeTransaction - */ - public static FeeTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FeeTransaction.class); - } - - /** - * Convert an instance of FeeTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/FeeTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/FeeTransactionAllOfAttributes.java deleted file mode 100644 index 7ad8dbbe..00000000 --- a/src/main/java/org/openapitools/client/model/FeeTransactionAllOfAttributes.java +++ /dev/null @@ -1,411 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * FeeTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FeeTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public FeeTransactionAllOfAttributes() { - } - - public FeeTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public FeeTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public FeeTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public FeeTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public FeeTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public FeeTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FeeTransactionAllOfAttributes feeTransactionAllOfAttributes = (FeeTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, feeTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, feeTransactionAllOfAttributes.direction) && - Objects.equals(this.amount, feeTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, feeTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, feeTransactionAllOfAttributes.summary) && - Objects.equals(this.tags, feeTransactionAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, amount, balance, summary, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FeeTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FeeTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FeeTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FeeTransactionAllOfAttributes is not found in the empty JSON string", FeeTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FeeTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FeeTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FeeTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FeeTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FeeTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FeeTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FeeTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FeeTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FeeTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of FeeTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to FeeTransactionAllOfAttributes - */ - public static FeeTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FeeTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of FeeTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/FreezeAccountRequest.java b/src/main/java/org/openapitools/client/model/FreezeAccountRequest.java deleted file mode 100644 index 132097ae..00000000 --- a/src/main/java/org/openapitools/client/model/FreezeAccountRequest.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * FreezeAccountRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FreezeAccountRequest { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private FreezeAccountRequest data; - - public FreezeAccountRequest() { - } - - public FreezeAccountRequest data(FreezeAccountRequest data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public FreezeAccountRequest getData() { - return data; - } - - - public void setData(FreezeAccountRequest data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FreezeAccountRequest freezeAccountRequest = (FreezeAccountRequest) o; - return Objects.equals(this.data, freezeAccountRequest.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FreezeAccountRequest {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FreezeAccountRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FreezeAccountRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FreezeAccountRequest is not found in the empty JSON string", FreezeAccountRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FreezeAccountRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FreezeAccountRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - FreezeAccountRequest.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FreezeAccountRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FreezeAccountRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FreezeAccountRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FreezeAccountRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FreezeAccountRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FreezeAccountRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of FreezeAccountRequest - * @throws IOException if the JSON string is invalid with respect to FreezeAccountRequest - */ - public static FreezeAccountRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FreezeAccountRequest.class); - } - - /** - * Convert an instance of FreezeAccountRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/FreezeAccountRequestAttributes.java b/src/main/java/org/openapitools/client/model/FreezeAccountRequestAttributes.java deleted file mode 100644 index 056303c2..00000000 --- a/src/main/java/org/openapitools/client/model/FreezeAccountRequestAttributes.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * FreezeAccountRequestAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FreezeAccountRequestAttributes { - /** - * Gets or Sets reason - */ - @JsonAdapter(ReasonEnum.Adapter.class) - public enum ReasonEnum { - FRAUD("Fraud"), - - OTHER("Other"); - - private String value; - - ReasonEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ReasonEnum fromValue(String value) { - for (ReasonEnum b : ReasonEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ReasonEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ReasonEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ReasonEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_REASON = "reason"; - @SerializedName(SERIALIZED_NAME_REASON) - private ReasonEnum reason; - - public static final String SERIALIZED_NAME_REASON_TEXT = "reasonText"; - @SerializedName(SERIALIZED_NAME_REASON_TEXT) - private String reasonText; - - public FreezeAccountRequestAttributes() { - } - - public FreezeAccountRequestAttributes reason(ReasonEnum reason) { - - this.reason = reason; - return this; - } - - /** - * Get reason - * @return reason - **/ - @javax.annotation.Nullable - public ReasonEnum getReason() { - return reason; - } - - - public void setReason(ReasonEnum reason) { - this.reason = reason; - } - - - public FreezeAccountRequestAttributes reasonText(String reasonText) { - - this.reasonText = reasonText; - return this; - } - - /** - * Get reasonText - * @return reasonText - **/ - @javax.annotation.Nullable - public String getReasonText() { - return reasonText; - } - - - public void setReasonText(String reasonText) { - this.reasonText = reasonText; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FreezeAccountRequestAttributes freezeAccountRequestAttributes = (FreezeAccountRequestAttributes) o; - return Objects.equals(this.reason, freezeAccountRequestAttributes.reason) && - Objects.equals(this.reasonText, freezeAccountRequestAttributes.reasonText); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(reason, reasonText); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FreezeAccountRequestAttributes {\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append(" reasonText: ").append(toIndentedString(reasonText)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("reason"); - openapiFields.add("reasonText"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FreezeAccountRequestAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FreezeAccountRequestAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FreezeAccountRequestAttributes is not found in the empty JSON string", FreezeAccountRequestAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FreezeAccountRequestAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FreezeAccountRequestAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); - } - if ((jsonObj.get("reasonText") != null && !jsonObj.get("reasonText").isJsonNull()) && !jsonObj.get("reasonText").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reasonText` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reasonText").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FreezeAccountRequestAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FreezeAccountRequestAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FreezeAccountRequestAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FreezeAccountRequestAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FreezeAccountRequestAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FreezeAccountRequestAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of FreezeAccountRequestAttributes - * @throws IOException if the JSON string is invalid with respect to FreezeAccountRequestAttributes - */ - public static FreezeAccountRequestAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FreezeAccountRequestAttributes.class); - } - - /** - * Convert an instance of FreezeAccountRequestAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/FullName.java b/src/main/java/org/openapitools/client/model/FullName.java deleted file mode 100644 index a9e43214..00000000 --- a/src/main/java/org/openapitools/client/model/FullName.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * FullName - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FullName { - public static final String SERIALIZED_NAME_FIRST = "first"; - @SerializedName(SERIALIZED_NAME_FIRST) - private String first; - - public static final String SERIALIZED_NAME_LAST = "last"; - @SerializedName(SERIALIZED_NAME_LAST) - private String last; - - public FullName() { - } - - public FullName first(String first) { - - this.first = first; - return this; - } - - /** - * Get first - * @return first - **/ - @javax.annotation.Nonnull - public String getFirst() { - return first; - } - - - public void setFirst(String first) { - this.first = first; - } - - - public FullName last(String last) { - - this.last = last; - return this; - } - - /** - * Get last - * @return last - **/ - @javax.annotation.Nonnull - public String getLast() { - return last; - } - - - public void setLast(String last) { - this.last = last; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FullName fullName = (FullName) o; - return Objects.equals(this.first, fullName.first) && - Objects.equals(this.last, fullName.last); - } - - @Override - public int hashCode() { - return Objects.hash(first, last); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FullName {\n"); - sb.append(" first: ").append(toIndentedString(first)).append("\n"); - sb.append(" last: ").append(toIndentedString(last)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("first"); - openapiFields.add("last"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("first"); - openapiRequiredFields.add("last"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FullName - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FullName.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FullName is not found in the empty JSON string", FullName.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FullName.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FullName` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FullName.openapiRequiredFields) { - 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("first").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `first` to be a primitive type in the JSON string but got `%s`", jsonObj.get("first").toString())); - } - if (!jsonObj.get("last").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FullName.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FullName' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FullName.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FullName value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FullName read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FullName given an JSON string - * - * @param jsonString JSON string - * @return An instance of FullName - * @throws IOException if the JSON string is invalid with respect to FullName - */ - public static FullName fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FullName.class); - } - - /** - * Convert an instance of FullName to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Grantor.java b/src/main/java/org/openapitools/client/model/Grantor.java deleted file mode 100644 index 8017aeca..00000000 --- a/src/main/java/org/openapitools/client/model/Grantor.java +++ /dev/null @@ -1,601 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Phone; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Grantor - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Grantor { - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_MATRICULA_CONSULAR = "matriculaConsular"; - @SerializedName(SERIALIZED_NAME_MATRICULA_CONSULAR) - private String matriculaConsular; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public static final String SERIALIZED_NAME_EVALUATION_ID = "evaluationId"; - @SerializedName(SERIALIZED_NAME_EVALUATION_ID) - private String evaluationId; - - public static final String SERIALIZED_NAME_EVALUATION_FLAGS = "evaluationFlags"; - @SerializedName(SERIALIZED_NAME_EVALUATION_FLAGS) - private List evaluationFlags; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_MASKED_S_S_N = "maskedSSN"; - @SerializedName(SERIALIZED_NAME_MASKED_S_S_N) - private String maskedSSN; - - public Grantor() { - } - - public Grantor fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nonnull - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public Grantor email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nonnull - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public Grantor phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nonnull - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public Grantor ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public Grantor passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public Grantor matriculaConsular(String matriculaConsular) { - - this.matriculaConsular = matriculaConsular; - return this; - } - - /** - * Get matriculaConsular - * @return matriculaConsular - **/ - @javax.annotation.Nullable - public String getMatriculaConsular() { - return matriculaConsular; - } - - - public void setMatriculaConsular(String matriculaConsular) { - this.matriculaConsular = matriculaConsular; - } - - - public Grantor nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public Grantor address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nonnull - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public Grantor dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nonnull - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public Grantor evaluationId(String evaluationId) { - - this.evaluationId = evaluationId; - return this; - } - - /** - * Get evaluationId - * @return evaluationId - **/ - @javax.annotation.Nullable - public String getEvaluationId() { - return evaluationId; - } - - - public void setEvaluationId(String evaluationId) { - this.evaluationId = evaluationId; - } - - - public Grantor evaluationFlags(List evaluationFlags) { - - this.evaluationFlags = evaluationFlags; - return this; - } - - public Grantor addEvaluationFlagsItem(String evaluationFlagsItem) { - if (this.evaluationFlags == null) { - this.evaluationFlags = new ArrayList<>(); - } - this.evaluationFlags.add(evaluationFlagsItem); - return this; - } - - /** - * Get evaluationFlags - * @return evaluationFlags - **/ - @javax.annotation.Nullable - public List getEvaluationFlags() { - return evaluationFlags; - } - - - public void setEvaluationFlags(List evaluationFlags) { - this.evaluationFlags = evaluationFlags; - } - - - public Grantor status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public Grantor maskedSSN(String maskedSSN) { - - this.maskedSSN = maskedSSN; - return this; - } - - /** - * Get maskedSSN - * @return maskedSSN - **/ - @javax.annotation.Nullable - public String getMaskedSSN() { - return maskedSSN; - } - - - public void setMaskedSSN(String maskedSSN) { - this.maskedSSN = maskedSSN; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Grantor grantor = (Grantor) o; - return Objects.equals(this.fullName, grantor.fullName) && - Objects.equals(this.email, grantor.email) && - Objects.equals(this.phone, grantor.phone) && - Objects.equals(this.ssn, grantor.ssn) && - Objects.equals(this.passport, grantor.passport) && - Objects.equals(this.matriculaConsular, grantor.matriculaConsular) && - Objects.equals(this.nationality, grantor.nationality) && - Objects.equals(this.address, grantor.address) && - Objects.equals(this.dateOfBirth, grantor.dateOfBirth) && - Objects.equals(this.evaluationId, grantor.evaluationId) && - Objects.equals(this.evaluationFlags, grantor.evaluationFlags) && - Objects.equals(this.status, grantor.status) && - Objects.equals(this.maskedSSN, grantor.maskedSSN); - } - - @Override - public int hashCode() { - return Objects.hash(fullName, email, phone, ssn, passport, matriculaConsular, nationality, address, dateOfBirth, evaluationId, evaluationFlags, status, maskedSSN); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Grantor {\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); - sb.append(" evaluationFlags: ").append(toIndentedString(evaluationFlags)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" maskedSSN: ").append(toIndentedString(maskedSSN)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fullName"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("matriculaConsular"); - openapiFields.add("nationality"); - openapiFields.add("address"); - openapiFields.add("dateOfBirth"); - openapiFields.add("evaluationId"); - openapiFields.add("evaluationFlags"); - openapiFields.add("status"); - openapiFields.add("maskedSSN"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("fullName"); - openapiRequiredFields.add("email"); - openapiRequiredFields.add("phone"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("dateOfBirth"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Grantor - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Grantor.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Grantor is not found in the empty JSON string", Grantor.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Grantor.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Grantor` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Grantor.openapiRequiredFields) { - 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(); - // validate the required field `fullName` - FullName.validateJsonElement(jsonObj.get("fullName")); - if (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the required field `phone` - Phone.validateJsonElement(jsonObj.get("phone")); - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("matriculaConsular") != null && !jsonObj.get("matriculaConsular").isJsonNull()) && !jsonObj.get("matriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `matriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("matriculaConsular").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - // validate the required field `address` - Address.validateJsonElement(jsonObj.get("address")); - if ((jsonObj.get("evaluationId") != null && !jsonObj.get("evaluationId").isJsonNull()) && !jsonObj.get("evaluationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("evaluationFlags") != null && !jsonObj.get("evaluationFlags").isJsonNull() && !jsonObj.get("evaluationFlags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationFlags` to be an array in the JSON string but got `%s`", jsonObj.get("evaluationFlags").toString())); - } - 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())); - } - if ((jsonObj.get("maskedSSN") != null && !jsonObj.get("maskedSSN").isJsonNull()) && !jsonObj.get("maskedSSN").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedSSN` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedSSN").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Grantor.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Grantor' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Grantor.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Grantor value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Grantor read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Grantor given an JSON string - * - * @param jsonString JSON string - * @return An instance of Grantor - * @throws IOException if the JSON string is invalid with respect to Grantor - */ - public static Grantor fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Grantor.class); - } - - /** - * Convert an instance of Grantor to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/HealthcareAmounts.java b/src/main/java/org/openapitools/client/model/HealthcareAmounts.java deleted file mode 100644 index 6b3461e8..00000000 --- a/src/main/java/org/openapitools/client/model/HealthcareAmounts.java +++ /dev/null @@ -1,358 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * HealthcareAmounts - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class HealthcareAmounts { - public static final String SERIALIZED_NAME_TRANSIT_AMOUNT = "transitAmount"; - @SerializedName(SERIALIZED_NAME_TRANSIT_AMOUNT) - private Integer transitAmount; - - public static final String SERIALIZED_NAME_PRESCRIPTION_R_X_AMOUNT = "prescriptionRXAmount"; - @SerializedName(SERIALIZED_NAME_PRESCRIPTION_R_X_AMOUNT) - private Integer prescriptionRXAmount; - - public static final String SERIALIZED_NAME_VISION_OPTICAL_AMOUNT = "visionOpticalAmount"; - @SerializedName(SERIALIZED_NAME_VISION_OPTICAL_AMOUNT) - private Integer visionOpticalAmount; - - public static final String SERIALIZED_NAME_CLINIC_OTHER_QUALIFIED_MEDICAL_AMOUNT = "clinicOtherQualifiedMedicalAmount"; - @SerializedName(SERIALIZED_NAME_CLINIC_OTHER_QUALIFIED_MEDICAL_AMOUNT) - private Integer clinicOtherQualifiedMedicalAmount; - - public static final String SERIALIZED_NAME_DENTAL_AMOUNT = "dentalAmount"; - @SerializedName(SERIALIZED_NAME_DENTAL_AMOUNT) - private Integer dentalAmount; - - public static final String SERIALIZED_NAME_TOTAL_HEALTHCARE_AMOUNT = "totalHealthcareAmount"; - @SerializedName(SERIALIZED_NAME_TOTAL_HEALTHCARE_AMOUNT) - private Integer totalHealthcareAmount; - - public HealthcareAmounts() { - } - - public HealthcareAmounts transitAmount(Integer transitAmount) { - - this.transitAmount = transitAmount; - return this; - } - - /** - * Get transitAmount - * @return transitAmount - **/ - @javax.annotation.Nonnull - public Integer getTransitAmount() { - return transitAmount; - } - - - public void setTransitAmount(Integer transitAmount) { - this.transitAmount = transitAmount; - } - - - public HealthcareAmounts prescriptionRXAmount(Integer prescriptionRXAmount) { - - this.prescriptionRXAmount = prescriptionRXAmount; - return this; - } - - /** - * Get prescriptionRXAmount - * @return prescriptionRXAmount - **/ - @javax.annotation.Nonnull - public Integer getPrescriptionRXAmount() { - return prescriptionRXAmount; - } - - - public void setPrescriptionRXAmount(Integer prescriptionRXAmount) { - this.prescriptionRXAmount = prescriptionRXAmount; - } - - - public HealthcareAmounts visionOpticalAmount(Integer visionOpticalAmount) { - - this.visionOpticalAmount = visionOpticalAmount; - return this; - } - - /** - * Get visionOpticalAmount - * @return visionOpticalAmount - **/ - @javax.annotation.Nonnull - public Integer getVisionOpticalAmount() { - return visionOpticalAmount; - } - - - public void setVisionOpticalAmount(Integer visionOpticalAmount) { - this.visionOpticalAmount = visionOpticalAmount; - } - - - public HealthcareAmounts clinicOtherQualifiedMedicalAmount(Integer clinicOtherQualifiedMedicalAmount) { - - this.clinicOtherQualifiedMedicalAmount = clinicOtherQualifiedMedicalAmount; - return this; - } - - /** - * Get clinicOtherQualifiedMedicalAmount - * @return clinicOtherQualifiedMedicalAmount - **/ - @javax.annotation.Nonnull - public Integer getClinicOtherQualifiedMedicalAmount() { - return clinicOtherQualifiedMedicalAmount; - } - - - public void setClinicOtherQualifiedMedicalAmount(Integer clinicOtherQualifiedMedicalAmount) { - this.clinicOtherQualifiedMedicalAmount = clinicOtherQualifiedMedicalAmount; - } - - - public HealthcareAmounts dentalAmount(Integer dentalAmount) { - - this.dentalAmount = dentalAmount; - return this; - } - - /** - * Get dentalAmount - * @return dentalAmount - **/ - @javax.annotation.Nonnull - public Integer getDentalAmount() { - return dentalAmount; - } - - - public void setDentalAmount(Integer dentalAmount) { - this.dentalAmount = dentalAmount; - } - - - public HealthcareAmounts totalHealthcareAmount(Integer totalHealthcareAmount) { - - this.totalHealthcareAmount = totalHealthcareAmount; - return this; - } - - /** - * Get totalHealthcareAmount - * @return totalHealthcareAmount - **/ - @javax.annotation.Nonnull - public Integer getTotalHealthcareAmount() { - return totalHealthcareAmount; - } - - - public void setTotalHealthcareAmount(Integer totalHealthcareAmount) { - this.totalHealthcareAmount = totalHealthcareAmount; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HealthcareAmounts healthcareAmounts = (HealthcareAmounts) o; - return Objects.equals(this.transitAmount, healthcareAmounts.transitAmount) && - Objects.equals(this.prescriptionRXAmount, healthcareAmounts.prescriptionRXAmount) && - Objects.equals(this.visionOpticalAmount, healthcareAmounts.visionOpticalAmount) && - Objects.equals(this.clinicOtherQualifiedMedicalAmount, healthcareAmounts.clinicOtherQualifiedMedicalAmount) && - Objects.equals(this.dentalAmount, healthcareAmounts.dentalAmount) && - Objects.equals(this.totalHealthcareAmount, healthcareAmounts.totalHealthcareAmount); - } - - @Override - public int hashCode() { - return Objects.hash(transitAmount, prescriptionRXAmount, visionOpticalAmount, clinicOtherQualifiedMedicalAmount, dentalAmount, totalHealthcareAmount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HealthcareAmounts {\n"); - sb.append(" transitAmount: ").append(toIndentedString(transitAmount)).append("\n"); - sb.append(" prescriptionRXAmount: ").append(toIndentedString(prescriptionRXAmount)).append("\n"); - sb.append(" visionOpticalAmount: ").append(toIndentedString(visionOpticalAmount)).append("\n"); - sb.append(" clinicOtherQualifiedMedicalAmount: ").append(toIndentedString(clinicOtherQualifiedMedicalAmount)).append("\n"); - sb.append(" dentalAmount: ").append(toIndentedString(dentalAmount)).append("\n"); - sb.append(" totalHealthcareAmount: ").append(toIndentedString(totalHealthcareAmount)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("transitAmount"); - openapiFields.add("prescriptionRXAmount"); - openapiFields.add("visionOpticalAmount"); - openapiFields.add("clinicOtherQualifiedMedicalAmount"); - openapiFields.add("dentalAmount"); - openapiFields.add("totalHealthcareAmount"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("transitAmount"); - openapiRequiredFields.add("prescriptionRXAmount"); - openapiRequiredFields.add("visionOpticalAmount"); - openapiRequiredFields.add("clinicOtherQualifiedMedicalAmount"); - openapiRequiredFields.add("dentalAmount"); - openapiRequiredFields.add("totalHealthcareAmount"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HealthcareAmounts - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HealthcareAmounts.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in HealthcareAmounts is not found in the empty JSON string", HealthcareAmounts.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!HealthcareAmounts.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HealthcareAmounts` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : HealthcareAmounts.openapiRequiredFields) { - 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 { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!HealthcareAmounts.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'HealthcareAmounts' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(HealthcareAmounts.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, HealthcareAmounts value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public HealthcareAmounts read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of HealthcareAmounts given an JSON string - * - * @param jsonString JSON string - * @return An instance of HealthcareAmounts - * @throws IOException if the JSON string is invalid with respect to HealthcareAmounts - */ - public static HealthcareAmounts fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, HealthcareAmounts.class); - } - - /** - * Convert an instance of HealthcareAmounts to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/IncludedResourceInner.java b/src/main/java/org/openapitools/client/model/IncludedResourceInner.java deleted file mode 100644 index 7c2ca329..00000000 --- a/src/main/java/org/openapitools/client/model/IncludedResourceInner.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * IncludedResourceInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IncludedResourceInner { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private Object attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private Object relationships; - - public IncludedResourceInner() { - } - - public IncludedResourceInner id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public IncludedResourceInner type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public IncludedResourceInner attributes(Object attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public Object getAttributes() { - return attributes; - } - - - public void setAttributes(Object attributes) { - this.attributes = attributes; - } - - - public IncludedResourceInner relationships(Object relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public Object getRelationships() { - return relationships; - } - - - public void setRelationships(Object relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IncludedResourceInner includedResourceInner = (IncludedResourceInner) o; - return Objects.equals(this.id, includedResourceInner.id) && - Objects.equals(this.type, includedResourceInner.type) && - Objects.equals(this.attributes, includedResourceInner.attributes) && - Objects.equals(this.relationships, includedResourceInner.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(id, type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IncludedResourceInner {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IncludedResourceInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IncludedResourceInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IncludedResourceInner is not found in the empty JSON string", IncludedResourceInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!IncludedResourceInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IncludedResourceInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - 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())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IncludedResourceInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IncludedResourceInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IncludedResourceInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IncludedResourceInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public IncludedResourceInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IncludedResourceInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of IncludedResourceInner - * @throws IOException if the JSON string is invalid with respect to IncludedResourceInner - */ - public static IncludedResourceInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IncludedResourceInner.class); - } - - /** - * Convert an instance of IncludedResourceInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/IncomingAchRelationship.java b/src/main/java/org/openapitools/client/model/IncomingAchRelationship.java deleted file mode 100644 index 5776d8d5..00000000 --- a/src/main/java/org/openapitools/client/model/IncomingAchRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.IncomingAchRelationshipData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * IncomingAchRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IncomingAchRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private IncomingAchRelationshipData data; - - public IncomingAchRelationship() { - } - - public IncomingAchRelationship data(IncomingAchRelationshipData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public IncomingAchRelationshipData getData() { - return data; - } - - - public void setData(IncomingAchRelationshipData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IncomingAchRelationship incomingAchRelationship = (IncomingAchRelationship) o; - return Objects.equals(this.data, incomingAchRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IncomingAchRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IncomingAchRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IncomingAchRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IncomingAchRelationship is not found in the empty JSON string", IncomingAchRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!IncomingAchRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IncomingAchRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : IncomingAchRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - IncomingAchRelationshipData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IncomingAchRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IncomingAchRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IncomingAchRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IncomingAchRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public IncomingAchRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IncomingAchRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of IncomingAchRelationship - * @throws IOException if the JSON string is invalid with respect to IncomingAchRelationship - */ - public static IncomingAchRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IncomingAchRelationship.class); - } - - /** - * Convert an instance of IncomingAchRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/IncomingAchRelationshipData.java b/src/main/java/org/openapitools/client/model/IncomingAchRelationshipData.java deleted file mode 100644 index 2826bf76..00000000 --- a/src/main/java/org/openapitools/client/model/IncomingAchRelationshipData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * IncomingAchRelationshipData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IncomingAchRelationshipData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "incomingAch"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public IncomingAchRelationshipData() { - } - - public IncomingAchRelationshipData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public IncomingAchRelationshipData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IncomingAchRelationshipData incomingAchRelationshipData = (IncomingAchRelationshipData) o; - return Objects.equals(this.type, incomingAchRelationshipData.type) && - Objects.equals(this.id, incomingAchRelationshipData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IncomingAchRelationshipData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IncomingAchRelationshipData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IncomingAchRelationshipData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IncomingAchRelationshipData is not found in the empty JSON string", IncomingAchRelationshipData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!IncomingAchRelationshipData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IncomingAchRelationshipData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : IncomingAchRelationshipData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IncomingAchRelationshipData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IncomingAchRelationshipData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IncomingAchRelationshipData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IncomingAchRelationshipData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public IncomingAchRelationshipData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IncomingAchRelationshipData given an JSON string - * - * @param jsonString JSON string - * @return An instance of IncomingAchRelationshipData - * @throws IOException if the JSON string is invalid with respect to IncomingAchRelationshipData - */ - public static IncomingAchRelationshipData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IncomingAchRelationshipData.class); - } - - /** - * Convert an instance of IncomingAchRelationshipData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/IndividualApplication.java b/src/main/java/org/openapitools/client/model/IndividualApplication.java deleted file mode 100644 index a6260274..00000000 --- a/src/main/java/org/openapitools/client/model/IndividualApplication.java +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Application; -import org.openapitools.client.model.ApplicationRelationships; -import org.openapitools.client.model.IndividualApplicationAllOfAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * IndividualApplication - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IndividualApplication extends Application { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private IndividualApplicationAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private ApplicationRelationships relationships; - - public IndividualApplication() { - this.type = this.getClass().getSimpleName(); - } - - public IndividualApplication attributes(IndividualApplicationAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public IndividualApplicationAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(IndividualApplicationAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public IndividualApplication relationships(ApplicationRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public ApplicationRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(ApplicationRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IndividualApplication individualApplication = (IndividualApplication) o; - return Objects.equals(this.attributes, individualApplication.attributes) && - Objects.equals(this.relationships, individualApplication.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IndividualApplication {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IndividualApplication - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IndividualApplication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IndividualApplication is not found in the empty JSON string", IndividualApplication.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!IndividualApplication.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IndividualApplication` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : IndividualApplication.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IndividualApplication.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IndividualApplication' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IndividualApplication.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IndividualApplication value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public IndividualApplication read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IndividualApplication given an JSON string - * - * @param jsonString JSON string - * @return An instance of IndividualApplication - * @throws IOException if the JSON string is invalid with respect to IndividualApplication - */ - public static IndividualApplication fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IndividualApplication.class); - } - - /** - * Convert an instance of IndividualApplication to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/IndividualApplicationAllOfAttributes.java b/src/main/java/org/openapitools/client/model/IndividualApplicationAllOfAttributes.java deleted file mode 100644 index 67c036e9..00000000 --- a/src/main/java/org/openapitools/client/model/IndividualApplicationAllOfAttributes.java +++ /dev/null @@ -1,1655 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.AnnualIncome; -import org.openapitools.client.model.ApplicationStatus; -import org.openapitools.client.model.BusinessVertical; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Industry; -import org.openapitools.client.model.Occupation; -import org.openapitools.client.model.Phone; -import org.openapitools.client.model.PowerOfAttorneyAgent; -import org.openapitools.client.model.SoleProprietorshipAnnualRevenue; -import org.openapitools.client.model.SoleProprietorshipNumberOfEmployees; -import org.openapitools.client.model.SourceOfIncome; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * IndividualApplicationAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IndividualApplicationAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private ApplicationStatus status; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - private String message; - - public static final String SERIALIZED_NAME_EVALUATION_OUTCOME = "evaluationOutcome"; - @SerializedName(SERIALIZED_NAME_EVALUATION_OUTCOME) - private String evaluationOutcome; - - public static final String SERIALIZED_NAME_EVALUATION_ID = "evaluationId"; - @SerializedName(SERIALIZED_NAME_EVALUATION_ID) - private String evaluationId; - - public static final String SERIALIZED_NAME_EVALUATION_ENTITY_ID = "evaluationEntityId"; - @SerializedName(SERIALIZED_NAME_EVALUATION_ENTITY_ID) - private String evaluationEntityId; - - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_MATRICULA_CONSULAR = "matriculaConsular"; - @SerializedName(SERIALIZED_NAME_MATRICULA_CONSULAR) - private String matriculaConsular; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Object address; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public static final String SERIALIZED_NAME_DBA = "dba"; - @SerializedName(SERIALIZED_NAME_DBA) - private String dba; - - public static final String SERIALIZED_NAME_EIN = "ein"; - @SerializedName(SERIALIZED_NAME_EIN) - private String ein; - - public static final String SERIALIZED_NAME_IP = "ip"; - @SerializedName(SERIALIZED_NAME_IP) - private String ip; - - public static final String SERIALIZED_NAME_SOLE_PROPRIETORSHIP = "soleProprietorship"; - @SerializedName(SERIALIZED_NAME_SOLE_PROPRIETORSHIP) - private Boolean soleProprietorship; - - /** - * Gets or Sets decisionMethod - */ - @JsonAdapter(DecisionMethodEnum.Adapter.class) - public enum DecisionMethodEnum { - MANUALLY("Manually"), - - AUTOMATICALLY("Automatically"); - - private String value; - - DecisionMethodEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DecisionMethodEnum fromValue(String value) { - for (DecisionMethodEnum b : DecisionMethodEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DecisionMethodEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DecisionMethodEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DecisionMethodEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DECISION_METHOD = "decisionMethod"; - @SerializedName(SERIALIZED_NAME_DECISION_METHOD) - private DecisionMethodEnum decisionMethod; - - public static final String SERIALIZED_NAME_DECISION_USER_ID = "decisionUserId"; - @SerializedName(SERIALIZED_NAME_DECISION_USER_ID) - private String decisionUserId; - - public static final String SERIALIZED_NAME_DECISION_REASON = "decisionReason"; - @SerializedName(SERIALIZED_NAME_DECISION_REASON) - private String decisionReason; - - public static final String SERIALIZED_NAME_DECISION_DATE_TIME = "decisionDateTime"; - @SerializedName(SERIALIZED_NAME_DECISION_DATE_TIME) - private OffsetDateTime decisionDateTime; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - /** - * Gets or Sets riskRate - */ - @JsonAdapter(RiskRateEnum.Adapter.class) - public enum RiskRateEnum { - LOW("low"), - - MEDIUM("medium"), - - HIGH("high"); - - private String value; - - RiskRateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static RiskRateEnum fromValue(String value) { - for (RiskRateEnum b : RiskRateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final RiskRateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public RiskRateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return RiskRateEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_RISK_RATE = "riskRate"; - @SerializedName(SERIALIZED_NAME_RISK_RATE) - private RiskRateEnum riskRate; - - public static final String SERIALIZED_NAME_EVALUATION_FLAGS = "evaluationFlags"; - @SerializedName(SERIALIZED_NAME_EVALUATION_FLAGS) - private List evaluationFlags; - - public static final String SERIALIZED_NAME_EVALUATION_SCORES = "evaluationScores"; - @SerializedName(SERIALIZED_NAME_EVALUATION_SCORES) - private Object evaluationScores; - - public static final String SERIALIZED_NAME_IP_LOCATION_DETAILS = "ipLocationDetails"; - @SerializedName(SERIALIZED_NAME_IP_LOCATION_DETAILS) - private Object ipLocationDetails; - - public static final String SERIALIZED_NAME_PHONE_LOCATION_DETAILS = "phoneLocationDetails"; - @SerializedName(SERIALIZED_NAME_PHONE_LOCATION_DETAILS) - private Object phoneLocationDetails; - - public static final String SERIALIZED_NAME_MASKED_S_S_N = "maskedSSN"; - @SerializedName(SERIALIZED_NAME_MASKED_S_S_N) - private String maskedSSN; - - public static final String SERIALIZED_NAME_MASKED_PASSPORT = "maskedPassport"; - @SerializedName(SERIALIZED_NAME_MASKED_PASSPORT) - private String maskedPassport; - - public static final String SERIALIZED_NAME_MASKED_MATRICULA_CONSULAR = "maskedMatriculaConsular"; - @SerializedName(SERIALIZED_NAME_MASKED_MATRICULA_CONSULAR) - private String maskedMatriculaConsular; - - public static final String SERIALIZED_NAME_JWT_SUBJECT = "jwtSubject"; - @SerializedName(SERIALIZED_NAME_JWT_SUBJECT) - private String jwtSubject; - - public static final String SERIALIZED_NAME_ARCHIVED = "archived"; - @SerializedName(SERIALIZED_NAME_ARCHIVED) - private Boolean archived; - - public static final String SERIALIZED_NAME_POWER_OF_ATTORNEY_AGENT = "powerOfAttorneyAgent"; - @SerializedName(SERIALIZED_NAME_POWER_OF_ATTORNEY_AGENT) - private PowerOfAttorneyAgent powerOfAttorneyAgent; - - public static final String SERIALIZED_NAME_INDUSTRY = "industry"; - @SerializedName(SERIALIZED_NAME_INDUSTRY) - private Industry industry; - - public static final String SERIALIZED_NAME_ID_THEFT_SCORE = "idTheftScore"; - @SerializedName(SERIALIZED_NAME_ID_THEFT_SCORE) - private Integer idTheftScore; - - public static final String SERIALIZED_NAME_OCCUPATION = "occupation"; - @SerializedName(SERIALIZED_NAME_OCCUPATION) - private Occupation occupation; - - public static final String SERIALIZED_NAME_ANNUAL_INCOME = "annualIncome"; - @SerializedName(SERIALIZED_NAME_ANNUAL_INCOME) - private AnnualIncome annualIncome; - - public static final String SERIALIZED_NAME_SOURCE_OF_INCOME = "sourceOfIncome"; - @SerializedName(SERIALIZED_NAME_SOURCE_OF_INCOME) - private SourceOfIncome sourceOfIncome; - - public static final String SERIALIZED_NAME_ANNUAL_REVENUE = "annualRevenue"; - @SerializedName(SERIALIZED_NAME_ANNUAL_REVENUE) - private SoleProprietorshipAnnualRevenue annualRevenue; - - public static final String SERIALIZED_NAME_NUMBER_OF_EMPLOYEES = "numberOfEmployees"; - @SerializedName(SERIALIZED_NAME_NUMBER_OF_EMPLOYEES) - private SoleProprietorshipNumberOfEmployees numberOfEmployees; - - public static final String SERIALIZED_NAME_BUSINESS_VERTICAL = "businessVertical"; - @SerializedName(SERIALIZED_NAME_BUSINESS_VERTICAL) - private BusinessVertical businessVertical; - - public static final String SERIALIZED_NAME_WEBSITE = "website"; - @SerializedName(SERIALIZED_NAME_WEBSITE) - private String website; - - public IndividualApplicationAllOfAttributes() { - } - - public IndividualApplicationAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public IndividualApplicationAllOfAttributes updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public IndividualApplicationAllOfAttributes status(ApplicationStatus status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public ApplicationStatus getStatus() { - return status; - } - - - public void setStatus(ApplicationStatus status) { - this.status = status; - } - - - public IndividualApplicationAllOfAttributes message(String message) { - - this.message = message; - return this; - } - - /** - * Get message - * @return message - **/ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - - public void setMessage(String message) { - this.message = message; - } - - - public IndividualApplicationAllOfAttributes evaluationOutcome(String evaluationOutcome) { - - this.evaluationOutcome = evaluationOutcome; - return this; - } - - /** - * Get evaluationOutcome - * @return evaluationOutcome - **/ - @javax.annotation.Nullable - public String getEvaluationOutcome() { - return evaluationOutcome; - } - - - public void setEvaluationOutcome(String evaluationOutcome) { - this.evaluationOutcome = evaluationOutcome; - } - - - public IndividualApplicationAllOfAttributes evaluationId(String evaluationId) { - - this.evaluationId = evaluationId; - return this; - } - - /** - * Get evaluationId - * @return evaluationId - **/ - @javax.annotation.Nullable - public String getEvaluationId() { - return evaluationId; - } - - - public void setEvaluationId(String evaluationId) { - this.evaluationId = evaluationId; - } - - - public IndividualApplicationAllOfAttributes evaluationEntityId(String evaluationEntityId) { - - this.evaluationEntityId = evaluationEntityId; - return this; - } - - /** - * Get evaluationEntityId - * @return evaluationEntityId - **/ - @javax.annotation.Nullable - public String getEvaluationEntityId() { - return evaluationEntityId; - } - - - public void setEvaluationEntityId(String evaluationEntityId) { - this.evaluationEntityId = evaluationEntityId; - } - - - public IndividualApplicationAllOfAttributes fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nonnull - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public IndividualApplicationAllOfAttributes email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public IndividualApplicationAllOfAttributes phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public IndividualApplicationAllOfAttributes ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public IndividualApplicationAllOfAttributes passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public IndividualApplicationAllOfAttributes nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public IndividualApplicationAllOfAttributes matriculaConsular(String matriculaConsular) { - - this.matriculaConsular = matriculaConsular; - return this; - } - - /** - * Get matriculaConsular - * @return matriculaConsular - **/ - @javax.annotation.Nullable - public String getMatriculaConsular() { - return matriculaConsular; - } - - - public void setMatriculaConsular(String matriculaConsular) { - this.matriculaConsular = matriculaConsular; - } - - - public IndividualApplicationAllOfAttributes address(Object address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Object getAddress() { - return address; - } - - - public void setAddress(Object address) { - this.address = address; - } - - - public IndividualApplicationAllOfAttributes dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nullable - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public IndividualApplicationAllOfAttributes dba(String dba) { - - this.dba = dba; - return this; - } - - /** - * Get dba - * @return dba - **/ - @javax.annotation.Nullable - public String getDba() { - return dba; - } - - - public void setDba(String dba) { - this.dba = dba; - } - - - public IndividualApplicationAllOfAttributes ein(String ein) { - - this.ein = ein; - return this; - } - - /** - * Get ein - * @return ein - **/ - @javax.annotation.Nullable - public String getEin() { - return ein; - } - - - public void setEin(String ein) { - this.ein = ein; - } - - - public IndividualApplicationAllOfAttributes ip(String ip) { - - this.ip = ip; - return this; - } - - /** - * Get ip - * @return ip - **/ - @javax.annotation.Nullable - public String getIp() { - return ip; - } - - - public void setIp(String ip) { - this.ip = ip; - } - - - public IndividualApplicationAllOfAttributes soleProprietorship(Boolean soleProprietorship) { - - this.soleProprietorship = soleProprietorship; - return this; - } - - /** - * Get soleProprietorship - * @return soleProprietorship - **/ - @javax.annotation.Nullable - public Boolean getSoleProprietorship() { - return soleProprietorship; - } - - - public void setSoleProprietorship(Boolean soleProprietorship) { - this.soleProprietorship = soleProprietorship; - } - - - public IndividualApplicationAllOfAttributes decisionMethod(DecisionMethodEnum decisionMethod) { - - this.decisionMethod = decisionMethod; - return this; - } - - /** - * Get decisionMethod - * @return decisionMethod - **/ - @javax.annotation.Nullable - public DecisionMethodEnum getDecisionMethod() { - return decisionMethod; - } - - - public void setDecisionMethod(DecisionMethodEnum decisionMethod) { - this.decisionMethod = decisionMethod; - } - - - public IndividualApplicationAllOfAttributes decisionUserId(String decisionUserId) { - - this.decisionUserId = decisionUserId; - return this; - } - - /** - * Get decisionUserId - * @return decisionUserId - **/ - @javax.annotation.Nullable - public String getDecisionUserId() { - return decisionUserId; - } - - - public void setDecisionUserId(String decisionUserId) { - this.decisionUserId = decisionUserId; - } - - - public IndividualApplicationAllOfAttributes decisionReason(String decisionReason) { - - this.decisionReason = decisionReason; - return this; - } - - /** - * Get decisionReason - * @return decisionReason - **/ - @javax.annotation.Nullable - public String getDecisionReason() { - return decisionReason; - } - - - public void setDecisionReason(String decisionReason) { - this.decisionReason = decisionReason; - } - - - public IndividualApplicationAllOfAttributes decisionDateTime(OffsetDateTime decisionDateTime) { - - this.decisionDateTime = decisionDateTime; - return this; - } - - /** - * Get decisionDateTime - * @return decisionDateTime - **/ - @javax.annotation.Nullable - public OffsetDateTime getDecisionDateTime() { - return decisionDateTime; - } - - - public void setDecisionDateTime(OffsetDateTime decisionDateTime) { - this.decisionDateTime = decisionDateTime; - } - - - public IndividualApplicationAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public IndividualApplicationAllOfAttributes riskRate(RiskRateEnum riskRate) { - - this.riskRate = riskRate; - return this; - } - - /** - * Get riskRate - * @return riskRate - **/ - @javax.annotation.Nullable - public RiskRateEnum getRiskRate() { - return riskRate; - } - - - public void setRiskRate(RiskRateEnum riskRate) { - this.riskRate = riskRate; - } - - - public IndividualApplicationAllOfAttributes evaluationFlags(List evaluationFlags) { - - this.evaluationFlags = evaluationFlags; - return this; - } - - public IndividualApplicationAllOfAttributes addEvaluationFlagsItem(String evaluationFlagsItem) { - if (this.evaluationFlags == null) { - this.evaluationFlags = new ArrayList<>(); - } - this.evaluationFlags.add(evaluationFlagsItem); - return this; - } - - /** - * Get evaluationFlags - * @return evaluationFlags - **/ - @javax.annotation.Nullable - public List getEvaluationFlags() { - return evaluationFlags; - } - - - public void setEvaluationFlags(List evaluationFlags) { - this.evaluationFlags = evaluationFlags; - } - - - public IndividualApplicationAllOfAttributes evaluationScores(Object evaluationScores) { - - this.evaluationScores = evaluationScores; - return this; - } - - /** - * Get evaluationScores - * @return evaluationScores - **/ - @javax.annotation.Nullable - public Object getEvaluationScores() { - return evaluationScores; - } - - - public void setEvaluationScores(Object evaluationScores) { - this.evaluationScores = evaluationScores; - } - - - public IndividualApplicationAllOfAttributes ipLocationDetails(Object ipLocationDetails) { - - this.ipLocationDetails = ipLocationDetails; - return this; - } - - /** - * Get ipLocationDetails - * @return ipLocationDetails - **/ - @javax.annotation.Nullable - public Object getIpLocationDetails() { - return ipLocationDetails; - } - - - public void setIpLocationDetails(Object ipLocationDetails) { - this.ipLocationDetails = ipLocationDetails; - } - - - public IndividualApplicationAllOfAttributes phoneLocationDetails(Object phoneLocationDetails) { - - this.phoneLocationDetails = phoneLocationDetails; - return this; - } - - /** - * Get phoneLocationDetails - * @return phoneLocationDetails - **/ - @javax.annotation.Nullable - public Object getPhoneLocationDetails() { - return phoneLocationDetails; - } - - - public void setPhoneLocationDetails(Object phoneLocationDetails) { - this.phoneLocationDetails = phoneLocationDetails; - } - - - public IndividualApplicationAllOfAttributes maskedSSN(String maskedSSN) { - - this.maskedSSN = maskedSSN; - return this; - } - - /** - * Get maskedSSN - * @return maskedSSN - **/ - @javax.annotation.Nullable - public String getMaskedSSN() { - return maskedSSN; - } - - - public void setMaskedSSN(String maskedSSN) { - this.maskedSSN = maskedSSN; - } - - - public IndividualApplicationAllOfAttributes maskedPassport(String maskedPassport) { - - this.maskedPassport = maskedPassport; - return this; - } - - /** - * Get maskedPassport - * @return maskedPassport - **/ - @javax.annotation.Nullable - public String getMaskedPassport() { - return maskedPassport; - } - - - public void setMaskedPassport(String maskedPassport) { - this.maskedPassport = maskedPassport; - } - - - public IndividualApplicationAllOfAttributes maskedMatriculaConsular(String maskedMatriculaConsular) { - - this.maskedMatriculaConsular = maskedMatriculaConsular; - return this; - } - - /** - * Get maskedMatriculaConsular - * @return maskedMatriculaConsular - **/ - @javax.annotation.Nullable - public String getMaskedMatriculaConsular() { - return maskedMatriculaConsular; - } - - - public void setMaskedMatriculaConsular(String maskedMatriculaConsular) { - this.maskedMatriculaConsular = maskedMatriculaConsular; - } - - - public IndividualApplicationAllOfAttributes jwtSubject(String jwtSubject) { - - this.jwtSubject = jwtSubject; - return this; - } - - /** - * Get jwtSubject - * @return jwtSubject - **/ - @javax.annotation.Nullable - public String getJwtSubject() { - return jwtSubject; - } - - - public void setJwtSubject(String jwtSubject) { - this.jwtSubject = jwtSubject; - } - - - public IndividualApplicationAllOfAttributes archived(Boolean archived) { - - this.archived = archived; - return this; - } - - /** - * Get archived - * @return archived - **/ - @javax.annotation.Nullable - public Boolean getArchived() { - return archived; - } - - - public void setArchived(Boolean archived) { - this.archived = archived; - } - - - public IndividualApplicationAllOfAttributes powerOfAttorneyAgent(PowerOfAttorneyAgent powerOfAttorneyAgent) { - - this.powerOfAttorneyAgent = powerOfAttorneyAgent; - return this; - } - - /** - * Get powerOfAttorneyAgent - * @return powerOfAttorneyAgent - **/ - @javax.annotation.Nullable - public PowerOfAttorneyAgent getPowerOfAttorneyAgent() { - return powerOfAttorneyAgent; - } - - - public void setPowerOfAttorneyAgent(PowerOfAttorneyAgent powerOfAttorneyAgent) { - this.powerOfAttorneyAgent = powerOfAttorneyAgent; - } - - - public IndividualApplicationAllOfAttributes industry(Industry industry) { - - this.industry = industry; - return this; - } - - /** - * Get industry - * @return industry - **/ - @javax.annotation.Nullable - public Industry getIndustry() { - return industry; - } - - - public void setIndustry(Industry industry) { - this.industry = industry; - } - - - public IndividualApplicationAllOfAttributes idTheftScore(Integer idTheftScore) { - - this.idTheftScore = idTheftScore; - return this; - } - - /** - * Get idTheftScore - * @return idTheftScore - **/ - @javax.annotation.Nullable - public Integer getIdTheftScore() { - return idTheftScore; - } - - - public void setIdTheftScore(Integer idTheftScore) { - this.idTheftScore = idTheftScore; - } - - - public IndividualApplicationAllOfAttributes occupation(Occupation occupation) { - - this.occupation = occupation; - return this; - } - - /** - * Get occupation - * @return occupation - **/ - @javax.annotation.Nullable - public Occupation getOccupation() { - return occupation; - } - - - public void setOccupation(Occupation occupation) { - this.occupation = occupation; - } - - - public IndividualApplicationAllOfAttributes annualIncome(AnnualIncome annualIncome) { - - this.annualIncome = annualIncome; - return this; - } - - /** - * Get annualIncome - * @return annualIncome - **/ - @javax.annotation.Nullable - public AnnualIncome getAnnualIncome() { - return annualIncome; - } - - - public void setAnnualIncome(AnnualIncome annualIncome) { - this.annualIncome = annualIncome; - } - - - public IndividualApplicationAllOfAttributes sourceOfIncome(SourceOfIncome sourceOfIncome) { - - this.sourceOfIncome = sourceOfIncome; - return this; - } - - /** - * Get sourceOfIncome - * @return sourceOfIncome - **/ - @javax.annotation.Nullable - public SourceOfIncome getSourceOfIncome() { - return sourceOfIncome; - } - - - public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { - this.sourceOfIncome = sourceOfIncome; - } - - - public IndividualApplicationAllOfAttributes annualRevenue(SoleProprietorshipAnnualRevenue annualRevenue) { - - this.annualRevenue = annualRevenue; - return this; - } - - /** - * Get annualRevenue - * @return annualRevenue - **/ - @javax.annotation.Nullable - public SoleProprietorshipAnnualRevenue getAnnualRevenue() { - return annualRevenue; - } - - - public void setAnnualRevenue(SoleProprietorshipAnnualRevenue annualRevenue) { - this.annualRevenue = annualRevenue; - } - - - public IndividualApplicationAllOfAttributes numberOfEmployees(SoleProprietorshipNumberOfEmployees numberOfEmployees) { - - this.numberOfEmployees = numberOfEmployees; - return this; - } - - /** - * Get numberOfEmployees - * @return numberOfEmployees - **/ - @javax.annotation.Nullable - public SoleProprietorshipNumberOfEmployees getNumberOfEmployees() { - return numberOfEmployees; - } - - - public void setNumberOfEmployees(SoleProprietorshipNumberOfEmployees numberOfEmployees) { - this.numberOfEmployees = numberOfEmployees; - } - - - public IndividualApplicationAllOfAttributes businessVertical(BusinessVertical businessVertical) { - - this.businessVertical = businessVertical; - return this; - } - - /** - * Get businessVertical - * @return businessVertical - **/ - @javax.annotation.Nullable - public BusinessVertical getBusinessVertical() { - return businessVertical; - } - - - public void setBusinessVertical(BusinessVertical businessVertical) { - this.businessVertical = businessVertical; - } - - - public IndividualApplicationAllOfAttributes website(String website) { - - this.website = website; - return this; - } - - /** - * Get website - * @return website - **/ - @javax.annotation.Nullable - public String getWebsite() { - return website; - } - - - public void setWebsite(String website) { - this.website = website; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IndividualApplicationAllOfAttributes individualApplicationAllOfAttributes = (IndividualApplicationAllOfAttributes) o; - return Objects.equals(this.createdAt, individualApplicationAllOfAttributes.createdAt) && - Objects.equals(this.updatedAt, individualApplicationAllOfAttributes.updatedAt) && - Objects.equals(this.status, individualApplicationAllOfAttributes.status) && - Objects.equals(this.message, individualApplicationAllOfAttributes.message) && - Objects.equals(this.evaluationOutcome, individualApplicationAllOfAttributes.evaluationOutcome) && - Objects.equals(this.evaluationId, individualApplicationAllOfAttributes.evaluationId) && - Objects.equals(this.evaluationEntityId, individualApplicationAllOfAttributes.evaluationEntityId) && - Objects.equals(this.fullName, individualApplicationAllOfAttributes.fullName) && - Objects.equals(this.email, individualApplicationAllOfAttributes.email) && - Objects.equals(this.phone, individualApplicationAllOfAttributes.phone) && - Objects.equals(this.ssn, individualApplicationAllOfAttributes.ssn) && - Objects.equals(this.passport, individualApplicationAllOfAttributes.passport) && - Objects.equals(this.nationality, individualApplicationAllOfAttributes.nationality) && - Objects.equals(this.matriculaConsular, individualApplicationAllOfAttributes.matriculaConsular) && - Objects.equals(this.address, individualApplicationAllOfAttributes.address) && - Objects.equals(this.dateOfBirth, individualApplicationAllOfAttributes.dateOfBirth) && - Objects.equals(this.dba, individualApplicationAllOfAttributes.dba) && - Objects.equals(this.ein, individualApplicationAllOfAttributes.ein) && - Objects.equals(this.ip, individualApplicationAllOfAttributes.ip) && - Objects.equals(this.soleProprietorship, individualApplicationAllOfAttributes.soleProprietorship) && - Objects.equals(this.decisionMethod, individualApplicationAllOfAttributes.decisionMethod) && - Objects.equals(this.decisionUserId, individualApplicationAllOfAttributes.decisionUserId) && - Objects.equals(this.decisionReason, individualApplicationAllOfAttributes.decisionReason) && - Objects.equals(this.decisionDateTime, individualApplicationAllOfAttributes.decisionDateTime) && - Objects.equals(this.tags, individualApplicationAllOfAttributes.tags) && - Objects.equals(this.riskRate, individualApplicationAllOfAttributes.riskRate) && - Objects.equals(this.evaluationFlags, individualApplicationAllOfAttributes.evaluationFlags) && - Objects.equals(this.evaluationScores, individualApplicationAllOfAttributes.evaluationScores) && - Objects.equals(this.ipLocationDetails, individualApplicationAllOfAttributes.ipLocationDetails) && - Objects.equals(this.phoneLocationDetails, individualApplicationAllOfAttributes.phoneLocationDetails) && - Objects.equals(this.maskedSSN, individualApplicationAllOfAttributes.maskedSSN) && - Objects.equals(this.maskedPassport, individualApplicationAllOfAttributes.maskedPassport) && - Objects.equals(this.maskedMatriculaConsular, individualApplicationAllOfAttributes.maskedMatriculaConsular) && - Objects.equals(this.jwtSubject, individualApplicationAllOfAttributes.jwtSubject) && - Objects.equals(this.archived, individualApplicationAllOfAttributes.archived) && - Objects.equals(this.powerOfAttorneyAgent, individualApplicationAllOfAttributes.powerOfAttorneyAgent) && - Objects.equals(this.industry, individualApplicationAllOfAttributes.industry) && - Objects.equals(this.idTheftScore, individualApplicationAllOfAttributes.idTheftScore) && - Objects.equals(this.occupation, individualApplicationAllOfAttributes.occupation) && - Objects.equals(this.annualIncome, individualApplicationAllOfAttributes.annualIncome) && - Objects.equals(this.sourceOfIncome, individualApplicationAllOfAttributes.sourceOfIncome) && - Objects.equals(this.annualRevenue, individualApplicationAllOfAttributes.annualRevenue) && - Objects.equals(this.numberOfEmployees, individualApplicationAllOfAttributes.numberOfEmployees) && - Objects.equals(this.businessVertical, individualApplicationAllOfAttributes.businessVertical) && - Objects.equals(this.website, individualApplicationAllOfAttributes.website); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, updatedAt, status, message, evaluationOutcome, evaluationId, evaluationEntityId, fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, dba, ein, ip, soleProprietorship, decisionMethod, decisionUserId, decisionReason, decisionDateTime, tags, riskRate, evaluationFlags, evaluationScores, ipLocationDetails, phoneLocationDetails, maskedSSN, maskedPassport, maskedMatriculaConsular, jwtSubject, archived, powerOfAttorneyAgent, industry, idTheftScore, occupation, annualIncome, sourceOfIncome, annualRevenue, numberOfEmployees, businessVertical, website); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IndividualApplicationAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" evaluationOutcome: ").append(toIndentedString(evaluationOutcome)).append("\n"); - sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); - sb.append(" evaluationEntityId: ").append(toIndentedString(evaluationEntityId)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" dba: ").append(toIndentedString(dba)).append("\n"); - sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); - sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); - sb.append(" soleProprietorship: ").append(toIndentedString(soleProprietorship)).append("\n"); - sb.append(" decisionMethod: ").append(toIndentedString(decisionMethod)).append("\n"); - sb.append(" decisionUserId: ").append(toIndentedString(decisionUserId)).append("\n"); - sb.append(" decisionReason: ").append(toIndentedString(decisionReason)).append("\n"); - sb.append(" decisionDateTime: ").append(toIndentedString(decisionDateTime)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" riskRate: ").append(toIndentedString(riskRate)).append("\n"); - sb.append(" evaluationFlags: ").append(toIndentedString(evaluationFlags)).append("\n"); - sb.append(" evaluationScores: ").append(toIndentedString(evaluationScores)).append("\n"); - sb.append(" ipLocationDetails: ").append(toIndentedString(ipLocationDetails)).append("\n"); - sb.append(" phoneLocationDetails: ").append(toIndentedString(phoneLocationDetails)).append("\n"); - sb.append(" maskedSSN: ").append(toIndentedString(maskedSSN)).append("\n"); - sb.append(" maskedPassport: ").append(toIndentedString(maskedPassport)).append("\n"); - sb.append(" maskedMatriculaConsular: ").append(toIndentedString(maskedMatriculaConsular)).append("\n"); - sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); - sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); - sb.append(" powerOfAttorneyAgent: ").append(toIndentedString(powerOfAttorneyAgent)).append("\n"); - sb.append(" industry: ").append(toIndentedString(industry)).append("\n"); - sb.append(" idTheftScore: ").append(toIndentedString(idTheftScore)).append("\n"); - sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); - sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); - sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); - sb.append(" annualRevenue: ").append(toIndentedString(annualRevenue)).append("\n"); - sb.append(" numberOfEmployees: ").append(toIndentedString(numberOfEmployees)).append("\n"); - sb.append(" businessVertical: ").append(toIndentedString(businessVertical)).append("\n"); - sb.append(" website: ").append(toIndentedString(website)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("status"); - openapiFields.add("message"); - openapiFields.add("evaluationOutcome"); - openapiFields.add("evaluationId"); - openapiFields.add("evaluationEntityId"); - openapiFields.add("fullName"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("nationality"); - openapiFields.add("matriculaConsular"); - openapiFields.add("address"); - openapiFields.add("dateOfBirth"); - openapiFields.add("dba"); - openapiFields.add("ein"); - openapiFields.add("ip"); - openapiFields.add("soleProprietorship"); - openapiFields.add("decisionMethod"); - openapiFields.add("decisionUserId"); - openapiFields.add("decisionReason"); - openapiFields.add("decisionDateTime"); - openapiFields.add("tags"); - openapiFields.add("riskRate"); - openapiFields.add("evaluationFlags"); - openapiFields.add("evaluationScores"); - openapiFields.add("ipLocationDetails"); - openapiFields.add("phoneLocationDetails"); - openapiFields.add("maskedSSN"); - openapiFields.add("maskedPassport"); - openapiFields.add("maskedMatriculaConsular"); - openapiFields.add("jwtSubject"); - openapiFields.add("archived"); - openapiFields.add("powerOfAttorneyAgent"); - openapiFields.add("industry"); - openapiFields.add("idTheftScore"); - openapiFields.add("occupation"); - openapiFields.add("annualIncome"); - openapiFields.add("sourceOfIncome"); - openapiFields.add("annualRevenue"); - openapiFields.add("numberOfEmployees"); - openapiFields.add("businessVertical"); - openapiFields.add("website"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("fullName"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IndividualApplicationAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IndividualApplicationAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IndividualApplicationAllOfAttributes is not found in the empty JSON string", IndividualApplicationAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!IndividualApplicationAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IndividualApplicationAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : IndividualApplicationAllOfAttributes.openapiRequiredFields) { - 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") != null && !jsonObj.get("message").isJsonNull()) && !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())); - } - if ((jsonObj.get("evaluationOutcome") != null && !jsonObj.get("evaluationOutcome").isJsonNull()) && !jsonObj.get("evaluationOutcome").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationOutcome` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationOutcome").toString())); - } - if ((jsonObj.get("evaluationId") != null && !jsonObj.get("evaluationId").isJsonNull()) && !jsonObj.get("evaluationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationId").toString())); - } - if ((jsonObj.get("evaluationEntityId") != null && !jsonObj.get("evaluationEntityId").isJsonNull()) && !jsonObj.get("evaluationEntityId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationEntityId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationEntityId").toString())); - } - // validate the required field `fullName` - FullName.validateJsonElement(jsonObj.get("fullName")); - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); - } - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - if ((jsonObj.get("matriculaConsular") != null && !jsonObj.get("matriculaConsular").isJsonNull()) && !jsonObj.get("matriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `matriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("matriculaConsular").toString())); - } - if ((jsonObj.get("dba") != null && !jsonObj.get("dba").isJsonNull()) && !jsonObj.get("dba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dba").toString())); - } - if ((jsonObj.get("ein") != null && !jsonObj.get("ein").isJsonNull()) && !jsonObj.get("ein").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ein` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ein").toString())); - } - if ((jsonObj.get("ip") != null && !jsonObj.get("ip").isJsonNull()) && !jsonObj.get("ip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip").toString())); - } - if ((jsonObj.get("decisionMethod") != null && !jsonObj.get("decisionMethod").isJsonNull()) && !jsonObj.get("decisionMethod").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `decisionMethod` to be a primitive type in the JSON string but got `%s`", jsonObj.get("decisionMethod").toString())); - } - if ((jsonObj.get("decisionUserId") != null && !jsonObj.get("decisionUserId").isJsonNull()) && !jsonObj.get("decisionUserId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `decisionUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("decisionUserId").toString())); - } - if ((jsonObj.get("decisionReason") != null && !jsonObj.get("decisionReason").isJsonNull()) && !jsonObj.get("decisionReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `decisionReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("decisionReason").toString())); - } - if ((jsonObj.get("riskRate") != null && !jsonObj.get("riskRate").isJsonNull()) && !jsonObj.get("riskRate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `riskRate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("riskRate").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("evaluationFlags") != null && !jsonObj.get("evaluationFlags").isJsonNull() && !jsonObj.get("evaluationFlags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationFlags` to be an array in the JSON string but got `%s`", jsonObj.get("evaluationFlags").toString())); - } - if ((jsonObj.get("maskedSSN") != null && !jsonObj.get("maskedSSN").isJsonNull()) && !jsonObj.get("maskedSSN").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedSSN` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedSSN").toString())); - } - if ((jsonObj.get("maskedPassport") != null && !jsonObj.get("maskedPassport").isJsonNull()) && !jsonObj.get("maskedPassport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedPassport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedPassport").toString())); - } - if ((jsonObj.get("maskedMatriculaConsular") != null && !jsonObj.get("maskedMatriculaConsular").isJsonNull()) && !jsonObj.get("maskedMatriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedMatriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedMatriculaConsular").toString())); - } - if ((jsonObj.get("jwtSubject") != null && !jsonObj.get("jwtSubject").isJsonNull()) && !jsonObj.get("jwtSubject").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `jwtSubject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jwtSubject").toString())); - } - // validate the optional field `powerOfAttorneyAgent` - if (jsonObj.get("powerOfAttorneyAgent") != null && !jsonObj.get("powerOfAttorneyAgent").isJsonNull()) { - PowerOfAttorneyAgent.validateJsonElement(jsonObj.get("powerOfAttorneyAgent")); - } - if ((jsonObj.get("website") != null && !jsonObj.get("website").isJsonNull()) && !jsonObj.get("website").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `website` to be a primitive type in the JSON string but got `%s`", jsonObj.get("website").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IndividualApplicationAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IndividualApplicationAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IndividualApplicationAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IndividualApplicationAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public IndividualApplicationAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IndividualApplicationAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of IndividualApplicationAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to IndividualApplicationAllOfAttributes - */ - public static IndividualApplicationAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IndividualApplicationAllOfAttributes.class); - } - - /** - * Convert an instance of IndividualApplicationAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/IndividualCustomer.java b/src/main/java/org/openapitools/client/model/IndividualCustomer.java deleted file mode 100644 index b8851cec..00000000 --- a/src/main/java/org/openapitools/client/model/IndividualCustomer.java +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Customer; -import org.openapitools.client.model.CustomerRelationships; -import org.openapitools.client.model.IndividualCustomerAllOfAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * IndividualCustomer - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IndividualCustomer extends Customer { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private IndividualCustomerAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CustomerRelationships relationships; - - public IndividualCustomer() { - this.type = this.getClass().getSimpleName(); - } - - public IndividualCustomer attributes(IndividualCustomerAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public IndividualCustomerAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(IndividualCustomerAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public IndividualCustomer relationships(CustomerRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public CustomerRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CustomerRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IndividualCustomer individualCustomer = (IndividualCustomer) o; - return Objects.equals(this.attributes, individualCustomer.attributes) && - Objects.equals(this.relationships, individualCustomer.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IndividualCustomer {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IndividualCustomer - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IndividualCustomer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IndividualCustomer is not found in the empty JSON string", IndividualCustomer.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!IndividualCustomer.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IndividualCustomer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IndividualCustomer.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IndividualCustomer' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IndividualCustomer.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IndividualCustomer value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public IndividualCustomer read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IndividualCustomer given an JSON string - * - * @param jsonString JSON string - * @return An instance of IndividualCustomer - * @throws IOException if the JSON string is invalid with respect to IndividualCustomer - */ - public static IndividualCustomer fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IndividualCustomer.class); - } - - /** - * Convert an instance of IndividualCustomer to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/IndividualCustomerAllOfAttributes.java b/src/main/java/org/openapitools/client/model/IndividualCustomerAllOfAttributes.java deleted file mode 100644 index 698ba03a..00000000 --- a/src/main/java/org/openapitools/client/model/IndividualCustomerAllOfAttributes.java +++ /dev/null @@ -1,1052 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.AuthorizedUser; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Phone; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * IndividualCustomerAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IndividualCustomerAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_MATRICULA_CONSULAR = "matriculaConsular"; - @SerializedName(SERIALIZED_NAME_MATRICULA_CONSULAR) - private String matriculaConsular; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public static final String SERIALIZED_NAME_EIN = "ein"; - @SerializedName(SERIALIZED_NAME_EIN) - private String ein; - - public static final String SERIALIZED_NAME_DBA = "dba"; - @SerializedName(SERIALIZED_NAME_DBA) - private String dba; - - public static final String SERIALIZED_NAME_SOLE_PROPRIETORSHIP = "soleProprietorship"; - @SerializedName(SERIALIZED_NAME_SOLE_PROPRIETORSHIP) - private Boolean soleProprietorship = false; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - /** - * Gets or Sets riskRate - */ - @JsonAdapter(RiskRateEnum.Adapter.class) - public enum RiskRateEnum { - LOW("low"), - - MEDIUM("medium"), - - HIGH("high"); - - private String value; - - RiskRateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static RiskRateEnum fromValue(String value) { - for (RiskRateEnum b : RiskRateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final RiskRateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public RiskRateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return RiskRateEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_RISK_RATE = "riskRate"; - @SerializedName(SERIALIZED_NAME_RISK_RATE) - private RiskRateEnum riskRate; - - public static final String SERIALIZED_NAME_MASKED_S_S_N = "maskedSSN"; - @SerializedName(SERIALIZED_NAME_MASKED_S_S_N) - private String maskedSSN; - - public static final String SERIALIZED_NAME_MASKED_PASSPORT = "maskedPassport"; - @SerializedName(SERIALIZED_NAME_MASKED_PASSPORT) - private String maskedPassport; - - public static final String SERIALIZED_NAME_MASKED_MATRICULA_CONSULAR = "maskedMatriculaConsular"; - @SerializedName(SERIALIZED_NAME_MASKED_MATRICULA_CONSULAR) - private String maskedMatriculaConsular; - - public static final String SERIALIZED_NAME_AUTHORIZED_USERS = "authorizedUsers"; - @SerializedName(SERIALIZED_NAME_AUTHORIZED_USERS) - private List authorizedUsers; - - public static final String SERIALIZED_NAME_JWT_SUBJECT = "jwtSubject"; - @SerializedName(SERIALIZED_NAME_JWT_SUBJECT) - private String jwtSubject; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - ACTIVE("Active"), - - ARCHIVED("Archived"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - /** - * Gets or Sets archiveReason - */ - @JsonAdapter(ArchiveReasonEnum.Adapter.class) - public enum ArchiveReasonEnum { - INACTIVE("Inactive"), - - FRAUDACHACTIVITY("FraudACHActivity"), - - FRAUDCARDACTIVITY("FraudCardActivity"), - - FRAUDCHECKACTIVITY("FraudCheckActivity"), - - FRAUDAPPLICATIONHISTORY("FraudApplicationHistory"), - - FRAUDACCOUNTACTIVITY("FraudAccountActivity"), - - FRAUDCLIENTIDENTIFIED("FraudClientIdentified"), - - FRAUDLINKEDTOFRAUDULENTCUSTOMER("FraudLinkedToFraudulentCustomer"); - - private String value; - - ArchiveReasonEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ArchiveReasonEnum fromValue(String value) { - for (ArchiveReasonEnum b : ArchiveReasonEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ArchiveReasonEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ArchiveReasonEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ArchiveReasonEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_ARCHIVE_REASON = "archiveReason"; - @SerializedName(SERIALIZED_NAME_ARCHIVE_REASON) - private ArchiveReasonEnum archiveReason; - - public IndividualCustomerAllOfAttributes() { - } - - public IndividualCustomerAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public IndividualCustomerAllOfAttributes fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nonnull - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public IndividualCustomerAllOfAttributes email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public IndividualCustomerAllOfAttributes phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public IndividualCustomerAllOfAttributes ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public IndividualCustomerAllOfAttributes passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public IndividualCustomerAllOfAttributes nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public IndividualCustomerAllOfAttributes matriculaConsular(String matriculaConsular) { - - this.matriculaConsular = matriculaConsular; - return this; - } - - /** - * Get matriculaConsular - * @return matriculaConsular - **/ - @javax.annotation.Nullable - public String getMatriculaConsular() { - return matriculaConsular; - } - - - public void setMatriculaConsular(String matriculaConsular) { - this.matriculaConsular = matriculaConsular; - } - - - public IndividualCustomerAllOfAttributes address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public IndividualCustomerAllOfAttributes dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nullable - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public IndividualCustomerAllOfAttributes ein(String ein) { - - this.ein = ein; - return this; - } - - /** - * Get ein - * @return ein - **/ - @javax.annotation.Nullable - public String getEin() { - return ein; - } - - - public void setEin(String ein) { - this.ein = ein; - } - - - public IndividualCustomerAllOfAttributes dba(String dba) { - - this.dba = dba; - return this; - } - - /** - * Get dba - * @return dba - **/ - @javax.annotation.Nullable - public String getDba() { - return dba; - } - - - public void setDba(String dba) { - this.dba = dba; - } - - - public IndividualCustomerAllOfAttributes soleProprietorship(Boolean soleProprietorship) { - - this.soleProprietorship = soleProprietorship; - return this; - } - - /** - * Get soleProprietorship - * @return soleProprietorship - **/ - @javax.annotation.Nullable - public Boolean getSoleProprietorship() { - return soleProprietorship; - } - - - public void setSoleProprietorship(Boolean soleProprietorship) { - this.soleProprietorship = soleProprietorship; - } - - - public IndividualCustomerAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public IndividualCustomerAllOfAttributes riskRate(RiskRateEnum riskRate) { - - this.riskRate = riskRate; - return this; - } - - /** - * Get riskRate - * @return riskRate - **/ - @javax.annotation.Nullable - public RiskRateEnum getRiskRate() { - return riskRate; - } - - - public void setRiskRate(RiskRateEnum riskRate) { - this.riskRate = riskRate; - } - - - public IndividualCustomerAllOfAttributes maskedSSN(String maskedSSN) { - - this.maskedSSN = maskedSSN; - return this; - } - - /** - * Get maskedSSN - * @return maskedSSN - **/ - @javax.annotation.Nullable - public String getMaskedSSN() { - return maskedSSN; - } - - - public void setMaskedSSN(String maskedSSN) { - this.maskedSSN = maskedSSN; - } - - - public IndividualCustomerAllOfAttributes maskedPassport(String maskedPassport) { - - this.maskedPassport = maskedPassport; - return this; - } - - /** - * Get maskedPassport - * @return maskedPassport - **/ - @javax.annotation.Nullable - public String getMaskedPassport() { - return maskedPassport; - } - - - public void setMaskedPassport(String maskedPassport) { - this.maskedPassport = maskedPassport; - } - - - public IndividualCustomerAllOfAttributes maskedMatriculaConsular(String maskedMatriculaConsular) { - - this.maskedMatriculaConsular = maskedMatriculaConsular; - return this; - } - - /** - * Get maskedMatriculaConsular - * @return maskedMatriculaConsular - **/ - @javax.annotation.Nullable - public String getMaskedMatriculaConsular() { - return maskedMatriculaConsular; - } - - - public void setMaskedMatriculaConsular(String maskedMatriculaConsular) { - this.maskedMatriculaConsular = maskedMatriculaConsular; - } - - - public IndividualCustomerAllOfAttributes authorizedUsers(List authorizedUsers) { - - this.authorizedUsers = authorizedUsers; - return this; - } - - public IndividualCustomerAllOfAttributes addAuthorizedUsersItem(AuthorizedUser authorizedUsersItem) { - if (this.authorizedUsers == null) { - this.authorizedUsers = new ArrayList<>(); - } - this.authorizedUsers.add(authorizedUsersItem); - return this; - } - - /** - * Get authorizedUsers - * @return authorizedUsers - **/ - @javax.annotation.Nullable - public List getAuthorizedUsers() { - return authorizedUsers; - } - - - public void setAuthorizedUsers(List authorizedUsers) { - this.authorizedUsers = authorizedUsers; - } - - - public IndividualCustomerAllOfAttributes jwtSubject(String jwtSubject) { - - this.jwtSubject = jwtSubject; - return this; - } - - /** - * Get jwtSubject - * @return jwtSubject - **/ - @javax.annotation.Nullable - public String getJwtSubject() { - return jwtSubject; - } - - - public void setJwtSubject(String jwtSubject) { - this.jwtSubject = jwtSubject; - } - - - public IndividualCustomerAllOfAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public IndividualCustomerAllOfAttributes archiveReason(ArchiveReasonEnum archiveReason) { - - this.archiveReason = archiveReason; - return this; - } - - /** - * Get archiveReason - * @return archiveReason - **/ - @javax.annotation.Nullable - public ArchiveReasonEnum getArchiveReason() { - return archiveReason; - } - - - public void setArchiveReason(ArchiveReasonEnum archiveReason) { - this.archiveReason = archiveReason; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IndividualCustomerAllOfAttributes individualCustomerAllOfAttributes = (IndividualCustomerAllOfAttributes) o; - return Objects.equals(this.createdAt, individualCustomerAllOfAttributes.createdAt) && - Objects.equals(this.fullName, individualCustomerAllOfAttributes.fullName) && - Objects.equals(this.email, individualCustomerAllOfAttributes.email) && - Objects.equals(this.phone, individualCustomerAllOfAttributes.phone) && - Objects.equals(this.ssn, individualCustomerAllOfAttributes.ssn) && - Objects.equals(this.passport, individualCustomerAllOfAttributes.passport) && - Objects.equals(this.nationality, individualCustomerAllOfAttributes.nationality) && - Objects.equals(this.matriculaConsular, individualCustomerAllOfAttributes.matriculaConsular) && - Objects.equals(this.address, individualCustomerAllOfAttributes.address) && - Objects.equals(this.dateOfBirth, individualCustomerAllOfAttributes.dateOfBirth) && - Objects.equals(this.ein, individualCustomerAllOfAttributes.ein) && - Objects.equals(this.dba, individualCustomerAllOfAttributes.dba) && - Objects.equals(this.soleProprietorship, individualCustomerAllOfAttributes.soleProprietorship) && - Objects.equals(this.tags, individualCustomerAllOfAttributes.tags) && - Objects.equals(this.riskRate, individualCustomerAllOfAttributes.riskRate) && - Objects.equals(this.maskedSSN, individualCustomerAllOfAttributes.maskedSSN) && - Objects.equals(this.maskedPassport, individualCustomerAllOfAttributes.maskedPassport) && - Objects.equals(this.maskedMatriculaConsular, individualCustomerAllOfAttributes.maskedMatriculaConsular) && - Objects.equals(this.authorizedUsers, individualCustomerAllOfAttributes.authorizedUsers) && - Objects.equals(this.jwtSubject, individualCustomerAllOfAttributes.jwtSubject) && - Objects.equals(this.status, individualCustomerAllOfAttributes.status) && - Objects.equals(this.archiveReason, individualCustomerAllOfAttributes.archiveReason); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, ein, dba, soleProprietorship, tags, riskRate, maskedSSN, maskedPassport, maskedMatriculaConsular, authorizedUsers, jwtSubject, status, archiveReason); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IndividualCustomerAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); - sb.append(" dba: ").append(toIndentedString(dba)).append("\n"); - sb.append(" soleProprietorship: ").append(toIndentedString(soleProprietorship)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" riskRate: ").append(toIndentedString(riskRate)).append("\n"); - sb.append(" maskedSSN: ").append(toIndentedString(maskedSSN)).append("\n"); - sb.append(" maskedPassport: ").append(toIndentedString(maskedPassport)).append("\n"); - sb.append(" maskedMatriculaConsular: ").append(toIndentedString(maskedMatriculaConsular)).append("\n"); - sb.append(" authorizedUsers: ").append(toIndentedString(authorizedUsers)).append("\n"); - sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" archiveReason: ").append(toIndentedString(archiveReason)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("fullName"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("nationality"); - openapiFields.add("matriculaConsular"); - openapiFields.add("address"); - openapiFields.add("dateOfBirth"); - openapiFields.add("ein"); - openapiFields.add("dba"); - openapiFields.add("soleProprietorship"); - openapiFields.add("tags"); - openapiFields.add("riskRate"); - openapiFields.add("maskedSSN"); - openapiFields.add("maskedPassport"); - openapiFields.add("maskedMatriculaConsular"); - openapiFields.add("authorizedUsers"); - openapiFields.add("jwtSubject"); - openapiFields.add("status"); - openapiFields.add("archiveReason"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("fullName"); - openapiRequiredFields.add("status"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IndividualCustomerAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IndividualCustomerAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IndividualCustomerAllOfAttributes is not found in the empty JSON string", IndividualCustomerAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!IndividualCustomerAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IndividualCustomerAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : IndividualCustomerAllOfAttributes.openapiRequiredFields) { - 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(); - // validate the required field `fullName` - FullName.validateJsonElement(jsonObj.get("fullName")); - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); - } - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - if ((jsonObj.get("matriculaConsular") != null && !jsonObj.get("matriculaConsular").isJsonNull()) && !jsonObj.get("matriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `matriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("matriculaConsular").toString())); - } - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("address")); - } - if ((jsonObj.get("ein") != null && !jsonObj.get("ein").isJsonNull()) && !jsonObj.get("ein").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ein` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ein").toString())); - } - if ((jsonObj.get("dba") != null && !jsonObj.get("dba").isJsonNull()) && !jsonObj.get("dba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dba").toString())); - } - if ((jsonObj.get("riskRate") != null && !jsonObj.get("riskRate").isJsonNull()) && !jsonObj.get("riskRate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `riskRate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("riskRate").toString())); - } - if ((jsonObj.get("maskedSSN") != null && !jsonObj.get("maskedSSN").isJsonNull()) && !jsonObj.get("maskedSSN").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedSSN` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedSSN").toString())); - } - if ((jsonObj.get("maskedPassport") != null && !jsonObj.get("maskedPassport").isJsonNull()) && !jsonObj.get("maskedPassport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedPassport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedPassport").toString())); - } - if ((jsonObj.get("maskedMatriculaConsular") != null && !jsonObj.get("maskedMatriculaConsular").isJsonNull()) && !jsonObj.get("maskedMatriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedMatriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedMatriculaConsular").toString())); - } - if (jsonObj.get("authorizedUsers") != null && !jsonObj.get("authorizedUsers").isJsonNull()) { - JsonArray jsonArrayauthorizedUsers = jsonObj.getAsJsonArray("authorizedUsers"); - if (jsonArrayauthorizedUsers != null) { - // ensure the json data is an array - if (!jsonObj.get("authorizedUsers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `authorizedUsers` to be an array in the JSON string but got `%s`", jsonObj.get("authorizedUsers").toString())); - } - - // validate the optional field `authorizedUsers` (array) - for (int i = 0; i < jsonArrayauthorizedUsers.size(); i++) { - AuthorizedUser.validateJsonElement(jsonArrayauthorizedUsers.get(i)); - }; - } - } - if ((jsonObj.get("jwtSubject") != null && !jsonObj.get("jwtSubject").isJsonNull()) && !jsonObj.get("jwtSubject").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `jwtSubject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jwtSubject").toString())); - } - if (!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())); - } - if ((jsonObj.get("archiveReason") != null && !jsonObj.get("archiveReason").isJsonNull()) && !jsonObj.get("archiveReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `archiveReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("archiveReason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IndividualCustomerAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IndividualCustomerAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IndividualCustomerAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IndividualCustomerAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public IndividualCustomerAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IndividualCustomerAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of IndividualCustomerAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to IndividualCustomerAllOfAttributes - */ - public static IndividualCustomerAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IndividualCustomerAllOfAttributes.class); - } - - /** - * Convert an instance of IndividualCustomerAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/IndividualDebitCard.java b/src/main/java/org/openapitools/client/model/IndividualDebitCard.java deleted file mode 100644 index b57dee2e..00000000 --- a/src/main/java/org/openapitools/client/model/IndividualDebitCard.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Card; -import org.openapitools.client.model.CardRelationships; -import org.openapitools.client.model.IndividualDebitCardAllOfAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * IndividualDebitCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IndividualDebitCard extends Card { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private IndividualDebitCardAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CardRelationships relationships; - - public IndividualDebitCard() { - this.type = this.getClass().getSimpleName(); - } - - public IndividualDebitCard attributes(IndividualDebitCardAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public IndividualDebitCardAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(IndividualDebitCardAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public IndividualDebitCard relationships(CardRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CardRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CardRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IndividualDebitCard individualDebitCard = (IndividualDebitCard) o; - return Objects.equals(this.attributes, individualDebitCard.attributes) && - Objects.equals(this.relationships, individualDebitCard.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IndividualDebitCard {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IndividualDebitCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IndividualDebitCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IndividualDebitCard is not found in the empty JSON string", IndividualDebitCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!IndividualDebitCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IndividualDebitCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : IndividualDebitCard.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IndividualDebitCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IndividualDebitCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IndividualDebitCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IndividualDebitCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public IndividualDebitCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IndividualDebitCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of IndividualDebitCard - * @throws IOException if the JSON string is invalid with respect to IndividualDebitCard - */ - public static IndividualDebitCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IndividualDebitCard.class); - } - - /** - * Convert an instance of IndividualDebitCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/IndividualDebitCardAllOfAttributes.java b/src/main/java/org/openapitools/client/model/IndividualDebitCardAllOfAttributes.java deleted file mode 100644 index 00d972c2..00000000 --- a/src/main/java/org/openapitools/client/model/IndividualDebitCardAllOfAttributes.java +++ /dev/null @@ -1,490 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.PhysicalCardStatus; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * IndividualDebitCardAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IndividualDebitCardAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_LAST4_DIGITS = "last4Digits"; - @SerializedName(SERIALIZED_NAME_LAST4_DIGITS) - private String last4Digits; - - public static final String SERIALIZED_NAME_EXPIRATION_DATE = "expirationDate"; - @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE) - private String expirationDate; - - public static final String SERIALIZED_NAME_SHIPPING_ADDRESS = "shippingAddress"; - @SerializedName(SERIALIZED_NAME_SHIPPING_ADDRESS) - private Address shippingAddress; - - public static final String SERIALIZED_NAME_BIN = "bin"; - @SerializedName(SERIALIZED_NAME_BIN) - private String bin; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private PhysicalCardStatus status; - - public static final String SERIALIZED_NAME_DESIGN = "design"; - @SerializedName(SERIALIZED_NAME_DESIGN) - private String design; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_FREEZE_REASON = "freezeReason"; - @SerializedName(SERIALIZED_NAME_FREEZE_REASON) - private String freezeReason; - - public IndividualDebitCardAllOfAttributes() { - } - - public IndividualDebitCardAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public IndividualDebitCardAllOfAttributes updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public IndividualDebitCardAllOfAttributes last4Digits(String last4Digits) { - - this.last4Digits = last4Digits; - return this; - } - - /** - * Get last4Digits - * @return last4Digits - **/ - @javax.annotation.Nonnull - public String getLast4Digits() { - return last4Digits; - } - - - public void setLast4Digits(String last4Digits) { - this.last4Digits = last4Digits; - } - - - public IndividualDebitCardAllOfAttributes expirationDate(String expirationDate) { - - this.expirationDate = expirationDate; - return this; - } - - /** - * Get expirationDate - * @return expirationDate - **/ - @javax.annotation.Nonnull - public String getExpirationDate() { - return expirationDate; - } - - - public void setExpirationDate(String expirationDate) { - this.expirationDate = expirationDate; - } - - - public IndividualDebitCardAllOfAttributes shippingAddress(Address shippingAddress) { - - this.shippingAddress = shippingAddress; - return this; - } - - /** - * Get shippingAddress - * @return shippingAddress - **/ - @javax.annotation.Nullable - public Address getShippingAddress() { - return shippingAddress; - } - - - public void setShippingAddress(Address shippingAddress) { - this.shippingAddress = shippingAddress; - } - - - public IndividualDebitCardAllOfAttributes bin(String bin) { - - this.bin = bin; - return this; - } - - /** - * Get bin - * @return bin - **/ - @javax.annotation.Nullable - public String getBin() { - return bin; - } - - - public void setBin(String bin) { - this.bin = bin; - } - - - public IndividualDebitCardAllOfAttributes status(PhysicalCardStatus status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public PhysicalCardStatus getStatus() { - return status; - } - - - public void setStatus(PhysicalCardStatus status) { - this.status = status; - } - - - public IndividualDebitCardAllOfAttributes design(String design) { - - this.design = design; - return this; - } - - /** - * Get design - * @return design - **/ - @javax.annotation.Nullable - public String getDesign() { - return design; - } - - - public void setDesign(String design) { - this.design = design; - } - - - public IndividualDebitCardAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public IndividualDebitCardAllOfAttributes freezeReason(String freezeReason) { - - this.freezeReason = freezeReason; - return this; - } - - /** - * Get freezeReason - * @return freezeReason - **/ - @javax.annotation.Nullable - public String getFreezeReason() { - return freezeReason; - } - - - public void setFreezeReason(String freezeReason) { - this.freezeReason = freezeReason; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IndividualDebitCardAllOfAttributes individualDebitCardAllOfAttributes = (IndividualDebitCardAllOfAttributes) o; - return Objects.equals(this.createdAt, individualDebitCardAllOfAttributes.createdAt) && - Objects.equals(this.updatedAt, individualDebitCardAllOfAttributes.updatedAt) && - Objects.equals(this.last4Digits, individualDebitCardAllOfAttributes.last4Digits) && - Objects.equals(this.expirationDate, individualDebitCardAllOfAttributes.expirationDate) && - Objects.equals(this.shippingAddress, individualDebitCardAllOfAttributes.shippingAddress) && - Objects.equals(this.bin, individualDebitCardAllOfAttributes.bin) && - Objects.equals(this.status, individualDebitCardAllOfAttributes.status) && - Objects.equals(this.design, individualDebitCardAllOfAttributes.design) && - Objects.equals(this.tags, individualDebitCardAllOfAttributes.tags) && - Objects.equals(this.freezeReason, individualDebitCardAllOfAttributes.freezeReason); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, updatedAt, last4Digits, expirationDate, shippingAddress, bin, status, design, tags, freezeReason); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IndividualDebitCardAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" last4Digits: ").append(toIndentedString(last4Digits)).append("\n"); - sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); - sb.append(" shippingAddress: ").append(toIndentedString(shippingAddress)).append("\n"); - sb.append(" bin: ").append(toIndentedString(bin)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" design: ").append(toIndentedString(design)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" freezeReason: ").append(toIndentedString(freezeReason)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("last4Digits"); - openapiFields.add("expirationDate"); - openapiFields.add("shippingAddress"); - openapiFields.add("bin"); - openapiFields.add("status"); - openapiFields.add("design"); - openapiFields.add("tags"); - openapiFields.add("freezeReason"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("last4Digits"); - openapiRequiredFields.add("expirationDate"); - openapiRequiredFields.add("status"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IndividualDebitCardAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IndividualDebitCardAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IndividualDebitCardAllOfAttributes is not found in the empty JSON string", IndividualDebitCardAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!IndividualDebitCardAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IndividualDebitCardAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : IndividualDebitCardAllOfAttributes.openapiRequiredFields) { - 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("last4Digits").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last4Digits` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last4Digits").toString())); - } - if (!jsonObj.get("expirationDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `expirationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expirationDate").toString())); - } - // validate the optional field `shippingAddress` - if (jsonObj.get("shippingAddress") != null && !jsonObj.get("shippingAddress").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("shippingAddress")); - } - if ((jsonObj.get("bin") != null && !jsonObj.get("bin").isJsonNull()) && !jsonObj.get("bin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bin").toString())); - } - if ((jsonObj.get("design") != null && !jsonObj.get("design").isJsonNull()) && !jsonObj.get("design").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `design` to be a primitive type in the JSON string but got `%s`", jsonObj.get("design").toString())); - } - if ((jsonObj.get("freezeReason") != null && !jsonObj.get("freezeReason").isJsonNull()) && !jsonObj.get("freezeReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `freezeReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("freezeReason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IndividualDebitCardAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IndividualDebitCardAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IndividualDebitCardAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IndividualDebitCardAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public IndividualDebitCardAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IndividualDebitCardAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of IndividualDebitCardAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to IndividualDebitCardAllOfAttributes - */ - public static IndividualDebitCardAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IndividualDebitCardAllOfAttributes.class); - } - - /** - * Convert an instance of IndividualDebitCardAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/IndividualVirtualDebitCard.java b/src/main/java/org/openapitools/client/model/IndividualVirtualDebitCard.java deleted file mode 100644 index 9d0f9430..00000000 --- a/src/main/java/org/openapitools/client/model/IndividualVirtualDebitCard.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Card; -import org.openapitools.client.model.CardRelationships; -import org.openapitools.client.model.IndividualVirtualDebitCardAllOfAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * IndividualVirtualDebitCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IndividualVirtualDebitCard extends Card { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private IndividualVirtualDebitCardAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CardRelationships relationships; - - public IndividualVirtualDebitCard() { - this.type = this.getClass().getSimpleName(); - } - - public IndividualVirtualDebitCard attributes(IndividualVirtualDebitCardAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public IndividualVirtualDebitCardAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(IndividualVirtualDebitCardAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public IndividualVirtualDebitCard relationships(CardRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public CardRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CardRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IndividualVirtualDebitCard individualVirtualDebitCard = (IndividualVirtualDebitCard) o; - return Objects.equals(this.attributes, individualVirtualDebitCard.attributes) && - Objects.equals(this.relationships, individualVirtualDebitCard.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IndividualVirtualDebitCard {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IndividualVirtualDebitCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IndividualVirtualDebitCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IndividualVirtualDebitCard is not found in the empty JSON string", IndividualVirtualDebitCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!IndividualVirtualDebitCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IndividualVirtualDebitCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : IndividualVirtualDebitCard.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IndividualVirtualDebitCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IndividualVirtualDebitCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IndividualVirtualDebitCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IndividualVirtualDebitCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public IndividualVirtualDebitCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IndividualVirtualDebitCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of IndividualVirtualDebitCard - * @throws IOException if the JSON string is invalid with respect to IndividualVirtualDebitCard - */ - public static IndividualVirtualDebitCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IndividualVirtualDebitCard.class); - } - - /** - * Convert an instance of IndividualVirtualDebitCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/IndividualVirtualDebitCardAllOfAttributes.java b/src/main/java/org/openapitools/client/model/IndividualVirtualDebitCardAllOfAttributes.java deleted file mode 100644 index 746ef89e..00000000 --- a/src/main/java/org/openapitools/client/model/IndividualVirtualDebitCardAllOfAttributes.java +++ /dev/null @@ -1,426 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.VirtualCardStatus; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * IndividualVirtualDebitCardAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IndividualVirtualDebitCardAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_LAST4_DIGITS = "last4Digits"; - @SerializedName(SERIALIZED_NAME_LAST4_DIGITS) - private String last4Digits; - - public static final String SERIALIZED_NAME_EXPIRATION_DATE = "expirationDate"; - @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE) - private String expirationDate; - - public static final String SERIALIZED_NAME_BIN = "bin"; - @SerializedName(SERIALIZED_NAME_BIN) - private String bin; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private VirtualCardStatus status; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_FREEZE_REASON = "freezeReason"; - @SerializedName(SERIALIZED_NAME_FREEZE_REASON) - private String freezeReason; - - public IndividualVirtualDebitCardAllOfAttributes() { - } - - public IndividualVirtualDebitCardAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public IndividualVirtualDebitCardAllOfAttributes updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public IndividualVirtualDebitCardAllOfAttributes last4Digits(String last4Digits) { - - this.last4Digits = last4Digits; - return this; - } - - /** - * Get last4Digits - * @return last4Digits - **/ - @javax.annotation.Nonnull - public String getLast4Digits() { - return last4Digits; - } - - - public void setLast4Digits(String last4Digits) { - this.last4Digits = last4Digits; - } - - - public IndividualVirtualDebitCardAllOfAttributes expirationDate(String expirationDate) { - - this.expirationDate = expirationDate; - return this; - } - - /** - * Get expirationDate - * @return expirationDate - **/ - @javax.annotation.Nonnull - public String getExpirationDate() { - return expirationDate; - } - - - public void setExpirationDate(String expirationDate) { - this.expirationDate = expirationDate; - } - - - public IndividualVirtualDebitCardAllOfAttributes bin(String bin) { - - this.bin = bin; - return this; - } - - /** - * Get bin - * @return bin - **/ - @javax.annotation.Nullable - public String getBin() { - return bin; - } - - - public void setBin(String bin) { - this.bin = bin; - } - - - public IndividualVirtualDebitCardAllOfAttributes status(VirtualCardStatus status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public VirtualCardStatus getStatus() { - return status; - } - - - public void setStatus(VirtualCardStatus status) { - this.status = status; - } - - - public IndividualVirtualDebitCardAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public IndividualVirtualDebitCardAllOfAttributes freezeReason(String freezeReason) { - - this.freezeReason = freezeReason; - return this; - } - - /** - * Get freezeReason - * @return freezeReason - **/ - @javax.annotation.Nullable - public String getFreezeReason() { - return freezeReason; - } - - - public void setFreezeReason(String freezeReason) { - this.freezeReason = freezeReason; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IndividualVirtualDebitCardAllOfAttributes individualVirtualDebitCardAllOfAttributes = (IndividualVirtualDebitCardAllOfAttributes) o; - return Objects.equals(this.createdAt, individualVirtualDebitCardAllOfAttributes.createdAt) && - Objects.equals(this.updatedAt, individualVirtualDebitCardAllOfAttributes.updatedAt) && - Objects.equals(this.last4Digits, individualVirtualDebitCardAllOfAttributes.last4Digits) && - Objects.equals(this.expirationDate, individualVirtualDebitCardAllOfAttributes.expirationDate) && - Objects.equals(this.bin, individualVirtualDebitCardAllOfAttributes.bin) && - Objects.equals(this.status, individualVirtualDebitCardAllOfAttributes.status) && - Objects.equals(this.tags, individualVirtualDebitCardAllOfAttributes.tags) && - Objects.equals(this.freezeReason, individualVirtualDebitCardAllOfAttributes.freezeReason); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, updatedAt, last4Digits, expirationDate, bin, status, tags, freezeReason); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IndividualVirtualDebitCardAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" last4Digits: ").append(toIndentedString(last4Digits)).append("\n"); - sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); - sb.append(" bin: ").append(toIndentedString(bin)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" freezeReason: ").append(toIndentedString(freezeReason)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("last4Digits"); - openapiFields.add("expirationDate"); - openapiFields.add("bin"); - openapiFields.add("status"); - openapiFields.add("tags"); - openapiFields.add("freezeReason"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("last4Digits"); - openapiRequiredFields.add("expirationDate"); - openapiRequiredFields.add("status"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IndividualVirtualDebitCardAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IndividualVirtualDebitCardAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IndividualVirtualDebitCardAllOfAttributes is not found in the empty JSON string", IndividualVirtualDebitCardAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!IndividualVirtualDebitCardAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IndividualVirtualDebitCardAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : IndividualVirtualDebitCardAllOfAttributes.openapiRequiredFields) { - 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("last4Digits").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last4Digits` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last4Digits").toString())); - } - if (!jsonObj.get("expirationDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `expirationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expirationDate").toString())); - } - if ((jsonObj.get("bin") != null && !jsonObj.get("bin").isJsonNull()) && !jsonObj.get("bin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bin").toString())); - } - if ((jsonObj.get("freezeReason") != null && !jsonObj.get("freezeReason").isJsonNull()) && !jsonObj.get("freezeReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `freezeReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("freezeReason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IndividualVirtualDebitCardAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IndividualVirtualDebitCardAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IndividualVirtualDebitCardAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IndividualVirtualDebitCardAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public IndividualVirtualDebitCardAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IndividualVirtualDebitCardAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of IndividualVirtualDebitCardAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to IndividualVirtualDebitCardAllOfAttributes - */ - public static IndividualVirtualDebitCardAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IndividualVirtualDebitCardAllOfAttributes.class); - } - - /** - * Convert an instance of IndividualVirtualDebitCardAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Industry.java b/src/main/java/org/openapitools/client/model/Industry.java deleted file mode 100644 index 4b427bb2..00000000 --- a/src/main/java/org/openapitools/client/model/Industry.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets industry - */ -@JsonAdapter(Industry.Adapter.class) -public enum Industry { - - RETAIL("Retail"), - - WHOLESALE("Wholesale"), - - RESTAURANTS("Restaurants"), - - HOSPITALS("Hospitals"), - - CONSTRUCTION("Construction"), - - INSURANCE("Insurance"), - - UNIONS("Unions"), - - REALESTATE("RealEstate"), - - FREELANCEPROFESSIONAL("FreelanceProfessional"), - - OTHERPROFESSIONALSERVICES("OtherProfessionalServices"), - - ONLINERETAILER("OnlineRetailer"), - - OTHEREDUCATIONSERVICES("OtherEducationServices"); - - private String value; - - Industry(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static Industry fromValue(String value) { - for (Industry b : Industry.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final Industry enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public Industry read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return Industry.fromValue(value); - } - } -} - diff --git a/src/main/java/org/openapitools/client/model/Institution.java b/src/main/java/org/openapitools/client/model/Institution.java deleted file mode 100644 index 74fb24ed..00000000 --- a/src/main/java/org/openapitools/client/model/Institution.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.InstitutionAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Institution - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Institution { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "institution"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private InstitutionAttributes attributes; - - public Institution() { - } - - public Institution type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public Institution attributes(InstitutionAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public InstitutionAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(InstitutionAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Institution institution = (Institution) o; - return Objects.equals(this.type, institution.type) && - Objects.equals(this.attributes, institution.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Institution {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Institution - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Institution.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Institution is not found in the empty JSON string", Institution.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Institution.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Institution` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Institution.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - InstitutionAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Institution.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Institution' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Institution.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Institution value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Institution read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Institution given an JSON string - * - * @param jsonString JSON string - * @return An instance of Institution - * @throws IOException if the JSON string is invalid with respect to Institution - */ - public static Institution fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Institution.class); - } - - /** - * Convert an instance of Institution to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/InstitutionAttributes.java b/src/main/java/org/openapitools/client/model/InstitutionAttributes.java deleted file mode 100644 index 0856fd5f..00000000 --- a/src/main/java/org/openapitools/client/model/InstitutionAttributes.java +++ /dev/null @@ -1,337 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * InstitutionAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InstitutionAttributes { - public static final String SERIALIZED_NAME_ROUTING_NUMBER = "routingNumber"; - @SerializedName(SERIALIZED_NAME_ROUTING_NUMBER) - private String routingNumber; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_IS_WIRE_SUPPORTED = "isWireSupported"; - @SerializedName(SERIALIZED_NAME_IS_WIRE_SUPPORTED) - private Boolean isWireSupported; - - public static final String SERIALIZED_NAME_IS_A_C_H_SUPPORTED = "isACHSupported"; - @SerializedName(SERIALIZED_NAME_IS_A_C_H_SUPPORTED) - private Boolean isACHSupported; - - public InstitutionAttributes() { - } - - public InstitutionAttributes routingNumber(String routingNumber) { - - this.routingNumber = routingNumber; - return this; - } - - /** - * Get routingNumber - * @return routingNumber - **/ - @javax.annotation.Nonnull - public String getRoutingNumber() { - return routingNumber; - } - - - public void setRoutingNumber(String routingNumber) { - this.routingNumber = routingNumber; - } - - - public InstitutionAttributes name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public InstitutionAttributes address(String address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - - public void setAddress(String address) { - this.address = address; - } - - - public InstitutionAttributes isWireSupported(Boolean isWireSupported) { - - this.isWireSupported = isWireSupported; - return this; - } - - /** - * Get isWireSupported - * @return isWireSupported - **/ - @javax.annotation.Nonnull - public Boolean getIsWireSupported() { - return isWireSupported; - } - - - public void setIsWireSupported(Boolean isWireSupported) { - this.isWireSupported = isWireSupported; - } - - - public InstitutionAttributes isACHSupported(Boolean isACHSupported) { - - this.isACHSupported = isACHSupported; - return this; - } - - /** - * Get isACHSupported - * @return isACHSupported - **/ - @javax.annotation.Nonnull - public Boolean getIsACHSupported() { - return isACHSupported; - } - - - public void setIsACHSupported(Boolean isACHSupported) { - this.isACHSupported = isACHSupported; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InstitutionAttributes institutionAttributes = (InstitutionAttributes) o; - return Objects.equals(this.routingNumber, institutionAttributes.routingNumber) && - Objects.equals(this.name, institutionAttributes.name) && - Objects.equals(this.address, institutionAttributes.address) && - Objects.equals(this.isWireSupported, institutionAttributes.isWireSupported) && - Objects.equals(this.isACHSupported, institutionAttributes.isACHSupported); - } - - @Override - public int hashCode() { - return Objects.hash(routingNumber, name, address, isWireSupported, isACHSupported); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InstitutionAttributes {\n"); - sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" isWireSupported: ").append(toIndentedString(isWireSupported)).append("\n"); - sb.append(" isACHSupported: ").append(toIndentedString(isACHSupported)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("routingNumber"); - openapiFields.add("name"); - openapiFields.add("address"); - openapiFields.add("isWireSupported"); - openapiFields.add("isACHSupported"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("routingNumber"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("isWireSupported"); - openapiRequiredFields.add("isACHSupported"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to InstitutionAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!InstitutionAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InstitutionAttributes is not found in the empty JSON string", InstitutionAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!InstitutionAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InstitutionAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : InstitutionAttributes.openapiRequiredFields) { - 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("routingNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `routingNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("routingNumber").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InstitutionAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InstitutionAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(InstitutionAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, InstitutionAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public InstitutionAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of InstitutionAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of InstitutionAttributes - * @throws IOException if the JSON string is invalid with respect to InstitutionAttributes - */ - public static InstitutionAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InstitutionAttributes.class); - } - - /** - * Convert an instance of InstitutionAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/InterchangeTransaction.java b/src/main/java/org/openapitools/client/model/InterchangeTransaction.java deleted file mode 100644 index a390ad2d..00000000 --- a/src/main/java/org/openapitools/client/model/InterchangeTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.FeeTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * InterchangeTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InterchangeTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private FeeTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public InterchangeTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public InterchangeTransaction attributes(FeeTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public FeeTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(FeeTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public InterchangeTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InterchangeTransaction interchangeTransaction = (InterchangeTransaction) o; - return Objects.equals(this.attributes, interchangeTransaction.attributes) && - Objects.equals(this.relationships, interchangeTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InterchangeTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to InterchangeTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!InterchangeTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InterchangeTransaction is not found in the empty JSON string", InterchangeTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!InterchangeTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InterchangeTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : InterchangeTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InterchangeTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InterchangeTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(InterchangeTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, InterchangeTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public InterchangeTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of InterchangeTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of InterchangeTransaction - * @throws IOException if the JSON string is invalid with respect to InterchangeTransaction - */ - public static InterchangeTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InterchangeTransaction.class); - } - - /** - * Convert an instance of InterchangeTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/InterestShareTransaction.java b/src/main/java/org/openapitools/client/model/InterestShareTransaction.java deleted file mode 100644 index f16ef7d8..00000000 --- a/src/main/java/org/openapitools/client/model/InterestShareTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.FeeTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * InterestShareTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InterestShareTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private FeeTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public InterestShareTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public InterestShareTransaction attributes(FeeTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public FeeTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(FeeTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public InterestShareTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InterestShareTransaction interestShareTransaction = (InterestShareTransaction) o; - return Objects.equals(this.attributes, interestShareTransaction.attributes) && - Objects.equals(this.relationships, interestShareTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InterestShareTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to InterestShareTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!InterestShareTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InterestShareTransaction is not found in the empty JSON string", InterestShareTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!InterestShareTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InterestShareTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : InterestShareTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InterestShareTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InterestShareTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(InterestShareTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, InterestShareTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public InterestShareTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of InterestShareTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of InterestShareTransaction - * @throws IOException if the JSON string is invalid with respect to InterestShareTransaction - */ - public static InterestShareTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InterestShareTransaction.class); - } - - /** - * Convert an instance of InterestShareTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/InterestTransaction.java b/src/main/java/org/openapitools/client/model/InterestTransaction.java deleted file mode 100644 index 3c98608b..00000000 --- a/src/main/java/org/openapitools/client/model/InterestTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.FeeTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * InterestTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InterestTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private FeeTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public InterestTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public InterestTransaction attributes(FeeTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public FeeTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(FeeTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public InterestTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InterestTransaction interestTransaction = (InterestTransaction) o; - return Objects.equals(this.attributes, interestTransaction.attributes) && - Objects.equals(this.relationships, interestTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InterestTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to InterestTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!InterestTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InterestTransaction is not found in the empty JSON string", InterestTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!InterestTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InterestTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : InterestTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InterestTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InterestTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(InterestTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, InterestTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public InterestTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of InterestTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of InterestTransaction - * @throws IOException if the JSON string is invalid with respect to InterestTransaction - */ - public static InterestTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InterestTransaction.class); - } - - /** - * Convert an instance of InterestTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Limits.java b/src/main/java/org/openapitools/client/model/Limits.java deleted file mode 100644 index 51f68414..00000000 --- a/src/main/java/org/openapitools/client/model/Limits.java +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.LimitsAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Limits - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Limits { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private LimitsAttributes attributes; - - public Limits() { - } - - public Limits type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public Limits id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public Limits attributes(LimitsAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public LimitsAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(LimitsAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Limits limits = (Limits) o; - return Objects.equals(this.type, limits.type) && - Objects.equals(this.id, limits.id) && - Objects.equals(this.attributes, limits.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Limits {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Limits - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Limits.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Limits is not found in the empty JSON string", Limits.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Limits.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Limits` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - 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())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - LimitsAttributes.validateJsonElement(jsonObj.get("attributes")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Limits.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Limits' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Limits.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Limits value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Limits read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Limits given an JSON string - * - * @param jsonString JSON string - * @return An instance of Limits - * @throws IOException if the JSON string is invalid with respect to Limits - */ - public static Limits fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Limits.class); - } - - /** - * Convert an instance of Limits to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Limits1.java b/src/main/java/org/openapitools/client/model/Limits1.java deleted file mode 100644 index 3c8fa685..00000000 --- a/src/main/java/org/openapitools/client/model/Limits1.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Limits1 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Limits1 { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - protected String type; - - public Limits1() { - this.type = this.getClass().getSimpleName(); - } - - public Limits1 type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Limits1 limits1 = (Limits1) o; - return Objects.equals(this.type, limits1.type); - } - - @Override - public int hashCode() { - return Objects.hash(type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Limits1 {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Limits1 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Limits1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Limits1 is not found in the empty JSON string", Limits1.openapiRequiredFields.toString())); - } - } - - String discriminatorValue = jsonElement.getAsJsonObject().get("type").getAsString(); - switch (discriminatorValue) { - case "creditLimits": - CreditLimits.validateJsonElement(jsonElement); - break; - case "limits": - DepositLimits.validateJsonElement(jsonElement); - break; - default: - throw new IllegalArgumentException(String.format("The value of the `type` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); - } - } - - - /** - * Create an instance of Limits1 given an JSON string - * - * @param jsonString JSON string - * @return An instance of Limits1 - * @throws IOException if the JSON string is invalid with respect to Limits1 - */ - public static Limits1 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Limits1.class); - } - - /** - * Convert an instance of Limits1 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/LimitsAttributes.java b/src/main/java/org/openapitools/client/model/LimitsAttributes.java deleted file mode 100644 index 7a21fc06..00000000 --- a/src/main/java/org/openapitools/client/model/LimitsAttributes.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.LimitsAttributesCard; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * LimitsAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LimitsAttributes { - public static final String SERIALIZED_NAME_CARD = "card"; - @SerializedName(SERIALIZED_NAME_CARD) - private LimitsAttributesCard card; - - public LimitsAttributes() { - } - - public LimitsAttributes card(LimitsAttributesCard card) { - - this.card = card; - return this; - } - - /** - * Get card - * @return card - **/ - @javax.annotation.Nullable - public LimitsAttributesCard getCard() { - return card; - } - - - public void setCard(LimitsAttributesCard card) { - this.card = card; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LimitsAttributes limitsAttributes = (LimitsAttributes) o; - return Objects.equals(this.card, limitsAttributes.card); - } - - @Override - public int hashCode() { - return Objects.hash(card); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LimitsAttributes {\n"); - sb.append(" card: ").append(toIndentedString(card)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("card"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LimitsAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LimitsAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LimitsAttributes is not found in the empty JSON string", LimitsAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!LimitsAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LimitsAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `card` - if (jsonObj.get("card") != null && !jsonObj.get("card").isJsonNull()) { - LimitsAttributesCard.validateJsonElement(jsonObj.get("card")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LimitsAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LimitsAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LimitsAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, LimitsAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LimitsAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of LimitsAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of LimitsAttributes - * @throws IOException if the JSON string is invalid with respect to LimitsAttributes - */ - public static LimitsAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LimitsAttributes.class); - } - - /** - * Convert an instance of LimitsAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/LimitsAttributesCard.java b/src/main/java/org/openapitools/client/model/LimitsAttributesCard.java deleted file mode 100644 index eb6cf3f8..00000000 --- a/src/main/java/org/openapitools/client/model/LimitsAttributesCard.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.LimitsAttributesCardLimits; -import org.openapitools.client.model.LimitsAttributesCardTotalsDaily; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * LimitsAttributesCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LimitsAttributesCard { - public static final String SERIALIZED_NAME_LIMITS = "limits"; - @SerializedName(SERIALIZED_NAME_LIMITS) - private LimitsAttributesCardLimits limits; - - public static final String SERIALIZED_NAME_TOTALS_DAILY = "totalsDaily"; - @SerializedName(SERIALIZED_NAME_TOTALS_DAILY) - private LimitsAttributesCardTotalsDaily totalsDaily; - - public LimitsAttributesCard() { - } - - public LimitsAttributesCard limits(LimitsAttributesCardLimits limits) { - - this.limits = limits; - return this; - } - - /** - * Get limits - * @return limits - **/ - @javax.annotation.Nullable - public LimitsAttributesCardLimits getLimits() { - return limits; - } - - - public void setLimits(LimitsAttributesCardLimits limits) { - this.limits = limits; - } - - - public LimitsAttributesCard totalsDaily(LimitsAttributesCardTotalsDaily totalsDaily) { - - this.totalsDaily = totalsDaily; - return this; - } - - /** - * Get totalsDaily - * @return totalsDaily - **/ - @javax.annotation.Nullable - public LimitsAttributesCardTotalsDaily getTotalsDaily() { - return totalsDaily; - } - - - public void setTotalsDaily(LimitsAttributesCardTotalsDaily totalsDaily) { - this.totalsDaily = totalsDaily; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LimitsAttributesCard limitsAttributesCard = (LimitsAttributesCard) o; - return Objects.equals(this.limits, limitsAttributesCard.limits) && - Objects.equals(this.totalsDaily, limitsAttributesCard.totalsDaily); - } - - @Override - public int hashCode() { - return Objects.hash(limits, totalsDaily); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LimitsAttributesCard {\n"); - sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); - sb.append(" totalsDaily: ").append(toIndentedString(totalsDaily)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("limits"); - openapiFields.add("totalsDaily"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LimitsAttributesCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LimitsAttributesCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LimitsAttributesCard is not found in the empty JSON string", LimitsAttributesCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!LimitsAttributesCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LimitsAttributesCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `limits` - if (jsonObj.get("limits") != null && !jsonObj.get("limits").isJsonNull()) { - LimitsAttributesCardLimits.validateJsonElement(jsonObj.get("limits")); - } - // validate the optional field `totalsDaily` - if (jsonObj.get("totalsDaily") != null && !jsonObj.get("totalsDaily").isJsonNull()) { - LimitsAttributesCardTotalsDaily.validateJsonElement(jsonObj.get("totalsDaily")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LimitsAttributesCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LimitsAttributesCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LimitsAttributesCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, LimitsAttributesCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LimitsAttributesCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of LimitsAttributesCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of LimitsAttributesCard - * @throws IOException if the JSON string is invalid with respect to LimitsAttributesCard - */ - public static LimitsAttributesCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LimitsAttributesCard.class); - } - - /** - * Convert an instance of LimitsAttributesCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/LimitsAttributesCardLimits.java b/src/main/java/org/openapitools/client/model/LimitsAttributesCardLimits.java deleted file mode 100644 index d42cbf61..00000000 --- a/src/main/java/org/openapitools/client/model/LimitsAttributesCardLimits.java +++ /dev/null @@ -1,290 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.math.BigDecimal; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * LimitsAttributesCardLimits - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LimitsAttributesCardLimits { - public static final String SERIALIZED_NAME_DAILY_WITHDRAWAL = "dailyWithdrawal"; - @SerializedName(SERIALIZED_NAME_DAILY_WITHDRAWAL) - private BigDecimal dailyWithdrawal; - - public static final String SERIALIZED_NAME_DAILY_DEPOSIT = "dailyDeposit"; - @SerializedName(SERIALIZED_NAME_DAILY_DEPOSIT) - private BigDecimal dailyDeposit; - - public static final String SERIALIZED_NAME_DAILY_PURCHASE = "dailyPurchase"; - @SerializedName(SERIALIZED_NAME_DAILY_PURCHASE) - private BigDecimal dailyPurchase; - - public static final String SERIALIZED_NAME_DAILY_CARD_TRANSACTION = "dailyCardTransaction"; - @SerializedName(SERIALIZED_NAME_DAILY_CARD_TRANSACTION) - private BigDecimal dailyCardTransaction; - - public LimitsAttributesCardLimits() { - } - - public LimitsAttributesCardLimits dailyWithdrawal(BigDecimal dailyWithdrawal) { - - this.dailyWithdrawal = dailyWithdrawal; - return this; - } - - /** - * Get dailyWithdrawal - * @return dailyWithdrawal - **/ - @javax.annotation.Nullable - public BigDecimal getDailyWithdrawal() { - return dailyWithdrawal; - } - - - public void setDailyWithdrawal(BigDecimal dailyWithdrawal) { - this.dailyWithdrawal = dailyWithdrawal; - } - - - public LimitsAttributesCardLimits dailyDeposit(BigDecimal dailyDeposit) { - - this.dailyDeposit = dailyDeposit; - return this; - } - - /** - * Get dailyDeposit - * @return dailyDeposit - **/ - @javax.annotation.Nullable - public BigDecimal getDailyDeposit() { - return dailyDeposit; - } - - - public void setDailyDeposit(BigDecimal dailyDeposit) { - this.dailyDeposit = dailyDeposit; - } - - - public LimitsAttributesCardLimits dailyPurchase(BigDecimal dailyPurchase) { - - this.dailyPurchase = dailyPurchase; - return this; - } - - /** - * Get dailyPurchase - * @return dailyPurchase - **/ - @javax.annotation.Nullable - public BigDecimal getDailyPurchase() { - return dailyPurchase; - } - - - public void setDailyPurchase(BigDecimal dailyPurchase) { - this.dailyPurchase = dailyPurchase; - } - - - public LimitsAttributesCardLimits dailyCardTransaction(BigDecimal dailyCardTransaction) { - - this.dailyCardTransaction = dailyCardTransaction; - return this; - } - - /** - * Get dailyCardTransaction - * @return dailyCardTransaction - **/ - @javax.annotation.Nullable - public BigDecimal getDailyCardTransaction() { - return dailyCardTransaction; - } - - - public void setDailyCardTransaction(BigDecimal dailyCardTransaction) { - this.dailyCardTransaction = dailyCardTransaction; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LimitsAttributesCardLimits limitsAttributesCardLimits = (LimitsAttributesCardLimits) o; - return Objects.equals(this.dailyWithdrawal, limitsAttributesCardLimits.dailyWithdrawal) && - Objects.equals(this.dailyDeposit, limitsAttributesCardLimits.dailyDeposit) && - Objects.equals(this.dailyPurchase, limitsAttributesCardLimits.dailyPurchase) && - Objects.equals(this.dailyCardTransaction, limitsAttributesCardLimits.dailyCardTransaction); - } - - @Override - public int hashCode() { - return Objects.hash(dailyWithdrawal, dailyDeposit, dailyPurchase, dailyCardTransaction); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LimitsAttributesCardLimits {\n"); - sb.append(" dailyWithdrawal: ").append(toIndentedString(dailyWithdrawal)).append("\n"); - sb.append(" dailyDeposit: ").append(toIndentedString(dailyDeposit)).append("\n"); - sb.append(" dailyPurchase: ").append(toIndentedString(dailyPurchase)).append("\n"); - sb.append(" dailyCardTransaction: ").append(toIndentedString(dailyCardTransaction)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("dailyWithdrawal"); - openapiFields.add("dailyDeposit"); - openapiFields.add("dailyPurchase"); - openapiFields.add("dailyCardTransaction"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LimitsAttributesCardLimits - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LimitsAttributesCardLimits.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LimitsAttributesCardLimits is not found in the empty JSON string", LimitsAttributesCardLimits.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!LimitsAttributesCardLimits.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LimitsAttributesCardLimits` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LimitsAttributesCardLimits.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LimitsAttributesCardLimits' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LimitsAttributesCardLimits.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, LimitsAttributesCardLimits value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LimitsAttributesCardLimits read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of LimitsAttributesCardLimits given an JSON string - * - * @param jsonString JSON string - * @return An instance of LimitsAttributesCardLimits - * @throws IOException if the JSON string is invalid with respect to LimitsAttributesCardLimits - */ - public static LimitsAttributesCardLimits fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LimitsAttributesCardLimits.class); - } - - /** - * Convert an instance of LimitsAttributesCardLimits to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/LimitsAttributesCardTotalsDaily.java b/src/main/java/org/openapitools/client/model/LimitsAttributesCardTotalsDaily.java deleted file mode 100644 index 62e1ed24..00000000 --- a/src/main/java/org/openapitools/client/model/LimitsAttributesCardTotalsDaily.java +++ /dev/null @@ -1,290 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.math.BigDecimal; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * LimitsAttributesCardTotalsDaily - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LimitsAttributesCardTotalsDaily { - public static final String SERIALIZED_NAME_WITHDRAWAL = "withdrawal"; - @SerializedName(SERIALIZED_NAME_WITHDRAWAL) - private BigDecimal withdrawal; - - public static final String SERIALIZED_NAME_DEPOSIT = "deposit"; - @SerializedName(SERIALIZED_NAME_DEPOSIT) - private BigDecimal deposit; - - public static final String SERIALIZED_NAME_PURCHASE = "purchase"; - @SerializedName(SERIALIZED_NAME_PURCHASE) - private BigDecimal purchase; - - public static final String SERIALIZED_NAME_CARD_TRANSACTION = "cardTransaction"; - @SerializedName(SERIALIZED_NAME_CARD_TRANSACTION) - private BigDecimal cardTransaction; - - public LimitsAttributesCardTotalsDaily() { - } - - public LimitsAttributesCardTotalsDaily withdrawal(BigDecimal withdrawal) { - - this.withdrawal = withdrawal; - return this; - } - - /** - * Get withdrawal - * @return withdrawal - **/ - @javax.annotation.Nullable - public BigDecimal getWithdrawal() { - return withdrawal; - } - - - public void setWithdrawal(BigDecimal withdrawal) { - this.withdrawal = withdrawal; - } - - - public LimitsAttributesCardTotalsDaily deposit(BigDecimal deposit) { - - this.deposit = deposit; - return this; - } - - /** - * Get deposit - * @return deposit - **/ - @javax.annotation.Nullable - public BigDecimal getDeposit() { - return deposit; - } - - - public void setDeposit(BigDecimal deposit) { - this.deposit = deposit; - } - - - public LimitsAttributesCardTotalsDaily purchase(BigDecimal purchase) { - - this.purchase = purchase; - return this; - } - - /** - * Get purchase - * @return purchase - **/ - @javax.annotation.Nullable - public BigDecimal getPurchase() { - return purchase; - } - - - public void setPurchase(BigDecimal purchase) { - this.purchase = purchase; - } - - - public LimitsAttributesCardTotalsDaily cardTransaction(BigDecimal cardTransaction) { - - this.cardTransaction = cardTransaction; - return this; - } - - /** - * Get cardTransaction - * @return cardTransaction - **/ - @javax.annotation.Nullable - public BigDecimal getCardTransaction() { - return cardTransaction; - } - - - public void setCardTransaction(BigDecimal cardTransaction) { - this.cardTransaction = cardTransaction; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LimitsAttributesCardTotalsDaily limitsAttributesCardTotalsDaily = (LimitsAttributesCardTotalsDaily) o; - return Objects.equals(this.withdrawal, limitsAttributesCardTotalsDaily.withdrawal) && - Objects.equals(this.deposit, limitsAttributesCardTotalsDaily.deposit) && - Objects.equals(this.purchase, limitsAttributesCardTotalsDaily.purchase) && - Objects.equals(this.cardTransaction, limitsAttributesCardTotalsDaily.cardTransaction); - } - - @Override - public int hashCode() { - return Objects.hash(withdrawal, deposit, purchase, cardTransaction); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LimitsAttributesCardTotalsDaily {\n"); - sb.append(" withdrawal: ").append(toIndentedString(withdrawal)).append("\n"); - sb.append(" deposit: ").append(toIndentedString(deposit)).append("\n"); - sb.append(" purchase: ").append(toIndentedString(purchase)).append("\n"); - sb.append(" cardTransaction: ").append(toIndentedString(cardTransaction)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("withdrawal"); - openapiFields.add("deposit"); - openapiFields.add("purchase"); - openapiFields.add("cardTransaction"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LimitsAttributesCardTotalsDaily - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LimitsAttributesCardTotalsDaily.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LimitsAttributesCardTotalsDaily is not found in the empty JSON string", LimitsAttributesCardTotalsDaily.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!LimitsAttributesCardTotalsDaily.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LimitsAttributesCardTotalsDaily` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LimitsAttributesCardTotalsDaily.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LimitsAttributesCardTotalsDaily' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LimitsAttributesCardTotalsDaily.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, LimitsAttributesCardTotalsDaily value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LimitsAttributesCardTotalsDaily read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of LimitsAttributesCardTotalsDaily given an JSON string - * - * @param jsonString JSON string - * @return An instance of LimitsAttributesCardTotalsDaily - * @throws IOException if the JSON string is invalid with respect to LimitsAttributesCardTotalsDaily - */ - public static LimitsAttributesCardTotalsDaily fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LimitsAttributesCardTotalsDaily.class); - } - - /** - * Convert an instance of LimitsAttributesCardTotalsDaily to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ListPageParametersObject.java b/src/main/java/org/openapitools/client/model/ListPageParametersObject.java deleted file mode 100644 index a30205fa..00000000 --- a/src/main/java/org/openapitools/client/model/ListPageParametersObject.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.*; - -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 com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; - -import org.openapitools.client.JSON; -import org.openapitools.client.Pair; - -/** - * ListPageParametersObject - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ListPageParametersObject { - public static final String SERIALIZED_NAME_LIMIT = "limit"; - @SerializedName(SERIALIZED_NAME_LIMIT) - private Integer limit = 100; - - public static final String SERIALIZED_NAME_OFFSET = "offset"; - @SerializedName(SERIALIZED_NAME_OFFSET) - private Integer offset = 0; - - public ListPageParametersObject() { - } - - public ListPageParametersObject limit(Integer limit) { - - this.limit = limit; - return this; - } - - /** - * Get limit - * maximum: 1000 - * @return limit - **/ - @javax.annotation.Nullable - public Integer getLimit() { - return limit; - } - - - public void setLimit(Integer limit) { - this.limit = limit; - } - - - public ListPageParametersObject offset(Integer offset) { - - this.offset = offset; - return this; - } - - /** - * Get offset - * @return offset - **/ - @javax.annotation.Nullable - public Integer getOffset() { - return offset; - } - - - public void setOffset(Integer offset) { - this.offset = offset; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ListPageParametersObject listPageParametersObject = (ListPageParametersObject) o; - return Objects.equals(this.limit, listPageParametersObject.limit) && - Objects.equals(this.offset, listPageParametersObject.offset); - } - - @Override - public int hashCode() { - return Objects.hash(limit, offset); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ListPageParametersObject {\n"); - sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); - sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("limit"); - openapiFields.add("offset"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ListPageParametersObject - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ListPageParametersObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ListPageParametersObject is not found in the empty JSON string", ListPageParametersObject.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ListPageParametersObject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ListPageParametersObject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ListPageParametersObject.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ListPageParametersObject' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ListPageParametersObject.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ListPageParametersObject value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ListPageParametersObject read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ListPageParametersObject given an JSON string - * - * @param jsonString JSON string - * @return An instance of ListPageParametersObject - * @throws IOException if the JSON string is invalid with respect to ListPageParametersObject - */ - public static ListPageParametersObject fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ListPageParametersObject.class); - } - - /** - * Convert an instance of ListPageParametersObject to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } - - public List toParams() { - List params = new ArrayList<>(); - - if (this.offset != null) { - params.add(new Pair("page[offset]", this.offset.toString())); - } - - if (this.limit != null) { - params.add(new Pair("page[limit]", this.limit.toString())); - } - - return params; - } -} - diff --git a/src/main/java/org/openapitools/client/model/Merchant.java b/src/main/java/org/openapitools/client/model/Merchant.java deleted file mode 100644 index 4d3afd79..00000000 --- a/src/main/java/org/openapitools/client/model/Merchant.java +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Merchant - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Merchant { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private Integer type; - - public static final String SERIALIZED_NAME_CATEGORY = "category"; - @SerializedName(SERIALIZED_NAME_CATEGORY) - private String category; - - public static final String SERIALIZED_NAME_LOCATION = "location"; - @SerializedName(SERIALIZED_NAME_LOCATION) - private String location; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public Merchant() { - } - - public Merchant name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public Merchant type(Integer type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public Integer getType() { - return type; - } - - - public void setType(Integer type) { - this.type = type; - } - - - public Merchant category(String category) { - - this.category = category; - return this; - } - - /** - * Get category - * @return category - **/ - @javax.annotation.Nonnull - public String getCategory() { - return category; - } - - - public void setCategory(String category) { - this.category = category; - } - - - public Merchant location(String location) { - - this.location = location; - return this; - } - - /** - * Get location - * @return location - **/ - @javax.annotation.Nullable - public String getLocation() { - return location; - } - - - public void setLocation(String location) { - this.location = location; - } - - - public Merchant id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Merchant merchant = (Merchant) o; - return Objects.equals(this.name, merchant.name) && - Objects.equals(this.type, merchant.type) && - Objects.equals(this.category, merchant.category) && - Objects.equals(this.location, merchant.location) && - Objects.equals(this.id, merchant.id); - } - - @Override - public int hashCode() { - return Objects.hash(name, type, category, location, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Merchant {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); - sb.append(" location: ").append(toIndentedString(location)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("type"); - openapiFields.add("category"); - openapiFields.add("location"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("category"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Merchant - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Merchant.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Merchant is not found in the empty JSON string", Merchant.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Merchant.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Merchant` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Merchant.openapiRequiredFields) { - 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("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if (!jsonObj.get("category").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); - } - if ((jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) && !jsonObj.get("location").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); - } - 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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Merchant.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Merchant' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Merchant.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Merchant value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Merchant read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Merchant given an JSON string - * - * @param jsonString JSON string - * @return An instance of Merchant - * @throws IOException if the JSON string is invalid with respect to Merchant - */ - public static Merchant fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Merchant.class); - } - - /** - * Convert an instance of Merchant to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/MonthlySchedule.java b/src/main/java/org/openapitools/client/model/MonthlySchedule.java deleted file mode 100644 index 735445d4..00000000 --- a/src/main/java/org/openapitools/client/model/MonthlySchedule.java +++ /dev/null @@ -1,467 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * MonthlySchedule - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MonthlySchedule { - public static final String SERIALIZED_NAME_START_TIME = "startTime"; - @SerializedName(SERIALIZED_NAME_START_TIME) - private LocalDate startTime; - - public static final String SERIALIZED_NAME_END_TIME = "endTime"; - @SerializedName(SERIALIZED_NAME_END_TIME) - private LocalDate endTime; - - public static final String SERIALIZED_NAME_DAY_OF_MONTH = "dayOfMonth"; - @SerializedName(SERIALIZED_NAME_DAY_OF_MONTH) - private Integer dayOfMonth; - - /** - * Gets or Sets dayOfWeek - */ - @JsonAdapter(DayOfWeekEnum.Adapter.class) - public enum DayOfWeekEnum { - SUNDAY("Sunday"), - - MONDAY("Monday"), - - TUESDAY("Tuesday"), - - WEDNESDAY("Wednesday"), - - THURSDAY("Thursday"), - - FRIDAY("Friday"), - - SATURDAY("Saturday"); - - private String value; - - DayOfWeekEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DayOfWeekEnum fromValue(String value) { - for (DayOfWeekEnum b : DayOfWeekEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DayOfWeekEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DayOfWeekEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DayOfWeekEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DAY_OF_WEEK = "dayOfWeek"; - @SerializedName(SERIALIZED_NAME_DAY_OF_WEEK) - private DayOfWeekEnum dayOfWeek; - - /** - * Gets or Sets interval - */ - @JsonAdapter(IntervalEnum.Adapter.class) - public enum IntervalEnum { - MONTHLY("Monthly"), - - WEEKLY("Weekly"); - - private String value; - - IntervalEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static IntervalEnum fromValue(String value) { - for (IntervalEnum b : IntervalEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final IntervalEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public IntervalEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return IntervalEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_INTERVAL = "interval"; - @SerializedName(SERIALIZED_NAME_INTERVAL) - private IntervalEnum interval; - - public static final String SERIALIZED_NAME_TOTAL_NUMBER_OF_PAYMENTS = "totalNumberOfPayments"; - @SerializedName(SERIALIZED_NAME_TOTAL_NUMBER_OF_PAYMENTS) - private Integer totalNumberOfPayments; - - public MonthlySchedule() { - } - - public MonthlySchedule startTime(LocalDate startTime) { - - this.startTime = startTime; - return this; - } - - /** - * Get startTime - * @return startTime - **/ - @javax.annotation.Nullable - public LocalDate getStartTime() { - return startTime; - } - - - public void setStartTime(LocalDate startTime) { - this.startTime = startTime; - } - - - public MonthlySchedule endTime(LocalDate endTime) { - - this.endTime = endTime; - return this; - } - - /** - * Get endTime - * @return endTime - **/ - @javax.annotation.Nullable - public LocalDate getEndTime() { - return endTime; - } - - - public void setEndTime(LocalDate endTime) { - this.endTime = endTime; - } - - - public MonthlySchedule dayOfMonth(Integer dayOfMonth) { - - this.dayOfMonth = dayOfMonth; - return this; - } - - /** - * Get dayOfMonth - * minimum: -5 - * maximum: 28 - * @return dayOfMonth - **/ - @javax.annotation.Nullable - public Integer getDayOfMonth() { - return dayOfMonth; - } - - - public void setDayOfMonth(Integer dayOfMonth) { - this.dayOfMonth = dayOfMonth; - } - - - public MonthlySchedule dayOfWeek(DayOfWeekEnum dayOfWeek) { - - this.dayOfWeek = dayOfWeek; - return this; - } - - /** - * Get dayOfWeek - * @return dayOfWeek - **/ - @javax.annotation.Nullable - public DayOfWeekEnum getDayOfWeek() { - return dayOfWeek; - } - - - public void setDayOfWeek(DayOfWeekEnum dayOfWeek) { - this.dayOfWeek = dayOfWeek; - } - - - public MonthlySchedule interval(IntervalEnum interval) { - - this.interval = interval; - return this; - } - - /** - * Get interval - * @return interval - **/ - @javax.annotation.Nonnull - public IntervalEnum getInterval() { - return interval; - } - - - public void setInterval(IntervalEnum interval) { - this.interval = interval; - } - - - public MonthlySchedule totalNumberOfPayments(Integer totalNumberOfPayments) { - - this.totalNumberOfPayments = totalNumberOfPayments; - return this; - } - - /** - * Get totalNumberOfPayments - * minimum: 1 - * @return totalNumberOfPayments - **/ - @javax.annotation.Nullable - public Integer getTotalNumberOfPayments() { - return totalNumberOfPayments; - } - - - public void setTotalNumberOfPayments(Integer totalNumberOfPayments) { - this.totalNumberOfPayments = totalNumberOfPayments; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MonthlySchedule monthlySchedule = (MonthlySchedule) o; - return Objects.equals(this.startTime, monthlySchedule.startTime) && - Objects.equals(this.endTime, monthlySchedule.endTime) && - Objects.equals(this.dayOfMonth, monthlySchedule.dayOfMonth) && - Objects.equals(this.dayOfWeek, monthlySchedule.dayOfWeek) && - Objects.equals(this.interval, monthlySchedule.interval) && - Objects.equals(this.totalNumberOfPayments, monthlySchedule.totalNumberOfPayments); - } - - @Override - public int hashCode() { - return Objects.hash(startTime, endTime, dayOfMonth, dayOfWeek, interval, totalNumberOfPayments); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MonthlySchedule {\n"); - sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); - sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); - sb.append(" dayOfMonth: ").append(toIndentedString(dayOfMonth)).append("\n"); - sb.append(" dayOfWeek: ").append(toIndentedString(dayOfWeek)).append("\n"); - sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); - sb.append(" totalNumberOfPayments: ").append(toIndentedString(totalNumberOfPayments)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("startTime"); - openapiFields.add("endTime"); - openapiFields.add("dayOfMonth"); - openapiFields.add("dayOfWeek"); - openapiFields.add("interval"); - openapiFields.add("totalNumberOfPayments"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("interval"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MonthlySchedule - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MonthlySchedule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MonthlySchedule is not found in the empty JSON string", MonthlySchedule.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MonthlySchedule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MonthlySchedule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MonthlySchedule.openapiRequiredFields) { - 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("dayOfWeek") != null && !jsonObj.get("dayOfWeek").isJsonNull()) && !jsonObj.get("dayOfWeek").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dayOfWeek` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dayOfWeek").toString())); - } - if (!jsonObj.get("interval").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `interval` to be a primitive type in the JSON string but got `%s`", jsonObj.get("interval").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MonthlySchedule.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MonthlySchedule' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MonthlySchedule.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MonthlySchedule value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MonthlySchedule read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MonthlySchedule given an JSON string - * - * @param jsonString JSON string - * @return An instance of MonthlySchedule - * @throws IOException if the JSON string is invalid with respect to MonthlySchedule - */ - public static MonthlySchedule fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MonthlySchedule.class); - } - - /** - * Convert an instance of MonthlySchedule to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/NegativeBalanceCoverageTransaction.java b/src/main/java/org/openapitools/client/model/NegativeBalanceCoverageTransaction.java deleted file mode 100644 index 4bab0551..00000000 --- a/src/main/java/org/openapitools/client/model/NegativeBalanceCoverageTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.FeeTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * NegativeBalanceCoverageTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NegativeBalanceCoverageTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private FeeTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public NegativeBalanceCoverageTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public NegativeBalanceCoverageTransaction attributes(FeeTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public FeeTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(FeeTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public NegativeBalanceCoverageTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NegativeBalanceCoverageTransaction negativeBalanceCoverageTransaction = (NegativeBalanceCoverageTransaction) o; - return Objects.equals(this.attributes, negativeBalanceCoverageTransaction.attributes) && - Objects.equals(this.relationships, negativeBalanceCoverageTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NegativeBalanceCoverageTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to NegativeBalanceCoverageTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!NegativeBalanceCoverageTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NegativeBalanceCoverageTransaction is not found in the empty JSON string", NegativeBalanceCoverageTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!NegativeBalanceCoverageTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NegativeBalanceCoverageTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : NegativeBalanceCoverageTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NegativeBalanceCoverageTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NegativeBalanceCoverageTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NegativeBalanceCoverageTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, NegativeBalanceCoverageTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public NegativeBalanceCoverageTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of NegativeBalanceCoverageTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of NegativeBalanceCoverageTransaction - * @throws IOException if the JSON string is invalid with respect to NegativeBalanceCoverageTransaction - */ - public static NegativeBalanceCoverageTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NegativeBalanceCoverageTransaction.class); - } - - /** - * Convert an instance of NegativeBalanceCoverageTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Occupation.java b/src/main/java/org/openapitools/client/model/Occupation.java deleted file mode 100644 index 57420584..00000000 --- a/src/main/java/org/openapitools/client/model/Occupation.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets occupation - */ -@JsonAdapter(Occupation.Adapter.class) -public enum Occupation { - - ARCHITECTORENGINEER("ArchitectOrEngineer"), - - BUSINESSANALYSTACCOUNTANTORFINANCIALADVISOR("BusinessAnalystAccountantOrFinancialAdvisor"), - - COMMUNITYANDSOCIALSERVICESWORKER("CommunityAndSocialServicesWorker"), - - CONSTRUCTIONMECHANICORMAINTENANCEWORKER("ConstructionMechanicOrMaintenanceWorker"), - - DOCTOR("Doctor"), - - EDUCATOR("Educator"), - - ENTERTAINMENTSPORTSARTSORMEDIA("EntertainmentSportsArtsOrMedia"), - - EXECUTIVEORMANAGER("ExecutiveOrManager"), - - FARMERFISHERMANFORESTER("FarmerFishermanForester"), - - FOODSERVICEWORKER("FoodServiceWorker"), - - GIGWORKER("GigWorker"), - - HOSPITALITYOFFICEORADMINISTRATIVESUPPORTWORKER("HospitalityOfficeOrAdministrativeSupportWorker"), - - HOUSEHOLDMANAGER("HouseholdManager"), - - JANITORHOUSEKEEPERLANDSCAPER("JanitorHousekeeperLandscaper"), - - LAWYER("Lawyer"), - - MANUFACTURINGORPRODUCTIONWORKER("ManufacturingOrProductionWorker"), - - MILITARYORPUBLICSAFETY("MilitaryOrPublicSafety"), - - NURSEHEALTHCARETECHNICIANORHEALTHCARESUPPORT("NurseHealthcareTechnicianOrHealthcareSupport"), - - PERSONALCAREORSERVICEWORKER("PersonalCareOrServiceWorker"), - - PILOTDRIVEROPERATOR("PilotDriverOperator"), - - SALESREPRESENTATIVEBROKERAGENT("SalesRepresentativeBrokerAgent"), - - SCIENTISTORTECHNOLOGIST("ScientistOrTechnologist"), - - STUDENT("Student"); - - private String value; - - Occupation(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static Occupation fromValue(String value) { - for (Occupation b : Occupation.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final Occupation enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public Occupation read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return Occupation.fromValue(value); - } - } -} - diff --git a/src/main/java/org/openapitools/client/model/Officer.java b/src/main/java/org/openapitools/client/model/Officer.java deleted file mode 100644 index 2a177e90..00000000 --- a/src/main/java/org/openapitools/client/model/Officer.java +++ /dev/null @@ -1,869 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.AnnualIncome; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Occupation; -import org.openapitools.client.model.Phone; -import org.openapitools.client.model.SourceOfIncome; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Officer - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Officer { - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_MATRICULA_CONSULAR = "matriculaConsular"; - @SerializedName(SERIALIZED_NAME_MATRICULA_CONSULAR) - private String matriculaConsular; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Object address; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public static final String SERIALIZED_NAME_EVALUATION_ID = "evaluationId"; - @SerializedName(SERIALIZED_NAME_EVALUATION_ID) - private String evaluationId; - - /** - * Gets or Sets title - */ - @JsonAdapter(TitleEnum.Adapter.class) - public enum TitleEnum { - PRESIDENT("President"), - - CEO("CEO"), - - COO("COO"), - - CFO("CFO"), - - BENEFITSADMINISTRATIONOFFICER("BenefitsAdministrationOfficer"), - - CIO("CIO"), - - VP("VP"), - - AVP("AVP"), - - TREASURER("Treasurer"), - - SECRETARY("Secretary"), - - CONTROLLER("Controller"), - - MANAGER("Manager"), - - PARTNER("Partner"), - - MEMBER("Member"); - - private String value; - - TitleEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TitleEnum fromValue(String value) { - for (TitleEnum b : TitleEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TitleEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TitleEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TitleEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TITLE = "title"; - @SerializedName(SERIALIZED_NAME_TITLE) - private TitleEnum title; - - public static final String SERIALIZED_NAME_EVALUATION_FLAGS = "evaluationFlags"; - @SerializedName(SERIALIZED_NAME_EVALUATION_FLAGS) - private List evaluationFlags; - - public static final String SERIALIZED_NAME_MASKED_S_S_N = "maskedSSN"; - @SerializedName(SERIALIZED_NAME_MASKED_S_S_N) - private String maskedSSN; - - public static final String SERIALIZED_NAME_MASKED_PASSPORT = "maskedPassport"; - @SerializedName(SERIALIZED_NAME_MASKED_PASSPORT) - private String maskedPassport; - - public static final String SERIALIZED_NAME_MASKED_MATRICULA_CONSULAR = "maskedMatriculaConsular"; - @SerializedName(SERIALIZED_NAME_MASKED_MATRICULA_CONSULAR) - private String maskedMatriculaConsular; - - public static final String SERIALIZED_NAME_ID_THEFT_SCORE = "idTheftScore"; - @SerializedName(SERIALIZED_NAME_ID_THEFT_SCORE) - private Integer idTheftScore; - - public static final String SERIALIZED_NAME_OCCUPATION = "occupation"; - @SerializedName(SERIALIZED_NAME_OCCUPATION) - private Occupation occupation; - - public static final String SERIALIZED_NAME_ANNUAL_INCOME = "annualIncome"; - @SerializedName(SERIALIZED_NAME_ANNUAL_INCOME) - private AnnualIncome annualIncome; - - public static final String SERIALIZED_NAME_SOURCE_OF_INCOME = "sourceOfIncome"; - @SerializedName(SERIALIZED_NAME_SOURCE_OF_INCOME) - private SourceOfIncome sourceOfIncome; - - public Officer() { - } - - public Officer status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public Officer fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nullable - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public Officer email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public Officer phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public Officer ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public Officer passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public Officer nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public Officer matriculaConsular(String matriculaConsular) { - - this.matriculaConsular = matriculaConsular; - return this; - } - - /** - * Get matriculaConsular - * @return matriculaConsular - **/ - @javax.annotation.Nullable - public String getMatriculaConsular() { - return matriculaConsular; - } - - - public void setMatriculaConsular(String matriculaConsular) { - this.matriculaConsular = matriculaConsular; - } - - - public Officer address(Object address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Object getAddress() { - return address; - } - - - public void setAddress(Object address) { - this.address = address; - } - - - public Officer dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nullable - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public Officer evaluationId(String evaluationId) { - - this.evaluationId = evaluationId; - return this; - } - - /** - * Get evaluationId - * @return evaluationId - **/ - @javax.annotation.Nullable - public String getEvaluationId() { - return evaluationId; - } - - - public void setEvaluationId(String evaluationId) { - this.evaluationId = evaluationId; - } - - - public Officer title(TitleEnum title) { - - this.title = title; - return this; - } - - /** - * Get title - * @return title - **/ - @javax.annotation.Nullable - public TitleEnum getTitle() { - return title; - } - - - public void setTitle(TitleEnum title) { - this.title = title; - } - - - public Officer evaluationFlags(List evaluationFlags) { - - this.evaluationFlags = evaluationFlags; - return this; - } - - public Officer addEvaluationFlagsItem(String evaluationFlagsItem) { - if (this.evaluationFlags == null) { - this.evaluationFlags = new ArrayList<>(); - } - this.evaluationFlags.add(evaluationFlagsItem); - return this; - } - - /** - * Get evaluationFlags - * @return evaluationFlags - **/ - @javax.annotation.Nullable - public List getEvaluationFlags() { - return evaluationFlags; - } - - - public void setEvaluationFlags(List evaluationFlags) { - this.evaluationFlags = evaluationFlags; - } - - - public Officer maskedSSN(String maskedSSN) { - - this.maskedSSN = maskedSSN; - return this; - } - - /** - * Get maskedSSN - * @return maskedSSN - **/ - @javax.annotation.Nullable - public String getMaskedSSN() { - return maskedSSN; - } - - - public void setMaskedSSN(String maskedSSN) { - this.maskedSSN = maskedSSN; - } - - - public Officer maskedPassport(String maskedPassport) { - - this.maskedPassport = maskedPassport; - return this; - } - - /** - * Get maskedPassport - * @return maskedPassport - **/ - @javax.annotation.Nullable - public String getMaskedPassport() { - return maskedPassport; - } - - - public void setMaskedPassport(String maskedPassport) { - this.maskedPassport = maskedPassport; - } - - - public Officer maskedMatriculaConsular(String maskedMatriculaConsular) { - - this.maskedMatriculaConsular = maskedMatriculaConsular; - return this; - } - - /** - * Get maskedMatriculaConsular - * @return maskedMatriculaConsular - **/ - @javax.annotation.Nullable - public String getMaskedMatriculaConsular() { - return maskedMatriculaConsular; - } - - - public void setMaskedMatriculaConsular(String maskedMatriculaConsular) { - this.maskedMatriculaConsular = maskedMatriculaConsular; - } - - - public Officer idTheftScore(Integer idTheftScore) { - - this.idTheftScore = idTheftScore; - return this; - } - - /** - * Get idTheftScore - * @return idTheftScore - **/ - @javax.annotation.Nullable - public Integer getIdTheftScore() { - return idTheftScore; - } - - - public void setIdTheftScore(Integer idTheftScore) { - this.idTheftScore = idTheftScore; - } - - - public Officer occupation(Occupation occupation) { - - this.occupation = occupation; - return this; - } - - /** - * Get occupation - * @return occupation - **/ - @javax.annotation.Nullable - public Occupation getOccupation() { - return occupation; - } - - - public void setOccupation(Occupation occupation) { - this.occupation = occupation; - } - - - public Officer annualIncome(AnnualIncome annualIncome) { - - this.annualIncome = annualIncome; - return this; - } - - /** - * Get annualIncome - * @return annualIncome - **/ - @javax.annotation.Nullable - public AnnualIncome getAnnualIncome() { - return annualIncome; - } - - - public void setAnnualIncome(AnnualIncome annualIncome) { - this.annualIncome = annualIncome; - } - - - public Officer sourceOfIncome(SourceOfIncome sourceOfIncome) { - - this.sourceOfIncome = sourceOfIncome; - return this; - } - - /** - * Get sourceOfIncome - * @return sourceOfIncome - **/ - @javax.annotation.Nullable - public SourceOfIncome getSourceOfIncome() { - return sourceOfIncome; - } - - - public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { - this.sourceOfIncome = sourceOfIncome; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Officer officer = (Officer) o; - return Objects.equals(this.status, officer.status) && - Objects.equals(this.fullName, officer.fullName) && - Objects.equals(this.email, officer.email) && - Objects.equals(this.phone, officer.phone) && - Objects.equals(this.ssn, officer.ssn) && - Objects.equals(this.passport, officer.passport) && - Objects.equals(this.nationality, officer.nationality) && - Objects.equals(this.matriculaConsular, officer.matriculaConsular) && - Objects.equals(this.address, officer.address) && - Objects.equals(this.dateOfBirth, officer.dateOfBirth) && - Objects.equals(this.evaluationId, officer.evaluationId) && - Objects.equals(this.title, officer.title) && - Objects.equals(this.evaluationFlags, officer.evaluationFlags) && - Objects.equals(this.maskedSSN, officer.maskedSSN) && - Objects.equals(this.maskedPassport, officer.maskedPassport) && - Objects.equals(this.maskedMatriculaConsular, officer.maskedMatriculaConsular) && - Objects.equals(this.idTheftScore, officer.idTheftScore) && - Objects.equals(this.occupation, officer.occupation) && - Objects.equals(this.annualIncome, officer.annualIncome) && - Objects.equals(this.sourceOfIncome, officer.sourceOfIncome); - } - - @Override - public int hashCode() { - return Objects.hash(status, fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, evaluationId, title, evaluationFlags, maskedSSN, maskedPassport, maskedMatriculaConsular, idTheftScore, occupation, annualIncome, sourceOfIncome); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Officer {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" evaluationFlags: ").append(toIndentedString(evaluationFlags)).append("\n"); - sb.append(" maskedSSN: ").append(toIndentedString(maskedSSN)).append("\n"); - sb.append(" maskedPassport: ").append(toIndentedString(maskedPassport)).append("\n"); - sb.append(" maskedMatriculaConsular: ").append(toIndentedString(maskedMatriculaConsular)).append("\n"); - sb.append(" idTheftScore: ").append(toIndentedString(idTheftScore)).append("\n"); - sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); - sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); - sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("status"); - openapiFields.add("fullName"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("nationality"); - openapiFields.add("matriculaConsular"); - openapiFields.add("address"); - openapiFields.add("dateOfBirth"); - openapiFields.add("evaluationId"); - openapiFields.add("title"); - openapiFields.add("evaluationFlags"); - openapiFields.add("maskedSSN"); - openapiFields.add("maskedPassport"); - openapiFields.add("maskedMatriculaConsular"); - openapiFields.add("idTheftScore"); - openapiFields.add("occupation"); - openapiFields.add("annualIncome"); - openapiFields.add("sourceOfIncome"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Officer - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Officer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Officer is not found in the empty JSON string", Officer.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Officer.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Officer` 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())); - } - // validate the optional field `fullName` - if (jsonObj.get("fullName") != null && !jsonObj.get("fullName").isJsonNull()) { - FullName.validateJsonElement(jsonObj.get("fullName")); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); - } - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - if ((jsonObj.get("matriculaConsular") != null && !jsonObj.get("matriculaConsular").isJsonNull()) && !jsonObj.get("matriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `matriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("matriculaConsular").toString())); - } - if ((jsonObj.get("evaluationId") != null && !jsonObj.get("evaluationId").isJsonNull()) && !jsonObj.get("evaluationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationId").toString())); - } - if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("evaluationFlags") != null && !jsonObj.get("evaluationFlags").isJsonNull() && !jsonObj.get("evaluationFlags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationFlags` to be an array in the JSON string but got `%s`", jsonObj.get("evaluationFlags").toString())); - } - if ((jsonObj.get("maskedSSN") != null && !jsonObj.get("maskedSSN").isJsonNull()) && !jsonObj.get("maskedSSN").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedSSN` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedSSN").toString())); - } - if ((jsonObj.get("maskedPassport") != null && !jsonObj.get("maskedPassport").isJsonNull()) && !jsonObj.get("maskedPassport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedPassport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedPassport").toString())); - } - if ((jsonObj.get("maskedMatriculaConsular") != null && !jsonObj.get("maskedMatriculaConsular").isJsonNull()) && !jsonObj.get("maskedMatriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedMatriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedMatriculaConsular").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Officer.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Officer' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Officer.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Officer value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Officer read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Officer given an JSON string - * - * @param jsonString JSON string - * @return An instance of Officer - * @throws IOException if the JSON string is invalid with respect to Officer - */ - public static Officer fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Officer.class); - } - - /** - * Convert an instance of Officer to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/OrgRelationship.java b/src/main/java/org/openapitools/client/model/OrgRelationship.java deleted file mode 100644 index f469c51a..00000000 --- a/src/main/java/org/openapitools/client/model/OrgRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.OrgRelationshipData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OrgRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OrgRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private OrgRelationshipData data; - - public OrgRelationship() { - } - - public OrgRelationship data(OrgRelationshipData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public OrgRelationshipData getData() { - return data; - } - - - public void setData(OrgRelationshipData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrgRelationship orgRelationship = (OrgRelationship) o; - return Objects.equals(this.data, orgRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrgRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OrgRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OrgRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OrgRelationship is not found in the empty JSON string", OrgRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OrgRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrgRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OrgRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - OrgRelationshipData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrgRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OrgRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OrgRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OrgRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OrgRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OrgRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrgRelationship - * @throws IOException if the JSON string is invalid with respect to OrgRelationship - */ - public static OrgRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OrgRelationship.class); - } - - /** - * Convert an instance of OrgRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/OrgRelationshipData.java b/src/main/java/org/openapitools/client/model/OrgRelationshipData.java deleted file mode 100644 index f05ea8bb..00000000 --- a/src/main/java/org/openapitools/client/model/OrgRelationshipData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OrgRelationshipData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OrgRelationshipData { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "org"; - - public OrgRelationshipData() { - } - - public OrgRelationshipData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public OrgRelationshipData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrgRelationshipData orgRelationshipData = (OrgRelationshipData) o; - return Objects.equals(this.id, orgRelationshipData.id) && - Objects.equals(this.type, orgRelationshipData.type); - } - - @Override - public int hashCode() { - return Objects.hash(id, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrgRelationshipData {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OrgRelationshipData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OrgRelationshipData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OrgRelationshipData is not found in the empty JSON string", OrgRelationshipData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OrgRelationshipData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrgRelationshipData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OrgRelationshipData.openapiRequiredFields) { - 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("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())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrgRelationshipData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OrgRelationshipData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OrgRelationshipData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OrgRelationshipData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OrgRelationshipData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OrgRelationshipData given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrgRelationshipData - * @throws IOException if the JSON string is invalid with respect to OrgRelationshipData - */ - public static OrgRelationshipData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OrgRelationshipData.class); - } - - /** - * Convert an instance of OrgRelationshipData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/OriginatedAchTransaction.java b/src/main/java/org/openapitools/client/model/OriginatedAchTransaction.java deleted file mode 100644 index 88b8d412..00000000 --- a/src/main/java/org/openapitools/client/model/OriginatedAchTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.OriginatedAchTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OriginatedAchTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OriginatedAchTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private OriginatedAchTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public OriginatedAchTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public OriginatedAchTransaction attributes(OriginatedAchTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public OriginatedAchTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(OriginatedAchTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public OriginatedAchTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OriginatedAchTransaction originatedAchTransaction = (OriginatedAchTransaction) o; - return Objects.equals(this.attributes, originatedAchTransaction.attributes) && - Objects.equals(this.relationships, originatedAchTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OriginatedAchTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OriginatedAchTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OriginatedAchTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OriginatedAchTransaction is not found in the empty JSON string", OriginatedAchTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OriginatedAchTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OriginatedAchTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OriginatedAchTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OriginatedAchTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OriginatedAchTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OriginatedAchTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OriginatedAchTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OriginatedAchTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OriginatedAchTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of OriginatedAchTransaction - * @throws IOException if the JSON string is invalid with respect to OriginatedAchTransaction - */ - public static OriginatedAchTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OriginatedAchTransaction.class); - } - - /** - * Convert an instance of OriginatedAchTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/OriginatedAchTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/OriginatedAchTransactionAllOfAttributes.java deleted file mode 100644 index 9c9256eb..00000000 --- a/src/main/java/org/openapitools/client/model/OriginatedAchTransactionAllOfAttributes.java +++ /dev/null @@ -1,568 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.Counterparty; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OriginatedAchTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OriginatedAchTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_ADDENDA = "addenda"; - @SerializedName(SERIALIZED_NAME_ADDENDA) - private String addenda; - - public static final String SERIALIZED_NAME_COUNTERPARTY = "counterparty"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY) - private Counterparty counterparty; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_SEC_CODE = "secCode"; - @SerializedName(SERIALIZED_NAME_SEC_CODE) - private String secCode; - - public static final String SERIALIZED_NAME_TRACE_NUMBER = "traceNumber"; - @SerializedName(SERIALIZED_NAME_TRACE_NUMBER) - private String traceNumber; - - public OriginatedAchTransactionAllOfAttributes() { - } - - public OriginatedAchTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public OriginatedAchTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public OriginatedAchTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public OriginatedAchTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public OriginatedAchTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public OriginatedAchTransactionAllOfAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public OriginatedAchTransactionAllOfAttributes addenda(String addenda) { - - this.addenda = addenda; - return this; - } - - /** - * Get addenda - * @return addenda - **/ - @javax.annotation.Nullable - public String getAddenda() { - return addenda; - } - - - public void setAddenda(String addenda) { - this.addenda = addenda; - } - - - public OriginatedAchTransactionAllOfAttributes counterparty(Counterparty counterparty) { - - this.counterparty = counterparty; - return this; - } - - /** - * Get counterparty - * @return counterparty - **/ - @javax.annotation.Nonnull - public Counterparty getCounterparty() { - return counterparty; - } - - - public void setCounterparty(Counterparty counterparty) { - this.counterparty = counterparty; - } - - - public OriginatedAchTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public OriginatedAchTransactionAllOfAttributes secCode(String secCode) { - - this.secCode = secCode; - return this; - } - - /** - * Get secCode - * @return secCode - **/ - @javax.annotation.Nullable - public String getSecCode() { - return secCode; - } - - - public void setSecCode(String secCode) { - this.secCode = secCode; - } - - - public OriginatedAchTransactionAllOfAttributes traceNumber(String traceNumber) { - - this.traceNumber = traceNumber; - return this; - } - - /** - * Get traceNumber - * @return traceNumber - **/ - @javax.annotation.Nullable - public String getTraceNumber() { - return traceNumber; - } - - - public void setTraceNumber(String traceNumber) { - this.traceNumber = traceNumber; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OriginatedAchTransactionAllOfAttributes originatedAchTransactionAllOfAttributes = (OriginatedAchTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, originatedAchTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, originatedAchTransactionAllOfAttributes.direction) && - Objects.equals(this.amount, originatedAchTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, originatedAchTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, originatedAchTransactionAllOfAttributes.summary) && - Objects.equals(this.description, originatedAchTransactionAllOfAttributes.description) && - Objects.equals(this.addenda, originatedAchTransactionAllOfAttributes.addenda) && - Objects.equals(this.counterparty, originatedAchTransactionAllOfAttributes.counterparty) && - Objects.equals(this.tags, originatedAchTransactionAllOfAttributes.tags) && - Objects.equals(this.secCode, originatedAchTransactionAllOfAttributes.secCode) && - Objects.equals(this.traceNumber, originatedAchTransactionAllOfAttributes.traceNumber); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, amount, balance, summary, description, addenda, counterparty, tags, secCode, traceNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OriginatedAchTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); - sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" secCode: ").append(toIndentedString(secCode)).append("\n"); - sb.append(" traceNumber: ").append(toIndentedString(traceNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("description"); - openapiFields.add("addenda"); - openapiFields.add("counterparty"); - openapiFields.add("tags"); - openapiFields.add("secCode"); - openapiFields.add("traceNumber"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("counterparty"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OriginatedAchTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OriginatedAchTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OriginatedAchTransactionAllOfAttributes is not found in the empty JSON string", OriginatedAchTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OriginatedAchTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OriginatedAchTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OriginatedAchTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("addenda") != null && !jsonObj.get("addenda").isJsonNull()) && !jsonObj.get("addenda").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `addenda` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addenda").toString())); - } - // validate the required field `counterparty` - Counterparty.validateJsonElement(jsonObj.get("counterparty")); - if ((jsonObj.get("secCode") != null && !jsonObj.get("secCode").isJsonNull()) && !jsonObj.get("secCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `secCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secCode").toString())); - } - if ((jsonObj.get("traceNumber") != null && !jsonObj.get("traceNumber").isJsonNull()) && !jsonObj.get("traceNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `traceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("traceNumber").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OriginatedAchTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OriginatedAchTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OriginatedAchTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OriginatedAchTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OriginatedAchTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OriginatedAchTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of OriginatedAchTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to OriginatedAchTransactionAllOfAttributes - */ - public static OriginatedAchTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OriginatedAchTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of OriginatedAchTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PaginationMeta.java b/src/main/java/org/openapitools/client/model/PaginationMeta.java deleted file mode 100644 index 683da810..00000000 --- a/src/main/java/org/openapitools/client/model/PaginationMeta.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PaginationMetaPagination; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PaginationMeta - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PaginationMeta { - public static final String SERIALIZED_NAME_PAGINATION = "pagination"; - @SerializedName(SERIALIZED_NAME_PAGINATION) - private PaginationMetaPagination pagination; - - public PaginationMeta() { - } - - public PaginationMeta pagination(PaginationMetaPagination pagination) { - - this.pagination = pagination; - return this; - } - - /** - * Get pagination - * @return pagination - **/ - @javax.annotation.Nullable - public PaginationMetaPagination getPagination() { - return pagination; - } - - - public void setPagination(PaginationMetaPagination pagination) { - this.pagination = pagination; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaginationMeta paginationMeta = (PaginationMeta) o; - return Objects.equals(this.pagination, paginationMeta.pagination); - } - - @Override - public int hashCode() { - return Objects.hash(pagination); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaginationMeta {\n"); - sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("pagination"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PaginationMeta - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PaginationMeta.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PaginationMeta is not found in the empty JSON string", PaginationMeta.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PaginationMeta.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PaginationMeta` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `pagination` - if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { - PaginationMetaPagination.validateJsonElement(jsonObj.get("pagination")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PaginationMeta.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PaginationMeta' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PaginationMeta.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PaginationMeta value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PaginationMeta read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PaginationMeta given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaginationMeta - * @throws IOException if the JSON string is invalid with respect to PaginationMeta - */ - public static PaginationMeta fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PaginationMeta.class); - } - - /** - * Convert an instance of PaginationMeta to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PaginationMetaPagination.java b/src/main/java/org/openapitools/client/model/PaginationMetaPagination.java deleted file mode 100644 index 527b3d48..00000000 --- a/src/main/java/org/openapitools/client/model/PaginationMetaPagination.java +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PaginationMetaPagination - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PaginationMetaPagination { - public static final String SERIALIZED_NAME_LIMIT = "limit"; - @SerializedName(SERIALIZED_NAME_LIMIT) - private Integer limit; - - public static final String SERIALIZED_NAME_OFFSET = "offset"; - @SerializedName(SERIALIZED_NAME_OFFSET) - private Integer offset; - - public static final String SERIALIZED_NAME_TOTAL = "total"; - @SerializedName(SERIALIZED_NAME_TOTAL) - private Integer total; - - public PaginationMetaPagination() { - } - - public PaginationMetaPagination limit(Integer limit) { - - this.limit = limit; - return this; - } - - /** - * Get limit - * @return limit - **/ - @javax.annotation.Nullable - public Integer getLimit() { - return limit; - } - - - public void setLimit(Integer limit) { - this.limit = limit; - } - - - public PaginationMetaPagination offset(Integer offset) { - - this.offset = offset; - return this; - } - - /** - * Get offset - * @return offset - **/ - @javax.annotation.Nullable - public Integer getOffset() { - return offset; - } - - - public void setOffset(Integer offset) { - this.offset = offset; - } - - - public PaginationMetaPagination total(Integer total) { - - this.total = total; - return this; - } - - /** - * Get total - * @return total - **/ - @javax.annotation.Nullable - public Integer getTotal() { - return total; - } - - - public void setTotal(Integer total) { - this.total = total; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaginationMetaPagination paginationMetaPagination = (PaginationMetaPagination) o; - return Objects.equals(this.limit, paginationMetaPagination.limit) && - Objects.equals(this.offset, paginationMetaPagination.offset) && - Objects.equals(this.total, paginationMetaPagination.total); - } - - @Override - public int hashCode() { - return Objects.hash(limit, offset, total); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaginationMetaPagination {\n"); - sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); - sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); - sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("limit"); - openapiFields.add("offset"); - openapiFields.add("total"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PaginationMetaPagination - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PaginationMetaPagination.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PaginationMetaPagination is not found in the empty JSON string", PaginationMetaPagination.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PaginationMetaPagination.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PaginationMetaPagination` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PaginationMetaPagination.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PaginationMetaPagination' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PaginationMetaPagination.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PaginationMetaPagination value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PaginationMetaPagination read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PaginationMetaPagination given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaginationMetaPagination - * @throws IOException if the JSON string is invalid with respect to PaginationMetaPagination - */ - public static PaginationMetaPagination fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PaginationMetaPagination.class); - } - - /** - * Convert an instance of PaginationMetaPagination to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchAccount.java b/src/main/java/org/openapitools/client/model/PatchAccount.java deleted file mode 100644 index 110de4bb..00000000 --- a/src/main/java/org/openapitools/client/model/PatchAccount.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchAccountData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchAccount - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchAccount { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private PatchAccountData data; - - public PatchAccount() { - } - - public PatchAccount data(PatchAccountData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public PatchAccountData getData() { - return data; - } - - - public void setData(PatchAccountData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchAccount patchAccount = (PatchAccount) o; - return Objects.equals(this.data, patchAccount.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchAccount {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchAccount - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchAccount is not found in the empty JSON string", PatchAccount.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchAccount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchAccount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchAccount.openapiRequiredFields) { - 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(); - // validate the required field `data` - PatchAccountData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchAccount.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchAccount' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchAccount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchAccount value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchAccount read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchAccount given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchAccount - * @throws IOException if the JSON string is invalid with respect to PatchAccount - */ - public static PatchAccount fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchAccount.class); - } - - /** - * Convert an instance of PatchAccount to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchAccountData.java b/src/main/java/org/openapitools/client/model/PatchAccountData.java deleted file mode 100644 index 4f80ddb8..00000000 --- a/src/main/java/org/openapitools/client/model/PatchAccountData.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.UpdateCreditAccount; -import org.openapitools.client.model.UpdateCreditAccountAttributes; -import org.openapitools.client.model.UpdateDepositAccount; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -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 com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import org.openapitools.client.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchAccountData extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(PatchAccountData.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchAccountData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchAccountData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterUpdateDepositAccount = gson.getDelegateAdapter(this, TypeToken.get(UpdateDepositAccount.class)); - final TypeAdapter adapterUpdateCreditAccount = gson.getDelegateAdapter(this, TypeToken.get(UpdateCreditAccount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchAccountData value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `UpdateDepositAccount` - if (value.getActualInstance() instanceof UpdateDepositAccount) { - JsonElement element = adapterUpdateDepositAccount.toJsonTree((UpdateDepositAccount)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `UpdateCreditAccount` - if (value.getActualInstance() instanceof UpdateCreditAccount) { - JsonElement element = adapterUpdateCreditAccount.toJsonTree((UpdateCreditAccount)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: UpdateCreditAccount, UpdateDepositAccount"); - } - - @Override - public PatchAccountData read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize UpdateDepositAccount - try { - // validate the JSON object to see if any exception is thrown - UpdateDepositAccount.validateJsonElement(jsonElement); - actualAdapter = adapterUpdateDepositAccount; - match++; - log.log(Level.FINER, "Input data matches schema 'UpdateDepositAccount'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for UpdateDepositAccount failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'UpdateDepositAccount'", e); - } - // deserialize UpdateCreditAccount - try { - // validate the JSON object to see if any exception is thrown - UpdateCreditAccount.validateJsonElement(jsonElement); - actualAdapter = adapterUpdateCreditAccount; - match++; - log.log(Level.FINER, "Input data matches schema 'UpdateCreditAccount'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for UpdateCreditAccount failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'UpdateCreditAccount'", e); - } - - if (match == 1) { - PatchAccountData ret = new PatchAccountData(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for PatchAccountData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public PatchAccountData() { - super("oneOf", Boolean.FALSE); - } - - public PatchAccountData(UpdateCreditAccount o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public PatchAccountData(UpdateDepositAccount o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("UpdateDepositAccount", UpdateDepositAccount.class); - schemas.put("UpdateCreditAccount", UpdateCreditAccount.class); - } - - @Override - public Map> getSchemas() { - return PatchAccountData.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * UpdateCreditAccount, UpdateDepositAccount - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof UpdateDepositAccount) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof UpdateCreditAccount) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be UpdateCreditAccount, UpdateDepositAccount"); - } - - /** - * Get the actual instance, which can be the following: - * UpdateCreditAccount, UpdateDepositAccount - * - * @return The actual instance (UpdateCreditAccount, UpdateDepositAccount) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `UpdateDepositAccount`. If the actual instance is not `UpdateDepositAccount`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `UpdateDepositAccount` - * @throws ClassCastException if the instance is not `UpdateDepositAccount` - */ - public UpdateDepositAccount getUpdateDepositAccount() throws ClassCastException { - return (UpdateDepositAccount)super.getActualInstance(); - } - /** - * Get the actual instance of `UpdateCreditAccount`. If the actual instance is not `UpdateCreditAccount`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `UpdateCreditAccount` - * @throws ClassCastException if the instance is not `UpdateCreditAccount` - */ - public UpdateCreditAccount getUpdateCreditAccount() throws ClassCastException { - return (UpdateCreditAccount)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchAccountData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with UpdateDepositAccount - try { - UpdateDepositAccount.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for UpdateDepositAccount failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with UpdateCreditAccount - try { - UpdateCreditAccount.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for UpdateCreditAccount failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for PatchAccountData with oneOf schemas: UpdateCreditAccount, UpdateDepositAccount. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of PatchAccountData given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchAccountData - * @throws IOException if the JSON string is invalid with respect to PatchAccountData - */ - public static PatchAccountData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchAccountData.class); - } - - /** - * Convert an instance of PatchAccountData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchAchPayment.java b/src/main/java/org/openapitools/client/model/PatchAchPayment.java deleted file mode 100644 index e1c564bd..00000000 --- a/src/main/java/org/openapitools/client/model/PatchAchPayment.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchTrustApplicationAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchAchPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchAchPayment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "achPayment"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchTrustApplicationAttributes attributes; - - public PatchAchPayment() { - } - - public PatchAchPayment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public PatchAchPayment attributes(PatchTrustApplicationAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchTrustApplicationAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchTrustApplicationAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchAchPayment patchAchPayment = (PatchAchPayment) o; - return Objects.equals(this.type, patchAchPayment.type) && - Objects.equals(this.attributes, patchAchPayment.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchAchPayment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchAchPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchAchPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchAchPayment is not found in the empty JSON string", PatchAchPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchAchPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchAchPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchAchPayment.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchTrustApplicationAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchAchPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchAchPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchAchPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchAchPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchAchPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchAchPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchAchPayment - * @throws IOException if the JSON string is invalid with respect to PatchAchPayment - */ - public static PatchAchPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchAchPayment.class); - } - - /** - * Convert an instance of PatchAchPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchAchReceivedPayment.java b/src/main/java/org/openapitools/client/model/PatchAchReceivedPayment.java deleted file mode 100644 index dbf06744..00000000 --- a/src/main/java/org/openapitools/client/model/PatchAchReceivedPayment.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchTrustApplicationAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchAchReceivedPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchAchReceivedPayment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "achReceivedPayment"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchTrustApplicationAttributes attributes; - - public PatchAchReceivedPayment() { - } - - public PatchAchReceivedPayment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public PatchAchReceivedPayment attributes(PatchTrustApplicationAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchTrustApplicationAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchTrustApplicationAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchAchReceivedPayment patchAchReceivedPayment = (PatchAchReceivedPayment) o; - return Objects.equals(this.type, patchAchReceivedPayment.type) && - Objects.equals(this.attributes, patchAchReceivedPayment.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchAchReceivedPayment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchAchReceivedPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchAchReceivedPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchAchReceivedPayment is not found in the empty JSON string", PatchAchReceivedPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchAchReceivedPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchAchReceivedPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchAchReceivedPayment.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchTrustApplicationAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchAchReceivedPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchAchReceivedPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchAchReceivedPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchAchReceivedPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchAchReceivedPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchAchReceivedPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchAchReceivedPayment - * @throws IOException if the JSON string is invalid with respect to PatchAchReceivedPayment - */ - public static PatchAchReceivedPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchAchReceivedPayment.class); - } - - /** - * Convert an instance of PatchAchReceivedPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchBookPayment.java b/src/main/java/org/openapitools/client/model/PatchBookPayment.java deleted file mode 100644 index ecd4a9a9..00000000 --- a/src/main/java/org/openapitools/client/model/PatchBookPayment.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchTrustApplicationAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchBookPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchBookPayment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "bookPayment"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchTrustApplicationAttributes attributes; - - public PatchBookPayment() { - } - - public PatchBookPayment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public PatchBookPayment attributes(PatchTrustApplicationAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchTrustApplicationAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchTrustApplicationAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchBookPayment patchBookPayment = (PatchBookPayment) o; - return Objects.equals(this.type, patchBookPayment.type) && - Objects.equals(this.attributes, patchBookPayment.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchBookPayment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchBookPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchBookPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBookPayment is not found in the empty JSON string", PatchBookPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchBookPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBookPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchBookPayment.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchTrustApplicationAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchBookPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchBookPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchBookPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchBookPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchBookPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchBookPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchBookPayment - * @throws IOException if the JSON string is invalid with respect to PatchBookPayment - */ - public static PatchBookPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchBookPayment.class); - } - - /** - * Convert an instance of PatchBookPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchBookTransaction.java b/src/main/java/org/openapitools/client/model/PatchBookTransaction.java deleted file mode 100644 index 8c77ae17..00000000 --- a/src/main/java/org/openapitools/client/model/PatchBookTransaction.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchBookTransactionAttributes; -import org.openapitools.client.model.PatchBookTransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchBookTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchBookTransaction { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "bookTransaction"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchBookTransactionAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private PatchBookTransactionRelationships relationships; - - public PatchBookTransaction() { - } - - public PatchBookTransaction type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public PatchBookTransaction attributes(PatchBookTransactionAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchBookTransactionAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchBookTransactionAttributes attributes) { - this.attributes = attributes; - } - - - public PatchBookTransaction relationships(PatchBookTransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public PatchBookTransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(PatchBookTransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchBookTransaction patchBookTransaction = (PatchBookTransaction) o; - return Objects.equals(this.type, patchBookTransaction.type) && - Objects.equals(this.attributes, patchBookTransaction.attributes) && - Objects.equals(this.relationships, patchBookTransaction.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchBookTransaction {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchBookTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchBookTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBookTransaction is not found in the empty JSON string", PatchBookTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchBookTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBookTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchBookTransaction.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchBookTransactionAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the optional field `relationships` - if (jsonObj.get("relationships") != null && !jsonObj.get("relationships").isJsonNull()) { - PatchBookTransactionRelationships.validateJsonElement(jsonObj.get("relationships")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchBookTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchBookTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchBookTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchBookTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchBookTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchBookTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchBookTransaction - * @throws IOException if the JSON string is invalid with respect to PatchBookTransaction - */ - public static PatchBookTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchBookTransaction.class); - } - - /** - * Convert an instance of PatchBookTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchBookTransactionAttributes.java b/src/main/java/org/openapitools/client/model/PatchBookTransactionAttributes.java deleted file mode 100644 index f8024ce7..00000000 --- a/src/main/java/org/openapitools/client/model/PatchBookTransactionAttributes.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchBookTransactionAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchBookTransactionAttributes { - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public PatchBookTransactionAttributes() { - } - - public PatchBookTransactionAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public PatchBookTransactionAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nullable - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchBookTransactionAttributes patchBookTransactionAttributes = (PatchBookTransactionAttributes) o; - return Objects.equals(this.tags, patchBookTransactionAttributes.tags) && - Objects.equals(this.summary, patchBookTransactionAttributes.summary); - } - - @Override - public int hashCode() { - return Objects.hash(tags, summary); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchBookTransactionAttributes {\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tags"); - openapiFields.add("summary"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchBookTransactionAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchBookTransactionAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBookTransactionAttributes is not found in the empty JSON string", PatchBookTransactionAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchBookTransactionAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBookTransactionAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("summary") != null && !jsonObj.get("summary").isJsonNull()) && !jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchBookTransactionAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchBookTransactionAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchBookTransactionAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchBookTransactionAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchBookTransactionAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchBookTransactionAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchBookTransactionAttributes - * @throws IOException if the JSON string is invalid with respect to PatchBookTransactionAttributes - */ - public static PatchBookTransactionAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchBookTransactionAttributes.class); - } - - /** - * Convert an instance of PatchBookTransactionAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchBookTransactionRelationships.java b/src/main/java/org/openapitools/client/model/PatchBookTransactionRelationships.java deleted file mode 100644 index 1856c62a..00000000 --- a/src/main/java/org/openapitools/client/model/PatchBookTransactionRelationships.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AccountRelationship1; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchBookTransactionRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchBookTransactionRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private AccountRelationship1 account; - - public PatchBookTransactionRelationships() { - } - - public PatchBookTransactionRelationships account(AccountRelationship1 account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public AccountRelationship1 getAccount() { - return account; - } - - - public void setAccount(AccountRelationship1 account) { - this.account = account; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchBookTransactionRelationships patchBookTransactionRelationships = (PatchBookTransactionRelationships) o; - return Objects.equals(this.account, patchBookTransactionRelationships.account); - } - - @Override - public int hashCode() { - return Objects.hash(account); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchBookTransactionRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchBookTransactionRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchBookTransactionRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBookTransactionRelationships is not found in the empty JSON string", PatchBookTransactionRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchBookTransactionRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBookTransactionRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchBookTransactionRelationships.openapiRequiredFields) { - 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(); - // validate the required field `account` - AccountRelationship1.validateJsonElement(jsonObj.get("account")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchBookTransactionRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchBookTransactionRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchBookTransactionRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchBookTransactionRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchBookTransactionRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchBookTransactionRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchBookTransactionRelationships - * @throws IOException if the JSON string is invalid with respect to PatchBookTransactionRelationships - */ - public static PatchBookTransactionRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchBookTransactionRelationships.class); - } - - /** - * Convert an instance of PatchBookTransactionRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessApplication.java b/src/main/java/org/openapitools/client/model/PatchBusinessApplication.java deleted file mode 100644 index 18e4214c..00000000 --- a/src/main/java/org/openapitools/client/model/PatchBusinessApplication.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchBusinessApplicationAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchBusinessApplication - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchBusinessApplication { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "businessApplication"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchBusinessApplicationAttributes attributes; - - public PatchBusinessApplication() { - } - - public PatchBusinessApplication type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public PatchBusinessApplication attributes(PatchBusinessApplicationAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchBusinessApplicationAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchBusinessApplicationAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchBusinessApplication patchBusinessApplication = (PatchBusinessApplication) o; - return Objects.equals(this.type, patchBusinessApplication.type) && - Objects.equals(this.attributes, patchBusinessApplication.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchBusinessApplication {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchBusinessApplication - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchBusinessApplication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBusinessApplication is not found in the empty JSON string", PatchBusinessApplication.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchBusinessApplication.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBusinessApplication` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchBusinessApplication.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchBusinessApplicationAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchBusinessApplication.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchBusinessApplication' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessApplication.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchBusinessApplication value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchBusinessApplication read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchBusinessApplication given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchBusinessApplication - * @throws IOException if the JSON string is invalid with respect to PatchBusinessApplication - */ - public static PatchBusinessApplication fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchBusinessApplication.class); - } - - /** - * Convert an instance of PatchBusinessApplication to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessApplicationAttributes.java b/src/main/java/org/openapitools/client/model/PatchBusinessApplicationAttributes.java deleted file mode 100644 index b2d07c6f..00000000 --- a/src/main/java/org/openapitools/client/model/PatchBusinessApplicationAttributes.java +++ /dev/null @@ -1,456 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.BusinessAnnualRevenue; -import org.openapitools.client.model.BusinessNumberOfEmployees; -import org.openapitools.client.model.BusinessVertical; -import org.openapitools.client.model.CashFlow; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchBusinessApplicationAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchBusinessApplicationAttributes { - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_ANNUAL_REVENUE = "annualRevenue"; - @SerializedName(SERIALIZED_NAME_ANNUAL_REVENUE) - private BusinessAnnualRevenue annualRevenue; - - public static final String SERIALIZED_NAME_NUMBER_OF_EMPLOYEES = "numberOfEmployees"; - @SerializedName(SERIALIZED_NAME_NUMBER_OF_EMPLOYEES) - private BusinessNumberOfEmployees numberOfEmployees; - - public static final String SERIALIZED_NAME_CASH_FLOW = "cashFlow"; - @SerializedName(SERIALIZED_NAME_CASH_FLOW) - private CashFlow cashFlow; - - public static final String SERIALIZED_NAME_YEAR_OF_INCORPORATION = "yearOfIncorporation"; - @SerializedName(SERIALIZED_NAME_YEAR_OF_INCORPORATION) - private String yearOfIncorporation; - - public static final String SERIALIZED_NAME_COUNTRIES_OF_OPERATION = "countriesOfOperation"; - @SerializedName(SERIALIZED_NAME_COUNTRIES_OF_OPERATION) - private List countriesOfOperation; - - public static final String SERIALIZED_NAME_STOCK_SYMBOL = "stockSymbol"; - @SerializedName(SERIALIZED_NAME_STOCK_SYMBOL) - private String stockSymbol; - - public static final String SERIALIZED_NAME_WEBSITE = "website"; - @SerializedName(SERIALIZED_NAME_WEBSITE) - private String website; - - public static final String SERIALIZED_NAME_BUSINESS_VERTICAL = "businessVertical"; - @SerializedName(SERIALIZED_NAME_BUSINESS_VERTICAL) - private BusinessVertical businessVertical; - - public PatchBusinessApplicationAttributes() { - } - - public PatchBusinessApplicationAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public PatchBusinessApplicationAttributes annualRevenue(BusinessAnnualRevenue annualRevenue) { - - this.annualRevenue = annualRevenue; - return this; - } - - /** - * Get annualRevenue - * @return annualRevenue - **/ - @javax.annotation.Nullable - public BusinessAnnualRevenue getAnnualRevenue() { - return annualRevenue; - } - - - public void setAnnualRevenue(BusinessAnnualRevenue annualRevenue) { - this.annualRevenue = annualRevenue; - } - - - public PatchBusinessApplicationAttributes numberOfEmployees(BusinessNumberOfEmployees numberOfEmployees) { - - this.numberOfEmployees = numberOfEmployees; - return this; - } - - /** - * Get numberOfEmployees - * @return numberOfEmployees - **/ - @javax.annotation.Nullable - public BusinessNumberOfEmployees getNumberOfEmployees() { - return numberOfEmployees; - } - - - public void setNumberOfEmployees(BusinessNumberOfEmployees numberOfEmployees) { - this.numberOfEmployees = numberOfEmployees; - } - - - public PatchBusinessApplicationAttributes cashFlow(CashFlow cashFlow) { - - this.cashFlow = cashFlow; - return this; - } - - /** - * Get cashFlow - * @return cashFlow - **/ - @javax.annotation.Nullable - public CashFlow getCashFlow() { - return cashFlow; - } - - - public void setCashFlow(CashFlow cashFlow) { - this.cashFlow = cashFlow; - } - - - public PatchBusinessApplicationAttributes yearOfIncorporation(String yearOfIncorporation) { - - this.yearOfIncorporation = yearOfIncorporation; - return this; - } - - /** - * Get yearOfIncorporation - * @return yearOfIncorporation - **/ - @javax.annotation.Nullable - public String getYearOfIncorporation() { - return yearOfIncorporation; - } - - - public void setYearOfIncorporation(String yearOfIncorporation) { - this.yearOfIncorporation = yearOfIncorporation; - } - - - public PatchBusinessApplicationAttributes countriesOfOperation(List countriesOfOperation) { - - this.countriesOfOperation = countriesOfOperation; - return this; - } - - public PatchBusinessApplicationAttributes addCountriesOfOperationItem(String countriesOfOperationItem) { - if (this.countriesOfOperation == null) { - this.countriesOfOperation = new ArrayList<>(); - } - this.countriesOfOperation.add(countriesOfOperationItem); - return this; - } - - /** - * Get countriesOfOperation - * @return countriesOfOperation - **/ - @javax.annotation.Nullable - public List getCountriesOfOperation() { - return countriesOfOperation; - } - - - public void setCountriesOfOperation(List countriesOfOperation) { - this.countriesOfOperation = countriesOfOperation; - } - - - public PatchBusinessApplicationAttributes stockSymbol(String stockSymbol) { - - this.stockSymbol = stockSymbol; - return this; - } - - /** - * Get stockSymbol - * @return stockSymbol - **/ - @javax.annotation.Nullable - public String getStockSymbol() { - return stockSymbol; - } - - - public void setStockSymbol(String stockSymbol) { - this.stockSymbol = stockSymbol; - } - - - public PatchBusinessApplicationAttributes website(String website) { - - this.website = website; - return this; - } - - /** - * Get website - * @return website - **/ - @javax.annotation.Nullable - public String getWebsite() { - return website; - } - - - public void setWebsite(String website) { - this.website = website; - } - - - public PatchBusinessApplicationAttributes businessVertical(BusinessVertical businessVertical) { - - this.businessVertical = businessVertical; - return this; - } - - /** - * Get businessVertical - * @return businessVertical - **/ - @javax.annotation.Nullable - public BusinessVertical getBusinessVertical() { - return businessVertical; - } - - - public void setBusinessVertical(BusinessVertical businessVertical) { - this.businessVertical = businessVertical; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchBusinessApplicationAttributes patchBusinessApplicationAttributes = (PatchBusinessApplicationAttributes) o; - return Objects.equals(this.tags, patchBusinessApplicationAttributes.tags) && - Objects.equals(this.annualRevenue, patchBusinessApplicationAttributes.annualRevenue) && - Objects.equals(this.numberOfEmployees, patchBusinessApplicationAttributes.numberOfEmployees) && - Objects.equals(this.cashFlow, patchBusinessApplicationAttributes.cashFlow) && - Objects.equals(this.yearOfIncorporation, patchBusinessApplicationAttributes.yearOfIncorporation) && - Objects.equals(this.countriesOfOperation, patchBusinessApplicationAttributes.countriesOfOperation) && - Objects.equals(this.stockSymbol, patchBusinessApplicationAttributes.stockSymbol) && - Objects.equals(this.website, patchBusinessApplicationAttributes.website) && - Objects.equals(this.businessVertical, patchBusinessApplicationAttributes.businessVertical); - } - - @Override - public int hashCode() { - return Objects.hash(tags, annualRevenue, numberOfEmployees, cashFlow, yearOfIncorporation, countriesOfOperation, stockSymbol, website, businessVertical); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchBusinessApplicationAttributes {\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" annualRevenue: ").append(toIndentedString(annualRevenue)).append("\n"); - sb.append(" numberOfEmployees: ").append(toIndentedString(numberOfEmployees)).append("\n"); - sb.append(" cashFlow: ").append(toIndentedString(cashFlow)).append("\n"); - sb.append(" yearOfIncorporation: ").append(toIndentedString(yearOfIncorporation)).append("\n"); - sb.append(" countriesOfOperation: ").append(toIndentedString(countriesOfOperation)).append("\n"); - sb.append(" stockSymbol: ").append(toIndentedString(stockSymbol)).append("\n"); - sb.append(" website: ").append(toIndentedString(website)).append("\n"); - sb.append(" businessVertical: ").append(toIndentedString(businessVertical)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tags"); - openapiFields.add("annualRevenue"); - openapiFields.add("numberOfEmployees"); - openapiFields.add("cashFlow"); - openapiFields.add("yearOfIncorporation"); - openapiFields.add("countriesOfOperation"); - openapiFields.add("stockSymbol"); - openapiFields.add("website"); - openapiFields.add("businessVertical"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchBusinessApplicationAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchBusinessApplicationAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBusinessApplicationAttributes is not found in the empty JSON string", PatchBusinessApplicationAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchBusinessApplicationAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBusinessApplicationAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("yearOfIncorporation") != null && !jsonObj.get("yearOfIncorporation").isJsonNull()) && !jsonObj.get("yearOfIncorporation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `yearOfIncorporation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("yearOfIncorporation").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("countriesOfOperation") != null && !jsonObj.get("countriesOfOperation").isJsonNull() && !jsonObj.get("countriesOfOperation").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `countriesOfOperation` to be an array in the JSON string but got `%s`", jsonObj.get("countriesOfOperation").toString())); - } - if ((jsonObj.get("stockSymbol") != null && !jsonObj.get("stockSymbol").isJsonNull()) && !jsonObj.get("stockSymbol").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `stockSymbol` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stockSymbol").toString())); - } - if ((jsonObj.get("website") != null && !jsonObj.get("website").isJsonNull()) && !jsonObj.get("website").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `website` to be a primitive type in the JSON string but got `%s`", jsonObj.get("website").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchBusinessApplicationAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchBusinessApplicationAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessApplicationAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchBusinessApplicationAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchBusinessApplicationAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchBusinessApplicationAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchBusinessApplicationAttributes - * @throws IOException if the JSON string is invalid with respect to PatchBusinessApplicationAttributes - */ - public static PatchBusinessApplicationAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchBusinessApplicationAttributes.class); - } - - /** - * Convert an instance of PatchBusinessApplicationAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessApplicationBeneficialOwner.java b/src/main/java/org/openapitools/client/model/PatchBusinessApplicationBeneficialOwner.java deleted file mode 100644 index 2c51f5e7..00000000 --- a/src/main/java/org/openapitools/client/model/PatchBusinessApplicationBeneficialOwner.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchBusinessApplicationBeneficialOwnerAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchBusinessApplicationBeneficialOwner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchBusinessApplicationBeneficialOwner { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "beneficialOwner"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchBusinessApplicationBeneficialOwnerAttributes attributes; - - public PatchBusinessApplicationBeneficialOwner() { - } - - public PatchBusinessApplicationBeneficialOwner type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public PatchBusinessApplicationBeneficialOwner attributes(PatchBusinessApplicationBeneficialOwnerAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchBusinessApplicationBeneficialOwnerAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchBusinessApplicationBeneficialOwnerAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchBusinessApplicationBeneficialOwner patchBusinessApplicationBeneficialOwner = (PatchBusinessApplicationBeneficialOwner) o; - return Objects.equals(this.type, patchBusinessApplicationBeneficialOwner.type) && - Objects.equals(this.attributes, patchBusinessApplicationBeneficialOwner.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchBusinessApplicationBeneficialOwner {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchBusinessApplicationBeneficialOwner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchBusinessApplicationBeneficialOwner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBusinessApplicationBeneficialOwner is not found in the empty JSON string", PatchBusinessApplicationBeneficialOwner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchBusinessApplicationBeneficialOwner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBusinessApplicationBeneficialOwner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchBusinessApplicationBeneficialOwner.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchBusinessApplicationBeneficialOwnerAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchBusinessApplicationBeneficialOwner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchBusinessApplicationBeneficialOwner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessApplicationBeneficialOwner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchBusinessApplicationBeneficialOwner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchBusinessApplicationBeneficialOwner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchBusinessApplicationBeneficialOwner given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchBusinessApplicationBeneficialOwner - * @throws IOException if the JSON string is invalid with respect to PatchBusinessApplicationBeneficialOwner - */ - public static PatchBusinessApplicationBeneficialOwner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchBusinessApplicationBeneficialOwner.class); - } - - /** - * Convert an instance of PatchBusinessApplicationBeneficialOwner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessApplicationBeneficialOwnerAttributes.java b/src/main/java/org/openapitools/client/model/PatchBusinessApplicationBeneficialOwnerAttributes.java deleted file mode 100644 index 028c2b08..00000000 --- a/src/main/java/org/openapitools/client/model/PatchBusinessApplicationBeneficialOwnerAttributes.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AnnualIncome; -import org.openapitools.client.model.Occupation; -import org.openapitools.client.model.SourceOfIncome; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchBusinessApplicationBeneficialOwnerAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchBusinessApplicationBeneficialOwnerAttributes { - public static final String SERIALIZED_NAME_OCCUPATION = "occupation"; - @SerializedName(SERIALIZED_NAME_OCCUPATION) - private Occupation occupation; - - public static final String SERIALIZED_NAME_ANNUAL_INCOME = "annualIncome"; - @SerializedName(SERIALIZED_NAME_ANNUAL_INCOME) - private AnnualIncome annualIncome; - - public static final String SERIALIZED_NAME_SOURCE_OF_INCOME = "sourceOfIncome"; - @SerializedName(SERIALIZED_NAME_SOURCE_OF_INCOME) - private SourceOfIncome sourceOfIncome; - - public PatchBusinessApplicationBeneficialOwnerAttributes() { - } - - public PatchBusinessApplicationBeneficialOwnerAttributes occupation(Occupation occupation) { - - this.occupation = occupation; - return this; - } - - /** - * Get occupation - * @return occupation - **/ - @javax.annotation.Nullable - public Occupation getOccupation() { - return occupation; - } - - - public void setOccupation(Occupation occupation) { - this.occupation = occupation; - } - - - public PatchBusinessApplicationBeneficialOwnerAttributes annualIncome(AnnualIncome annualIncome) { - - this.annualIncome = annualIncome; - return this; - } - - /** - * Get annualIncome - * @return annualIncome - **/ - @javax.annotation.Nullable - public AnnualIncome getAnnualIncome() { - return annualIncome; - } - - - public void setAnnualIncome(AnnualIncome annualIncome) { - this.annualIncome = annualIncome; - } - - - public PatchBusinessApplicationBeneficialOwnerAttributes sourceOfIncome(SourceOfIncome sourceOfIncome) { - - this.sourceOfIncome = sourceOfIncome; - return this; - } - - /** - * Get sourceOfIncome - * @return sourceOfIncome - **/ - @javax.annotation.Nullable - public SourceOfIncome getSourceOfIncome() { - return sourceOfIncome; - } - - - public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { - this.sourceOfIncome = sourceOfIncome; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchBusinessApplicationBeneficialOwnerAttributes patchBusinessApplicationBeneficialOwnerAttributes = (PatchBusinessApplicationBeneficialOwnerAttributes) o; - return Objects.equals(this.occupation, patchBusinessApplicationBeneficialOwnerAttributes.occupation) && - Objects.equals(this.annualIncome, patchBusinessApplicationBeneficialOwnerAttributes.annualIncome) && - Objects.equals(this.sourceOfIncome, patchBusinessApplicationBeneficialOwnerAttributes.sourceOfIncome); - } - - @Override - public int hashCode() { - return Objects.hash(occupation, annualIncome, sourceOfIncome); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchBusinessApplicationBeneficialOwnerAttributes {\n"); - sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); - sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); - sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("occupation"); - openapiFields.add("annualIncome"); - openapiFields.add("sourceOfIncome"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchBusinessApplicationBeneficialOwnerAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchBusinessApplicationBeneficialOwnerAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBusinessApplicationBeneficialOwnerAttributes is not found in the empty JSON string", PatchBusinessApplicationBeneficialOwnerAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchBusinessApplicationBeneficialOwnerAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBusinessApplicationBeneficialOwnerAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchBusinessApplicationBeneficialOwnerAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchBusinessApplicationBeneficialOwnerAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessApplicationBeneficialOwnerAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchBusinessApplicationBeneficialOwnerAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchBusinessApplicationBeneficialOwnerAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchBusinessApplicationBeneficialOwnerAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchBusinessApplicationBeneficialOwnerAttributes - * @throws IOException if the JSON string is invalid with respect to PatchBusinessApplicationBeneficialOwnerAttributes - */ - public static PatchBusinessApplicationBeneficialOwnerAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchBusinessApplicationBeneficialOwnerAttributes.class); - } - - /** - * Convert an instance of PatchBusinessApplicationBeneficialOwnerAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessApplicationOfficer.java b/src/main/java/org/openapitools/client/model/PatchBusinessApplicationOfficer.java deleted file mode 100644 index 1a66cf64..00000000 --- a/src/main/java/org/openapitools/client/model/PatchBusinessApplicationOfficer.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchBusinessApplicationOfficerAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchBusinessApplicationOfficer - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchBusinessApplicationOfficer { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "businessApplication"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchBusinessApplicationOfficerAttributes attributes; - - public PatchBusinessApplicationOfficer() { - } - - public PatchBusinessApplicationOfficer type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public PatchBusinessApplicationOfficer attributes(PatchBusinessApplicationOfficerAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchBusinessApplicationOfficerAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchBusinessApplicationOfficerAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchBusinessApplicationOfficer patchBusinessApplicationOfficer = (PatchBusinessApplicationOfficer) o; - return Objects.equals(this.type, patchBusinessApplicationOfficer.type) && - Objects.equals(this.attributes, patchBusinessApplicationOfficer.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchBusinessApplicationOfficer {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchBusinessApplicationOfficer - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchBusinessApplicationOfficer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBusinessApplicationOfficer is not found in the empty JSON string", PatchBusinessApplicationOfficer.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchBusinessApplicationOfficer.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBusinessApplicationOfficer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchBusinessApplicationOfficer.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchBusinessApplicationOfficerAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchBusinessApplicationOfficer.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchBusinessApplicationOfficer' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessApplicationOfficer.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchBusinessApplicationOfficer value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchBusinessApplicationOfficer read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchBusinessApplicationOfficer given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchBusinessApplicationOfficer - * @throws IOException if the JSON string is invalid with respect to PatchBusinessApplicationOfficer - */ - public static PatchBusinessApplicationOfficer fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchBusinessApplicationOfficer.class); - } - - /** - * Convert an instance of PatchBusinessApplicationOfficer to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessApplicationOfficerAttributes.java b/src/main/java/org/openapitools/client/model/PatchBusinessApplicationOfficerAttributes.java deleted file mode 100644 index 0bef894f..00000000 --- a/src/main/java/org/openapitools/client/model/PatchBusinessApplicationOfficerAttributes.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchBusinessApplicationOfficerAttributesOfficer; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchBusinessApplicationOfficerAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchBusinessApplicationOfficerAttributes { - public static final String SERIALIZED_NAME_OFFICER = "officer"; - @SerializedName(SERIALIZED_NAME_OFFICER) - private PatchBusinessApplicationOfficerAttributesOfficer officer; - - public PatchBusinessApplicationOfficerAttributes() { - } - - public PatchBusinessApplicationOfficerAttributes officer(PatchBusinessApplicationOfficerAttributesOfficer officer) { - - this.officer = officer; - return this; - } - - /** - * Get officer - * @return officer - **/ - @javax.annotation.Nullable - public PatchBusinessApplicationOfficerAttributesOfficer getOfficer() { - return officer; - } - - - public void setOfficer(PatchBusinessApplicationOfficerAttributesOfficer officer) { - this.officer = officer; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchBusinessApplicationOfficerAttributes patchBusinessApplicationOfficerAttributes = (PatchBusinessApplicationOfficerAttributes) o; - return Objects.equals(this.officer, patchBusinessApplicationOfficerAttributes.officer); - } - - @Override - public int hashCode() { - return Objects.hash(officer); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchBusinessApplicationOfficerAttributes {\n"); - sb.append(" officer: ").append(toIndentedString(officer)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("officer"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchBusinessApplicationOfficerAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchBusinessApplicationOfficerAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBusinessApplicationOfficerAttributes is not found in the empty JSON string", PatchBusinessApplicationOfficerAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchBusinessApplicationOfficerAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBusinessApplicationOfficerAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `officer` - if (jsonObj.get("officer") != null && !jsonObj.get("officer").isJsonNull()) { - PatchBusinessApplicationOfficerAttributesOfficer.validateJsonElement(jsonObj.get("officer")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchBusinessApplicationOfficerAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchBusinessApplicationOfficerAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessApplicationOfficerAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchBusinessApplicationOfficerAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchBusinessApplicationOfficerAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchBusinessApplicationOfficerAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchBusinessApplicationOfficerAttributes - * @throws IOException if the JSON string is invalid with respect to PatchBusinessApplicationOfficerAttributes - */ - public static PatchBusinessApplicationOfficerAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchBusinessApplicationOfficerAttributes.class); - } - - /** - * Convert an instance of PatchBusinessApplicationOfficerAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessApplicationOfficerAttributesOfficer.java b/src/main/java/org/openapitools/client/model/PatchBusinessApplicationOfficerAttributesOfficer.java deleted file mode 100644 index 8be70de5..00000000 --- a/src/main/java/org/openapitools/client/model/PatchBusinessApplicationOfficerAttributesOfficer.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AnnualIncome; -import org.openapitools.client.model.Occupation; -import org.openapitools.client.model.SourceOfIncome; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchBusinessApplicationOfficerAttributesOfficer - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchBusinessApplicationOfficerAttributesOfficer { - public static final String SERIALIZED_NAME_OCCUPATION = "occupation"; - @SerializedName(SERIALIZED_NAME_OCCUPATION) - private Occupation occupation; - - public static final String SERIALIZED_NAME_ANNUAL_INCOME = "annualIncome"; - @SerializedName(SERIALIZED_NAME_ANNUAL_INCOME) - private AnnualIncome annualIncome; - - public static final String SERIALIZED_NAME_SOURCE_OF_INCOME = "sourceOfIncome"; - @SerializedName(SERIALIZED_NAME_SOURCE_OF_INCOME) - private SourceOfIncome sourceOfIncome; - - public PatchBusinessApplicationOfficerAttributesOfficer() { - } - - public PatchBusinessApplicationOfficerAttributesOfficer occupation(Occupation occupation) { - - this.occupation = occupation; - return this; - } - - /** - * Get occupation - * @return occupation - **/ - @javax.annotation.Nullable - public Occupation getOccupation() { - return occupation; - } - - - public void setOccupation(Occupation occupation) { - this.occupation = occupation; - } - - - public PatchBusinessApplicationOfficerAttributesOfficer annualIncome(AnnualIncome annualIncome) { - - this.annualIncome = annualIncome; - return this; - } - - /** - * Get annualIncome - * @return annualIncome - **/ - @javax.annotation.Nullable - public AnnualIncome getAnnualIncome() { - return annualIncome; - } - - - public void setAnnualIncome(AnnualIncome annualIncome) { - this.annualIncome = annualIncome; - } - - - public PatchBusinessApplicationOfficerAttributesOfficer sourceOfIncome(SourceOfIncome sourceOfIncome) { - - this.sourceOfIncome = sourceOfIncome; - return this; - } - - /** - * Get sourceOfIncome - * @return sourceOfIncome - **/ - @javax.annotation.Nullable - public SourceOfIncome getSourceOfIncome() { - return sourceOfIncome; - } - - - public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { - this.sourceOfIncome = sourceOfIncome; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchBusinessApplicationOfficerAttributesOfficer patchBusinessApplicationOfficerAttributesOfficer = (PatchBusinessApplicationOfficerAttributesOfficer) o; - return Objects.equals(this.occupation, patchBusinessApplicationOfficerAttributesOfficer.occupation) && - Objects.equals(this.annualIncome, patchBusinessApplicationOfficerAttributesOfficer.annualIncome) && - Objects.equals(this.sourceOfIncome, patchBusinessApplicationOfficerAttributesOfficer.sourceOfIncome); - } - - @Override - public int hashCode() { - return Objects.hash(occupation, annualIncome, sourceOfIncome); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchBusinessApplicationOfficerAttributesOfficer {\n"); - sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); - sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); - sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("occupation"); - openapiFields.add("annualIncome"); - openapiFields.add("sourceOfIncome"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchBusinessApplicationOfficerAttributesOfficer - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchBusinessApplicationOfficerAttributesOfficer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBusinessApplicationOfficerAttributesOfficer is not found in the empty JSON string", PatchBusinessApplicationOfficerAttributesOfficer.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchBusinessApplicationOfficerAttributesOfficer.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBusinessApplicationOfficerAttributesOfficer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchBusinessApplicationOfficerAttributesOfficer.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchBusinessApplicationOfficerAttributesOfficer' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessApplicationOfficerAttributesOfficer.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchBusinessApplicationOfficerAttributesOfficer value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchBusinessApplicationOfficerAttributesOfficer read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchBusinessApplicationOfficerAttributesOfficer given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchBusinessApplicationOfficerAttributesOfficer - * @throws IOException if the JSON string is invalid with respect to PatchBusinessApplicationOfficerAttributesOfficer - */ - public static PatchBusinessApplicationOfficerAttributesOfficer fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchBusinessApplicationOfficerAttributesOfficer.class); - } - - /** - * Convert an instance of PatchBusinessApplicationOfficerAttributesOfficer to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessCreditCard.java b/src/main/java/org/openapitools/client/model/PatchBusinessCreditCard.java deleted file mode 100644 index 36b8dc63..00000000 --- a/src/main/java/org/openapitools/client/model/PatchBusinessCreditCard.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchBusinessDebitCardAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchBusinessCreditCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchBusinessCreditCard { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - BUSINESSCREDITCARD("businessCreditCard"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchBusinessDebitCardAttributes attributes; - - public PatchBusinessCreditCard() { - } - - public PatchBusinessCreditCard type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public PatchBusinessCreditCard attributes(PatchBusinessDebitCardAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchBusinessDebitCardAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchBusinessDebitCardAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchBusinessCreditCard patchBusinessCreditCard = (PatchBusinessCreditCard) o; - return Objects.equals(this.type, patchBusinessCreditCard.type) && - Objects.equals(this.attributes, patchBusinessCreditCard.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchBusinessCreditCard {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchBusinessCreditCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchBusinessCreditCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBusinessCreditCard is not found in the empty JSON string", PatchBusinessCreditCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchBusinessCreditCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBusinessCreditCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchBusinessCreditCard.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchBusinessDebitCardAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchBusinessCreditCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchBusinessCreditCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessCreditCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchBusinessCreditCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchBusinessCreditCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchBusinessCreditCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchBusinessCreditCard - * @throws IOException if the JSON string is invalid with respect to PatchBusinessCreditCard - */ - public static PatchBusinessCreditCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchBusinessCreditCard.class); - } - - /** - * Convert an instance of PatchBusinessCreditCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessDebitCard.java b/src/main/java/org/openapitools/client/model/PatchBusinessDebitCard.java deleted file mode 100644 index 2bf4ebea..00000000 --- a/src/main/java/org/openapitools/client/model/PatchBusinessDebitCard.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchBusinessDebitCardAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchBusinessDebitCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchBusinessDebitCard { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - BUSINESSDEBITCARD("businessDebitCard"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchBusinessDebitCardAttributes attributes; - - public PatchBusinessDebitCard() { - } - - public PatchBusinessDebitCard type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public PatchBusinessDebitCard attributes(PatchBusinessDebitCardAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchBusinessDebitCardAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchBusinessDebitCardAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchBusinessDebitCard patchBusinessDebitCard = (PatchBusinessDebitCard) o; - return Objects.equals(this.type, patchBusinessDebitCard.type) && - Objects.equals(this.attributes, patchBusinessDebitCard.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchBusinessDebitCard {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchBusinessDebitCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchBusinessDebitCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBusinessDebitCard is not found in the empty JSON string", PatchBusinessDebitCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchBusinessDebitCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBusinessDebitCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchBusinessDebitCard.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchBusinessDebitCardAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchBusinessDebitCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchBusinessDebitCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessDebitCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchBusinessDebitCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchBusinessDebitCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchBusinessDebitCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchBusinessDebitCard - * @throws IOException if the JSON string is invalid with respect to PatchBusinessDebitCard - */ - public static PatchBusinessDebitCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchBusinessDebitCard.class); - } - - /** - * Convert an instance of PatchBusinessDebitCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessDebitCardAttributes.java b/src/main/java/org/openapitools/client/model/PatchBusinessDebitCardAttributes.java deleted file mode 100644 index 4bfaf61c..00000000 --- a/src/main/java/org/openapitools/client/model/PatchBusinessDebitCardAttributes.java +++ /dev/null @@ -1,441 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Address; -import org.openapitools.client.model.CardLevelLimits; -import org.openapitools.client.model.Phone; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchBusinessDebitCardAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchBusinessDebitCardAttributes { - public static final String SERIALIZED_NAME_SHIPPING_ADDRESS = "shippingAddress"; - @SerializedName(SERIALIZED_NAME_SHIPPING_ADDRESS) - private Address shippingAddress; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_DESIGN = "design"; - @SerializedName(SERIALIZED_NAME_DESIGN) - private String design; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_LIMITS = "limits"; - @SerializedName(SERIALIZED_NAME_LIMITS) - private CardLevelLimits limits; - - public static final String SERIALIZED_NAME_DEFAULT_FUNDING_ACCOUNT_ID = "defaultFundingAccountId"; - @SerializedName(SERIALIZED_NAME_DEFAULT_FUNDING_ACCOUNT_ID) - private String defaultFundingAccountId; - - public PatchBusinessDebitCardAttributes() { - } - - public PatchBusinessDebitCardAttributes shippingAddress(Address shippingAddress) { - - this.shippingAddress = shippingAddress; - return this; - } - - /** - * Get shippingAddress - * @return shippingAddress - **/ - @javax.annotation.Nullable - public Address getShippingAddress() { - return shippingAddress; - } - - - public void setShippingAddress(Address shippingAddress) { - this.shippingAddress = shippingAddress; - } - - - public PatchBusinessDebitCardAttributes address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public PatchBusinessDebitCardAttributes phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public PatchBusinessDebitCardAttributes email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public PatchBusinessDebitCardAttributes design(String design) { - - this.design = design; - return this; - } - - /** - * Get design - * @return design - **/ - @javax.annotation.Nullable - public String getDesign() { - return design; - } - - - public void setDesign(String design) { - this.design = design; - } - - - public PatchBusinessDebitCardAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public PatchBusinessDebitCardAttributes limits(CardLevelLimits limits) { - - this.limits = limits; - return this; - } - - /** - * Get limits - * @return limits - **/ - @javax.annotation.Nullable - public CardLevelLimits getLimits() { - return limits; - } - - - public void setLimits(CardLevelLimits limits) { - this.limits = limits; - } - - - public PatchBusinessDebitCardAttributes defaultFundingAccountId(String defaultFundingAccountId) { - - this.defaultFundingAccountId = defaultFundingAccountId; - return this; - } - - /** - * Get defaultFundingAccountId - * @return defaultFundingAccountId - **/ - @javax.annotation.Nullable - public String getDefaultFundingAccountId() { - return defaultFundingAccountId; - } - - - public void setDefaultFundingAccountId(String defaultFundingAccountId) { - this.defaultFundingAccountId = defaultFundingAccountId; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchBusinessDebitCardAttributes patchBusinessDebitCardAttributes = (PatchBusinessDebitCardAttributes) o; - return Objects.equals(this.shippingAddress, patchBusinessDebitCardAttributes.shippingAddress) && - Objects.equals(this.address, patchBusinessDebitCardAttributes.address) && - Objects.equals(this.phone, patchBusinessDebitCardAttributes.phone) && - Objects.equals(this.email, patchBusinessDebitCardAttributes.email) && - Objects.equals(this.design, patchBusinessDebitCardAttributes.design) && - Objects.equals(this.tags, patchBusinessDebitCardAttributes.tags) && - Objects.equals(this.limits, patchBusinessDebitCardAttributes.limits) && - Objects.equals(this.defaultFundingAccountId, patchBusinessDebitCardAttributes.defaultFundingAccountId); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(shippingAddress, address, phone, email, design, tags, limits, defaultFundingAccountId); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchBusinessDebitCardAttributes {\n"); - sb.append(" shippingAddress: ").append(toIndentedString(shippingAddress)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" design: ").append(toIndentedString(design)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); - sb.append(" defaultFundingAccountId: ").append(toIndentedString(defaultFundingAccountId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("shippingAddress"); - openapiFields.add("address"); - openapiFields.add("phone"); - openapiFields.add("email"); - openapiFields.add("design"); - openapiFields.add("tags"); - openapiFields.add("limits"); - openapiFields.add("defaultFundingAccountId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchBusinessDebitCardAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchBusinessDebitCardAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBusinessDebitCardAttributes is not found in the empty JSON string", PatchBusinessDebitCardAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchBusinessDebitCardAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBusinessDebitCardAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `shippingAddress` - if (jsonObj.get("shippingAddress") != null && !jsonObj.get("shippingAddress").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("shippingAddress")); - } - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("address")); - } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("design") != null && !jsonObj.get("design").isJsonNull()) && !jsonObj.get("design").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `design` to be a primitive type in the JSON string but got `%s`", jsonObj.get("design").toString())); - } - // validate the optional field `limits` - if (jsonObj.get("limits") != null && !jsonObj.get("limits").isJsonNull()) { - CardLevelLimits.validateJsonElement(jsonObj.get("limits")); - } - if ((jsonObj.get("defaultFundingAccountId") != null && !jsonObj.get("defaultFundingAccountId").isJsonNull()) && !jsonObj.get("defaultFundingAccountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `defaultFundingAccountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("defaultFundingAccountId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchBusinessDebitCardAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchBusinessDebitCardAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessDebitCardAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchBusinessDebitCardAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchBusinessDebitCardAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchBusinessDebitCardAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchBusinessDebitCardAttributes - * @throws IOException if the JSON string is invalid with respect to PatchBusinessDebitCardAttributes - */ - public static PatchBusinessDebitCardAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchBusinessDebitCardAttributes.class); - } - - /** - * Convert an instance of PatchBusinessDebitCardAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessVirtualCreditCard.java b/src/main/java/org/openapitools/client/model/PatchBusinessVirtualCreditCard.java deleted file mode 100644 index ece57cf3..00000000 --- a/src/main/java/org/openapitools/client/model/PatchBusinessVirtualCreditCard.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchBusinessVirtualDebitCardAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchBusinessVirtualCreditCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchBusinessVirtualCreditCard { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - BUSINESSVIRTUALCREDITCARD("businessVirtualCreditCard"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchBusinessVirtualDebitCardAttributes attributes; - - public PatchBusinessVirtualCreditCard() { - } - - public PatchBusinessVirtualCreditCard type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public PatchBusinessVirtualCreditCard attributes(PatchBusinessVirtualDebitCardAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchBusinessVirtualDebitCardAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchBusinessVirtualDebitCardAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchBusinessVirtualCreditCard patchBusinessVirtualCreditCard = (PatchBusinessVirtualCreditCard) o; - return Objects.equals(this.type, patchBusinessVirtualCreditCard.type) && - Objects.equals(this.attributes, patchBusinessVirtualCreditCard.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchBusinessVirtualCreditCard {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchBusinessVirtualCreditCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchBusinessVirtualCreditCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBusinessVirtualCreditCard is not found in the empty JSON string", PatchBusinessVirtualCreditCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchBusinessVirtualCreditCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBusinessVirtualCreditCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchBusinessVirtualCreditCard.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchBusinessVirtualDebitCardAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchBusinessVirtualCreditCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchBusinessVirtualCreditCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessVirtualCreditCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchBusinessVirtualCreditCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchBusinessVirtualCreditCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchBusinessVirtualCreditCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchBusinessVirtualCreditCard - * @throws IOException if the JSON string is invalid with respect to PatchBusinessVirtualCreditCard - */ - public static PatchBusinessVirtualCreditCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchBusinessVirtualCreditCard.class); - } - - /** - * Convert an instance of PatchBusinessVirtualCreditCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessVirtualDebitCard.java b/src/main/java/org/openapitools/client/model/PatchBusinessVirtualDebitCard.java deleted file mode 100644 index 3449f776..00000000 --- a/src/main/java/org/openapitools/client/model/PatchBusinessVirtualDebitCard.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchBusinessVirtualDebitCardAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchBusinessVirtualDebitCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchBusinessVirtualDebitCard { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - BUSINESSVIRTUALDEBITCARD("businessVirtualDebitCard"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchBusinessVirtualDebitCardAttributes attributes; - - public PatchBusinessVirtualDebitCard() { - } - - public PatchBusinessVirtualDebitCard type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public PatchBusinessVirtualDebitCard attributes(PatchBusinessVirtualDebitCardAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchBusinessVirtualDebitCardAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchBusinessVirtualDebitCardAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchBusinessVirtualDebitCard patchBusinessVirtualDebitCard = (PatchBusinessVirtualDebitCard) o; - return Objects.equals(this.type, patchBusinessVirtualDebitCard.type) && - Objects.equals(this.attributes, patchBusinessVirtualDebitCard.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchBusinessVirtualDebitCard {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchBusinessVirtualDebitCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchBusinessVirtualDebitCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBusinessVirtualDebitCard is not found in the empty JSON string", PatchBusinessVirtualDebitCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchBusinessVirtualDebitCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBusinessVirtualDebitCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchBusinessVirtualDebitCard.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchBusinessVirtualDebitCardAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchBusinessVirtualDebitCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchBusinessVirtualDebitCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessVirtualDebitCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchBusinessVirtualDebitCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchBusinessVirtualDebitCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchBusinessVirtualDebitCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchBusinessVirtualDebitCard - * @throws IOException if the JSON string is invalid with respect to PatchBusinessVirtualDebitCard - */ - public static PatchBusinessVirtualDebitCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchBusinessVirtualDebitCard.class); - } - - /** - * Convert an instance of PatchBusinessVirtualDebitCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchBusinessVirtualDebitCardAttributes.java b/src/main/java/org/openapitools/client/model/PatchBusinessVirtualDebitCardAttributes.java deleted file mode 100644 index 8b96b88c..00000000 --- a/src/main/java/org/openapitools/client/model/PatchBusinessVirtualDebitCardAttributes.java +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Address; -import org.openapitools.client.model.CardLevelLimits; -import org.openapitools.client.model.Phone; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchBusinessVirtualDebitCardAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchBusinessVirtualDebitCardAttributes { - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_LIMITS = "limits"; - @SerializedName(SERIALIZED_NAME_LIMITS) - private CardLevelLimits limits; - - public static final String SERIALIZED_NAME_DEFAULT_FUNDING_ACCOUNT_ID = "defaultFundingAccountId"; - @SerializedName(SERIALIZED_NAME_DEFAULT_FUNDING_ACCOUNT_ID) - private String defaultFundingAccountId; - - public PatchBusinessVirtualDebitCardAttributes() { - } - - public PatchBusinessVirtualDebitCardAttributes address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public PatchBusinessVirtualDebitCardAttributes phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public PatchBusinessVirtualDebitCardAttributes email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public PatchBusinessVirtualDebitCardAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public PatchBusinessVirtualDebitCardAttributes limits(CardLevelLimits limits) { - - this.limits = limits; - return this; - } - - /** - * Get limits - * @return limits - **/ - @javax.annotation.Nullable - public CardLevelLimits getLimits() { - return limits; - } - - - public void setLimits(CardLevelLimits limits) { - this.limits = limits; - } - - - public PatchBusinessVirtualDebitCardAttributes defaultFundingAccountId(String defaultFundingAccountId) { - - this.defaultFundingAccountId = defaultFundingAccountId; - return this; - } - - /** - * Get defaultFundingAccountId - * @return defaultFundingAccountId - **/ - @javax.annotation.Nullable - public String getDefaultFundingAccountId() { - return defaultFundingAccountId; - } - - - public void setDefaultFundingAccountId(String defaultFundingAccountId) { - this.defaultFundingAccountId = defaultFundingAccountId; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchBusinessVirtualDebitCardAttributes patchBusinessVirtualDebitCardAttributes = (PatchBusinessVirtualDebitCardAttributes) o; - return Objects.equals(this.address, patchBusinessVirtualDebitCardAttributes.address) && - Objects.equals(this.phone, patchBusinessVirtualDebitCardAttributes.phone) && - Objects.equals(this.email, patchBusinessVirtualDebitCardAttributes.email) && - Objects.equals(this.tags, patchBusinessVirtualDebitCardAttributes.tags) && - Objects.equals(this.limits, patchBusinessVirtualDebitCardAttributes.limits) && - Objects.equals(this.defaultFundingAccountId, patchBusinessVirtualDebitCardAttributes.defaultFundingAccountId); - } - - @Override - public int hashCode() { - return Objects.hash(address, phone, email, tags, limits, defaultFundingAccountId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchBusinessVirtualDebitCardAttributes {\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); - sb.append(" defaultFundingAccountId: ").append(toIndentedString(defaultFundingAccountId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address"); - openapiFields.add("phone"); - openapiFields.add("email"); - openapiFields.add("tags"); - openapiFields.add("limits"); - openapiFields.add("defaultFundingAccountId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchBusinessVirtualDebitCardAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchBusinessVirtualDebitCardAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchBusinessVirtualDebitCardAttributes is not found in the empty JSON string", PatchBusinessVirtualDebitCardAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchBusinessVirtualDebitCardAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchBusinessVirtualDebitCardAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("address")); - } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the optional field `limits` - if (jsonObj.get("limits") != null && !jsonObj.get("limits").isJsonNull()) { - CardLevelLimits.validateJsonElement(jsonObj.get("limits")); - } - if ((jsonObj.get("defaultFundingAccountId") != null && !jsonObj.get("defaultFundingAccountId").isJsonNull()) && !jsonObj.get("defaultFundingAccountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `defaultFundingAccountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("defaultFundingAccountId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchBusinessVirtualDebitCardAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchBusinessVirtualDebitCardAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessVirtualDebitCardAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchBusinessVirtualDebitCardAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchBusinessVirtualDebitCardAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchBusinessVirtualDebitCardAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchBusinessVirtualDebitCardAttributes - * @throws IOException if the JSON string is invalid with respect to PatchBusinessVirtualDebitCardAttributes - */ - public static PatchBusinessVirtualDebitCardAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchBusinessVirtualDebitCardAttributes.class); - } - - /** - * Convert an instance of PatchBusinessVirtualDebitCardAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchChargebackTransaction.java b/src/main/java/org/openapitools/client/model/PatchChargebackTransaction.java deleted file mode 100644 index a1cda800..00000000 --- a/src/main/java/org/openapitools/client/model/PatchChargebackTransaction.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchBookTransactionAttributes; -import org.openapitools.client.model.PatchBookTransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchChargebackTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchChargebackTransaction { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "chargebackTransaction"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchBookTransactionAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private PatchBookTransactionRelationships relationships; - - public PatchChargebackTransaction() { - } - - public PatchChargebackTransaction type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public PatchChargebackTransaction attributes(PatchBookTransactionAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchBookTransactionAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchBookTransactionAttributes attributes) { - this.attributes = attributes; - } - - - public PatchChargebackTransaction relationships(PatchBookTransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public PatchBookTransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(PatchBookTransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchChargebackTransaction patchChargebackTransaction = (PatchChargebackTransaction) o; - return Objects.equals(this.type, patchChargebackTransaction.type) && - Objects.equals(this.attributes, patchChargebackTransaction.attributes) && - Objects.equals(this.relationships, patchChargebackTransaction.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchChargebackTransaction {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchChargebackTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchChargebackTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchChargebackTransaction is not found in the empty JSON string", PatchChargebackTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchChargebackTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchChargebackTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchChargebackTransaction.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchBookTransactionAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the optional field `relationships` - if (jsonObj.get("relationships") != null && !jsonObj.get("relationships").isJsonNull()) { - PatchBookTransactionRelationships.validateJsonElement(jsonObj.get("relationships")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchChargebackTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchChargebackTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchChargebackTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchChargebackTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchChargebackTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchChargebackTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchChargebackTransaction - * @throws IOException if the JSON string is invalid with respect to PatchChargebackTransaction - */ - public static PatchChargebackTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchChargebackTransaction.class); - } - - /** - * Convert an instance of PatchChargebackTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchCheckDeposit.java b/src/main/java/org/openapitools/client/model/PatchCheckDeposit.java deleted file mode 100644 index c9459982..00000000 --- a/src/main/java/org/openapitools/client/model/PatchCheckDeposit.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchCheckDepositAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchCheckDeposit - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchCheckDeposit { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "checkDeposit"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchCheckDepositAttributes attributes; - - public PatchCheckDeposit() { - } - - public PatchCheckDeposit type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public PatchCheckDeposit attributes(PatchCheckDepositAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchCheckDepositAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchCheckDepositAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchCheckDeposit patchCheckDeposit = (PatchCheckDeposit) o; - return Objects.equals(this.type, patchCheckDeposit.type) && - Objects.equals(this.attributes, patchCheckDeposit.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchCheckDeposit {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchCheckDeposit - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchCheckDeposit.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchCheckDeposit is not found in the empty JSON string", PatchCheckDeposit.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchCheckDeposit.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchCheckDeposit` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchCheckDeposit.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchCheckDepositAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchCheckDeposit.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchCheckDeposit' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchCheckDeposit.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchCheckDeposit value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchCheckDeposit read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchCheckDeposit given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchCheckDeposit - * @throws IOException if the JSON string is invalid with respect to PatchCheckDeposit - */ - public static PatchCheckDeposit fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchCheckDeposit.class); - } - - /** - * Convert an instance of PatchCheckDeposit to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchCheckDepositAttributes.java b/src/main/java/org/openapitools/client/model/PatchCheckDepositAttributes.java deleted file mode 100644 index a3b11de2..00000000 --- a/src/main/java/org/openapitools/client/model/PatchCheckDepositAttributes.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchCheckDepositAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchCheckDepositAttributes { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public PatchCheckDepositAttributes() { - } - - public PatchCheckDepositAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nullable - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public PatchCheckDepositAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchCheckDepositAttributes patchCheckDepositAttributes = (PatchCheckDepositAttributes) o; - return Objects.equals(this.amount, patchCheckDepositAttributes.amount) && - Objects.equals(this.tags, patchCheckDepositAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(amount, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchCheckDepositAttributes {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchCheckDepositAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchCheckDepositAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchCheckDepositAttributes is not found in the empty JSON string", PatchCheckDepositAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchCheckDepositAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchCheckDepositAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchCheckDepositAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchCheckDepositAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchCheckDepositAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchCheckDepositAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchCheckDepositAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchCheckDepositAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchCheckDepositAttributes - * @throws IOException if the JSON string is invalid with respect to PatchCheckDepositAttributes - */ - public static PatchCheckDepositAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchCheckDepositAttributes.class); - } - - /** - * Convert an instance of PatchCheckDepositAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchCounterparty.java b/src/main/java/org/openapitools/client/model/PatchCounterparty.java deleted file mode 100644 index d9856933..00000000 --- a/src/main/java/org/openapitools/client/model/PatchCounterparty.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchCounterpartyAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchCounterparty - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchCounterparty { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "counterparty"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchCounterpartyAttributes attributes; - - public PatchCounterparty() { - } - - public PatchCounterparty type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public PatchCounterparty attributes(PatchCounterpartyAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchCounterpartyAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchCounterpartyAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchCounterparty patchCounterparty = (PatchCounterparty) o; - return Objects.equals(this.type, patchCounterparty.type) && - Objects.equals(this.attributes, patchCounterparty.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchCounterparty {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchCounterparty - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchCounterparty.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchCounterparty is not found in the empty JSON string", PatchCounterparty.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchCounterparty.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchCounterparty` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchCounterparty.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchCounterpartyAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchCounterparty.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchCounterparty' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchCounterparty.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchCounterparty value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchCounterparty read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchCounterparty given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchCounterparty - * @throws IOException if the JSON string is invalid with respect to PatchCounterparty - */ - public static PatchCounterparty fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchCounterparty.class); - } - - /** - * Convert an instance of PatchCounterparty to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchCounterpartyAttributes.java b/src/main/java/org/openapitools/client/model/PatchCounterpartyAttributes.java deleted file mode 100644 index 2a670dc4..00000000 --- a/src/main/java/org/openapitools/client/model/PatchCounterpartyAttributes.java +++ /dev/null @@ -1,375 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchCounterpartyAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchCounterpartyAttributes { - public static final String SERIALIZED_NAME_PLAID_PROCESSOR_TOKEN = "plaidProcessorToken"; - @SerializedName(SERIALIZED_NAME_PLAID_PROCESSOR_TOKEN) - private String plaidProcessorToken; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - /** - * Gets or Sets permissions - */ - @JsonAdapter(PermissionsEnum.Adapter.class) - public enum PermissionsEnum { - CREDITONLY("CreditOnly"), - - DEBITONLY("DebitOnly"), - - CREDITANDDEBIT("CreditAndDebit"); - - private String value; - - PermissionsEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PermissionsEnum fromValue(String value) { - for (PermissionsEnum b : PermissionsEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PermissionsEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PermissionsEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PermissionsEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; - @SerializedName(SERIALIZED_NAME_PERMISSIONS) - private PermissionsEnum permissions; - - public static final String SERIALIZED_NAME_VERIFY_NAME = "verifyName"; - @SerializedName(SERIALIZED_NAME_VERIFY_NAME) - private Boolean verifyName = false; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public PatchCounterpartyAttributes() { - } - - public PatchCounterpartyAttributes plaidProcessorToken(String plaidProcessorToken) { - - this.plaidProcessorToken = plaidProcessorToken; - return this; - } - - /** - * Get plaidProcessorToken - * @return plaidProcessorToken - **/ - @javax.annotation.Nullable - public String getPlaidProcessorToken() { - return plaidProcessorToken; - } - - - public void setPlaidProcessorToken(String plaidProcessorToken) { - this.plaidProcessorToken = plaidProcessorToken; - } - - - public PatchCounterpartyAttributes name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public PatchCounterpartyAttributes permissions(PermissionsEnum permissions) { - - this.permissions = permissions; - return this; - } - - /** - * Get permissions - * @return permissions - **/ - @javax.annotation.Nullable - public PermissionsEnum getPermissions() { - return permissions; - } - - - public void setPermissions(PermissionsEnum permissions) { - this.permissions = permissions; - } - - - public PatchCounterpartyAttributes verifyName(Boolean verifyName) { - - this.verifyName = verifyName; - return this; - } - - /** - * Get verifyName - * @return verifyName - **/ - @javax.annotation.Nullable - public Boolean getVerifyName() { - return verifyName; - } - - - public void setVerifyName(Boolean verifyName) { - this.verifyName = verifyName; - } - - - public PatchCounterpartyAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchCounterpartyAttributes patchCounterpartyAttributes = (PatchCounterpartyAttributes) o; - return Objects.equals(this.plaidProcessorToken, patchCounterpartyAttributes.plaidProcessorToken) && - Objects.equals(this.name, patchCounterpartyAttributes.name) && - Objects.equals(this.permissions, patchCounterpartyAttributes.permissions) && - Objects.equals(this.verifyName, patchCounterpartyAttributes.verifyName) && - Objects.equals(this.tags, patchCounterpartyAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(plaidProcessorToken, name, permissions, verifyName, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchCounterpartyAttributes {\n"); - sb.append(" plaidProcessorToken: ").append(toIndentedString(plaidProcessorToken)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); - sb.append(" verifyName: ").append(toIndentedString(verifyName)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("plaidProcessorToken"); - openapiFields.add("name"); - openapiFields.add("permissions"); - openapiFields.add("verifyName"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchCounterpartyAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchCounterpartyAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchCounterpartyAttributes is not found in the empty JSON string", PatchCounterpartyAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchCounterpartyAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchCounterpartyAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("plaidProcessorToken") != null && !jsonObj.get("plaidProcessorToken").isJsonNull()) && !jsonObj.get("plaidProcessorToken").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plaidProcessorToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plaidProcessorToken").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonNull()) && !jsonObj.get("permissions").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `permissions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("permissions").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchCounterpartyAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchCounterpartyAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchCounterpartyAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchCounterpartyAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchCounterpartyAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchCounterpartyAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchCounterpartyAttributes - * @throws IOException if the JSON string is invalid with respect to PatchCounterpartyAttributes - */ - public static PatchCounterpartyAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchCounterpartyAttributes.class); - } - - /** - * Convert an instance of PatchCounterpartyAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchIndividualApplication.java b/src/main/java/org/openapitools/client/model/PatchIndividualApplication.java deleted file mode 100644 index 30951dca..00000000 --- a/src/main/java/org/openapitools/client/model/PatchIndividualApplication.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchIndividualApplicationAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchIndividualApplication - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchIndividualApplication { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "individualApplication"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchIndividualApplicationAttributes attributes; - - public PatchIndividualApplication() { - } - - public PatchIndividualApplication type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public PatchIndividualApplication attributes(PatchIndividualApplicationAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchIndividualApplicationAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchIndividualApplicationAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchIndividualApplication patchIndividualApplication = (PatchIndividualApplication) o; - return Objects.equals(this.type, patchIndividualApplication.type) && - Objects.equals(this.attributes, patchIndividualApplication.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchIndividualApplication {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchIndividualApplication - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchIndividualApplication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchIndividualApplication is not found in the empty JSON string", PatchIndividualApplication.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchIndividualApplication.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchIndividualApplication` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchIndividualApplication.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchIndividualApplicationAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchIndividualApplication.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchIndividualApplication' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchIndividualApplication.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchIndividualApplication value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchIndividualApplication read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchIndividualApplication given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchIndividualApplication - * @throws IOException if the JSON string is invalid with respect to PatchIndividualApplication - */ - public static PatchIndividualApplication fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchIndividualApplication.class); - } - - /** - * Convert an instance of PatchIndividualApplication to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchIndividualApplicationAttributes.java b/src/main/java/org/openapitools/client/model/PatchIndividualApplicationAttributes.java deleted file mode 100644 index 695348dc..00000000 --- a/src/main/java/org/openapitools/client/model/PatchIndividualApplicationAttributes.java +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AnnualIncome; -import org.openapitools.client.model.Occupation; -import org.openapitools.client.model.SourceOfIncome; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchIndividualApplicationAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchIndividualApplicationAttributes { - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_OCCUPATION = "occupation"; - @SerializedName(SERIALIZED_NAME_OCCUPATION) - private Occupation occupation; - - public static final String SERIALIZED_NAME_ANNUAL_INCOME = "annualIncome"; - @SerializedName(SERIALIZED_NAME_ANNUAL_INCOME) - private AnnualIncome annualIncome; - - public static final String SERIALIZED_NAME_SOURCE_OF_INCOME = "sourceOfIncome"; - @SerializedName(SERIALIZED_NAME_SOURCE_OF_INCOME) - private SourceOfIncome sourceOfIncome; - - public PatchIndividualApplicationAttributes() { - } - - public PatchIndividualApplicationAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public PatchIndividualApplicationAttributes occupation(Occupation occupation) { - - this.occupation = occupation; - return this; - } - - /** - * Get occupation - * @return occupation - **/ - @javax.annotation.Nullable - public Occupation getOccupation() { - return occupation; - } - - - public void setOccupation(Occupation occupation) { - this.occupation = occupation; - } - - - public PatchIndividualApplicationAttributes annualIncome(AnnualIncome annualIncome) { - - this.annualIncome = annualIncome; - return this; - } - - /** - * Get annualIncome - * @return annualIncome - **/ - @javax.annotation.Nullable - public AnnualIncome getAnnualIncome() { - return annualIncome; - } - - - public void setAnnualIncome(AnnualIncome annualIncome) { - this.annualIncome = annualIncome; - } - - - public PatchIndividualApplicationAttributes sourceOfIncome(SourceOfIncome sourceOfIncome) { - - this.sourceOfIncome = sourceOfIncome; - return this; - } - - /** - * Get sourceOfIncome - * @return sourceOfIncome - **/ - @javax.annotation.Nullable - public SourceOfIncome getSourceOfIncome() { - return sourceOfIncome; - } - - - public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { - this.sourceOfIncome = sourceOfIncome; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchIndividualApplicationAttributes patchIndividualApplicationAttributes = (PatchIndividualApplicationAttributes) o; - return Objects.equals(this.tags, patchIndividualApplicationAttributes.tags) && - Objects.equals(this.occupation, patchIndividualApplicationAttributes.occupation) && - Objects.equals(this.annualIncome, patchIndividualApplicationAttributes.annualIncome) && - Objects.equals(this.sourceOfIncome, patchIndividualApplicationAttributes.sourceOfIncome); - } - - @Override - public int hashCode() { - return Objects.hash(tags, occupation, annualIncome, sourceOfIncome); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchIndividualApplicationAttributes {\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); - sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); - sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tags"); - openapiFields.add("occupation"); - openapiFields.add("annualIncome"); - openapiFields.add("sourceOfIncome"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchIndividualApplicationAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchIndividualApplicationAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchIndividualApplicationAttributes is not found in the empty JSON string", PatchIndividualApplicationAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchIndividualApplicationAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchIndividualApplicationAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchIndividualApplicationAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchIndividualApplicationAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchIndividualApplicationAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchIndividualApplicationAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchIndividualApplicationAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchIndividualApplicationAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchIndividualApplicationAttributes - * @throws IOException if the JSON string is invalid with respect to PatchIndividualApplicationAttributes - */ - public static PatchIndividualApplicationAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchIndividualApplicationAttributes.class); - } - - /** - * Convert an instance of PatchIndividualApplicationAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchIndividualDebitCard.java b/src/main/java/org/openapitools/client/model/PatchIndividualDebitCard.java deleted file mode 100644 index 468ecfb3..00000000 --- a/src/main/java/org/openapitools/client/model/PatchIndividualDebitCard.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchIndividualDebitCardAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchIndividualDebitCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchIndividualDebitCard { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - INDIVIDUALDEBITCARD("individualDebitCard"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchIndividualDebitCardAttributes attributes; - - public PatchIndividualDebitCard() { - } - - public PatchIndividualDebitCard type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public PatchIndividualDebitCard attributes(PatchIndividualDebitCardAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchIndividualDebitCardAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchIndividualDebitCardAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchIndividualDebitCard patchIndividualDebitCard = (PatchIndividualDebitCard) o; - return Objects.equals(this.type, patchIndividualDebitCard.type) && - Objects.equals(this.attributes, patchIndividualDebitCard.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchIndividualDebitCard {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchIndividualDebitCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchIndividualDebitCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchIndividualDebitCard is not found in the empty JSON string", PatchIndividualDebitCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchIndividualDebitCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchIndividualDebitCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchIndividualDebitCard.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchIndividualDebitCardAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchIndividualDebitCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchIndividualDebitCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchIndividualDebitCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchIndividualDebitCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchIndividualDebitCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchIndividualDebitCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchIndividualDebitCard - * @throws IOException if the JSON string is invalid with respect to PatchIndividualDebitCard - */ - public static PatchIndividualDebitCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchIndividualDebitCard.class); - } - - /** - * Convert an instance of PatchIndividualDebitCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchIndividualDebitCardAttributes.java b/src/main/java/org/openapitools/client/model/PatchIndividualDebitCardAttributes.java deleted file mode 100644 index ab0c1721..00000000 --- a/src/main/java/org/openapitools/client/model/PatchIndividualDebitCardAttributes.java +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Address; -import org.openapitools.client.model.CardLevelLimits; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchIndividualDebitCardAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchIndividualDebitCardAttributes { - public static final String SERIALIZED_NAME_SHIPPING_ADDRESS = "shippingAddress"; - @SerializedName(SERIALIZED_NAME_SHIPPING_ADDRESS) - private Address shippingAddress; - - public static final String SERIALIZED_NAME_DESIGN = "design"; - @SerializedName(SERIALIZED_NAME_DESIGN) - private String design; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_LIMITS = "limits"; - @SerializedName(SERIALIZED_NAME_LIMITS) - private CardLevelLimits limits; - - public static final String SERIALIZED_NAME_DEFAULT_FUNDING_ACCOUNT_ID = "defaultFundingAccountId"; - @SerializedName(SERIALIZED_NAME_DEFAULT_FUNDING_ACCOUNT_ID) - private String defaultFundingAccountId; - - public PatchIndividualDebitCardAttributes() { - } - - public PatchIndividualDebitCardAttributes shippingAddress(Address shippingAddress) { - - this.shippingAddress = shippingAddress; - return this; - } - - /** - * Get shippingAddress - * @return shippingAddress - **/ - @javax.annotation.Nullable - public Address getShippingAddress() { - return shippingAddress; - } - - - public void setShippingAddress(Address shippingAddress) { - this.shippingAddress = shippingAddress; - } - - - public PatchIndividualDebitCardAttributes design(String design) { - - this.design = design; - return this; - } - - /** - * Get design - * @return design - **/ - @javax.annotation.Nullable - public String getDesign() { - return design; - } - - - public void setDesign(String design) { - this.design = design; - } - - - public PatchIndividualDebitCardAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public PatchIndividualDebitCardAttributes limits(CardLevelLimits limits) { - - this.limits = limits; - return this; - } - - /** - * Get limits - * @return limits - **/ - @javax.annotation.Nullable - public CardLevelLimits getLimits() { - return limits; - } - - - public void setLimits(CardLevelLimits limits) { - this.limits = limits; - } - - - public PatchIndividualDebitCardAttributes defaultFundingAccountId(String defaultFundingAccountId) { - - this.defaultFundingAccountId = defaultFundingAccountId; - return this; - } - - /** - * Get defaultFundingAccountId - * @return defaultFundingAccountId - **/ - @javax.annotation.Nullable - public String getDefaultFundingAccountId() { - return defaultFundingAccountId; - } - - - public void setDefaultFundingAccountId(String defaultFundingAccountId) { - this.defaultFundingAccountId = defaultFundingAccountId; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchIndividualDebitCardAttributes patchIndividualDebitCardAttributes = (PatchIndividualDebitCardAttributes) o; - return Objects.equals(this.shippingAddress, patchIndividualDebitCardAttributes.shippingAddress) && - Objects.equals(this.design, patchIndividualDebitCardAttributes.design) && - Objects.equals(this.tags, patchIndividualDebitCardAttributes.tags) && - Objects.equals(this.limits, patchIndividualDebitCardAttributes.limits) && - Objects.equals(this.defaultFundingAccountId, patchIndividualDebitCardAttributes.defaultFundingAccountId); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(shippingAddress, design, tags, limits, defaultFundingAccountId); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchIndividualDebitCardAttributes {\n"); - sb.append(" shippingAddress: ").append(toIndentedString(shippingAddress)).append("\n"); - sb.append(" design: ").append(toIndentedString(design)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); - sb.append(" defaultFundingAccountId: ").append(toIndentedString(defaultFundingAccountId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("shippingAddress"); - openapiFields.add("design"); - openapiFields.add("tags"); - openapiFields.add("limits"); - openapiFields.add("defaultFundingAccountId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchIndividualDebitCardAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchIndividualDebitCardAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchIndividualDebitCardAttributes is not found in the empty JSON string", PatchIndividualDebitCardAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchIndividualDebitCardAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchIndividualDebitCardAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `shippingAddress` - if (jsonObj.get("shippingAddress") != null && !jsonObj.get("shippingAddress").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("shippingAddress")); - } - if ((jsonObj.get("design") != null && !jsonObj.get("design").isJsonNull()) && !jsonObj.get("design").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `design` to be a primitive type in the JSON string but got `%s`", jsonObj.get("design").toString())); - } - // validate the optional field `limits` - if (jsonObj.get("limits") != null && !jsonObj.get("limits").isJsonNull()) { - CardLevelLimits.validateJsonElement(jsonObj.get("limits")); - } - if ((jsonObj.get("defaultFundingAccountId") != null && !jsonObj.get("defaultFundingAccountId").isJsonNull()) && !jsonObj.get("defaultFundingAccountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `defaultFundingAccountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("defaultFundingAccountId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchIndividualDebitCardAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchIndividualDebitCardAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchIndividualDebitCardAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchIndividualDebitCardAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchIndividualDebitCardAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchIndividualDebitCardAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchIndividualDebitCardAttributes - * @throws IOException if the JSON string is invalid with respect to PatchIndividualDebitCardAttributes - */ - public static PatchIndividualDebitCardAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchIndividualDebitCardAttributes.class); - } - - /** - * Convert an instance of PatchIndividualDebitCardAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchIndividualVirtualDebitCard.java b/src/main/java/org/openapitools/client/model/PatchIndividualVirtualDebitCard.java deleted file mode 100644 index 1e6dccac..00000000 --- a/src/main/java/org/openapitools/client/model/PatchIndividualVirtualDebitCard.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchIndividualVirtualDebitCardAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchIndividualVirtualDebitCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchIndividualVirtualDebitCard { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - INDIVIDUALVIRTUALDEBITCARD("individualVirtualDebitCard"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchIndividualVirtualDebitCardAttributes attributes; - - public PatchIndividualVirtualDebitCard() { - } - - public PatchIndividualVirtualDebitCard type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public PatchIndividualVirtualDebitCard attributes(PatchIndividualVirtualDebitCardAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchIndividualVirtualDebitCardAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchIndividualVirtualDebitCardAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchIndividualVirtualDebitCard patchIndividualVirtualDebitCard = (PatchIndividualVirtualDebitCard) o; - return Objects.equals(this.type, patchIndividualVirtualDebitCard.type) && - Objects.equals(this.attributes, patchIndividualVirtualDebitCard.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchIndividualVirtualDebitCard {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchIndividualVirtualDebitCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchIndividualVirtualDebitCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchIndividualVirtualDebitCard is not found in the empty JSON string", PatchIndividualVirtualDebitCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchIndividualVirtualDebitCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchIndividualVirtualDebitCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchIndividualVirtualDebitCard.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchIndividualVirtualDebitCardAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchIndividualVirtualDebitCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchIndividualVirtualDebitCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchIndividualVirtualDebitCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchIndividualVirtualDebitCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchIndividualVirtualDebitCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchIndividualVirtualDebitCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchIndividualVirtualDebitCard - * @throws IOException if the JSON string is invalid with respect to PatchIndividualVirtualDebitCard - */ - public static PatchIndividualVirtualDebitCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchIndividualVirtualDebitCard.class); - } - - /** - * Convert an instance of PatchIndividualVirtualDebitCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchIndividualVirtualDebitCardAttributes.java b/src/main/java/org/openapitools/client/model/PatchIndividualVirtualDebitCardAttributes.java deleted file mode 100644 index 689c54c6..00000000 --- a/src/main/java/org/openapitools/client/model/PatchIndividualVirtualDebitCardAttributes.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CardLevelLimits; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchIndividualVirtualDebitCardAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchIndividualVirtualDebitCardAttributes { - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_LIMITS = "limits"; - @SerializedName(SERIALIZED_NAME_LIMITS) - private CardLevelLimits limits; - - public static final String SERIALIZED_NAME_DEFAULT_FUNDING_ACCOUNT_ID = "defaultFundingAccountId"; - @SerializedName(SERIALIZED_NAME_DEFAULT_FUNDING_ACCOUNT_ID) - private String defaultFundingAccountId; - - public PatchIndividualVirtualDebitCardAttributes() { - } - - public PatchIndividualVirtualDebitCardAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public PatchIndividualVirtualDebitCardAttributes limits(CardLevelLimits limits) { - - this.limits = limits; - return this; - } - - /** - * Get limits - * @return limits - **/ - @javax.annotation.Nullable - public CardLevelLimits getLimits() { - return limits; - } - - - public void setLimits(CardLevelLimits limits) { - this.limits = limits; - } - - - public PatchIndividualVirtualDebitCardAttributes defaultFundingAccountId(String defaultFundingAccountId) { - - this.defaultFundingAccountId = defaultFundingAccountId; - return this; - } - - /** - * Get defaultFundingAccountId - * @return defaultFundingAccountId - **/ - @javax.annotation.Nullable - public String getDefaultFundingAccountId() { - return defaultFundingAccountId; - } - - - public void setDefaultFundingAccountId(String defaultFundingAccountId) { - this.defaultFundingAccountId = defaultFundingAccountId; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchIndividualVirtualDebitCardAttributes patchIndividualVirtualDebitCardAttributes = (PatchIndividualVirtualDebitCardAttributes) o; - return Objects.equals(this.tags, patchIndividualVirtualDebitCardAttributes.tags) && - Objects.equals(this.limits, patchIndividualVirtualDebitCardAttributes.limits) && - Objects.equals(this.defaultFundingAccountId, patchIndividualVirtualDebitCardAttributes.defaultFundingAccountId); - } - - @Override - public int hashCode() { - return Objects.hash(tags, limits, defaultFundingAccountId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchIndividualVirtualDebitCardAttributes {\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); - sb.append(" defaultFundingAccountId: ").append(toIndentedString(defaultFundingAccountId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tags"); - openapiFields.add("limits"); - openapiFields.add("defaultFundingAccountId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchIndividualVirtualDebitCardAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchIndividualVirtualDebitCardAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchIndividualVirtualDebitCardAttributes is not found in the empty JSON string", PatchIndividualVirtualDebitCardAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchIndividualVirtualDebitCardAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchIndividualVirtualDebitCardAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `limits` - if (jsonObj.get("limits") != null && !jsonObj.get("limits").isJsonNull()) { - CardLevelLimits.validateJsonElement(jsonObj.get("limits")); - } - if ((jsonObj.get("defaultFundingAccountId") != null && !jsonObj.get("defaultFundingAccountId").isJsonNull()) && !jsonObj.get("defaultFundingAccountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `defaultFundingAccountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("defaultFundingAccountId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchIndividualVirtualDebitCardAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchIndividualVirtualDebitCardAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchIndividualVirtualDebitCardAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchIndividualVirtualDebitCardAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchIndividualVirtualDebitCardAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchIndividualVirtualDebitCardAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchIndividualVirtualDebitCardAttributes - * @throws IOException if the JSON string is invalid with respect to PatchIndividualVirtualDebitCardAttributes - */ - public static PatchIndividualVirtualDebitCardAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchIndividualVirtualDebitCardAttributes.class); - } - - /** - * Convert an instance of PatchIndividualVirtualDebitCardAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchSoleProprietorApplication.java b/src/main/java/org/openapitools/client/model/PatchSoleProprietorApplication.java deleted file mode 100644 index 3480eb2b..00000000 --- a/src/main/java/org/openapitools/client/model/PatchSoleProprietorApplication.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchSoleProprietorApplicationAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchSoleProprietorApplication - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchSoleProprietorApplication { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "individualApplication"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchSoleProprietorApplicationAttributes attributes; - - public PatchSoleProprietorApplication() { - } - - public PatchSoleProprietorApplication type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public PatchSoleProprietorApplication attributes(PatchSoleProprietorApplicationAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchSoleProprietorApplicationAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchSoleProprietorApplicationAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchSoleProprietorApplication patchSoleProprietorApplication = (PatchSoleProprietorApplication) o; - return Objects.equals(this.type, patchSoleProprietorApplication.type) && - Objects.equals(this.attributes, patchSoleProprietorApplication.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchSoleProprietorApplication {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchSoleProprietorApplication - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchSoleProprietorApplication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchSoleProprietorApplication is not found in the empty JSON string", PatchSoleProprietorApplication.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchSoleProprietorApplication.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchSoleProprietorApplication` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchSoleProprietorApplication.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchSoleProprietorApplicationAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchSoleProprietorApplication.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchSoleProprietorApplication' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchSoleProprietorApplication.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchSoleProprietorApplication value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchSoleProprietorApplication read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchSoleProprietorApplication given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchSoleProprietorApplication - * @throws IOException if the JSON string is invalid with respect to PatchSoleProprietorApplication - */ - public static PatchSoleProprietorApplication fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchSoleProprietorApplication.class); - } - - /** - * Convert an instance of PatchSoleProprietorApplication to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchSoleProprietorApplicationAttributes.java b/src/main/java/org/openapitools/client/model/PatchSoleProprietorApplicationAttributes.java deleted file mode 100644 index 9302c986..00000000 --- a/src/main/java/org/openapitools/client/model/PatchSoleProprietorApplicationAttributes.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.BusinessVertical; -import org.openapitools.client.model.SoleProprietorshipAnnualRevenue; -import org.openapitools.client.model.SoleProprietorshipNumberOfEmployees; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchSoleProprietorApplicationAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchSoleProprietorApplicationAttributes { - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_ANNUAL_REVENUE = "annualRevenue"; - @SerializedName(SERIALIZED_NAME_ANNUAL_REVENUE) - private SoleProprietorshipAnnualRevenue annualRevenue; - - public static final String SERIALIZED_NAME_NUMBER_OF_EMPLOYEES = "numberOfEmployees"; - @SerializedName(SERIALIZED_NAME_NUMBER_OF_EMPLOYEES) - private SoleProprietorshipNumberOfEmployees numberOfEmployees; - - public static final String SERIALIZED_NAME_BUSINESS_VERTICAL = "businessVertical"; - @SerializedName(SERIALIZED_NAME_BUSINESS_VERTICAL) - private BusinessVertical businessVertical; - - public static final String SERIALIZED_NAME_WEBSITE = "website"; - @SerializedName(SERIALIZED_NAME_WEBSITE) - private String website; - - public PatchSoleProprietorApplicationAttributes() { - } - - public PatchSoleProprietorApplicationAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public PatchSoleProprietorApplicationAttributes annualRevenue(SoleProprietorshipAnnualRevenue annualRevenue) { - - this.annualRevenue = annualRevenue; - return this; - } - - /** - * Get annualRevenue - * @return annualRevenue - **/ - @javax.annotation.Nullable - public SoleProprietorshipAnnualRevenue getAnnualRevenue() { - return annualRevenue; - } - - - public void setAnnualRevenue(SoleProprietorshipAnnualRevenue annualRevenue) { - this.annualRevenue = annualRevenue; - } - - - public PatchSoleProprietorApplicationAttributes numberOfEmployees(SoleProprietorshipNumberOfEmployees numberOfEmployees) { - - this.numberOfEmployees = numberOfEmployees; - return this; - } - - /** - * Get numberOfEmployees - * @return numberOfEmployees - **/ - @javax.annotation.Nullable - public SoleProprietorshipNumberOfEmployees getNumberOfEmployees() { - return numberOfEmployees; - } - - - public void setNumberOfEmployees(SoleProprietorshipNumberOfEmployees numberOfEmployees) { - this.numberOfEmployees = numberOfEmployees; - } - - - public PatchSoleProprietorApplicationAttributes businessVertical(BusinessVertical businessVertical) { - - this.businessVertical = businessVertical; - return this; - } - - /** - * Get businessVertical - * @return businessVertical - **/ - @javax.annotation.Nullable - public BusinessVertical getBusinessVertical() { - return businessVertical; - } - - - public void setBusinessVertical(BusinessVertical businessVertical) { - this.businessVertical = businessVertical; - } - - - public PatchSoleProprietorApplicationAttributes website(String website) { - - this.website = website; - return this; - } - - /** - * Get website - * @return website - **/ - @javax.annotation.Nullable - public String getWebsite() { - return website; - } - - - public void setWebsite(String website) { - this.website = website; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchSoleProprietorApplicationAttributes patchSoleProprietorApplicationAttributes = (PatchSoleProprietorApplicationAttributes) o; - return Objects.equals(this.tags, patchSoleProprietorApplicationAttributes.tags) && - Objects.equals(this.annualRevenue, patchSoleProprietorApplicationAttributes.annualRevenue) && - Objects.equals(this.numberOfEmployees, patchSoleProprietorApplicationAttributes.numberOfEmployees) && - Objects.equals(this.businessVertical, patchSoleProprietorApplicationAttributes.businessVertical) && - Objects.equals(this.website, patchSoleProprietorApplicationAttributes.website); - } - - @Override - public int hashCode() { - return Objects.hash(tags, annualRevenue, numberOfEmployees, businessVertical, website); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchSoleProprietorApplicationAttributes {\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" annualRevenue: ").append(toIndentedString(annualRevenue)).append("\n"); - sb.append(" numberOfEmployees: ").append(toIndentedString(numberOfEmployees)).append("\n"); - sb.append(" businessVertical: ").append(toIndentedString(businessVertical)).append("\n"); - sb.append(" website: ").append(toIndentedString(website)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tags"); - openapiFields.add("annualRevenue"); - openapiFields.add("numberOfEmployees"); - openapiFields.add("businessVertical"); - openapiFields.add("website"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchSoleProprietorApplicationAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchSoleProprietorApplicationAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchSoleProprietorApplicationAttributes is not found in the empty JSON string", PatchSoleProprietorApplicationAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchSoleProprietorApplicationAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchSoleProprietorApplicationAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("website") != null && !jsonObj.get("website").isJsonNull()) && !jsonObj.get("website").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `website` to be a primitive type in the JSON string but got `%s`", jsonObj.get("website").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchSoleProprietorApplicationAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchSoleProprietorApplicationAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchSoleProprietorApplicationAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchSoleProprietorApplicationAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchSoleProprietorApplicationAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchSoleProprietorApplicationAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchSoleProprietorApplicationAttributes - * @throws IOException if the JSON string is invalid with respect to PatchSoleProprietorApplicationAttributes - */ - public static PatchSoleProprietorApplicationAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchSoleProprietorApplicationAttributes.class); - } - - /** - * Convert an instance of PatchSoleProprietorApplicationAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchTransactionTags.java b/src/main/java/org/openapitools/client/model/PatchTransactionTags.java deleted file mode 100644 index 3d7695af..00000000 --- a/src/main/java/org/openapitools/client/model/PatchTransactionTags.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchTransactionTagsAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchTransactionTags - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchTransactionTags { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "transaction"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchTransactionTagsAttributes attributes; - - public PatchTransactionTags() { - } - - public PatchTransactionTags type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public PatchTransactionTags attributes(PatchTransactionTagsAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchTransactionTagsAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchTransactionTagsAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchTransactionTags patchTransactionTags = (PatchTransactionTags) o; - return Objects.equals(this.type, patchTransactionTags.type) && - Objects.equals(this.attributes, patchTransactionTags.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchTransactionTags {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchTransactionTags - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchTransactionTags.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchTransactionTags is not found in the empty JSON string", PatchTransactionTags.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchTransactionTags.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchTransactionTags` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchTransactionTags.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchTransactionTagsAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchTransactionTags.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchTransactionTags' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchTransactionTags.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchTransactionTags value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchTransactionTags read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchTransactionTags given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchTransactionTags - * @throws IOException if the JSON string is invalid with respect to PatchTransactionTags - */ - public static PatchTransactionTags fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchTransactionTags.class); - } - - /** - * Convert an instance of PatchTransactionTags to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchTransactionTagsAttributes.java b/src/main/java/org/openapitools/client/model/PatchTransactionTagsAttributes.java deleted file mode 100644 index d151b5ad..00000000 --- a/src/main/java/org/openapitools/client/model/PatchTransactionTagsAttributes.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchTransactionTagsAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchTransactionTagsAttributes { - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public PatchTransactionTagsAttributes() { - } - - public PatchTransactionTagsAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nonnull - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchTransactionTagsAttributes patchTransactionTagsAttributes = (PatchTransactionTagsAttributes) o; - return Objects.equals(this.tags, patchTransactionTagsAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchTransactionTagsAttributes {\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("tags"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchTransactionTagsAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchTransactionTagsAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchTransactionTagsAttributes is not found in the empty JSON string", PatchTransactionTagsAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchTransactionTagsAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchTransactionTagsAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchTransactionTagsAttributes.openapiRequiredFields) { - 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 { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchTransactionTagsAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchTransactionTagsAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchTransactionTagsAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchTransactionTagsAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchTransactionTagsAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchTransactionTagsAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchTransactionTagsAttributes - * @throws IOException if the JSON string is invalid with respect to PatchTransactionTagsAttributes - */ - public static PatchTransactionTagsAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchTransactionTagsAttributes.class); - } - - /** - * Convert an instance of PatchTransactionTagsAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchTrustApplication.java b/src/main/java/org/openapitools/client/model/PatchTrustApplication.java deleted file mode 100644 index 23965abd..00000000 --- a/src/main/java/org/openapitools/client/model/PatchTrustApplication.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchTrustApplicationAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchTrustApplication - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchTrustApplication { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "trustApplication"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchTrustApplicationAttributes attributes; - - public PatchTrustApplication() { - } - - public PatchTrustApplication type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public PatchTrustApplication attributes(PatchTrustApplicationAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PatchTrustApplicationAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PatchTrustApplicationAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchTrustApplication patchTrustApplication = (PatchTrustApplication) o; - return Objects.equals(this.type, patchTrustApplication.type) && - Objects.equals(this.attributes, patchTrustApplication.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchTrustApplication {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchTrustApplication - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchTrustApplication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchTrustApplication is not found in the empty JSON string", PatchTrustApplication.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchTrustApplication.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchTrustApplication` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchTrustApplication.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - PatchTrustApplicationAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchTrustApplication.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchTrustApplication' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchTrustApplication.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchTrustApplication value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchTrustApplication read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchTrustApplication given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchTrustApplication - * @throws IOException if the JSON string is invalid with respect to PatchTrustApplication - */ - public static PatchTrustApplication fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchTrustApplication.class); - } - - /** - * Convert an instance of PatchTrustApplication to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PatchTrustApplicationAttributes.java b/src/main/java/org/openapitools/client/model/PatchTrustApplicationAttributes.java deleted file mode 100644 index ec6a9749..00000000 --- a/src/main/java/org/openapitools/client/model/PatchTrustApplicationAttributes.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PatchTrustApplicationAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchTrustApplicationAttributes { - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public PatchTrustApplicationAttributes() { - } - - public PatchTrustApplicationAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchTrustApplicationAttributes patchTrustApplicationAttributes = (PatchTrustApplicationAttributes) o; - return Objects.equals(this.tags, patchTrustApplicationAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchTrustApplicationAttributes {\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchTrustApplicationAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PatchTrustApplicationAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchTrustApplicationAttributes is not found in the empty JSON string", PatchTrustApplicationAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PatchTrustApplicationAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PatchTrustApplicationAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchTrustApplicationAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchTrustApplicationAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchTrustApplicationAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PatchTrustApplicationAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PatchTrustApplicationAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PatchTrustApplicationAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of PatchTrustApplicationAttributes - * @throws IOException if the JSON string is invalid with respect to PatchTrustApplicationAttributes - */ - public static PatchTrustApplicationAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchTrustApplicationAttributes.class); - } - - /** - * Convert an instance of PatchTrustApplicationAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Payment.java b/src/main/java/org/openapitools/client/model/Payment.java deleted file mode 100644 index d81edbaf..00000000 --- a/src/main/java/org/openapitools/client/model/Payment.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Payment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Payment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - protected String type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public Payment() { - this.type = this.getClass().getSimpleName(); - } - - public Payment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public Payment id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Payment payment = (Payment) o; - return Objects.equals(this.type, payment.type) && - Objects.equals(this.id, payment.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Payment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Payment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Payment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Payment is not found in the empty JSON string", Payment.openapiRequiredFields.toString())); - } - } - - String discriminatorValue = jsonElement.getAsJsonObject().get("type").getAsString(); - switch (discriminatorValue) { - case "achPayment": - AchPayment.validateJsonElement(jsonElement); - break; - case "billPayment": - BillPayment.validateJsonElement(jsonElement); - break; - case "bookPayment": - BookPayment.validateJsonElement(jsonElement); - break; - case "wirePayment": - WirePayment.validateJsonElement(jsonElement); - break; - default: - throw new IllegalArgumentException(String.format("The value of the `type` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); - } - } - - - /** - * Create an instance of Payment given an JSON string - * - * @param jsonString JSON string - * @return An instance of Payment - * @throws IOException if the JSON string is invalid with respect to Payment - */ - public static Payment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Payment.class); - } - - /** - * Convert an instance of Payment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PaymentAdvanceTransaction.java b/src/main/java/org/openapitools/client/model/PaymentAdvanceTransaction.java deleted file mode 100644 index bb1b7615..00000000 --- a/src/main/java/org/openapitools/client/model/PaymentAdvanceTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CheckDepositTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PaymentAdvanceTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PaymentAdvanceTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CheckDepositTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public PaymentAdvanceTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public PaymentAdvanceTransaction attributes(CheckDepositTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CheckDepositTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CheckDepositTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public PaymentAdvanceTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentAdvanceTransaction paymentAdvanceTransaction = (PaymentAdvanceTransaction) o; - return Objects.equals(this.attributes, paymentAdvanceTransaction.attributes) && - Objects.equals(this.relationships, paymentAdvanceTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentAdvanceTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PaymentAdvanceTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PaymentAdvanceTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PaymentAdvanceTransaction is not found in the empty JSON string", PaymentAdvanceTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PaymentAdvanceTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PaymentAdvanceTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PaymentAdvanceTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PaymentAdvanceTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PaymentAdvanceTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PaymentAdvanceTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PaymentAdvanceTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PaymentAdvanceTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PaymentAdvanceTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentAdvanceTransaction - * @throws IOException if the JSON string is invalid with respect to PaymentAdvanceTransaction - */ - public static PaymentAdvanceTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PaymentAdvanceTransaction.class); - } - - /** - * Convert an instance of PaymentAdvanceTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PaymentRelationship.java b/src/main/java/org/openapitools/client/model/PaymentRelationship.java deleted file mode 100644 index ccfb98fe..00000000 --- a/src/main/java/org/openapitools/client/model/PaymentRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PaymentRelationshipData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PaymentRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PaymentRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private PaymentRelationshipData data; - - public PaymentRelationship() { - } - - public PaymentRelationship data(PaymentRelationshipData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public PaymentRelationshipData getData() { - return data; - } - - - public void setData(PaymentRelationshipData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentRelationship paymentRelationship = (PaymentRelationship) o; - return Objects.equals(this.data, paymentRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PaymentRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PaymentRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PaymentRelationship is not found in the empty JSON string", PaymentRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PaymentRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PaymentRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PaymentRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - PaymentRelationshipData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PaymentRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PaymentRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PaymentRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PaymentRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PaymentRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PaymentRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentRelationship - * @throws IOException if the JSON string is invalid with respect to PaymentRelationship - */ - public static PaymentRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PaymentRelationship.class); - } - - /** - * Convert an instance of PaymentRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PaymentRelationshipData.java b/src/main/java/org/openapitools/client/model/PaymentRelationshipData.java deleted file mode 100644 index 281b7068..00000000 --- a/src/main/java/org/openapitools/client/model/PaymentRelationshipData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PaymentRelationshipData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PaymentRelationshipData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "payment"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public PaymentRelationshipData() { - } - - public PaymentRelationshipData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public PaymentRelationshipData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentRelationshipData paymentRelationshipData = (PaymentRelationshipData) o; - return Objects.equals(this.type, paymentRelationshipData.type) && - Objects.equals(this.id, paymentRelationshipData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentRelationshipData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PaymentRelationshipData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PaymentRelationshipData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PaymentRelationshipData is not found in the empty JSON string", PaymentRelationshipData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PaymentRelationshipData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PaymentRelationshipData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PaymentRelationshipData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PaymentRelationshipData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PaymentRelationshipData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PaymentRelationshipData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PaymentRelationshipData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PaymentRelationshipData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PaymentRelationshipData given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentRelationshipData - * @throws IOException if the JSON string is invalid with respect to PaymentRelationshipData - */ - public static PaymentRelationshipData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PaymentRelationshipData.class); - } - - /** - * Convert an instance of PaymentRelationshipData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PaymentRelationships.java b/src/main/java/org/openapitools/client/model/PaymentRelationships.java deleted file mode 100644 index 06e680f4..00000000 --- a/src/main/java/org/openapitools/client/model/PaymentRelationships.java +++ /dev/null @@ -1,479 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PaymentRelationshipsCustomers; -import org.openapitools.client.model.Relationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PaymentRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PaymentRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private Relationship account; - - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private Relationship customer; - - public static final String SERIALIZED_NAME_CUSTOMERS = "customers"; - @SerializedName(SERIALIZED_NAME_CUSTOMERS) - private PaymentRelationshipsCustomers customers; - - public static final String SERIALIZED_NAME_COUNTERPARTY = "counterparty"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY) - private Relationship counterparty; - - public static final String SERIALIZED_NAME_COUNTERPARTY_ACCOUNT = "counterpartyAccount"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_ACCOUNT) - private Relationship counterpartyAccount; - - public static final String SERIALIZED_NAME_TRANSACTION = "transaction"; - @SerializedName(SERIALIZED_NAME_TRANSACTION) - private Relationship transaction; - - public static final String SERIALIZED_NAME_RECURRING_PAYMENT = "recurringPayment"; - @SerializedName(SERIALIZED_NAME_RECURRING_PAYMENT) - private Relationship recurringPayment; - - public PaymentRelationships() { - } - - public PaymentRelationships account(Relationship account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nullable - public Relationship getAccount() { - return account; - } - - - public void setAccount(Relationship account) { - this.account = account; - } - - - public PaymentRelationships customer(Relationship customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nullable - public Relationship getCustomer() { - return customer; - } - - - public void setCustomer(Relationship customer) { - this.customer = customer; - } - - - public PaymentRelationships customers(PaymentRelationshipsCustomers customers) { - - this.customers = customers; - return this; - } - - /** - * Get customers - * @return customers - **/ - @javax.annotation.Nullable - public PaymentRelationshipsCustomers getCustomers() { - return customers; - } - - - public void setCustomers(PaymentRelationshipsCustomers customers) { - this.customers = customers; - } - - - public PaymentRelationships counterparty(Relationship counterparty) { - - this.counterparty = counterparty; - return this; - } - - /** - * Get counterparty - * @return counterparty - **/ - @javax.annotation.Nullable - public Relationship getCounterparty() { - return counterparty; - } - - - public void setCounterparty(Relationship counterparty) { - this.counterparty = counterparty; - } - - - public PaymentRelationships counterpartyAccount(Relationship counterpartyAccount) { - - this.counterpartyAccount = counterpartyAccount; - return this; - } - - /** - * Get counterpartyAccount - * @return counterpartyAccount - **/ - @javax.annotation.Nullable - public Relationship getCounterpartyAccount() { - return counterpartyAccount; - } - - - public void setCounterpartyAccount(Relationship counterpartyAccount) { - this.counterpartyAccount = counterpartyAccount; - } - - - public PaymentRelationships transaction(Relationship transaction) { - - this.transaction = transaction; - return this; - } - - /** - * Get transaction - * @return transaction - **/ - @javax.annotation.Nullable - public Relationship getTransaction() { - return transaction; - } - - - public void setTransaction(Relationship transaction) { - this.transaction = transaction; - } - - - public PaymentRelationships recurringPayment(Relationship recurringPayment) { - - this.recurringPayment = recurringPayment; - return this; - } - - /** - * Get recurringPayment - * @return recurringPayment - **/ - @javax.annotation.Nullable - public Relationship getRecurringPayment() { - return recurringPayment; - } - - - public void setRecurringPayment(Relationship recurringPayment) { - this.recurringPayment = recurringPayment; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PaymentRelationships instance itself - */ - public PaymentRelationships putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentRelationships paymentRelationships = (PaymentRelationships) o; - return Objects.equals(this.account, paymentRelationships.account) && - Objects.equals(this.customer, paymentRelationships.customer) && - Objects.equals(this.customers, paymentRelationships.customers) && - Objects.equals(this.counterparty, paymentRelationships.counterparty) && - Objects.equals(this.counterpartyAccount, paymentRelationships.counterpartyAccount) && - Objects.equals(this.transaction, paymentRelationships.transaction) && - Objects.equals(this.recurringPayment, paymentRelationships.recurringPayment)&& - Objects.equals(this.additionalProperties, paymentRelationships.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(account, customer, customers, counterparty, counterpartyAccount, transaction, recurringPayment, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" customers: ").append(toIndentedString(customers)).append("\n"); - sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); - sb.append(" counterpartyAccount: ").append(toIndentedString(counterpartyAccount)).append("\n"); - sb.append(" transaction: ").append(toIndentedString(transaction)).append("\n"); - sb.append(" recurringPayment: ").append(toIndentedString(recurringPayment)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - openapiFields.add("customer"); - openapiFields.add("customers"); - openapiFields.add("counterparty"); - openapiFields.add("counterpartyAccount"); - openapiFields.add("transaction"); - openapiFields.add("recurringPayment"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PaymentRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PaymentRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PaymentRelationships is not found in the empty JSON string", PaymentRelationships.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `account` - if (jsonObj.get("account") != null && !jsonObj.get("account").isJsonNull()) { - Relationship.validateJsonElement(jsonObj.get("account")); - } - // validate the optional field `customer` - if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { - Relationship.validateJsonElement(jsonObj.get("customer")); - } - // validate the optional field `customers` - if (jsonObj.get("customers") != null && !jsonObj.get("customers").isJsonNull()) { - PaymentRelationshipsCustomers.validateJsonElement(jsonObj.get("customers")); - } - // validate the optional field `counterparty` - if (jsonObj.get("counterparty") != null && !jsonObj.get("counterparty").isJsonNull()) { - Relationship.validateJsonElement(jsonObj.get("counterparty")); - } - // validate the optional field `counterpartyAccount` - if (jsonObj.get("counterpartyAccount") != null && !jsonObj.get("counterpartyAccount").isJsonNull()) { - Relationship.validateJsonElement(jsonObj.get("counterpartyAccount")); - } - // validate the optional field `transaction` - if (jsonObj.get("transaction") != null && !jsonObj.get("transaction").isJsonNull()) { - Relationship.validateJsonElement(jsonObj.get("transaction")); - } - // validate the optional field `recurringPayment` - if (jsonObj.get("recurringPayment") != null && !jsonObj.get("recurringPayment").isJsonNull()) { - Relationship.validateJsonElement(jsonObj.get("recurringPayment")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PaymentRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PaymentRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PaymentRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PaymentRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PaymentRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PaymentRelationships instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PaymentRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentRelationships - * @throws IOException if the JSON string is invalid with respect to PaymentRelationships - */ - public static PaymentRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PaymentRelationships.class); - } - - /** - * Convert an instance of PaymentRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PaymentRelationshipsCustomers.java b/src/main/java/org/openapitools/client/model/PaymentRelationshipsCustomers.java deleted file mode 100644 index 3bc8bac4..00000000 --- a/src/main/java/org/openapitools/client/model/PaymentRelationshipsCustomers.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.PaymentRelationshipsCustomersDataInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PaymentRelationshipsCustomers - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PaymentRelationshipsCustomers { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public PaymentRelationshipsCustomers() { - } - - public PaymentRelationshipsCustomers data(List data) { - - this.data = data; - return this; - } - - public PaymentRelationshipsCustomers addDataItem(PaymentRelationshipsCustomersDataInner dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentRelationshipsCustomers paymentRelationshipsCustomers = (PaymentRelationshipsCustomers) o; - return Objects.equals(this.data, paymentRelationshipsCustomers.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentRelationshipsCustomers {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PaymentRelationshipsCustomers - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PaymentRelationshipsCustomers.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PaymentRelationshipsCustomers is not found in the empty JSON string", PaymentRelationshipsCustomers.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PaymentRelationshipsCustomers.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PaymentRelationshipsCustomers` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - PaymentRelationshipsCustomersDataInner.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PaymentRelationshipsCustomers.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PaymentRelationshipsCustomers' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PaymentRelationshipsCustomers.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PaymentRelationshipsCustomers value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PaymentRelationshipsCustomers read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PaymentRelationshipsCustomers given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentRelationshipsCustomers - * @throws IOException if the JSON string is invalid with respect to PaymentRelationshipsCustomers - */ - public static PaymentRelationshipsCustomers fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PaymentRelationshipsCustomers.class); - } - - /** - * Convert an instance of PaymentRelationshipsCustomers to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PaymentRelationshipsCustomersDataInner.java b/src/main/java/org/openapitools/client/model/PaymentRelationshipsCustomersDataInner.java deleted file mode 100644 index 0dabf57c..00000000 --- a/src/main/java/org/openapitools/client/model/PaymentRelationshipsCustomersDataInner.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PaymentRelationshipsCustomersDataInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PaymentRelationshipsCustomersDataInner { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "org"; - - public PaymentRelationshipsCustomersDataInner() { - } - - public PaymentRelationshipsCustomersDataInner id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public PaymentRelationshipsCustomersDataInner type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentRelationshipsCustomersDataInner paymentRelationshipsCustomersDataInner = (PaymentRelationshipsCustomersDataInner) o; - return Objects.equals(this.id, paymentRelationshipsCustomersDataInner.id) && - Objects.equals(this.type, paymentRelationshipsCustomersDataInner.type); - } - - @Override - public int hashCode() { - return Objects.hash(id, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentRelationshipsCustomersDataInner {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PaymentRelationshipsCustomersDataInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PaymentRelationshipsCustomersDataInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PaymentRelationshipsCustomersDataInner is not found in the empty JSON string", PaymentRelationshipsCustomersDataInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PaymentRelationshipsCustomersDataInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PaymentRelationshipsCustomersDataInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - 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())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PaymentRelationshipsCustomersDataInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PaymentRelationshipsCustomersDataInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PaymentRelationshipsCustomersDataInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PaymentRelationshipsCustomersDataInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PaymentRelationshipsCustomersDataInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PaymentRelationshipsCustomersDataInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentRelationshipsCustomersDataInner - * @throws IOException if the JSON string is invalid with respect to PaymentRelationshipsCustomersDataInner - */ - public static PaymentRelationshipsCustomersDataInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PaymentRelationshipsCustomersDataInner.class); - } - - /** - * Convert an instance of PaymentRelationshipsCustomersDataInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Phone.java b/src/main/java/org/openapitools/client/model/Phone.java deleted file mode 100644 index e276369f..00000000 --- a/src/main/java/org/openapitools/client/model/Phone.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Phone - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Phone { - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_NUMBER = "number"; - @SerializedName(SERIALIZED_NAME_NUMBER) - private String number; - - public Phone() { - } - - public Phone countryCode(String countryCode) { - - this.countryCode = countryCode; - return this; - } - - /** - * Get countryCode - * @return countryCode - **/ - @javax.annotation.Nonnull - public String getCountryCode() { - return countryCode; - } - - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Phone number(String number) { - - this.number = number; - return this; - } - - /** - * Get number - * @return number - **/ - @javax.annotation.Nonnull - public String getNumber() { - return number; - } - - - public void setNumber(String number) { - this.number = number; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Phone phone = (Phone) o; - return Objects.equals(this.countryCode, phone.countryCode) && - Objects.equals(this.number, phone.number); - } - - @Override - public int hashCode() { - return Objects.hash(countryCode, number); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Phone {\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" number: ").append(toIndentedString(number)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("countryCode"); - openapiFields.add("number"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("countryCode"); - openapiRequiredFields.add("number"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Phone - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Phone.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Phone is not found in the empty JSON string", Phone.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Phone.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Phone` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Phone.openapiRequiredFields) { - 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("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - if (!jsonObj.get("number").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `number` to be a primitive type in the JSON string but got `%s`", jsonObj.get("number").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Phone.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Phone' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Phone.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Phone value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Phone read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Phone given an JSON string - * - * @param jsonString JSON string - * @return An instance of Phone - * @throws IOException if the JSON string is invalid with respect to Phone - */ - public static Phone fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Phone.class); - } - - /** - * Convert an instance of Phone to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PhysicalCardStatus.java b/src/main/java/org/openapitools/client/model/PhysicalCardStatus.java deleted file mode 100644 index a69cf9e3..00000000 --- a/src/main/java/org/openapitools/client/model/PhysicalCardStatus.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets physicalCardStatus - */ -@JsonAdapter(PhysicalCardStatus.Adapter.class) -public enum PhysicalCardStatus { - - ACTIVE("Active"), - - INACTIVE("Inactive"), - - STOLEN("Stolen"), - - LOST("Lost"), - - FROZEN("Frozen"), - - CLOSEDBYCUSTOMER("ClosedByCustomer"), - - UNKNOWN("Unknown"), - - SUSPECTEDFRAUD("SuspectedFraud"), - - ACTIVEFORONLINEUSE("ActiveForOnlineUse"); - - private String value; - - PhysicalCardStatus(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PhysicalCardStatus fromValue(String value) { - for (PhysicalCardStatus b : PhysicalCardStatus.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PhysicalCardStatus enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PhysicalCardStatus read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PhysicalCardStatus.fromValue(value); - } - } -} - diff --git a/src/main/java/org/openapitools/client/model/PinStatus.java b/src/main/java/org/openapitools/client/model/PinStatus.java deleted file mode 100644 index f0971db8..00000000 --- a/src/main/java/org/openapitools/client/model/PinStatus.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PinStatusAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PinStatus - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PinStatus { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PinStatusAttributes attributes; - - public PinStatus() { - } - - public PinStatus type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public PinStatus attributes(PinStatusAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public PinStatusAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PinStatusAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PinStatus pinStatus = (PinStatus) o; - return Objects.equals(this.type, pinStatus.type) && - Objects.equals(this.attributes, pinStatus.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PinStatus {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PinStatus - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PinStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PinStatus is not found in the empty JSON string", PinStatus.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PinStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PinStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - PinStatusAttributes.validateJsonElement(jsonObj.get("attributes")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PinStatus.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PinStatus' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PinStatus.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PinStatus value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PinStatus read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PinStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of PinStatus - * @throws IOException if the JSON string is invalid with respect to PinStatus - */ - public static PinStatus fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PinStatus.class); - } - - /** - * Convert an instance of PinStatus to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PinStatusAttributes.java b/src/main/java/org/openapitools/client/model/PinStatusAttributes.java deleted file mode 100644 index bc9a0286..00000000 --- a/src/main/java/org/openapitools/client/model/PinStatusAttributes.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PinStatusAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PinStatusAttributes { - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public PinStatusAttributes() { - } - - public PinStatusAttributes status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PinStatusAttributes pinStatusAttributes = (PinStatusAttributes) o; - return Objects.equals(this.status, pinStatusAttributes.status); - } - - @Override - public int hashCode() { - return Objects.hash(status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PinStatusAttributes {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("status"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PinStatusAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PinStatusAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PinStatusAttributes is not found in the empty JSON string", PinStatusAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PinStatusAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PinStatusAttributes` 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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PinStatusAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PinStatusAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PinStatusAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PinStatusAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PinStatusAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PinStatusAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of PinStatusAttributes - * @throws IOException if the JSON string is invalid with respect to PinStatusAttributes - */ - public static PinStatusAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PinStatusAttributes.class); - } - - /** - * Convert an instance of PinStatusAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PowerOfAttorneyAgent.java b/src/main/java/org/openapitools/client/model/PowerOfAttorneyAgent.java deleted file mode 100644 index 799e4faf..00000000 --- a/src/main/java/org/openapitools/client/model/PowerOfAttorneyAgent.java +++ /dev/null @@ -1,687 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Phone; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PowerOfAttorneyAgent - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PowerOfAttorneyAgent { - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_MATRICULA_CONSULAR = "matriculaConsular"; - @SerializedName(SERIALIZED_NAME_MATRICULA_CONSULAR) - private String matriculaConsular; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Object address; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public static final String SERIALIZED_NAME_EVALUATION_ID = "evaluationId"; - @SerializedName(SERIALIZED_NAME_EVALUATION_ID) - private String evaluationId; - - public static final String SERIALIZED_NAME_EVALUATION_FLAGS = "evaluationFlags"; - @SerializedName(SERIALIZED_NAME_EVALUATION_FLAGS) - private List evaluationFlags; - - public static final String SERIALIZED_NAME_MASKED_S_S_N = "maskedSSN"; - @SerializedName(SERIALIZED_NAME_MASKED_S_S_N) - private String maskedSSN; - - public static final String SERIALIZED_NAME_MASKED_PASSPORT = "maskedPassport"; - @SerializedName(SERIALIZED_NAME_MASKED_PASSPORT) - private String maskedPassport; - - public static final String SERIALIZED_NAME_MASKED_MATRICULA_CONSULAR = "maskedMatriculaConsular"; - @SerializedName(SERIALIZED_NAME_MASKED_MATRICULA_CONSULAR) - private String maskedMatriculaConsular; - - public static final String SERIALIZED_NAME_ID_THEFT_SCORE = "idTheftScore"; - @SerializedName(SERIALIZED_NAME_ID_THEFT_SCORE) - private Integer idTheftScore; - - public PowerOfAttorneyAgent() { - } - - public PowerOfAttorneyAgent status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public PowerOfAttorneyAgent fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nonnull - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public PowerOfAttorneyAgent email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public PowerOfAttorneyAgent phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public PowerOfAttorneyAgent ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public PowerOfAttorneyAgent passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public PowerOfAttorneyAgent nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public PowerOfAttorneyAgent matriculaConsular(String matriculaConsular) { - - this.matriculaConsular = matriculaConsular; - return this; - } - - /** - * Get matriculaConsular - * @return matriculaConsular - **/ - @javax.annotation.Nullable - public String getMatriculaConsular() { - return matriculaConsular; - } - - - public void setMatriculaConsular(String matriculaConsular) { - this.matriculaConsular = matriculaConsular; - } - - - public PowerOfAttorneyAgent address(Object address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Object getAddress() { - return address; - } - - - public void setAddress(Object address) { - this.address = address; - } - - - public PowerOfAttorneyAgent dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nullable - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - public PowerOfAttorneyAgent evaluationId(String evaluationId) { - - this.evaluationId = evaluationId; - return this; - } - - /** - * Get evaluationId - * @return evaluationId - **/ - @javax.annotation.Nullable - public String getEvaluationId() { - return evaluationId; - } - - - public void setEvaluationId(String evaluationId) { - this.evaluationId = evaluationId; - } - - - public PowerOfAttorneyAgent evaluationFlags(List evaluationFlags) { - - this.evaluationFlags = evaluationFlags; - return this; - } - - public PowerOfAttorneyAgent addEvaluationFlagsItem(String evaluationFlagsItem) { - if (this.evaluationFlags == null) { - this.evaluationFlags = new ArrayList<>(); - } - this.evaluationFlags.add(evaluationFlagsItem); - return this; - } - - /** - * Get evaluationFlags - * @return evaluationFlags - **/ - @javax.annotation.Nullable - public List getEvaluationFlags() { - return evaluationFlags; - } - - - public void setEvaluationFlags(List evaluationFlags) { - this.evaluationFlags = evaluationFlags; - } - - - public PowerOfAttorneyAgent maskedSSN(String maskedSSN) { - - this.maskedSSN = maskedSSN; - return this; - } - - /** - * Get maskedSSN - * @return maskedSSN - **/ - @javax.annotation.Nullable - public String getMaskedSSN() { - return maskedSSN; - } - - - public void setMaskedSSN(String maskedSSN) { - this.maskedSSN = maskedSSN; - } - - - public PowerOfAttorneyAgent maskedPassport(String maskedPassport) { - - this.maskedPassport = maskedPassport; - return this; - } - - /** - * Get maskedPassport - * @return maskedPassport - **/ - @javax.annotation.Nullable - public String getMaskedPassport() { - return maskedPassport; - } - - - public void setMaskedPassport(String maskedPassport) { - this.maskedPassport = maskedPassport; - } - - - public PowerOfAttorneyAgent maskedMatriculaConsular(String maskedMatriculaConsular) { - - this.maskedMatriculaConsular = maskedMatriculaConsular; - return this; - } - - /** - * Get maskedMatriculaConsular - * @return maskedMatriculaConsular - **/ - @javax.annotation.Nullable - public String getMaskedMatriculaConsular() { - return maskedMatriculaConsular; - } - - - public void setMaskedMatriculaConsular(String maskedMatriculaConsular) { - this.maskedMatriculaConsular = maskedMatriculaConsular; - } - - - public PowerOfAttorneyAgent idTheftScore(Integer idTheftScore) { - - this.idTheftScore = idTheftScore; - return this; - } - - /** - * Get idTheftScore - * @return idTheftScore - **/ - @javax.annotation.Nullable - public Integer getIdTheftScore() { - return idTheftScore; - } - - - public void setIdTheftScore(Integer idTheftScore) { - this.idTheftScore = idTheftScore; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PowerOfAttorneyAgent powerOfAttorneyAgent = (PowerOfAttorneyAgent) o; - return Objects.equals(this.status, powerOfAttorneyAgent.status) && - Objects.equals(this.fullName, powerOfAttorneyAgent.fullName) && - Objects.equals(this.email, powerOfAttorneyAgent.email) && - Objects.equals(this.phone, powerOfAttorneyAgent.phone) && - Objects.equals(this.ssn, powerOfAttorneyAgent.ssn) && - Objects.equals(this.passport, powerOfAttorneyAgent.passport) && - Objects.equals(this.nationality, powerOfAttorneyAgent.nationality) && - Objects.equals(this.matriculaConsular, powerOfAttorneyAgent.matriculaConsular) && - Objects.equals(this.address, powerOfAttorneyAgent.address) && - Objects.equals(this.dateOfBirth, powerOfAttorneyAgent.dateOfBirth) && - Objects.equals(this.evaluationId, powerOfAttorneyAgent.evaluationId) && - Objects.equals(this.evaluationFlags, powerOfAttorneyAgent.evaluationFlags) && - Objects.equals(this.maskedSSN, powerOfAttorneyAgent.maskedSSN) && - Objects.equals(this.maskedPassport, powerOfAttorneyAgent.maskedPassport) && - Objects.equals(this.maskedMatriculaConsular, powerOfAttorneyAgent.maskedMatriculaConsular) && - Objects.equals(this.idTheftScore, powerOfAttorneyAgent.idTheftScore); - } - - @Override - public int hashCode() { - return Objects.hash(status, fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, evaluationId, evaluationFlags, maskedSSN, maskedPassport, maskedMatriculaConsular, idTheftScore); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PowerOfAttorneyAgent {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); - sb.append(" evaluationFlags: ").append(toIndentedString(evaluationFlags)).append("\n"); - sb.append(" maskedSSN: ").append(toIndentedString(maskedSSN)).append("\n"); - sb.append(" maskedPassport: ").append(toIndentedString(maskedPassport)).append("\n"); - sb.append(" maskedMatriculaConsular: ").append(toIndentedString(maskedMatriculaConsular)).append("\n"); - sb.append(" idTheftScore: ").append(toIndentedString(idTheftScore)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("status"); - openapiFields.add("fullName"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("nationality"); - openapiFields.add("matriculaConsular"); - openapiFields.add("address"); - openapiFields.add("dateOfBirth"); - openapiFields.add("evaluationId"); - openapiFields.add("evaluationFlags"); - openapiFields.add("maskedSSN"); - openapiFields.add("maskedPassport"); - openapiFields.add("maskedMatriculaConsular"); - openapiFields.add("idTheftScore"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("fullName"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PowerOfAttorneyAgent - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PowerOfAttorneyAgent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PowerOfAttorneyAgent is not found in the empty JSON string", PowerOfAttorneyAgent.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PowerOfAttorneyAgent.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PowerOfAttorneyAgent` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PowerOfAttorneyAgent.openapiRequiredFields) { - 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("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())); - } - // validate the required field `fullName` - FullName.validateJsonElement(jsonObj.get("fullName")); - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); - } - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - if ((jsonObj.get("matriculaConsular") != null && !jsonObj.get("matriculaConsular").isJsonNull()) && !jsonObj.get("matriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `matriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("matriculaConsular").toString())); - } - if ((jsonObj.get("evaluationId") != null && !jsonObj.get("evaluationId").isJsonNull()) && !jsonObj.get("evaluationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("evaluationFlags") != null && !jsonObj.get("evaluationFlags").isJsonNull() && !jsonObj.get("evaluationFlags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationFlags` to be an array in the JSON string but got `%s`", jsonObj.get("evaluationFlags").toString())); - } - if ((jsonObj.get("maskedSSN") != null && !jsonObj.get("maskedSSN").isJsonNull()) && !jsonObj.get("maskedSSN").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedSSN` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedSSN").toString())); - } - if ((jsonObj.get("maskedPassport") != null && !jsonObj.get("maskedPassport").isJsonNull()) && !jsonObj.get("maskedPassport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedPassport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedPassport").toString())); - } - if ((jsonObj.get("maskedMatriculaConsular") != null && !jsonObj.get("maskedMatriculaConsular").isJsonNull()) && !jsonObj.get("maskedMatriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskedMatriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskedMatriculaConsular").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PowerOfAttorneyAgent.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PowerOfAttorneyAgent' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PowerOfAttorneyAgent.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PowerOfAttorneyAgent value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PowerOfAttorneyAgent read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PowerOfAttorneyAgent given an JSON string - * - * @param jsonString JSON string - * @return An instance of PowerOfAttorneyAgent - * @throws IOException if the JSON string is invalid with respect to PowerOfAttorneyAgent - */ - public static PowerOfAttorneyAgent fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PowerOfAttorneyAgent.class); - } - - /** - * Convert an instance of PowerOfAttorneyAgent to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PurchaseAuthorizationRequest.java b/src/main/java/org/openapitools/client/model/PurchaseAuthorizationRequest.java deleted file mode 100644 index 0b0f20a1..00000000 --- a/src/main/java/org/openapitools/client/model/PurchaseAuthorizationRequest.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AuthorizationRequest; -import org.openapitools.client.model.AuthorizationRequestRelationships; -import org.openapitools.client.model.PurchaseAuthorizationRequestAllOfAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PurchaseAuthorizationRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PurchaseAuthorizationRequest extends AuthorizationRequest { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PurchaseAuthorizationRequestAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private AuthorizationRequestRelationships relationships; - - public PurchaseAuthorizationRequest() { - this.type = this.getClass().getSimpleName(); - } - - public PurchaseAuthorizationRequest attributes(PurchaseAuthorizationRequestAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public PurchaseAuthorizationRequestAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PurchaseAuthorizationRequestAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public PurchaseAuthorizationRequest relationships(AuthorizationRequestRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public AuthorizationRequestRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(AuthorizationRequestRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PurchaseAuthorizationRequest purchaseAuthorizationRequest = (PurchaseAuthorizationRequest) o; - return Objects.equals(this.attributes, purchaseAuthorizationRequest.attributes) && - Objects.equals(this.relationships, purchaseAuthorizationRequest.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PurchaseAuthorizationRequest {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PurchaseAuthorizationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PurchaseAuthorizationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PurchaseAuthorizationRequest is not found in the empty JSON string", PurchaseAuthorizationRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PurchaseAuthorizationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PurchaseAuthorizationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PurchaseAuthorizationRequest.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PurchaseAuthorizationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PurchaseAuthorizationRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PurchaseAuthorizationRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PurchaseAuthorizationRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PurchaseAuthorizationRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PurchaseAuthorizationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of PurchaseAuthorizationRequest - * @throws IOException if the JSON string is invalid with respect to PurchaseAuthorizationRequest - */ - public static PurchaseAuthorizationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PurchaseAuthorizationRequest.class); - } - - /** - * Convert an instance of PurchaseAuthorizationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PurchaseAuthorizationRequestAllOfAttributes.java b/src/main/java/org/openapitools/client/model/PurchaseAuthorizationRequestAllOfAttributes.java deleted file mode 100644 index bb383d06..00000000 --- a/src/main/java/org/openapitools/client/model/PurchaseAuthorizationRequestAllOfAttributes.java +++ /dev/null @@ -1,695 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.CardVerificationData; -import org.openapitools.client.model.HealthcareAmounts; -import org.openapitools.client.model.Merchant; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PurchaseAuthorizationRequestAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PurchaseAuthorizationRequestAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_PARTIAL_APPROVAL_ALLOWED = "partialApprovalAllowed"; - @SerializedName(SERIALIZED_NAME_PARTIAL_APPROVAL_ALLOWED) - private Boolean partialApprovalAllowed; - - public static final String SERIALIZED_NAME_APPROVED_AMOUNT = "approvedAmount"; - @SerializedName(SERIALIZED_NAME_APPROVED_AMOUNT) - private Integer approvedAmount; - - public static final String SERIALIZED_NAME_DECLINE_REASON = "declineReason"; - @SerializedName(SERIALIZED_NAME_DECLINE_REASON) - private String declineReason; - - public static final String SERIALIZED_NAME_MERCHANT = "merchant"; - @SerializedName(SERIALIZED_NAME_MERCHANT) - private Merchant merchant; - - public static final String SERIALIZED_NAME_RECURRING = "recurring"; - @SerializedName(SERIALIZED_NAME_RECURRING) - private Boolean recurring; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_HEALTHCARE_AMOUNTS = "healthcareAmounts"; - @SerializedName(SERIALIZED_NAME_HEALTHCARE_AMOUNTS) - private HealthcareAmounts healthcareAmounts; - - public static final String SERIALIZED_NAME_PAYMENT_METHOD = "paymentMethod"; - @SerializedName(SERIALIZED_NAME_PAYMENT_METHOD) - private String paymentMethod; - - public static final String SERIALIZED_NAME_DIGITAL_WALLET = "digitalWallet"; - @SerializedName(SERIALIZED_NAME_DIGITAL_WALLET) - private String digitalWallet; - - public static final String SERIALIZED_NAME_CARD_VERIFICATION_DATA = "cardVerificationData"; - @SerializedName(SERIALIZED_NAME_CARD_VERIFICATION_DATA) - private CardVerificationData cardVerificationData; - - public static final String SERIALIZED_NAME_ECOMMERCE = "ecommerce"; - @SerializedName(SERIALIZED_NAME_ECOMMERCE) - private Boolean ecommerce; - - public static final String SERIALIZED_NAME_CARD_PRESENT = "cardPresent"; - @SerializedName(SERIALIZED_NAME_CARD_PRESENT) - private Boolean cardPresent; - - public static final String SERIALIZED_NAME_CARD_NETWORK = "cardNetwork"; - @SerializedName(SERIALIZED_NAME_CARD_NETWORK) - private String cardNetwork; - - public static final String SERIALIZED_NAME_CASH_WITHDRAWAL_AMOUNT = "cashWithdrawalAmount"; - @SerializedName(SERIALIZED_NAME_CASH_WITHDRAWAL_AMOUNT) - private Integer cashWithdrawalAmount; - - public PurchaseAuthorizationRequestAllOfAttributes() { - } - - public PurchaseAuthorizationRequestAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public PurchaseAuthorizationRequestAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public PurchaseAuthorizationRequestAllOfAttributes status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public PurchaseAuthorizationRequestAllOfAttributes partialApprovalAllowed(Boolean partialApprovalAllowed) { - - this.partialApprovalAllowed = partialApprovalAllowed; - return this; - } - - /** - * Get partialApprovalAllowed - * @return partialApprovalAllowed - **/ - @javax.annotation.Nonnull - public Boolean getPartialApprovalAllowed() { - return partialApprovalAllowed; - } - - - public void setPartialApprovalAllowed(Boolean partialApprovalAllowed) { - this.partialApprovalAllowed = partialApprovalAllowed; - } - - - public PurchaseAuthorizationRequestAllOfAttributes approvedAmount(Integer approvedAmount) { - - this.approvedAmount = approvedAmount; - return this; - } - - /** - * Get approvedAmount - * @return approvedAmount - **/ - @javax.annotation.Nullable - public Integer getApprovedAmount() { - return approvedAmount; - } - - - public void setApprovedAmount(Integer approvedAmount) { - this.approvedAmount = approvedAmount; - } - - - public PurchaseAuthorizationRequestAllOfAttributes declineReason(String declineReason) { - - this.declineReason = declineReason; - return this; - } - - /** - * Get declineReason - * @return declineReason - **/ - @javax.annotation.Nullable - public String getDeclineReason() { - return declineReason; - } - - - public void setDeclineReason(String declineReason) { - this.declineReason = declineReason; - } - - - public PurchaseAuthorizationRequestAllOfAttributes merchant(Merchant merchant) { - - this.merchant = merchant; - return this; - } - - /** - * Get merchant - * @return merchant - **/ - @javax.annotation.Nonnull - public Merchant getMerchant() { - return merchant; - } - - - public void setMerchant(Merchant merchant) { - this.merchant = merchant; - } - - - public PurchaseAuthorizationRequestAllOfAttributes recurring(Boolean recurring) { - - this.recurring = recurring; - return this; - } - - /** - * Get recurring - * @return recurring - **/ - @javax.annotation.Nonnull - public Boolean getRecurring() { - return recurring; - } - - - public void setRecurring(Boolean recurring) { - this.recurring = recurring; - } - - - public PurchaseAuthorizationRequestAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public PurchaseAuthorizationRequestAllOfAttributes healthcareAmounts(HealthcareAmounts healthcareAmounts) { - - this.healthcareAmounts = healthcareAmounts; - return this; - } - - /** - * Get healthcareAmounts - * @return healthcareAmounts - **/ - @javax.annotation.Nullable - public HealthcareAmounts getHealthcareAmounts() { - return healthcareAmounts; - } - - - public void setHealthcareAmounts(HealthcareAmounts healthcareAmounts) { - this.healthcareAmounts = healthcareAmounts; - } - - - public PurchaseAuthorizationRequestAllOfAttributes paymentMethod(String paymentMethod) { - - this.paymentMethod = paymentMethod; - return this; - } - - /** - * Get paymentMethod - * @return paymentMethod - **/ - @javax.annotation.Nullable - public String getPaymentMethod() { - return paymentMethod; - } - - - public void setPaymentMethod(String paymentMethod) { - this.paymentMethod = paymentMethod; - } - - - public PurchaseAuthorizationRequestAllOfAttributes digitalWallet(String digitalWallet) { - - this.digitalWallet = digitalWallet; - return this; - } - - /** - * Get digitalWallet - * @return digitalWallet - **/ - @javax.annotation.Nullable - public String getDigitalWallet() { - return digitalWallet; - } - - - public void setDigitalWallet(String digitalWallet) { - this.digitalWallet = digitalWallet; - } - - - public PurchaseAuthorizationRequestAllOfAttributes cardVerificationData(CardVerificationData cardVerificationData) { - - this.cardVerificationData = cardVerificationData; - return this; - } - - /** - * Get cardVerificationData - * @return cardVerificationData - **/ - @javax.annotation.Nullable - public CardVerificationData getCardVerificationData() { - return cardVerificationData; - } - - - public void setCardVerificationData(CardVerificationData cardVerificationData) { - this.cardVerificationData = cardVerificationData; - } - - - public PurchaseAuthorizationRequestAllOfAttributes ecommerce(Boolean ecommerce) { - - this.ecommerce = ecommerce; - return this; - } - - /** - * Get ecommerce - * @return ecommerce - **/ - @javax.annotation.Nullable - public Boolean getEcommerce() { - return ecommerce; - } - - - public void setEcommerce(Boolean ecommerce) { - this.ecommerce = ecommerce; - } - - - public PurchaseAuthorizationRequestAllOfAttributes cardPresent(Boolean cardPresent) { - - this.cardPresent = cardPresent; - return this; - } - - /** - * Get cardPresent - * @return cardPresent - **/ - @javax.annotation.Nullable - public Boolean getCardPresent() { - return cardPresent; - } - - - public void setCardPresent(Boolean cardPresent) { - this.cardPresent = cardPresent; - } - - - public PurchaseAuthorizationRequestAllOfAttributes cardNetwork(String cardNetwork) { - - this.cardNetwork = cardNetwork; - return this; - } - - /** - * Get cardNetwork - * @return cardNetwork - **/ - @javax.annotation.Nullable - public String getCardNetwork() { - return cardNetwork; - } - - - public void setCardNetwork(String cardNetwork) { - this.cardNetwork = cardNetwork; - } - - - public PurchaseAuthorizationRequestAllOfAttributes cashWithdrawalAmount(Integer cashWithdrawalAmount) { - - this.cashWithdrawalAmount = cashWithdrawalAmount; - return this; - } - - /** - * Get cashWithdrawalAmount - * @return cashWithdrawalAmount - **/ - @javax.annotation.Nullable - public Integer getCashWithdrawalAmount() { - return cashWithdrawalAmount; - } - - - public void setCashWithdrawalAmount(Integer cashWithdrawalAmount) { - this.cashWithdrawalAmount = cashWithdrawalAmount; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PurchaseAuthorizationRequestAllOfAttributes purchaseAuthorizationRequestAllOfAttributes = (PurchaseAuthorizationRequestAllOfAttributes) o; - return Objects.equals(this.createdAt, purchaseAuthorizationRequestAllOfAttributes.createdAt) && - Objects.equals(this.amount, purchaseAuthorizationRequestAllOfAttributes.amount) && - Objects.equals(this.status, purchaseAuthorizationRequestAllOfAttributes.status) && - Objects.equals(this.partialApprovalAllowed, purchaseAuthorizationRequestAllOfAttributes.partialApprovalAllowed) && - Objects.equals(this.approvedAmount, purchaseAuthorizationRequestAllOfAttributes.approvedAmount) && - Objects.equals(this.declineReason, purchaseAuthorizationRequestAllOfAttributes.declineReason) && - Objects.equals(this.merchant, purchaseAuthorizationRequestAllOfAttributes.merchant) && - Objects.equals(this.recurring, purchaseAuthorizationRequestAllOfAttributes.recurring) && - Objects.equals(this.tags, purchaseAuthorizationRequestAllOfAttributes.tags) && - Objects.equals(this.healthcareAmounts, purchaseAuthorizationRequestAllOfAttributes.healthcareAmounts) && - Objects.equals(this.paymentMethod, purchaseAuthorizationRequestAllOfAttributes.paymentMethod) && - Objects.equals(this.digitalWallet, purchaseAuthorizationRequestAllOfAttributes.digitalWallet) && - Objects.equals(this.cardVerificationData, purchaseAuthorizationRequestAllOfAttributes.cardVerificationData) && - Objects.equals(this.ecommerce, purchaseAuthorizationRequestAllOfAttributes.ecommerce) && - Objects.equals(this.cardPresent, purchaseAuthorizationRequestAllOfAttributes.cardPresent) && - Objects.equals(this.cardNetwork, purchaseAuthorizationRequestAllOfAttributes.cardNetwork) && - Objects.equals(this.cashWithdrawalAmount, purchaseAuthorizationRequestAllOfAttributes.cashWithdrawalAmount); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, amount, status, partialApprovalAllowed, approvedAmount, declineReason, merchant, recurring, tags, healthcareAmounts, paymentMethod, digitalWallet, cardVerificationData, ecommerce, cardPresent, cardNetwork, cashWithdrawalAmount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PurchaseAuthorizationRequestAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" partialApprovalAllowed: ").append(toIndentedString(partialApprovalAllowed)).append("\n"); - sb.append(" approvedAmount: ").append(toIndentedString(approvedAmount)).append("\n"); - sb.append(" declineReason: ").append(toIndentedString(declineReason)).append("\n"); - sb.append(" merchant: ").append(toIndentedString(merchant)).append("\n"); - sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" healthcareAmounts: ").append(toIndentedString(healthcareAmounts)).append("\n"); - sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n"); - sb.append(" digitalWallet: ").append(toIndentedString(digitalWallet)).append("\n"); - sb.append(" cardVerificationData: ").append(toIndentedString(cardVerificationData)).append("\n"); - sb.append(" ecommerce: ").append(toIndentedString(ecommerce)).append("\n"); - sb.append(" cardPresent: ").append(toIndentedString(cardPresent)).append("\n"); - sb.append(" cardNetwork: ").append(toIndentedString(cardNetwork)).append("\n"); - sb.append(" cashWithdrawalAmount: ").append(toIndentedString(cashWithdrawalAmount)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("amount"); - openapiFields.add("status"); - openapiFields.add("partialApprovalAllowed"); - openapiFields.add("approvedAmount"); - openapiFields.add("declineReason"); - openapiFields.add("merchant"); - openapiFields.add("recurring"); - openapiFields.add("tags"); - openapiFields.add("healthcareAmounts"); - openapiFields.add("paymentMethod"); - openapiFields.add("digitalWallet"); - openapiFields.add("cardVerificationData"); - openapiFields.add("ecommerce"); - openapiFields.add("cardPresent"); - openapiFields.add("cardNetwork"); - openapiFields.add("cashWithdrawalAmount"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("partialApprovalAllowed"); - openapiRequiredFields.add("merchant"); - openapiRequiredFields.add("recurring"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PurchaseAuthorizationRequestAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PurchaseAuthorizationRequestAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PurchaseAuthorizationRequestAllOfAttributes is not found in the empty JSON string", PurchaseAuthorizationRequestAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PurchaseAuthorizationRequestAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PurchaseAuthorizationRequestAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PurchaseAuthorizationRequestAllOfAttributes.openapiRequiredFields) { - 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("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())); - } - if ((jsonObj.get("declineReason") != null && !jsonObj.get("declineReason").isJsonNull()) && !jsonObj.get("declineReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `declineReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("declineReason").toString())); - } - // validate the required field `merchant` - Merchant.validateJsonElement(jsonObj.get("merchant")); - // validate the optional field `healthcareAmounts` - if (jsonObj.get("healthcareAmounts") != null && !jsonObj.get("healthcareAmounts").isJsonNull()) { - HealthcareAmounts.validateJsonElement(jsonObj.get("healthcareAmounts")); - } - if ((jsonObj.get("paymentMethod") != null && !jsonObj.get("paymentMethod").isJsonNull()) && !jsonObj.get("paymentMethod").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `paymentMethod` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentMethod").toString())); - } - if ((jsonObj.get("digitalWallet") != null && !jsonObj.get("digitalWallet").isJsonNull()) && !jsonObj.get("digitalWallet").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `digitalWallet` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digitalWallet").toString())); - } - // validate the optional field `cardVerificationData` - if (jsonObj.get("cardVerificationData") != null && !jsonObj.get("cardVerificationData").isJsonNull()) { - CardVerificationData.validateJsonElement(jsonObj.get("cardVerificationData")); - } - if ((jsonObj.get("cardNetwork") != null && !jsonObj.get("cardNetwork").isJsonNull()) && !jsonObj.get("cardNetwork").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardNetwork` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardNetwork").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PurchaseAuthorizationRequestAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PurchaseAuthorizationRequestAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PurchaseAuthorizationRequestAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PurchaseAuthorizationRequestAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PurchaseAuthorizationRequestAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PurchaseAuthorizationRequestAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of PurchaseAuthorizationRequestAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to PurchaseAuthorizationRequestAllOfAttributes - */ - public static PurchaseAuthorizationRequestAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PurchaseAuthorizationRequestAllOfAttributes.class); - } - - /** - * Convert an instance of PurchaseAuthorizationRequestAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PurchaseTransaction.java b/src/main/java/org/openapitools/client/model/PurchaseTransaction.java deleted file mode 100644 index cf308236..00000000 --- a/src/main/java/org/openapitools/client/model/PurchaseTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PurchaseTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PurchaseTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PurchaseTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PurchaseTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public PurchaseTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public PurchaseTransaction attributes(PurchaseTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public PurchaseTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(PurchaseTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public PurchaseTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PurchaseTransaction purchaseTransaction = (PurchaseTransaction) o; - return Objects.equals(this.attributes, purchaseTransaction.attributes) && - Objects.equals(this.relationships, purchaseTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PurchaseTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PurchaseTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PurchaseTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PurchaseTransaction is not found in the empty JSON string", PurchaseTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PurchaseTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PurchaseTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PurchaseTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PurchaseTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PurchaseTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PurchaseTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PurchaseTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PurchaseTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PurchaseTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of PurchaseTransaction - * @throws IOException if the JSON string is invalid with respect to PurchaseTransaction - */ - public static PurchaseTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PurchaseTransaction.class); - } - - /** - * Convert an instance of PurchaseTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/PurchaseTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/PurchaseTransactionAllOfAttributes.java deleted file mode 100644 index 6709a5bd..00000000 --- a/src/main/java/org/openapitools/client/model/PurchaseTransactionAllOfAttributes.java +++ /dev/null @@ -1,823 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.CardVerificationData; -import org.openapitools.client.model.Coordinates; -import org.openapitools.client.model.Merchant; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * PurchaseTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PurchaseTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_CARD_LAST4_DIGITS = "cardLast4Digits"; - @SerializedName(SERIALIZED_NAME_CARD_LAST4_DIGITS) - private String cardLast4Digits; - - public static final String SERIALIZED_NAME_MERCHANT = "merchant"; - @SerializedName(SERIALIZED_NAME_MERCHANT) - private Merchant merchant; - - public static final String SERIALIZED_NAME_COORDINATES = "coordinates"; - @SerializedName(SERIALIZED_NAME_COORDINATES) - private Coordinates coordinates; - - public static final String SERIALIZED_NAME_RECURRING = "recurring"; - @SerializedName(SERIALIZED_NAME_RECURRING) - private Boolean recurring; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_NETWORK_TRANSACTION_ID = "networkTransactionId"; - @SerializedName(SERIALIZED_NAME_NETWORK_TRANSACTION_ID) - private String networkTransactionId; - - public static final String SERIALIZED_NAME_INTERCHANGE = "interchange"; - @SerializedName(SERIALIZED_NAME_INTERCHANGE) - private String interchange; - - public static final String SERIALIZED_NAME_ECOMMERCE = "ecommerce"; - @SerializedName(SERIALIZED_NAME_ECOMMERCE) - private Boolean ecommerce; - - public static final String SERIALIZED_NAME_CARD_PRESENT = "cardPresent"; - @SerializedName(SERIALIZED_NAME_CARD_PRESENT) - private Boolean cardPresent; - - public static final String SERIALIZED_NAME_INTERNATIONAL_SERVICE_FEE = "internationalServiceFee"; - @SerializedName(SERIALIZED_NAME_INTERNATIONAL_SERVICE_FEE) - private Integer internationalServiceFee; - - public static final String SERIALIZED_NAME_PAYMENT_METHOD = "paymentMethod"; - @SerializedName(SERIALIZED_NAME_PAYMENT_METHOD) - private String paymentMethod; - - public static final String SERIALIZED_NAME_DIGITAL_WALLET = "digitalWallet"; - @SerializedName(SERIALIZED_NAME_DIGITAL_WALLET) - private String digitalWallet; - - public static final String SERIALIZED_NAME_CARD_VERIFICATION_DATA = "cardVerificationData"; - @SerializedName(SERIALIZED_NAME_CARD_VERIFICATION_DATA) - private CardVerificationData cardVerificationData; - - public static final String SERIALIZED_NAME_CARD_NETWORK = "cardNetwork"; - @SerializedName(SERIALIZED_NAME_CARD_NETWORK) - private String cardNetwork; - - public PurchaseTransactionAllOfAttributes() { - } - - public PurchaseTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public PurchaseTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public PurchaseTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public PurchaseTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public PurchaseTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public PurchaseTransactionAllOfAttributes cardLast4Digits(String cardLast4Digits) { - - this.cardLast4Digits = cardLast4Digits; - return this; - } - - /** - * Get cardLast4Digits - * @return cardLast4Digits - **/ - @javax.annotation.Nonnull - public String getCardLast4Digits() { - return cardLast4Digits; - } - - - public void setCardLast4Digits(String cardLast4Digits) { - this.cardLast4Digits = cardLast4Digits; - } - - - public PurchaseTransactionAllOfAttributes merchant(Merchant merchant) { - - this.merchant = merchant; - return this; - } - - /** - * Get merchant - * @return merchant - **/ - @javax.annotation.Nonnull - public Merchant getMerchant() { - return merchant; - } - - - public void setMerchant(Merchant merchant) { - this.merchant = merchant; - } - - - public PurchaseTransactionAllOfAttributes coordinates(Coordinates coordinates) { - - this.coordinates = coordinates; - return this; - } - - /** - * Get coordinates - * @return coordinates - **/ - @javax.annotation.Nullable - public Coordinates getCoordinates() { - return coordinates; - } - - - public void setCoordinates(Coordinates coordinates) { - this.coordinates = coordinates; - } - - - public PurchaseTransactionAllOfAttributes recurring(Boolean recurring) { - - this.recurring = recurring; - return this; - } - - /** - * Get recurring - * @return recurring - **/ - @javax.annotation.Nonnull - public Boolean getRecurring() { - return recurring; - } - - - public void setRecurring(Boolean recurring) { - this.recurring = recurring; - } - - - public PurchaseTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public PurchaseTransactionAllOfAttributes networkTransactionId(String networkTransactionId) { - - this.networkTransactionId = networkTransactionId; - return this; - } - - /** - * Get networkTransactionId - * @return networkTransactionId - **/ - @javax.annotation.Nullable - public String getNetworkTransactionId() { - return networkTransactionId; - } - - - public void setNetworkTransactionId(String networkTransactionId) { - this.networkTransactionId = networkTransactionId; - } - - - public PurchaseTransactionAllOfAttributes interchange(String interchange) { - - this.interchange = interchange; - return this; - } - - /** - * Get interchange - * @return interchange - **/ - @javax.annotation.Nullable - public String getInterchange() { - return interchange; - } - - - public void setInterchange(String interchange) { - this.interchange = interchange; - } - - - public PurchaseTransactionAllOfAttributes ecommerce(Boolean ecommerce) { - - this.ecommerce = ecommerce; - return this; - } - - /** - * Get ecommerce - * @return ecommerce - **/ - @javax.annotation.Nonnull - public Boolean getEcommerce() { - return ecommerce; - } - - - public void setEcommerce(Boolean ecommerce) { - this.ecommerce = ecommerce; - } - - - public PurchaseTransactionAllOfAttributes cardPresent(Boolean cardPresent) { - - this.cardPresent = cardPresent; - return this; - } - - /** - * Get cardPresent - * @return cardPresent - **/ - @javax.annotation.Nonnull - public Boolean getCardPresent() { - return cardPresent; - } - - - public void setCardPresent(Boolean cardPresent) { - this.cardPresent = cardPresent; - } - - - public PurchaseTransactionAllOfAttributes internationalServiceFee(Integer internationalServiceFee) { - - this.internationalServiceFee = internationalServiceFee; - return this; - } - - /** - * Get internationalServiceFee - * @return internationalServiceFee - **/ - @javax.annotation.Nullable - public Integer getInternationalServiceFee() { - return internationalServiceFee; - } - - - public void setInternationalServiceFee(Integer internationalServiceFee) { - this.internationalServiceFee = internationalServiceFee; - } - - - public PurchaseTransactionAllOfAttributes paymentMethod(String paymentMethod) { - - this.paymentMethod = paymentMethod; - return this; - } - - /** - * Get paymentMethod - * @return paymentMethod - **/ - @javax.annotation.Nullable - public String getPaymentMethod() { - return paymentMethod; - } - - - public void setPaymentMethod(String paymentMethod) { - this.paymentMethod = paymentMethod; - } - - - public PurchaseTransactionAllOfAttributes digitalWallet(String digitalWallet) { - - this.digitalWallet = digitalWallet; - return this; - } - - /** - * Get digitalWallet - * @return digitalWallet - **/ - @javax.annotation.Nullable - public String getDigitalWallet() { - return digitalWallet; - } - - - public void setDigitalWallet(String digitalWallet) { - this.digitalWallet = digitalWallet; - } - - - public PurchaseTransactionAllOfAttributes cardVerificationData(CardVerificationData cardVerificationData) { - - this.cardVerificationData = cardVerificationData; - return this; - } - - /** - * Get cardVerificationData - * @return cardVerificationData - **/ - @javax.annotation.Nullable - public CardVerificationData getCardVerificationData() { - return cardVerificationData; - } - - - public void setCardVerificationData(CardVerificationData cardVerificationData) { - this.cardVerificationData = cardVerificationData; - } - - - public PurchaseTransactionAllOfAttributes cardNetwork(String cardNetwork) { - - this.cardNetwork = cardNetwork; - return this; - } - - /** - * Get cardNetwork - * @return cardNetwork - **/ - @javax.annotation.Nullable - public String getCardNetwork() { - return cardNetwork; - } - - - public void setCardNetwork(String cardNetwork) { - this.cardNetwork = cardNetwork; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PurchaseTransactionAllOfAttributes purchaseTransactionAllOfAttributes = (PurchaseTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, purchaseTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, purchaseTransactionAllOfAttributes.direction) && - Objects.equals(this.amount, purchaseTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, purchaseTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, purchaseTransactionAllOfAttributes.summary) && - Objects.equals(this.cardLast4Digits, purchaseTransactionAllOfAttributes.cardLast4Digits) && - Objects.equals(this.merchant, purchaseTransactionAllOfAttributes.merchant) && - Objects.equals(this.coordinates, purchaseTransactionAllOfAttributes.coordinates) && - Objects.equals(this.recurring, purchaseTransactionAllOfAttributes.recurring) && - Objects.equals(this.tags, purchaseTransactionAllOfAttributes.tags) && - Objects.equals(this.networkTransactionId, purchaseTransactionAllOfAttributes.networkTransactionId) && - Objects.equals(this.interchange, purchaseTransactionAllOfAttributes.interchange) && - Objects.equals(this.ecommerce, purchaseTransactionAllOfAttributes.ecommerce) && - Objects.equals(this.cardPresent, purchaseTransactionAllOfAttributes.cardPresent) && - Objects.equals(this.internationalServiceFee, purchaseTransactionAllOfAttributes.internationalServiceFee) && - Objects.equals(this.paymentMethod, purchaseTransactionAllOfAttributes.paymentMethod) && - Objects.equals(this.digitalWallet, purchaseTransactionAllOfAttributes.digitalWallet) && - Objects.equals(this.cardVerificationData, purchaseTransactionAllOfAttributes.cardVerificationData) && - Objects.equals(this.cardNetwork, purchaseTransactionAllOfAttributes.cardNetwork); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, amount, balance, summary, cardLast4Digits, merchant, coordinates, recurring, tags, networkTransactionId, interchange, ecommerce, cardPresent, internationalServiceFee, paymentMethod, digitalWallet, cardVerificationData, cardNetwork); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PurchaseTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" cardLast4Digits: ").append(toIndentedString(cardLast4Digits)).append("\n"); - sb.append(" merchant: ").append(toIndentedString(merchant)).append("\n"); - sb.append(" coordinates: ").append(toIndentedString(coordinates)).append("\n"); - sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" networkTransactionId: ").append(toIndentedString(networkTransactionId)).append("\n"); - sb.append(" interchange: ").append(toIndentedString(interchange)).append("\n"); - sb.append(" ecommerce: ").append(toIndentedString(ecommerce)).append("\n"); - sb.append(" cardPresent: ").append(toIndentedString(cardPresent)).append("\n"); - sb.append(" internationalServiceFee: ").append(toIndentedString(internationalServiceFee)).append("\n"); - sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n"); - sb.append(" digitalWallet: ").append(toIndentedString(digitalWallet)).append("\n"); - sb.append(" cardVerificationData: ").append(toIndentedString(cardVerificationData)).append("\n"); - sb.append(" cardNetwork: ").append(toIndentedString(cardNetwork)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("cardLast4Digits"); - openapiFields.add("merchant"); - openapiFields.add("coordinates"); - openapiFields.add("recurring"); - openapiFields.add("tags"); - openapiFields.add("networkTransactionId"); - openapiFields.add("interchange"); - openapiFields.add("ecommerce"); - openapiFields.add("cardPresent"); - openapiFields.add("internationalServiceFee"); - openapiFields.add("paymentMethod"); - openapiFields.add("digitalWallet"); - openapiFields.add("cardVerificationData"); - openapiFields.add("cardNetwork"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - openapiRequiredFields.add("cardLast4Digits"); - openapiRequiredFields.add("merchant"); - openapiRequiredFields.add("recurring"); - openapiRequiredFields.add("ecommerce"); - openapiRequiredFields.add("cardPresent"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PurchaseTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PurchaseTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PurchaseTransactionAllOfAttributes is not found in the empty JSON string", PurchaseTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PurchaseTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PurchaseTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PurchaseTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - if (!jsonObj.get("cardLast4Digits").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardLast4Digits` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardLast4Digits").toString())); - } - // validate the required field `merchant` - Merchant.validateJsonElement(jsonObj.get("merchant")); - // validate the optional field `coordinates` - if (jsonObj.get("coordinates") != null && !jsonObj.get("coordinates").isJsonNull()) { - Coordinates.validateJsonElement(jsonObj.get("coordinates")); - } - if ((jsonObj.get("networkTransactionId") != null && !jsonObj.get("networkTransactionId").isJsonNull()) && !jsonObj.get("networkTransactionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `networkTransactionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("networkTransactionId").toString())); - } - if ((jsonObj.get("interchange") != null && !jsonObj.get("interchange").isJsonNull()) && !jsonObj.get("interchange").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `interchange` to be a primitive type in the JSON string but got `%s`", jsonObj.get("interchange").toString())); - } - if ((jsonObj.get("paymentMethod") != null && !jsonObj.get("paymentMethod").isJsonNull()) && !jsonObj.get("paymentMethod").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `paymentMethod` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentMethod").toString())); - } - if ((jsonObj.get("digitalWallet") != null && !jsonObj.get("digitalWallet").isJsonNull()) && !jsonObj.get("digitalWallet").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `digitalWallet` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digitalWallet").toString())); - } - // validate the optional field `cardVerificationData` - if (jsonObj.get("cardVerificationData") != null && !jsonObj.get("cardVerificationData").isJsonNull()) { - CardVerificationData.validateJsonElement(jsonObj.get("cardVerificationData")); - } - if ((jsonObj.get("cardNetwork") != null && !jsonObj.get("cardNetwork").isJsonNull()) && !jsonObj.get("cardNetwork").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardNetwork` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardNetwork").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PurchaseTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PurchaseTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PurchaseTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PurchaseTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PurchaseTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PurchaseTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of PurchaseTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to PurchaseTransactionAllOfAttributes - */ - public static PurchaseTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PurchaseTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of PurchaseTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReceivedAchTransaction.java b/src/main/java/org/openapitools/client/model/ReceivedAchTransaction.java deleted file mode 100644 index 46b090b4..00000000 --- a/src/main/java/org/openapitools/client/model/ReceivedAchTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReceivedAchTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReceivedAchTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReceivedAchTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ReceivedAchTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public ReceivedAchTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public ReceivedAchTransaction attributes(ReceivedAchTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public ReceivedAchTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(ReceivedAchTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public ReceivedAchTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReceivedAchTransaction receivedAchTransaction = (ReceivedAchTransaction) o; - return Objects.equals(this.attributes, receivedAchTransaction.attributes) && - Objects.equals(this.relationships, receivedAchTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReceivedAchTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReceivedAchTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReceivedAchTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReceivedAchTransaction is not found in the empty JSON string", ReceivedAchTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReceivedAchTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReceivedAchTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReceivedAchTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReceivedAchTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReceivedAchTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReceivedAchTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReceivedAchTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReceivedAchTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReceivedAchTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReceivedAchTransaction - * @throws IOException if the JSON string is invalid with respect to ReceivedAchTransaction - */ - public static ReceivedAchTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReceivedAchTransaction.class); - } - - /** - * Convert an instance of ReceivedAchTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReceivedAchTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/ReceivedAchTransactionAllOfAttributes.java deleted file mode 100644 index 348ff492..00000000 --- a/src/main/java/org/openapitools/client/model/ReceivedAchTransactionAllOfAttributes.java +++ /dev/null @@ -1,631 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReceivedAchTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReceivedAchTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_ADDENDA = "addenda"; - @SerializedName(SERIALIZED_NAME_ADDENDA) - private String addenda; - - public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; - @SerializedName(SERIALIZED_NAME_COMPANY_NAME) - private String companyName; - - public static final String SERIALIZED_NAME_COUNTERPARTY_NAME = "counterpartyName"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_NAME) - private String counterpartyName; - - public static final String SERIALIZED_NAME_COUNTERPARTY_ROUTING_NUMBER = "counterpartyRoutingNumber"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_ROUTING_NUMBER) - private String counterpartyRoutingNumber; - - public static final String SERIALIZED_NAME_TRACE_NUMBER = "traceNumber"; - @SerializedName(SERIALIZED_NAME_TRACE_NUMBER) - private String traceNumber; - - public static final String SERIALIZED_NAME_SEC_CODE = "secCode"; - @SerializedName(SERIALIZED_NAME_SEC_CODE) - private String secCode; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public ReceivedAchTransactionAllOfAttributes() { - } - - public ReceivedAchTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public ReceivedAchTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public ReceivedAchTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public ReceivedAchTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public ReceivedAchTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public ReceivedAchTransactionAllOfAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public ReceivedAchTransactionAllOfAttributes addenda(String addenda) { - - this.addenda = addenda; - return this; - } - - /** - * Get addenda - * @return addenda - **/ - @javax.annotation.Nullable - public String getAddenda() { - return addenda; - } - - - public void setAddenda(String addenda) { - this.addenda = addenda; - } - - - public ReceivedAchTransactionAllOfAttributes companyName(String companyName) { - - this.companyName = companyName; - return this; - } - - /** - * Get companyName - * @return companyName - **/ - @javax.annotation.Nonnull - public String getCompanyName() { - return companyName; - } - - - public void setCompanyName(String companyName) { - this.companyName = companyName; - } - - - public ReceivedAchTransactionAllOfAttributes counterpartyName(String counterpartyName) { - - this.counterpartyName = counterpartyName; - return this; - } - - /** - * Get counterpartyName - * @return counterpartyName - **/ - @javax.annotation.Nullable - public String getCounterpartyName() { - return counterpartyName; - } - - - public void setCounterpartyName(String counterpartyName) { - this.counterpartyName = counterpartyName; - } - - - public ReceivedAchTransactionAllOfAttributes counterpartyRoutingNumber(String counterpartyRoutingNumber) { - - this.counterpartyRoutingNumber = counterpartyRoutingNumber; - return this; - } - - /** - * Get counterpartyRoutingNumber - * @return counterpartyRoutingNumber - **/ - @javax.annotation.Nonnull - public String getCounterpartyRoutingNumber() { - return counterpartyRoutingNumber; - } - - - public void setCounterpartyRoutingNumber(String counterpartyRoutingNumber) { - this.counterpartyRoutingNumber = counterpartyRoutingNumber; - } - - - public ReceivedAchTransactionAllOfAttributes traceNumber(String traceNumber) { - - this.traceNumber = traceNumber; - return this; - } - - /** - * Get traceNumber - * @return traceNumber - **/ - @javax.annotation.Nullable - public String getTraceNumber() { - return traceNumber; - } - - - public void setTraceNumber(String traceNumber) { - this.traceNumber = traceNumber; - } - - - public ReceivedAchTransactionAllOfAttributes secCode(String secCode) { - - this.secCode = secCode; - return this; - } - - /** - * Get secCode - * @return secCode - **/ - @javax.annotation.Nullable - public String getSecCode() { - return secCode; - } - - - public void setSecCode(String secCode) { - this.secCode = secCode; - } - - - public ReceivedAchTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReceivedAchTransactionAllOfAttributes receivedAchTransactionAllOfAttributes = (ReceivedAchTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, receivedAchTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, receivedAchTransactionAllOfAttributes.direction) && - Objects.equals(this.amount, receivedAchTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, receivedAchTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, receivedAchTransactionAllOfAttributes.summary) && - Objects.equals(this.description, receivedAchTransactionAllOfAttributes.description) && - Objects.equals(this.addenda, receivedAchTransactionAllOfAttributes.addenda) && - Objects.equals(this.companyName, receivedAchTransactionAllOfAttributes.companyName) && - Objects.equals(this.counterpartyName, receivedAchTransactionAllOfAttributes.counterpartyName) && - Objects.equals(this.counterpartyRoutingNumber, receivedAchTransactionAllOfAttributes.counterpartyRoutingNumber) && - Objects.equals(this.traceNumber, receivedAchTransactionAllOfAttributes.traceNumber) && - Objects.equals(this.secCode, receivedAchTransactionAllOfAttributes.secCode) && - Objects.equals(this.tags, receivedAchTransactionAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, amount, balance, summary, description, addenda, companyName, counterpartyName, counterpartyRoutingNumber, traceNumber, secCode, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReceivedAchTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); - sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); - sb.append(" counterpartyName: ").append(toIndentedString(counterpartyName)).append("\n"); - sb.append(" counterpartyRoutingNumber: ").append(toIndentedString(counterpartyRoutingNumber)).append("\n"); - sb.append(" traceNumber: ").append(toIndentedString(traceNumber)).append("\n"); - sb.append(" secCode: ").append(toIndentedString(secCode)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("description"); - openapiFields.add("addenda"); - openapiFields.add("companyName"); - openapiFields.add("counterpartyName"); - openapiFields.add("counterpartyRoutingNumber"); - openapiFields.add("traceNumber"); - openapiFields.add("secCode"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("companyName"); - openapiRequiredFields.add("counterpartyRoutingNumber"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReceivedAchTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReceivedAchTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReceivedAchTransactionAllOfAttributes is not found in the empty JSON string", ReceivedAchTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReceivedAchTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReceivedAchTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReceivedAchTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("addenda") != null && !jsonObj.get("addenda").isJsonNull()) && !jsonObj.get("addenda").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `addenda` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addenda").toString())); - } - if (!jsonObj.get("companyName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); - } - if ((jsonObj.get("counterpartyName") != null && !jsonObj.get("counterpartyName").isJsonNull()) && !jsonObj.get("counterpartyName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `counterpartyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("counterpartyName").toString())); - } - if (!jsonObj.get("counterpartyRoutingNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `counterpartyRoutingNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("counterpartyRoutingNumber").toString())); - } - if ((jsonObj.get("traceNumber") != null && !jsonObj.get("traceNumber").isJsonNull()) && !jsonObj.get("traceNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `traceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("traceNumber").toString())); - } - if ((jsonObj.get("secCode") != null && !jsonObj.get("secCode").isJsonNull()) && !jsonObj.get("secCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `secCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secCode").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReceivedAchTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReceivedAchTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReceivedAchTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReceivedAchTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReceivedAchTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReceivedAchTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReceivedAchTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to ReceivedAchTransactionAllOfAttributes - */ - public static ReceivedAchTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReceivedAchTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of ReceivedAchTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReceivedPayment.java b/src/main/java/org/openapitools/client/model/ReceivedPayment.java deleted file mode 100644 index 308d4a9d..00000000 --- a/src/main/java/org/openapitools/client/model/ReceivedPayment.java +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReceivedPaymentAttributes; -import org.openapitools.client.model.ReceivedPaymentRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReceivedPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReceivedPayment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ReceivedPaymentAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private ReceivedPaymentRelationships relationships; - - public ReceivedPayment() { - } - - public ReceivedPayment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public ReceivedPayment id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public ReceivedPayment attributes(ReceivedPaymentAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public ReceivedPaymentAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(ReceivedPaymentAttributes attributes) { - this.attributes = attributes; - } - - - public ReceivedPayment relationships(ReceivedPaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public ReceivedPaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(ReceivedPaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReceivedPayment receivedPayment = (ReceivedPayment) o; - return Objects.equals(this.type, receivedPayment.type) && - Objects.equals(this.id, receivedPayment.id) && - Objects.equals(this.attributes, receivedPayment.attributes) && - Objects.equals(this.relationships, receivedPayment.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReceivedPayment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReceivedPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReceivedPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReceivedPayment is not found in the empty JSON string", ReceivedPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReceivedPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReceivedPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - 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())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - ReceivedPaymentAttributes.validateJsonElement(jsonObj.get("attributes")); - } - // validate the optional field `relationships` - if (jsonObj.get("relationships") != null && !jsonObj.get("relationships").isJsonNull()) { - ReceivedPaymentRelationships.validateJsonElement(jsonObj.get("relationships")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReceivedPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReceivedPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReceivedPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReceivedPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReceivedPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReceivedPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReceivedPayment - * @throws IOException if the JSON string is invalid with respect to ReceivedPayment - */ - public static ReceivedPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReceivedPayment.class); - } - - /** - * Convert an instance of ReceivedPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReceivedPaymentAttributes.java b/src/main/java/org/openapitools/client/model/ReceivedPaymentAttributes.java deleted file mode 100644 index 181e24e9..00000000 --- a/src/main/java/org/openapitools/client/model/ReceivedPaymentAttributes.java +++ /dev/null @@ -1,804 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReceivedPaymentAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReceivedPaymentAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - PENDING("Pending"), - - ADVANCED("Advanced"), - - COMPLETED("Completed"), - - RETURNED("Returned"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_COMPLETION_DATE = "completionDate"; - @SerializedName(SERIALIZED_NAME_COMPLETION_DATE) - private String completionDate; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - DEBIT("Debit"), - - CREDIT("Credit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_WAS_ADVANCED = "wasAdvanced"; - @SerializedName(SERIALIZED_NAME_WAS_ADVANCED) - private Boolean wasAdvanced; - - public static final String SERIALIZED_NAME_IS_ADVANCEABLE = "isAdvanceable"; - @SerializedName(SERIALIZED_NAME_IS_ADVANCEABLE) - private Boolean isAdvanceable; - - public static final String SERIALIZED_NAME_IS_ADVACEABLE = "isAdvaceable"; - @SerializedName(SERIALIZED_NAME_IS_ADVACEABLE) - private Boolean isAdvaceable; - - public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; - @SerializedName(SERIALIZED_NAME_COMPANY_NAME) - private String companyName; - - public static final String SERIALIZED_NAME_COUNTERPARTY_ROUTING_NUMBER = "counterpartyRoutingNumber"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_ROUTING_NUMBER) - private String counterpartyRoutingNumber; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_ADDENDA = "addenda"; - @SerializedName(SERIALIZED_NAME_ADDENDA) - private String addenda; - - public static final String SERIALIZED_NAME_TRACE_NUMBER = "traceNumber"; - @SerializedName(SERIALIZED_NAME_TRACE_NUMBER) - private String traceNumber; - - public static final String SERIALIZED_NAME_SEC_CODE = "secCode"; - @SerializedName(SERIALIZED_NAME_SEC_CODE) - private String secCode; - - public static final String SERIALIZED_NAME_RETURN_REASON = "returnReason"; - @SerializedName(SERIALIZED_NAME_RETURN_REASON) - private String returnReason; - - public static final String SERIALIZED_NAME_RECEIVING_ENTITY_NAME = "receivingEntityName"; - @SerializedName(SERIALIZED_NAME_RECEIVING_ENTITY_NAME) - private String receivingEntityName; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public ReceivedPaymentAttributes() { - } - - public ReceivedPaymentAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public ReceivedPaymentAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public ReceivedPaymentAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public ReceivedPaymentAttributes completionDate(String completionDate) { - - this.completionDate = completionDate; - return this; - } - - /** - * Get completionDate - * @return completionDate - **/ - @javax.annotation.Nonnull - public String getCompletionDate() { - return completionDate; - } - - - public void setCompletionDate(String completionDate) { - this.completionDate = completionDate; - } - - - public ReceivedPaymentAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public ReceivedPaymentAttributes wasAdvanced(Boolean wasAdvanced) { - - this.wasAdvanced = wasAdvanced; - return this; - } - - /** - * Get wasAdvanced - * @return wasAdvanced - **/ - @javax.annotation.Nonnull - public Boolean getWasAdvanced() { - return wasAdvanced; - } - - - public void setWasAdvanced(Boolean wasAdvanced) { - this.wasAdvanced = wasAdvanced; - } - - - public ReceivedPaymentAttributes isAdvanceable(Boolean isAdvanceable) { - - this.isAdvanceable = isAdvanceable; - return this; - } - - /** - * Get isAdvanceable - * @return isAdvanceable - **/ - @javax.annotation.Nullable - public Boolean getIsAdvanceable() { - return isAdvanceable; - } - - - public void setIsAdvanceable(Boolean isAdvanceable) { - this.isAdvanceable = isAdvanceable; - } - - - public ReceivedPaymentAttributes isAdvaceable(Boolean isAdvaceable) { - - this.isAdvaceable = isAdvaceable; - return this; - } - - /** - * Get isAdvaceable - * @return isAdvaceable - **/ - @javax.annotation.Nullable - public Boolean getIsAdvaceable() { - return isAdvaceable; - } - - - public void setIsAdvaceable(Boolean isAdvaceable) { - this.isAdvaceable = isAdvaceable; - } - - - public ReceivedPaymentAttributes companyName(String companyName) { - - this.companyName = companyName; - return this; - } - - /** - * Get companyName - * @return companyName - **/ - @javax.annotation.Nonnull - public String getCompanyName() { - return companyName; - } - - - public void setCompanyName(String companyName) { - this.companyName = companyName; - } - - - public ReceivedPaymentAttributes counterpartyRoutingNumber(String counterpartyRoutingNumber) { - - this.counterpartyRoutingNumber = counterpartyRoutingNumber; - return this; - } - - /** - * Get counterpartyRoutingNumber - * @return counterpartyRoutingNumber - **/ - @javax.annotation.Nonnull - public String getCounterpartyRoutingNumber() { - return counterpartyRoutingNumber; - } - - - public void setCounterpartyRoutingNumber(String counterpartyRoutingNumber) { - this.counterpartyRoutingNumber = counterpartyRoutingNumber; - } - - - public ReceivedPaymentAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public ReceivedPaymentAttributes addenda(String addenda) { - - this.addenda = addenda; - return this; - } - - /** - * Get addenda - * @return addenda - **/ - @javax.annotation.Nullable - public String getAddenda() { - return addenda; - } - - - public void setAddenda(String addenda) { - this.addenda = addenda; - } - - - public ReceivedPaymentAttributes traceNumber(String traceNumber) { - - this.traceNumber = traceNumber; - return this; - } - - /** - * Get traceNumber - * @return traceNumber - **/ - @javax.annotation.Nonnull - public String getTraceNumber() { - return traceNumber; - } - - - public void setTraceNumber(String traceNumber) { - this.traceNumber = traceNumber; - } - - - public ReceivedPaymentAttributes secCode(String secCode) { - - this.secCode = secCode; - return this; - } - - /** - * Get secCode - * @return secCode - **/ - @javax.annotation.Nonnull - public String getSecCode() { - return secCode; - } - - - public void setSecCode(String secCode) { - this.secCode = secCode; - } - - - public ReceivedPaymentAttributes returnReason(String returnReason) { - - this.returnReason = returnReason; - return this; - } - - /** - * Get returnReason - * @return returnReason - **/ - @javax.annotation.Nullable - public String getReturnReason() { - return returnReason; - } - - - public void setReturnReason(String returnReason) { - this.returnReason = returnReason; - } - - - public ReceivedPaymentAttributes receivingEntityName(String receivingEntityName) { - - this.receivingEntityName = receivingEntityName; - return this; - } - - /** - * Get receivingEntityName - * @return receivingEntityName - **/ - @javax.annotation.Nullable - public String getReceivingEntityName() { - return receivingEntityName; - } - - - public void setReceivingEntityName(String receivingEntityName) { - this.receivingEntityName = receivingEntityName; - } - - - public ReceivedPaymentAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReceivedPaymentAttributes receivedPaymentAttributes = (ReceivedPaymentAttributes) o; - return Objects.equals(this.createdAt, receivedPaymentAttributes.createdAt) && - Objects.equals(this.status, receivedPaymentAttributes.status) && - Objects.equals(this.amount, receivedPaymentAttributes.amount) && - Objects.equals(this.completionDate, receivedPaymentAttributes.completionDate) && - Objects.equals(this.direction, receivedPaymentAttributes.direction) && - Objects.equals(this.wasAdvanced, receivedPaymentAttributes.wasAdvanced) && - Objects.equals(this.isAdvanceable, receivedPaymentAttributes.isAdvanceable) && - Objects.equals(this.isAdvaceable, receivedPaymentAttributes.isAdvaceable) && - Objects.equals(this.companyName, receivedPaymentAttributes.companyName) && - Objects.equals(this.counterpartyRoutingNumber, receivedPaymentAttributes.counterpartyRoutingNumber) && - Objects.equals(this.description, receivedPaymentAttributes.description) && - Objects.equals(this.addenda, receivedPaymentAttributes.addenda) && - Objects.equals(this.traceNumber, receivedPaymentAttributes.traceNumber) && - Objects.equals(this.secCode, receivedPaymentAttributes.secCode) && - Objects.equals(this.returnReason, receivedPaymentAttributes.returnReason) && - Objects.equals(this.receivingEntityName, receivedPaymentAttributes.receivingEntityName) && - Objects.equals(this.tags, receivedPaymentAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, status, amount, completionDate, direction, wasAdvanced, isAdvanceable, isAdvaceable, companyName, counterpartyRoutingNumber, description, addenda, traceNumber, secCode, returnReason, receivingEntityName, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReceivedPaymentAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" completionDate: ").append(toIndentedString(completionDate)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" wasAdvanced: ").append(toIndentedString(wasAdvanced)).append("\n"); - sb.append(" isAdvanceable: ").append(toIndentedString(isAdvanceable)).append("\n"); - sb.append(" isAdvaceable: ").append(toIndentedString(isAdvaceable)).append("\n"); - sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); - sb.append(" counterpartyRoutingNumber: ").append(toIndentedString(counterpartyRoutingNumber)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); - sb.append(" traceNumber: ").append(toIndentedString(traceNumber)).append("\n"); - sb.append(" secCode: ").append(toIndentedString(secCode)).append("\n"); - sb.append(" returnReason: ").append(toIndentedString(returnReason)).append("\n"); - sb.append(" receivingEntityName: ").append(toIndentedString(receivingEntityName)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("status"); - openapiFields.add("amount"); - openapiFields.add("completionDate"); - openapiFields.add("direction"); - openapiFields.add("wasAdvanced"); - openapiFields.add("isAdvanceable"); - openapiFields.add("isAdvaceable"); - openapiFields.add("companyName"); - openapiFields.add("counterpartyRoutingNumber"); - openapiFields.add("description"); - openapiFields.add("addenda"); - openapiFields.add("traceNumber"); - openapiFields.add("secCode"); - openapiFields.add("returnReason"); - openapiFields.add("receivingEntityName"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("completionDate"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("wasAdvanced"); - openapiRequiredFields.add("companyName"); - openapiRequiredFields.add("counterpartyRoutingNumber"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("traceNumber"); - openapiRequiredFields.add("secCode"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReceivedPaymentAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReceivedPaymentAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReceivedPaymentAttributes is not found in the empty JSON string", ReceivedPaymentAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReceivedPaymentAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReceivedPaymentAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReceivedPaymentAttributes.openapiRequiredFields) { - 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("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())); - } - if (!jsonObj.get("completionDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `completionDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("completionDate").toString())); - } - if (!jsonObj.get("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("companyName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); - } - if (!jsonObj.get("counterpartyRoutingNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `counterpartyRoutingNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("counterpartyRoutingNumber").toString())); - } - if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("addenda") != null && !jsonObj.get("addenda").isJsonNull()) && !jsonObj.get("addenda").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `addenda` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addenda").toString())); - } - if (!jsonObj.get("traceNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `traceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("traceNumber").toString())); - } - if (!jsonObj.get("secCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `secCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secCode").toString())); - } - if ((jsonObj.get("returnReason") != null && !jsonObj.get("returnReason").isJsonNull()) && !jsonObj.get("returnReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `returnReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("returnReason").toString())); - } - if ((jsonObj.get("receivingEntityName") != null && !jsonObj.get("receivingEntityName").isJsonNull()) && !jsonObj.get("receivingEntityName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `receivingEntityName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("receivingEntityName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReceivedPaymentAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReceivedPaymentAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReceivedPaymentAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReceivedPaymentAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReceivedPaymentAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReceivedPaymentAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReceivedPaymentAttributes - * @throws IOException if the JSON string is invalid with respect to ReceivedPaymentAttributes - */ - public static ReceivedPaymentAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReceivedPaymentAttributes.class); - } - - /** - * Convert an instance of ReceivedPaymentAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationship.java b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationship.java deleted file mode 100644 index 2dda28ab..00000000 --- a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReceivedPaymentRelationshipData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReceivedPaymentRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReceivedPaymentRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ReceivedPaymentRelationshipData data; - - public ReceivedPaymentRelationship() { - } - - public ReceivedPaymentRelationship data(ReceivedPaymentRelationshipData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public ReceivedPaymentRelationshipData getData() { - return data; - } - - - public void setData(ReceivedPaymentRelationshipData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReceivedPaymentRelationship receivedPaymentRelationship = (ReceivedPaymentRelationship) o; - return Objects.equals(this.data, receivedPaymentRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReceivedPaymentRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReceivedPaymentRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReceivedPaymentRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReceivedPaymentRelationship is not found in the empty JSON string", ReceivedPaymentRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReceivedPaymentRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReceivedPaymentRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReceivedPaymentRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - ReceivedPaymentRelationshipData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReceivedPaymentRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReceivedPaymentRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReceivedPaymentRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReceivedPaymentRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReceivedPaymentRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReceivedPaymentRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReceivedPaymentRelationship - * @throws IOException if the JSON string is invalid with respect to ReceivedPaymentRelationship - */ - public static ReceivedPaymentRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReceivedPaymentRelationship.class); - } - - /** - * Convert an instance of ReceivedPaymentRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipData.java b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipData.java deleted file mode 100644 index bd1b1b77..00000000 --- a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReceivedPaymentRelationshipData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReceivedPaymentRelationshipData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "receivedPayment"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public ReceivedPaymentRelationshipData() { - } - - public ReceivedPaymentRelationshipData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public ReceivedPaymentRelationshipData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReceivedPaymentRelationshipData receivedPaymentRelationshipData = (ReceivedPaymentRelationshipData) o; - return Objects.equals(this.type, receivedPaymentRelationshipData.type) && - Objects.equals(this.id, receivedPaymentRelationshipData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReceivedPaymentRelationshipData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReceivedPaymentRelationshipData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReceivedPaymentRelationshipData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReceivedPaymentRelationshipData is not found in the empty JSON string", ReceivedPaymentRelationshipData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReceivedPaymentRelationshipData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReceivedPaymentRelationshipData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReceivedPaymentRelationshipData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReceivedPaymentRelationshipData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReceivedPaymentRelationshipData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReceivedPaymentRelationshipData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReceivedPaymentRelationshipData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReceivedPaymentRelationshipData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReceivedPaymentRelationshipData given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReceivedPaymentRelationshipData - * @throws IOException if the JSON string is invalid with respect to ReceivedPaymentRelationshipData - */ - public static ReceivedPaymentRelationshipData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReceivedPaymentRelationshipData.class); - } - - /** - * Convert an instance of ReceivedPaymentRelationshipData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationships.java b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationships.java deleted file mode 100644 index a3a590b6..00000000 --- a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationships.java +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReceivedPaymentRelationshipsCustomer; -import org.openapitools.client.model.ReceivedPaymentRelationshipsReceivePaymentTransaction; -import org.openapitools.client.model.RelationshipsAccount; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReceivedPaymentRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReceivedPaymentRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private RelationshipsAccount account; - - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private ReceivedPaymentRelationshipsCustomer customer; - - public static final String SERIALIZED_NAME_RECEIVE_PAYMENT_TRANSACTION = "receivePaymentTransaction"; - @SerializedName(SERIALIZED_NAME_RECEIVE_PAYMENT_TRANSACTION) - private ReceivedPaymentRelationshipsReceivePaymentTransaction receivePaymentTransaction; - - public static final String SERIALIZED_NAME_PAYMENT_ADVANCE_TRANSACTION = "paymentAdvanceTransaction"; - @SerializedName(SERIALIZED_NAME_PAYMENT_ADVANCE_TRANSACTION) - private ReceivedPaymentRelationshipsReceivePaymentTransaction paymentAdvanceTransaction; - - public static final String SERIALIZED_NAME_REPAY_PAYMENT_ADVANCE_TRANSACTION = "repayPaymentAdvanceTransaction"; - @SerializedName(SERIALIZED_NAME_REPAY_PAYMENT_ADVANCE_TRANSACTION) - private ReceivedPaymentRelationshipsReceivePaymentTransaction repayPaymentAdvanceTransaction; - - public ReceivedPaymentRelationships() { - } - - public ReceivedPaymentRelationships account(RelationshipsAccount account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public RelationshipsAccount getAccount() { - return account; - } - - - public void setAccount(RelationshipsAccount account) { - this.account = account; - } - - - public ReceivedPaymentRelationships customer(ReceivedPaymentRelationshipsCustomer customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nonnull - public ReceivedPaymentRelationshipsCustomer getCustomer() { - return customer; - } - - - public void setCustomer(ReceivedPaymentRelationshipsCustomer customer) { - this.customer = customer; - } - - - public ReceivedPaymentRelationships receivePaymentTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction receivePaymentTransaction) { - - this.receivePaymentTransaction = receivePaymentTransaction; - return this; - } - - /** - * Get receivePaymentTransaction - * @return receivePaymentTransaction - **/ - @javax.annotation.Nullable - public ReceivedPaymentRelationshipsReceivePaymentTransaction getReceivePaymentTransaction() { - return receivePaymentTransaction; - } - - - public void setReceivePaymentTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction receivePaymentTransaction) { - this.receivePaymentTransaction = receivePaymentTransaction; - } - - - public ReceivedPaymentRelationships paymentAdvanceTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction paymentAdvanceTransaction) { - - this.paymentAdvanceTransaction = paymentAdvanceTransaction; - return this; - } - - /** - * Get paymentAdvanceTransaction - * @return paymentAdvanceTransaction - **/ - @javax.annotation.Nullable - public ReceivedPaymentRelationshipsReceivePaymentTransaction getPaymentAdvanceTransaction() { - return paymentAdvanceTransaction; - } - - - public void setPaymentAdvanceTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction paymentAdvanceTransaction) { - this.paymentAdvanceTransaction = paymentAdvanceTransaction; - } - - - public ReceivedPaymentRelationships repayPaymentAdvanceTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction repayPaymentAdvanceTransaction) { - - this.repayPaymentAdvanceTransaction = repayPaymentAdvanceTransaction; - return this; - } - - /** - * Get repayPaymentAdvanceTransaction - * @return repayPaymentAdvanceTransaction - **/ - @javax.annotation.Nullable - public ReceivedPaymentRelationshipsReceivePaymentTransaction getRepayPaymentAdvanceTransaction() { - return repayPaymentAdvanceTransaction; - } - - - public void setRepayPaymentAdvanceTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction repayPaymentAdvanceTransaction) { - this.repayPaymentAdvanceTransaction = repayPaymentAdvanceTransaction; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReceivedPaymentRelationships receivedPaymentRelationships = (ReceivedPaymentRelationships) o; - return Objects.equals(this.account, receivedPaymentRelationships.account) && - Objects.equals(this.customer, receivedPaymentRelationships.customer) && - Objects.equals(this.receivePaymentTransaction, receivedPaymentRelationships.receivePaymentTransaction) && - Objects.equals(this.paymentAdvanceTransaction, receivedPaymentRelationships.paymentAdvanceTransaction) && - Objects.equals(this.repayPaymentAdvanceTransaction, receivedPaymentRelationships.repayPaymentAdvanceTransaction); - } - - @Override - public int hashCode() { - return Objects.hash(account, customer, receivePaymentTransaction, paymentAdvanceTransaction, repayPaymentAdvanceTransaction); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReceivedPaymentRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" receivePaymentTransaction: ").append(toIndentedString(receivePaymentTransaction)).append("\n"); - sb.append(" paymentAdvanceTransaction: ").append(toIndentedString(paymentAdvanceTransaction)).append("\n"); - sb.append(" repayPaymentAdvanceTransaction: ").append(toIndentedString(repayPaymentAdvanceTransaction)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - openapiFields.add("customer"); - openapiFields.add("receivePaymentTransaction"); - openapiFields.add("paymentAdvanceTransaction"); - openapiFields.add("repayPaymentAdvanceTransaction"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account"); - openapiRequiredFields.add("customer"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReceivedPaymentRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReceivedPaymentRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReceivedPaymentRelationships is not found in the empty JSON string", ReceivedPaymentRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReceivedPaymentRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReceivedPaymentRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReceivedPaymentRelationships.openapiRequiredFields) { - 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(); - // validate the required field `account` - RelationshipsAccount.validateJsonElement(jsonObj.get("account")); - // validate the required field `customer` - ReceivedPaymentRelationshipsCustomer.validateJsonElement(jsonObj.get("customer")); - // validate the optional field `receivePaymentTransaction` - if (jsonObj.get("receivePaymentTransaction") != null && !jsonObj.get("receivePaymentTransaction").isJsonNull()) { - ReceivedPaymentRelationshipsReceivePaymentTransaction.validateJsonElement(jsonObj.get("receivePaymentTransaction")); - } - // validate the optional field `paymentAdvanceTransaction` - if (jsonObj.get("paymentAdvanceTransaction") != null && !jsonObj.get("paymentAdvanceTransaction").isJsonNull()) { - ReceivedPaymentRelationshipsReceivePaymentTransaction.validateJsonElement(jsonObj.get("paymentAdvanceTransaction")); - } - // validate the optional field `repayPaymentAdvanceTransaction` - if (jsonObj.get("repayPaymentAdvanceTransaction") != null && !jsonObj.get("repayPaymentAdvanceTransaction").isJsonNull()) { - ReceivedPaymentRelationshipsReceivePaymentTransaction.validateJsonElement(jsonObj.get("repayPaymentAdvanceTransaction")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReceivedPaymentRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReceivedPaymentRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReceivedPaymentRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReceivedPaymentRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReceivedPaymentRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReceivedPaymentRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReceivedPaymentRelationships - * @throws IOException if the JSON string is invalid with respect to ReceivedPaymentRelationships - */ - public static ReceivedPaymentRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReceivedPaymentRelationships.class); - } - - /** - * Convert an instance of ReceivedPaymentRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsCustomer.java b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsCustomer.java deleted file mode 100644 index 57211775..00000000 --- a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsCustomer.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReceivedPaymentRelationshipsCustomerData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReceivedPaymentRelationshipsCustomer - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReceivedPaymentRelationshipsCustomer { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ReceivedPaymentRelationshipsCustomerData data; - - public ReceivedPaymentRelationshipsCustomer() { - } - - public ReceivedPaymentRelationshipsCustomer data(ReceivedPaymentRelationshipsCustomerData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public ReceivedPaymentRelationshipsCustomerData getData() { - return data; - } - - - public void setData(ReceivedPaymentRelationshipsCustomerData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReceivedPaymentRelationshipsCustomer receivedPaymentRelationshipsCustomer = (ReceivedPaymentRelationshipsCustomer) o; - return Objects.equals(this.data, receivedPaymentRelationshipsCustomer.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReceivedPaymentRelationshipsCustomer {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReceivedPaymentRelationshipsCustomer - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReceivedPaymentRelationshipsCustomer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReceivedPaymentRelationshipsCustomer is not found in the empty JSON string", ReceivedPaymentRelationshipsCustomer.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReceivedPaymentRelationshipsCustomer.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReceivedPaymentRelationshipsCustomer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReceivedPaymentRelationshipsCustomer.openapiRequiredFields) { - 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(); - // validate the required field `data` - ReceivedPaymentRelationshipsCustomerData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReceivedPaymentRelationshipsCustomer.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReceivedPaymentRelationshipsCustomer' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReceivedPaymentRelationshipsCustomer.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReceivedPaymentRelationshipsCustomer value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReceivedPaymentRelationshipsCustomer read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReceivedPaymentRelationshipsCustomer given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReceivedPaymentRelationshipsCustomer - * @throws IOException if the JSON string is invalid with respect to ReceivedPaymentRelationshipsCustomer - */ - public static ReceivedPaymentRelationshipsCustomer fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReceivedPaymentRelationshipsCustomer.class); - } - - /** - * Convert an instance of ReceivedPaymentRelationshipsCustomer to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsCustomerData.java b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsCustomerData.java deleted file mode 100644 index a167d111..00000000 --- a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsCustomerData.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReceivedPaymentRelationshipsCustomerData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReceivedPaymentRelationshipsCustomerData { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - BUSINESSCUSTOMER("businessCustomer"), - - INDIVIDUALCUSTOMER("individualCustomer"), - - CUSTOMER("customer"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public ReceivedPaymentRelationshipsCustomerData() { - } - - public ReceivedPaymentRelationshipsCustomerData type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public ReceivedPaymentRelationshipsCustomerData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReceivedPaymentRelationshipsCustomerData receivedPaymentRelationshipsCustomerData = (ReceivedPaymentRelationshipsCustomerData) o; - return Objects.equals(this.type, receivedPaymentRelationshipsCustomerData.type) && - Objects.equals(this.id, receivedPaymentRelationshipsCustomerData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReceivedPaymentRelationshipsCustomerData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReceivedPaymentRelationshipsCustomerData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReceivedPaymentRelationshipsCustomerData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReceivedPaymentRelationshipsCustomerData is not found in the empty JSON string", ReceivedPaymentRelationshipsCustomerData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReceivedPaymentRelationshipsCustomerData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReceivedPaymentRelationshipsCustomerData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReceivedPaymentRelationshipsCustomerData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReceivedPaymentRelationshipsCustomerData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReceivedPaymentRelationshipsCustomerData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReceivedPaymentRelationshipsCustomerData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReceivedPaymentRelationshipsCustomerData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReceivedPaymentRelationshipsCustomerData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReceivedPaymentRelationshipsCustomerData given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReceivedPaymentRelationshipsCustomerData - * @throws IOException if the JSON string is invalid with respect to ReceivedPaymentRelationshipsCustomerData - */ - public static ReceivedPaymentRelationshipsCustomerData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReceivedPaymentRelationshipsCustomerData.class); - } - - /** - * Convert an instance of ReceivedPaymentRelationshipsCustomerData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsReceivePaymentTransaction.java b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsReceivePaymentTransaction.java deleted file mode 100644 index ee43571e..00000000 --- a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsReceivePaymentTransaction.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReceivedPaymentRelationshipsReceivePaymentTransactionData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReceivedPaymentRelationshipsReceivePaymentTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReceivedPaymentRelationshipsReceivePaymentTransaction { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ReceivedPaymentRelationshipsReceivePaymentTransactionData data; - - public ReceivedPaymentRelationshipsReceivePaymentTransaction() { - } - - public ReceivedPaymentRelationshipsReceivePaymentTransaction data(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public ReceivedPaymentRelationshipsReceivePaymentTransactionData getData() { - return data; - } - - - public void setData(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReceivedPaymentRelationshipsReceivePaymentTransaction receivedPaymentRelationshipsReceivePaymentTransaction = (ReceivedPaymentRelationshipsReceivePaymentTransaction) o; - return Objects.equals(this.data, receivedPaymentRelationshipsReceivePaymentTransaction.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReceivedPaymentRelationshipsReceivePaymentTransaction {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReceivedPaymentRelationshipsReceivePaymentTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReceivedPaymentRelationshipsReceivePaymentTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReceivedPaymentRelationshipsReceivePaymentTransaction is not found in the empty JSON string", ReceivedPaymentRelationshipsReceivePaymentTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReceivedPaymentRelationshipsReceivePaymentTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReceivedPaymentRelationshipsReceivePaymentTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReceivedPaymentRelationshipsReceivePaymentTransaction.openapiRequiredFields) { - 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(); - // validate the required field `data` - ReceivedPaymentRelationshipsReceivePaymentTransactionData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReceivedPaymentRelationshipsReceivePaymentTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReceivedPaymentRelationshipsReceivePaymentTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReceivedPaymentRelationshipsReceivePaymentTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReceivedPaymentRelationshipsReceivePaymentTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReceivedPaymentRelationshipsReceivePaymentTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReceivedPaymentRelationshipsReceivePaymentTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReceivedPaymentRelationshipsReceivePaymentTransaction - * @throws IOException if the JSON string is invalid with respect to ReceivedPaymentRelationshipsReceivePaymentTransaction - */ - public static ReceivedPaymentRelationshipsReceivePaymentTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReceivedPaymentRelationshipsReceivePaymentTransaction.class); - } - - /** - * Convert an instance of ReceivedPaymentRelationshipsReceivePaymentTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsReceivePaymentTransactionData.java b/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsReceivePaymentTransactionData.java deleted file mode 100644 index 829b43ad..00000000 --- a/src/main/java/org/openapitools/client/model/ReceivedPaymentRelationshipsReceivePaymentTransactionData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReceivedPaymentRelationshipsReceivePaymentTransactionData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReceivedPaymentRelationshipsReceivePaymentTransactionData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "transaction"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public ReceivedPaymentRelationshipsReceivePaymentTransactionData() { - } - - public ReceivedPaymentRelationshipsReceivePaymentTransactionData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public ReceivedPaymentRelationshipsReceivePaymentTransactionData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReceivedPaymentRelationshipsReceivePaymentTransactionData receivedPaymentRelationshipsReceivePaymentTransactionData = (ReceivedPaymentRelationshipsReceivePaymentTransactionData) o; - return Objects.equals(this.type, receivedPaymentRelationshipsReceivePaymentTransactionData.type) && - Objects.equals(this.id, receivedPaymentRelationshipsReceivePaymentTransactionData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReceivedPaymentRelationshipsReceivePaymentTransactionData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReceivedPaymentRelationshipsReceivePaymentTransactionData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReceivedPaymentRelationshipsReceivePaymentTransactionData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReceivedPaymentRelationshipsReceivePaymentTransactionData is not found in the empty JSON string", ReceivedPaymentRelationshipsReceivePaymentTransactionData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReceivedPaymentRelationshipsReceivePaymentTransactionData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReceivedPaymentRelationshipsReceivePaymentTransactionData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReceivedPaymentRelationshipsReceivePaymentTransactionData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReceivedPaymentRelationshipsReceivePaymentTransactionData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReceivedPaymentRelationshipsReceivePaymentTransactionData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReceivedPaymentRelationshipsReceivePaymentTransactionData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReceivedPaymentRelationshipsReceivePaymentTransactionData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReceivedPaymentRelationshipsReceivePaymentTransactionData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReceivedPaymentRelationshipsReceivePaymentTransactionData given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReceivedPaymentRelationshipsReceivePaymentTransactionData - * @throws IOException if the JSON string is invalid with respect to ReceivedPaymentRelationshipsReceivePaymentTransactionData - */ - public static ReceivedPaymentRelationshipsReceivePaymentTransactionData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReceivedPaymentRelationshipsReceivePaymentTransactionData.class); - } - - /** - * Convert an instance of ReceivedPaymentRelationshipsReceivePaymentTransactionData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReceivingAccountRelationship.java b/src/main/java/org/openapitools/client/model/ReceivingAccountRelationship.java deleted file mode 100644 index bf050a09..00000000 --- a/src/main/java/org/openapitools/client/model/ReceivingAccountRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RecurringAchPaymentRelationshipsAccountData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReceivingAccountRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReceivingAccountRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private RecurringAchPaymentRelationshipsAccountData data; - - public ReceivingAccountRelationship() { - } - - public ReceivingAccountRelationship data(RecurringAchPaymentRelationshipsAccountData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public RecurringAchPaymentRelationshipsAccountData getData() { - return data; - } - - - public void setData(RecurringAchPaymentRelationshipsAccountData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReceivingAccountRelationship receivingAccountRelationship = (ReceivingAccountRelationship) o; - return Objects.equals(this.data, receivingAccountRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReceivingAccountRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReceivingAccountRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReceivingAccountRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReceivingAccountRelationship is not found in the empty JSON string", ReceivingAccountRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReceivingAccountRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReceivingAccountRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReceivingAccountRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - RecurringAchPaymentRelationshipsAccountData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReceivingAccountRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReceivingAccountRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReceivingAccountRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReceivingAccountRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReceivingAccountRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReceivingAccountRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReceivingAccountRelationship - * @throws IOException if the JSON string is invalid with respect to ReceivingAccountRelationship - */ - public static ReceivingAccountRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReceivingAccountRelationship.class); - } - - /** - * Convert an instance of ReceivingAccountRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationships.java b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationships.java deleted file mode 100644 index f8066ab3..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationships.java +++ /dev/null @@ -1,309 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReceivedPaymentRelationshipsCustomer; -import org.openapitools.client.model.RecurringAchPaymentRelationshipsAccount; -import org.openapitools.client.model.RecurringAchPaymentRelationshipsCounterparty; -import org.openapitools.client.model.RecurringAchPaymentRelationshipsOrg; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringAchPaymentRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringAchPaymentRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private RecurringAchPaymentRelationshipsAccount account; - - public static final String SERIALIZED_NAME_COUNTERPARTY = "counterparty"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY) - private RecurringAchPaymentRelationshipsCounterparty counterparty; - - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private ReceivedPaymentRelationshipsCustomer customer; - - public static final String SERIALIZED_NAME_ORG = "org"; - @SerializedName(SERIALIZED_NAME_ORG) - private RecurringAchPaymentRelationshipsOrg org; - - public RecurringAchPaymentRelationships() { - } - - public RecurringAchPaymentRelationships account(RecurringAchPaymentRelationshipsAccount account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nullable - public RecurringAchPaymentRelationshipsAccount getAccount() { - return account; - } - - - public void setAccount(RecurringAchPaymentRelationshipsAccount account) { - this.account = account; - } - - - public RecurringAchPaymentRelationships counterparty(RecurringAchPaymentRelationshipsCounterparty counterparty) { - - this.counterparty = counterparty; - return this; - } - - /** - * Get counterparty - * @return counterparty - **/ - @javax.annotation.Nullable - public RecurringAchPaymentRelationshipsCounterparty getCounterparty() { - return counterparty; - } - - - public void setCounterparty(RecurringAchPaymentRelationshipsCounterparty counterparty) { - this.counterparty = counterparty; - } - - - public RecurringAchPaymentRelationships customer(ReceivedPaymentRelationshipsCustomer customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nullable - public ReceivedPaymentRelationshipsCustomer getCustomer() { - return customer; - } - - - public void setCustomer(ReceivedPaymentRelationshipsCustomer customer) { - this.customer = customer; - } - - - public RecurringAchPaymentRelationships org(RecurringAchPaymentRelationshipsOrg org) { - - this.org = org; - return this; - } - - /** - * Get org - * @return org - **/ - @javax.annotation.Nullable - public RecurringAchPaymentRelationshipsOrg getOrg() { - return org; - } - - - public void setOrg(RecurringAchPaymentRelationshipsOrg org) { - this.org = org; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringAchPaymentRelationships recurringAchPaymentRelationships = (RecurringAchPaymentRelationships) o; - return Objects.equals(this.account, recurringAchPaymentRelationships.account) && - Objects.equals(this.counterparty, recurringAchPaymentRelationships.counterparty) && - Objects.equals(this.customer, recurringAchPaymentRelationships.customer) && - Objects.equals(this.org, recurringAchPaymentRelationships.org); - } - - @Override - public int hashCode() { - return Objects.hash(account, counterparty, customer, org); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringAchPaymentRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" org: ").append(toIndentedString(org)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - openapiFields.add("counterparty"); - openapiFields.add("customer"); - openapiFields.add("org"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringAchPaymentRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringAchPaymentRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringAchPaymentRelationships is not found in the empty JSON string", RecurringAchPaymentRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecurringAchPaymentRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecurringAchPaymentRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `account` - if (jsonObj.get("account") != null && !jsonObj.get("account").isJsonNull()) { - RecurringAchPaymentRelationshipsAccount.validateJsonElement(jsonObj.get("account")); - } - // validate the optional field `counterparty` - if (jsonObj.get("counterparty") != null && !jsonObj.get("counterparty").isJsonNull()) { - RecurringAchPaymentRelationshipsCounterparty.validateJsonElement(jsonObj.get("counterparty")); - } - // validate the optional field `customer` - if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { - ReceivedPaymentRelationshipsCustomer.validateJsonElement(jsonObj.get("customer")); - } - // validate the optional field `org` - if (jsonObj.get("org") != null && !jsonObj.get("org").isJsonNull()) { - RecurringAchPaymentRelationshipsOrg.validateJsonElement(jsonObj.get("org")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecurringAchPaymentRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecurringAchPaymentRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecurringAchPaymentRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecurringAchPaymentRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecurringAchPaymentRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecurringAchPaymentRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringAchPaymentRelationships - * @throws IOException if the JSON string is invalid with respect to RecurringAchPaymentRelationships - */ - public static RecurringAchPaymentRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringAchPaymentRelationships.class); - } - - /** - * Convert an instance of RecurringAchPaymentRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsAccount.java b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsAccount.java deleted file mode 100644 index a5a2c094..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsAccount.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RecurringAchPaymentRelationshipsAccountData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringAchPaymentRelationshipsAccount - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringAchPaymentRelationshipsAccount { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private RecurringAchPaymentRelationshipsAccountData data; - - public RecurringAchPaymentRelationshipsAccount() { - } - - public RecurringAchPaymentRelationshipsAccount data(RecurringAchPaymentRelationshipsAccountData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public RecurringAchPaymentRelationshipsAccountData getData() { - return data; - } - - - public void setData(RecurringAchPaymentRelationshipsAccountData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringAchPaymentRelationshipsAccount recurringAchPaymentRelationshipsAccount = (RecurringAchPaymentRelationshipsAccount) o; - return Objects.equals(this.data, recurringAchPaymentRelationshipsAccount.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringAchPaymentRelationshipsAccount {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringAchPaymentRelationshipsAccount - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringAchPaymentRelationshipsAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringAchPaymentRelationshipsAccount is not found in the empty JSON string", RecurringAchPaymentRelationshipsAccount.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecurringAchPaymentRelationshipsAccount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecurringAchPaymentRelationshipsAccount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RecurringAchPaymentRelationshipsAccount.openapiRequiredFields) { - 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(); - // validate the required field `data` - RecurringAchPaymentRelationshipsAccountData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecurringAchPaymentRelationshipsAccount.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecurringAchPaymentRelationshipsAccount' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecurringAchPaymentRelationshipsAccount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecurringAchPaymentRelationshipsAccount value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecurringAchPaymentRelationshipsAccount read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecurringAchPaymentRelationshipsAccount given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringAchPaymentRelationshipsAccount - * @throws IOException if the JSON string is invalid with respect to RecurringAchPaymentRelationshipsAccount - */ - public static RecurringAchPaymentRelationshipsAccount fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringAchPaymentRelationshipsAccount.class); - } - - /** - * Convert an instance of RecurringAchPaymentRelationshipsAccount to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsAccountData.java b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsAccountData.java deleted file mode 100644 index 9342a23f..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsAccountData.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringAchPaymentRelationshipsAccountData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringAchPaymentRelationshipsAccountData { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - DEPOSITACCOUNT("depositAccount"), - - ACCOUNT("account"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public RecurringAchPaymentRelationshipsAccountData() { - } - - public RecurringAchPaymentRelationshipsAccountData type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public RecurringAchPaymentRelationshipsAccountData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringAchPaymentRelationshipsAccountData recurringAchPaymentRelationshipsAccountData = (RecurringAchPaymentRelationshipsAccountData) o; - return Objects.equals(this.type, recurringAchPaymentRelationshipsAccountData.type) && - Objects.equals(this.id, recurringAchPaymentRelationshipsAccountData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringAchPaymentRelationshipsAccountData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringAchPaymentRelationshipsAccountData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringAchPaymentRelationshipsAccountData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringAchPaymentRelationshipsAccountData is not found in the empty JSON string", RecurringAchPaymentRelationshipsAccountData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecurringAchPaymentRelationshipsAccountData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecurringAchPaymentRelationshipsAccountData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RecurringAchPaymentRelationshipsAccountData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecurringAchPaymentRelationshipsAccountData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecurringAchPaymentRelationshipsAccountData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecurringAchPaymentRelationshipsAccountData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecurringAchPaymentRelationshipsAccountData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecurringAchPaymentRelationshipsAccountData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecurringAchPaymentRelationshipsAccountData given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringAchPaymentRelationshipsAccountData - * @throws IOException if the JSON string is invalid with respect to RecurringAchPaymentRelationshipsAccountData - */ - public static RecurringAchPaymentRelationshipsAccountData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringAchPaymentRelationshipsAccountData.class); - } - - /** - * Convert an instance of RecurringAchPaymentRelationshipsAccountData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsCounterparty.java b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsCounterparty.java deleted file mode 100644 index 153a91e9..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsCounterparty.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RecurringAchPaymentRelationshipsCounterpartyData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringAchPaymentRelationshipsCounterparty - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringAchPaymentRelationshipsCounterparty { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private RecurringAchPaymentRelationshipsCounterpartyData data; - - public RecurringAchPaymentRelationshipsCounterparty() { - } - - public RecurringAchPaymentRelationshipsCounterparty data(RecurringAchPaymentRelationshipsCounterpartyData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public RecurringAchPaymentRelationshipsCounterpartyData getData() { - return data; - } - - - public void setData(RecurringAchPaymentRelationshipsCounterpartyData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringAchPaymentRelationshipsCounterparty recurringAchPaymentRelationshipsCounterparty = (RecurringAchPaymentRelationshipsCounterparty) o; - return Objects.equals(this.data, recurringAchPaymentRelationshipsCounterparty.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringAchPaymentRelationshipsCounterparty {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringAchPaymentRelationshipsCounterparty - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringAchPaymentRelationshipsCounterparty.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringAchPaymentRelationshipsCounterparty is not found in the empty JSON string", RecurringAchPaymentRelationshipsCounterparty.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecurringAchPaymentRelationshipsCounterparty.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecurringAchPaymentRelationshipsCounterparty` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RecurringAchPaymentRelationshipsCounterparty.openapiRequiredFields) { - 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(); - // validate the required field `data` - RecurringAchPaymentRelationshipsCounterpartyData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecurringAchPaymentRelationshipsCounterparty.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecurringAchPaymentRelationshipsCounterparty' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecurringAchPaymentRelationshipsCounterparty.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecurringAchPaymentRelationshipsCounterparty value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecurringAchPaymentRelationshipsCounterparty read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecurringAchPaymentRelationshipsCounterparty given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringAchPaymentRelationshipsCounterparty - * @throws IOException if the JSON string is invalid with respect to RecurringAchPaymentRelationshipsCounterparty - */ - public static RecurringAchPaymentRelationshipsCounterparty fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringAchPaymentRelationshipsCounterparty.class); - } - - /** - * Convert an instance of RecurringAchPaymentRelationshipsCounterparty to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsCounterpartyData.java b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsCounterpartyData.java deleted file mode 100644 index 751743a4..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsCounterpartyData.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringAchPaymentRelationshipsCounterpartyData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringAchPaymentRelationshipsCounterpartyData { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - ACCOUNT("account"), - - COUNTERPARTY("counterparty"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public RecurringAchPaymentRelationshipsCounterpartyData() { - } - - public RecurringAchPaymentRelationshipsCounterpartyData type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public RecurringAchPaymentRelationshipsCounterpartyData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringAchPaymentRelationshipsCounterpartyData recurringAchPaymentRelationshipsCounterpartyData = (RecurringAchPaymentRelationshipsCounterpartyData) o; - return Objects.equals(this.type, recurringAchPaymentRelationshipsCounterpartyData.type) && - Objects.equals(this.id, recurringAchPaymentRelationshipsCounterpartyData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringAchPaymentRelationshipsCounterpartyData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringAchPaymentRelationshipsCounterpartyData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringAchPaymentRelationshipsCounterpartyData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringAchPaymentRelationshipsCounterpartyData is not found in the empty JSON string", RecurringAchPaymentRelationshipsCounterpartyData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecurringAchPaymentRelationshipsCounterpartyData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecurringAchPaymentRelationshipsCounterpartyData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RecurringAchPaymentRelationshipsCounterpartyData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecurringAchPaymentRelationshipsCounterpartyData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecurringAchPaymentRelationshipsCounterpartyData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecurringAchPaymentRelationshipsCounterpartyData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecurringAchPaymentRelationshipsCounterpartyData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecurringAchPaymentRelationshipsCounterpartyData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecurringAchPaymentRelationshipsCounterpartyData given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringAchPaymentRelationshipsCounterpartyData - * @throws IOException if the JSON string is invalid with respect to RecurringAchPaymentRelationshipsCounterpartyData - */ - public static RecurringAchPaymentRelationshipsCounterpartyData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringAchPaymentRelationshipsCounterpartyData.class); - } - - /** - * Convert an instance of RecurringAchPaymentRelationshipsCounterpartyData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsOrg.java b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsOrg.java deleted file mode 100644 index fb2699d2..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsOrg.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RecurringAchPaymentRelationshipsOrgData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringAchPaymentRelationshipsOrg - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringAchPaymentRelationshipsOrg { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private RecurringAchPaymentRelationshipsOrgData data; - - public RecurringAchPaymentRelationshipsOrg() { - } - - public RecurringAchPaymentRelationshipsOrg data(RecurringAchPaymentRelationshipsOrgData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public RecurringAchPaymentRelationshipsOrgData getData() { - return data; - } - - - public void setData(RecurringAchPaymentRelationshipsOrgData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringAchPaymentRelationshipsOrg recurringAchPaymentRelationshipsOrg = (RecurringAchPaymentRelationshipsOrg) o; - return Objects.equals(this.data, recurringAchPaymentRelationshipsOrg.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringAchPaymentRelationshipsOrg {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringAchPaymentRelationshipsOrg - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringAchPaymentRelationshipsOrg.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringAchPaymentRelationshipsOrg is not found in the empty JSON string", RecurringAchPaymentRelationshipsOrg.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecurringAchPaymentRelationshipsOrg.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecurringAchPaymentRelationshipsOrg` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RecurringAchPaymentRelationshipsOrg.openapiRequiredFields) { - 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(); - // validate the required field `data` - RecurringAchPaymentRelationshipsOrgData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecurringAchPaymentRelationshipsOrg.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecurringAchPaymentRelationshipsOrg' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecurringAchPaymentRelationshipsOrg.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecurringAchPaymentRelationshipsOrg value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecurringAchPaymentRelationshipsOrg read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecurringAchPaymentRelationshipsOrg given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringAchPaymentRelationshipsOrg - * @throws IOException if the JSON string is invalid with respect to RecurringAchPaymentRelationshipsOrg - */ - public static RecurringAchPaymentRelationshipsOrg fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringAchPaymentRelationshipsOrg.class); - } - - /** - * Convert an instance of RecurringAchPaymentRelationshipsOrg to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsOrgData.java b/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsOrgData.java deleted file mode 100644 index efff1200..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringAchPaymentRelationshipsOrgData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringAchPaymentRelationshipsOrgData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringAchPaymentRelationshipsOrgData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public RecurringAchPaymentRelationshipsOrgData() { - } - - public RecurringAchPaymentRelationshipsOrgData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public RecurringAchPaymentRelationshipsOrgData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringAchPaymentRelationshipsOrgData recurringAchPaymentRelationshipsOrgData = (RecurringAchPaymentRelationshipsOrgData) o; - return Objects.equals(this.type, recurringAchPaymentRelationshipsOrgData.type) && - Objects.equals(this.id, recurringAchPaymentRelationshipsOrgData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringAchPaymentRelationshipsOrgData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringAchPaymentRelationshipsOrgData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringAchPaymentRelationshipsOrgData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringAchPaymentRelationshipsOrgData is not found in the empty JSON string", RecurringAchPaymentRelationshipsOrgData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecurringAchPaymentRelationshipsOrgData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecurringAchPaymentRelationshipsOrgData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RecurringAchPaymentRelationshipsOrgData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecurringAchPaymentRelationshipsOrgData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecurringAchPaymentRelationshipsOrgData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecurringAchPaymentRelationshipsOrgData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecurringAchPaymentRelationshipsOrgData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecurringAchPaymentRelationshipsOrgData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecurringAchPaymentRelationshipsOrgData given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringAchPaymentRelationshipsOrgData - * @throws IOException if the JSON string is invalid with respect to RecurringAchPaymentRelationshipsOrgData - */ - public static RecurringAchPaymentRelationshipsOrgData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringAchPaymentRelationshipsOrgData.class); - } - - /** - * Convert an instance of RecurringAchPaymentRelationshipsOrgData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationships.java b/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationships.java deleted file mode 100644 index 25b71c1c..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationships.java +++ /dev/null @@ -1,309 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReceivedPaymentRelationshipsCustomer; -import org.openapitools.client.model.RecurringAchPaymentRelationshipsAccount; -import org.openapitools.client.model.RecurringAchPaymentRelationshipsOrg; -import org.openapitools.client.model.RecurringBookPaymentRelationshipsCounterpartyAccount; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringBookPaymentRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringBookPaymentRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private RecurringAchPaymentRelationshipsAccount account; - - public static final String SERIALIZED_NAME_COUNTERPARTY_ACCOUNT = "counterpartyAccount"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_ACCOUNT) - private RecurringBookPaymentRelationshipsCounterpartyAccount counterpartyAccount; - - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private ReceivedPaymentRelationshipsCustomer customer; - - public static final String SERIALIZED_NAME_ORG = "org"; - @SerializedName(SERIALIZED_NAME_ORG) - private RecurringAchPaymentRelationshipsOrg org; - - public RecurringBookPaymentRelationships() { - } - - public RecurringBookPaymentRelationships account(RecurringAchPaymentRelationshipsAccount account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nullable - public RecurringAchPaymentRelationshipsAccount getAccount() { - return account; - } - - - public void setAccount(RecurringAchPaymentRelationshipsAccount account) { - this.account = account; - } - - - public RecurringBookPaymentRelationships counterpartyAccount(RecurringBookPaymentRelationshipsCounterpartyAccount counterpartyAccount) { - - this.counterpartyAccount = counterpartyAccount; - return this; - } - - /** - * Get counterpartyAccount - * @return counterpartyAccount - **/ - @javax.annotation.Nullable - public RecurringBookPaymentRelationshipsCounterpartyAccount getCounterpartyAccount() { - return counterpartyAccount; - } - - - public void setCounterpartyAccount(RecurringBookPaymentRelationshipsCounterpartyAccount counterpartyAccount) { - this.counterpartyAccount = counterpartyAccount; - } - - - public RecurringBookPaymentRelationships customer(ReceivedPaymentRelationshipsCustomer customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nullable - public ReceivedPaymentRelationshipsCustomer getCustomer() { - return customer; - } - - - public void setCustomer(ReceivedPaymentRelationshipsCustomer customer) { - this.customer = customer; - } - - - public RecurringBookPaymentRelationships org(RecurringAchPaymentRelationshipsOrg org) { - - this.org = org; - return this; - } - - /** - * Get org - * @return org - **/ - @javax.annotation.Nullable - public RecurringAchPaymentRelationshipsOrg getOrg() { - return org; - } - - - public void setOrg(RecurringAchPaymentRelationshipsOrg org) { - this.org = org; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringBookPaymentRelationships recurringBookPaymentRelationships = (RecurringBookPaymentRelationships) o; - return Objects.equals(this.account, recurringBookPaymentRelationships.account) && - Objects.equals(this.counterpartyAccount, recurringBookPaymentRelationships.counterpartyAccount) && - Objects.equals(this.customer, recurringBookPaymentRelationships.customer) && - Objects.equals(this.org, recurringBookPaymentRelationships.org); - } - - @Override - public int hashCode() { - return Objects.hash(account, counterpartyAccount, customer, org); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringBookPaymentRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" counterpartyAccount: ").append(toIndentedString(counterpartyAccount)).append("\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" org: ").append(toIndentedString(org)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - openapiFields.add("counterpartyAccount"); - openapiFields.add("customer"); - openapiFields.add("org"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringBookPaymentRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringBookPaymentRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringBookPaymentRelationships is not found in the empty JSON string", RecurringBookPaymentRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecurringBookPaymentRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecurringBookPaymentRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `account` - if (jsonObj.get("account") != null && !jsonObj.get("account").isJsonNull()) { - RecurringAchPaymentRelationshipsAccount.validateJsonElement(jsonObj.get("account")); - } - // validate the optional field `counterpartyAccount` - if (jsonObj.get("counterpartyAccount") != null && !jsonObj.get("counterpartyAccount").isJsonNull()) { - RecurringBookPaymentRelationshipsCounterpartyAccount.validateJsonElement(jsonObj.get("counterpartyAccount")); - } - // validate the optional field `customer` - if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { - ReceivedPaymentRelationshipsCustomer.validateJsonElement(jsonObj.get("customer")); - } - // validate the optional field `org` - if (jsonObj.get("org") != null && !jsonObj.get("org").isJsonNull()) { - RecurringAchPaymentRelationshipsOrg.validateJsonElement(jsonObj.get("org")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecurringBookPaymentRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecurringBookPaymentRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecurringBookPaymentRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecurringBookPaymentRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecurringBookPaymentRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecurringBookPaymentRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringBookPaymentRelationships - * @throws IOException if the JSON string is invalid with respect to RecurringBookPaymentRelationships - */ - public static RecurringBookPaymentRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringBookPaymentRelationships.class); - } - - /** - * Convert an instance of RecurringBookPaymentRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationshipsCounterpartyAccount.java b/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationshipsCounterpartyAccount.java deleted file mode 100644 index 9420cb56..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationshipsCounterpartyAccount.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RecurringBookPaymentRelationshipsCounterpartyAccountData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringBookPaymentRelationshipsCounterpartyAccount - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringBookPaymentRelationshipsCounterpartyAccount { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private RecurringBookPaymentRelationshipsCounterpartyAccountData data; - - public RecurringBookPaymentRelationshipsCounterpartyAccount() { - } - - public RecurringBookPaymentRelationshipsCounterpartyAccount data(RecurringBookPaymentRelationshipsCounterpartyAccountData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public RecurringBookPaymentRelationshipsCounterpartyAccountData getData() { - return data; - } - - - public void setData(RecurringBookPaymentRelationshipsCounterpartyAccountData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringBookPaymentRelationshipsCounterpartyAccount recurringBookPaymentRelationshipsCounterpartyAccount = (RecurringBookPaymentRelationshipsCounterpartyAccount) o; - return Objects.equals(this.data, recurringBookPaymentRelationshipsCounterpartyAccount.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringBookPaymentRelationshipsCounterpartyAccount {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringBookPaymentRelationshipsCounterpartyAccount - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringBookPaymentRelationshipsCounterpartyAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringBookPaymentRelationshipsCounterpartyAccount is not found in the empty JSON string", RecurringBookPaymentRelationshipsCounterpartyAccount.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecurringBookPaymentRelationshipsCounterpartyAccount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecurringBookPaymentRelationshipsCounterpartyAccount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RecurringBookPaymentRelationshipsCounterpartyAccount.openapiRequiredFields) { - 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(); - // validate the required field `data` - RecurringBookPaymentRelationshipsCounterpartyAccountData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecurringBookPaymentRelationshipsCounterpartyAccount.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecurringBookPaymentRelationshipsCounterpartyAccount' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecurringBookPaymentRelationshipsCounterpartyAccount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecurringBookPaymentRelationshipsCounterpartyAccount value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecurringBookPaymentRelationshipsCounterpartyAccount read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecurringBookPaymentRelationshipsCounterpartyAccount given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringBookPaymentRelationshipsCounterpartyAccount - * @throws IOException if the JSON string is invalid with respect to RecurringBookPaymentRelationshipsCounterpartyAccount - */ - public static RecurringBookPaymentRelationshipsCounterpartyAccount fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringBookPaymentRelationshipsCounterpartyAccount.class); - } - - /** - * Convert an instance of RecurringBookPaymentRelationshipsCounterpartyAccount to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationshipsCounterpartyAccountData.java b/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationshipsCounterpartyAccountData.java deleted file mode 100644 index 1784a6c9..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringBookPaymentRelationshipsCounterpartyAccountData.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringBookPaymentRelationshipsCounterpartyAccountData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringBookPaymentRelationshipsCounterpartyAccountData { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - ACCOUNT("account"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public RecurringBookPaymentRelationshipsCounterpartyAccountData() { - } - - public RecurringBookPaymentRelationshipsCounterpartyAccountData type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public RecurringBookPaymentRelationshipsCounterpartyAccountData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringBookPaymentRelationshipsCounterpartyAccountData recurringBookPaymentRelationshipsCounterpartyAccountData = (RecurringBookPaymentRelationshipsCounterpartyAccountData) o; - return Objects.equals(this.type, recurringBookPaymentRelationshipsCounterpartyAccountData.type) && - Objects.equals(this.id, recurringBookPaymentRelationshipsCounterpartyAccountData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringBookPaymentRelationshipsCounterpartyAccountData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringBookPaymentRelationshipsCounterpartyAccountData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringBookPaymentRelationshipsCounterpartyAccountData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringBookPaymentRelationshipsCounterpartyAccountData is not found in the empty JSON string", RecurringBookPaymentRelationshipsCounterpartyAccountData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecurringBookPaymentRelationshipsCounterpartyAccountData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecurringBookPaymentRelationshipsCounterpartyAccountData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RecurringBookPaymentRelationshipsCounterpartyAccountData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecurringBookPaymentRelationshipsCounterpartyAccountData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecurringBookPaymentRelationshipsCounterpartyAccountData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecurringBookPaymentRelationshipsCounterpartyAccountData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecurringBookPaymentRelationshipsCounterpartyAccountData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecurringBookPaymentRelationshipsCounterpartyAccountData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecurringBookPaymentRelationshipsCounterpartyAccountData given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringBookPaymentRelationshipsCounterpartyAccountData - * @throws IOException if the JSON string is invalid with respect to RecurringBookPaymentRelationshipsCounterpartyAccountData - */ - public static RecurringBookPaymentRelationshipsCounterpartyAccountData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringBookPaymentRelationshipsCounterpartyAccountData.class); - } - - /** - * Convert an instance of RecurringBookPaymentRelationshipsCounterpartyAccountData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringCreditAchPayment.java b/src/main/java/org/openapitools/client/model/RecurringCreditAchPayment.java deleted file mode 100644 index 30b11e41..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringCreditAchPayment.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RecurringAchPaymentRelationships; -import org.openapitools.client.model.RecurringCreditAchPaymentAllOfAttributes; -import org.openapitools.client.model.RecurringPayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringCreditAchPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringCreditAchPayment extends RecurringPayment { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private RecurringCreditAchPaymentAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private RecurringAchPaymentRelationships relationships; - - public RecurringCreditAchPayment() { - this.type = this.getClass().getSimpleName(); - } - - public RecurringCreditAchPayment attributes(RecurringCreditAchPaymentAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public RecurringCreditAchPaymentAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(RecurringCreditAchPaymentAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public RecurringCreditAchPayment relationships(RecurringAchPaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public RecurringAchPaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(RecurringAchPaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringCreditAchPayment recurringCreditAchPayment = (RecurringCreditAchPayment) o; - return Objects.equals(this.attributes, recurringCreditAchPayment.attributes) && - Objects.equals(this.relationships, recurringCreditAchPayment.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringCreditAchPayment {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringCreditAchPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringCreditAchPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringCreditAchPayment is not found in the empty JSON string", RecurringCreditAchPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecurringCreditAchPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecurringCreditAchPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RecurringCreditAchPayment.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecurringCreditAchPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecurringCreditAchPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecurringCreditAchPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecurringCreditAchPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecurringCreditAchPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecurringCreditAchPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringCreditAchPayment - * @throws IOException if the JSON string is invalid with respect to RecurringCreditAchPayment - */ - public static RecurringCreditAchPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringCreditAchPayment.class); - } - - /** - * Convert an instance of RecurringCreditAchPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringCreditAchPaymentAllOfAttributes.java b/src/main/java/org/openapitools/client/model/RecurringCreditAchPaymentAllOfAttributes.java deleted file mode 100644 index 69f060d4..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringCreditAchPaymentAllOfAttributes.java +++ /dev/null @@ -1,507 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.Schedule; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringCreditAchPaymentAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringCreditAchPaymentAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_ADDENDA = "addenda"; - @SerializedName(SERIALIZED_NAME_ADDENDA) - private String addenda; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - PENDING("Pending"), - - ACTIVE("Active"), - - COMPLETED("Completed"), - - DISABLED("Disabled"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_SCHEDULE = "schedule"; - @SerializedName(SERIALIZED_NAME_SCHEDULE) - private Schedule schedule; - - public static final String SERIALIZED_NAME_NUMBER_OF_PAYMENTS = "numberOfPayments"; - @SerializedName(SERIALIZED_NAME_NUMBER_OF_PAYMENTS) - private Integer numberOfPayments; - - public RecurringCreditAchPaymentAllOfAttributes() { - } - - public RecurringCreditAchPaymentAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public RecurringCreditAchPaymentAllOfAttributes updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public RecurringCreditAchPaymentAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public RecurringCreditAchPaymentAllOfAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public RecurringCreditAchPaymentAllOfAttributes addenda(String addenda) { - - this.addenda = addenda; - return this; - } - - /** - * Get addenda - * @return addenda - **/ - @javax.annotation.Nullable - public String getAddenda() { - return addenda; - } - - - public void setAddenda(String addenda) { - this.addenda = addenda; - } - - - public RecurringCreditAchPaymentAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public RecurringCreditAchPaymentAllOfAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public RecurringCreditAchPaymentAllOfAttributes schedule(Schedule schedule) { - - this.schedule = schedule; - return this; - } - - /** - * Get schedule - * @return schedule - **/ - @javax.annotation.Nonnull - public Schedule getSchedule() { - return schedule; - } - - - public void setSchedule(Schedule schedule) { - this.schedule = schedule; - } - - - public RecurringCreditAchPaymentAllOfAttributes numberOfPayments(Integer numberOfPayments) { - - this.numberOfPayments = numberOfPayments; - return this; - } - - /** - * Get numberOfPayments - * @return numberOfPayments - **/ - @javax.annotation.Nonnull - public Integer getNumberOfPayments() { - return numberOfPayments; - } - - - public void setNumberOfPayments(Integer numberOfPayments) { - this.numberOfPayments = numberOfPayments; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringCreditAchPaymentAllOfAttributes recurringCreditAchPaymentAllOfAttributes = (RecurringCreditAchPaymentAllOfAttributes) o; - return Objects.equals(this.createdAt, recurringCreditAchPaymentAllOfAttributes.createdAt) && - Objects.equals(this.updatedAt, recurringCreditAchPaymentAllOfAttributes.updatedAt) && - Objects.equals(this.amount, recurringCreditAchPaymentAllOfAttributes.amount) && - Objects.equals(this.description, recurringCreditAchPaymentAllOfAttributes.description) && - Objects.equals(this.addenda, recurringCreditAchPaymentAllOfAttributes.addenda) && - Objects.equals(this.tags, recurringCreditAchPaymentAllOfAttributes.tags) && - Objects.equals(this.status, recurringCreditAchPaymentAllOfAttributes.status) && - Objects.equals(this.schedule, recurringCreditAchPaymentAllOfAttributes.schedule) && - Objects.equals(this.numberOfPayments, recurringCreditAchPaymentAllOfAttributes.numberOfPayments); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, updatedAt, amount, description, addenda, tags, status, schedule, numberOfPayments); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringCreditAchPaymentAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); - sb.append(" numberOfPayments: ").append(toIndentedString(numberOfPayments)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("amount"); - openapiFields.add("description"); - openapiFields.add("addenda"); - openapiFields.add("tags"); - openapiFields.add("status"); - openapiFields.add("schedule"); - openapiFields.add("numberOfPayments"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("schedule"); - openapiRequiredFields.add("numberOfPayments"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringCreditAchPaymentAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringCreditAchPaymentAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringCreditAchPaymentAllOfAttributes is not found in the empty JSON string", RecurringCreditAchPaymentAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecurringCreditAchPaymentAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecurringCreditAchPaymentAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RecurringCreditAchPaymentAllOfAttributes.openapiRequiredFields) { - 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("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("addenda") != null && !jsonObj.get("addenda").isJsonNull()) && !jsonObj.get("addenda").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `addenda` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addenda").toString())); - } - if (!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())); - } - // validate the required field `schedule` - Schedule.validateJsonElement(jsonObj.get("schedule")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecurringCreditAchPaymentAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecurringCreditAchPaymentAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecurringCreditAchPaymentAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecurringCreditAchPaymentAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecurringCreditAchPaymentAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecurringCreditAchPaymentAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringCreditAchPaymentAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to RecurringCreditAchPaymentAllOfAttributes - */ - public static RecurringCreditAchPaymentAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringCreditAchPaymentAllOfAttributes.class); - } - - /** - * Convert an instance of RecurringCreditAchPaymentAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringCreditBookPayment.java b/src/main/java/org/openapitools/client/model/RecurringCreditBookPayment.java deleted file mode 100644 index dab91c37..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringCreditBookPayment.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RecurringBookPaymentRelationships; -import org.openapitools.client.model.RecurringCreditBookPaymentAllOfAttributes; -import org.openapitools.client.model.RecurringPayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringCreditBookPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringCreditBookPayment extends RecurringPayment { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private RecurringCreditBookPaymentAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private RecurringBookPaymentRelationships relationships; - - public RecurringCreditBookPayment() { - this.type = this.getClass().getSimpleName(); - } - - public RecurringCreditBookPayment attributes(RecurringCreditBookPaymentAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public RecurringCreditBookPaymentAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(RecurringCreditBookPaymentAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public RecurringCreditBookPayment relationships(RecurringBookPaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public RecurringBookPaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(RecurringBookPaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringCreditBookPayment recurringCreditBookPayment = (RecurringCreditBookPayment) o; - return Objects.equals(this.attributes, recurringCreditBookPayment.attributes) && - Objects.equals(this.relationships, recurringCreditBookPayment.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringCreditBookPayment {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringCreditBookPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringCreditBookPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringCreditBookPayment is not found in the empty JSON string", RecurringCreditBookPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecurringCreditBookPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecurringCreditBookPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RecurringCreditBookPayment.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecurringCreditBookPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecurringCreditBookPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecurringCreditBookPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecurringCreditBookPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecurringCreditBookPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecurringCreditBookPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringCreditBookPayment - * @throws IOException if the JSON string is invalid with respect to RecurringCreditBookPayment - */ - public static RecurringCreditBookPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringCreditBookPayment.class); - } - - /** - * Convert an instance of RecurringCreditBookPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringCreditBookPaymentAllOfAttributes.java b/src/main/java/org/openapitools/client/model/RecurringCreditBookPaymentAllOfAttributes.java deleted file mode 100644 index 799d5678..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringCreditBookPaymentAllOfAttributes.java +++ /dev/null @@ -1,477 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.Schedule; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringCreditBookPaymentAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringCreditBookPaymentAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - PENDING("Pending"), - - ACTIVE("Active"), - - COMPLETED("Completed"), - - DISABLED("Disabled"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_SCHEDULE = "schedule"; - @SerializedName(SERIALIZED_NAME_SCHEDULE) - private Schedule schedule; - - public static final String SERIALIZED_NAME_NUMBER_OF_PAYMENTS = "numberOfPayments"; - @SerializedName(SERIALIZED_NAME_NUMBER_OF_PAYMENTS) - private Integer numberOfPayments; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public RecurringCreditBookPaymentAllOfAttributes() { - } - - public RecurringCreditBookPaymentAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public RecurringCreditBookPaymentAllOfAttributes updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public RecurringCreditBookPaymentAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public RecurringCreditBookPaymentAllOfAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public RecurringCreditBookPaymentAllOfAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public RecurringCreditBookPaymentAllOfAttributes schedule(Schedule schedule) { - - this.schedule = schedule; - return this; - } - - /** - * Get schedule - * @return schedule - **/ - @javax.annotation.Nonnull - public Schedule getSchedule() { - return schedule; - } - - - public void setSchedule(Schedule schedule) { - this.schedule = schedule; - } - - - public RecurringCreditBookPaymentAllOfAttributes numberOfPayments(Integer numberOfPayments) { - - this.numberOfPayments = numberOfPayments; - return this; - } - - /** - * Get numberOfPayments - * @return numberOfPayments - **/ - @javax.annotation.Nonnull - public Integer getNumberOfPayments() { - return numberOfPayments; - } - - - public void setNumberOfPayments(Integer numberOfPayments) { - this.numberOfPayments = numberOfPayments; - } - - - public RecurringCreditBookPaymentAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringCreditBookPaymentAllOfAttributes recurringCreditBookPaymentAllOfAttributes = (RecurringCreditBookPaymentAllOfAttributes) o; - return Objects.equals(this.createdAt, recurringCreditBookPaymentAllOfAttributes.createdAt) && - Objects.equals(this.updatedAt, recurringCreditBookPaymentAllOfAttributes.updatedAt) && - Objects.equals(this.amount, recurringCreditBookPaymentAllOfAttributes.amount) && - Objects.equals(this.description, recurringCreditBookPaymentAllOfAttributes.description) && - Objects.equals(this.status, recurringCreditBookPaymentAllOfAttributes.status) && - Objects.equals(this.schedule, recurringCreditBookPaymentAllOfAttributes.schedule) && - Objects.equals(this.numberOfPayments, recurringCreditBookPaymentAllOfAttributes.numberOfPayments) && - Objects.equals(this.tags, recurringCreditBookPaymentAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, updatedAt, amount, description, status, schedule, numberOfPayments, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringCreditBookPaymentAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); - sb.append(" numberOfPayments: ").append(toIndentedString(numberOfPayments)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("amount"); - openapiFields.add("description"); - openapiFields.add("status"); - openapiFields.add("schedule"); - openapiFields.add("numberOfPayments"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("updatedAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("schedule"); - openapiRequiredFields.add("numberOfPayments"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringCreditBookPaymentAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringCreditBookPaymentAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringCreditBookPaymentAllOfAttributes is not found in the empty JSON string", RecurringCreditBookPaymentAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecurringCreditBookPaymentAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecurringCreditBookPaymentAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RecurringCreditBookPaymentAllOfAttributes.openapiRequiredFields) { - 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("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if (!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())); - } - // validate the required field `schedule` - Schedule.validateJsonElement(jsonObj.get("schedule")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecurringCreditBookPaymentAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecurringCreditBookPaymentAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecurringCreditBookPaymentAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecurringCreditBookPaymentAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecurringCreditBookPaymentAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecurringCreditBookPaymentAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringCreditBookPaymentAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to RecurringCreditBookPaymentAllOfAttributes - */ - public static RecurringCreditBookPaymentAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringCreditBookPaymentAllOfAttributes.class); - } - - /** - * Convert an instance of RecurringCreditBookPaymentAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringDebitAchPayment.java b/src/main/java/org/openapitools/client/model/RecurringDebitAchPayment.java deleted file mode 100644 index 5f7c3764..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringDebitAchPayment.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RecurringAchPaymentRelationships; -import org.openapitools.client.model.RecurringDebitAchPaymentAllOfAttributes; -import org.openapitools.client.model.RecurringPayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringDebitAchPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringDebitAchPayment extends RecurringPayment { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private RecurringDebitAchPaymentAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private RecurringAchPaymentRelationships relationships; - - public RecurringDebitAchPayment() { - this.type = this.getClass().getSimpleName(); - } - - public RecurringDebitAchPayment attributes(RecurringDebitAchPaymentAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public RecurringDebitAchPaymentAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(RecurringDebitAchPaymentAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public RecurringDebitAchPayment relationships(RecurringAchPaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public RecurringAchPaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(RecurringAchPaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringDebitAchPayment recurringDebitAchPayment = (RecurringDebitAchPayment) o; - return Objects.equals(this.attributes, recurringDebitAchPayment.attributes) && - Objects.equals(this.relationships, recurringDebitAchPayment.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringDebitAchPayment {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringDebitAchPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringDebitAchPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringDebitAchPayment is not found in the empty JSON string", RecurringDebitAchPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecurringDebitAchPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecurringDebitAchPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RecurringDebitAchPayment.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecurringDebitAchPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecurringDebitAchPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecurringDebitAchPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecurringDebitAchPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecurringDebitAchPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecurringDebitAchPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringDebitAchPayment - * @throws IOException if the JSON string is invalid with respect to RecurringDebitAchPayment - */ - public static RecurringDebitAchPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringDebitAchPayment.class); - } - - /** - * Convert an instance of RecurringDebitAchPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringDebitAchPaymentAllOfAttributes.java b/src/main/java/org/openapitools/client/model/RecurringDebitAchPaymentAllOfAttributes.java deleted file mode 100644 index 9aff1a8a..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringDebitAchPaymentAllOfAttributes.java +++ /dev/null @@ -1,563 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.Schedule; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringDebitAchPaymentAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringDebitAchPaymentAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_ADDENDA = "addenda"; - @SerializedName(SERIALIZED_NAME_ADDENDA) - private String addenda; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - PENDING("Pending"), - - ACTIVE("Active"), - - COMPLETED("Completed"), - - DISABLED("Disabled"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_SCHEDULE = "schedule"; - @SerializedName(SERIALIZED_NAME_SCHEDULE) - private Schedule schedule; - - public static final String SERIALIZED_NAME_NUMBER_OF_PAYMENTS = "numberOfPayments"; - @SerializedName(SERIALIZED_NAME_NUMBER_OF_PAYMENTS) - private Integer numberOfPayments; - - public static final String SERIALIZED_NAME_VERIFY_COUNTERPARTY_BALANCE = "verifyCounterpartyBalance"; - @SerializedName(SERIALIZED_NAME_VERIFY_COUNTERPARTY_BALANCE) - private Boolean verifyCounterpartyBalance = false; - - public static final String SERIALIZED_NAME_SAME_DAY = "sameDay"; - @SerializedName(SERIALIZED_NAME_SAME_DAY) - private Boolean sameDay = false; - - public RecurringDebitAchPaymentAllOfAttributes() { - } - - public RecurringDebitAchPaymentAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public RecurringDebitAchPaymentAllOfAttributes updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public RecurringDebitAchPaymentAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public RecurringDebitAchPaymentAllOfAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public RecurringDebitAchPaymentAllOfAttributes addenda(String addenda) { - - this.addenda = addenda; - return this; - } - - /** - * Get addenda - * @return addenda - **/ - @javax.annotation.Nullable - public String getAddenda() { - return addenda; - } - - - public void setAddenda(String addenda) { - this.addenda = addenda; - } - - - public RecurringDebitAchPaymentAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public RecurringDebitAchPaymentAllOfAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public RecurringDebitAchPaymentAllOfAttributes schedule(Schedule schedule) { - - this.schedule = schedule; - return this; - } - - /** - * Get schedule - * @return schedule - **/ - @javax.annotation.Nonnull - public Schedule getSchedule() { - return schedule; - } - - - public void setSchedule(Schedule schedule) { - this.schedule = schedule; - } - - - public RecurringDebitAchPaymentAllOfAttributes numberOfPayments(Integer numberOfPayments) { - - this.numberOfPayments = numberOfPayments; - return this; - } - - /** - * Get numberOfPayments - * @return numberOfPayments - **/ - @javax.annotation.Nonnull - public Integer getNumberOfPayments() { - return numberOfPayments; - } - - - public void setNumberOfPayments(Integer numberOfPayments) { - this.numberOfPayments = numberOfPayments; - } - - - public RecurringDebitAchPaymentAllOfAttributes verifyCounterpartyBalance(Boolean verifyCounterpartyBalance) { - - this.verifyCounterpartyBalance = verifyCounterpartyBalance; - return this; - } - - /** - * Get verifyCounterpartyBalance - * @return verifyCounterpartyBalance - **/ - @javax.annotation.Nullable - public Boolean getVerifyCounterpartyBalance() { - return verifyCounterpartyBalance; - } - - - public void setVerifyCounterpartyBalance(Boolean verifyCounterpartyBalance) { - this.verifyCounterpartyBalance = verifyCounterpartyBalance; - } - - - public RecurringDebitAchPaymentAllOfAttributes sameDay(Boolean sameDay) { - - this.sameDay = sameDay; - return this; - } - - /** - * Get sameDay - * @return sameDay - **/ - @javax.annotation.Nullable - public Boolean getSameDay() { - return sameDay; - } - - - public void setSameDay(Boolean sameDay) { - this.sameDay = sameDay; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringDebitAchPaymentAllOfAttributes recurringDebitAchPaymentAllOfAttributes = (RecurringDebitAchPaymentAllOfAttributes) o; - return Objects.equals(this.createdAt, recurringDebitAchPaymentAllOfAttributes.createdAt) && - Objects.equals(this.updatedAt, recurringDebitAchPaymentAllOfAttributes.updatedAt) && - Objects.equals(this.amount, recurringDebitAchPaymentAllOfAttributes.amount) && - Objects.equals(this.description, recurringDebitAchPaymentAllOfAttributes.description) && - Objects.equals(this.addenda, recurringDebitAchPaymentAllOfAttributes.addenda) && - Objects.equals(this.tags, recurringDebitAchPaymentAllOfAttributes.tags) && - Objects.equals(this.status, recurringDebitAchPaymentAllOfAttributes.status) && - Objects.equals(this.schedule, recurringDebitAchPaymentAllOfAttributes.schedule) && - Objects.equals(this.numberOfPayments, recurringDebitAchPaymentAllOfAttributes.numberOfPayments) && - Objects.equals(this.verifyCounterpartyBalance, recurringDebitAchPaymentAllOfAttributes.verifyCounterpartyBalance) && - Objects.equals(this.sameDay, recurringDebitAchPaymentAllOfAttributes.sameDay); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, updatedAt, amount, description, addenda, tags, status, schedule, numberOfPayments, verifyCounterpartyBalance, sameDay); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringDebitAchPaymentAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); - sb.append(" numberOfPayments: ").append(toIndentedString(numberOfPayments)).append("\n"); - sb.append(" verifyCounterpartyBalance: ").append(toIndentedString(verifyCounterpartyBalance)).append("\n"); - sb.append(" sameDay: ").append(toIndentedString(sameDay)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("amount"); - openapiFields.add("description"); - openapiFields.add("addenda"); - openapiFields.add("tags"); - openapiFields.add("status"); - openapiFields.add("schedule"); - openapiFields.add("numberOfPayments"); - openapiFields.add("verifyCounterpartyBalance"); - openapiFields.add("sameDay"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("schedule"); - openapiRequiredFields.add("numberOfPayments"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringDebitAchPaymentAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringDebitAchPaymentAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringDebitAchPaymentAllOfAttributes is not found in the empty JSON string", RecurringDebitAchPaymentAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecurringDebitAchPaymentAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecurringDebitAchPaymentAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RecurringDebitAchPaymentAllOfAttributes.openapiRequiredFields) { - 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("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("addenda") != null && !jsonObj.get("addenda").isJsonNull()) && !jsonObj.get("addenda").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `addenda` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addenda").toString())); - } - if (!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())); - } - // validate the required field `schedule` - Schedule.validateJsonElement(jsonObj.get("schedule")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecurringDebitAchPaymentAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecurringDebitAchPaymentAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecurringDebitAchPaymentAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecurringDebitAchPaymentAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecurringDebitAchPaymentAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecurringDebitAchPaymentAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringDebitAchPaymentAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to RecurringDebitAchPaymentAllOfAttributes - */ - public static RecurringDebitAchPaymentAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringDebitAchPaymentAllOfAttributes.class); - } - - /** - * Convert an instance of RecurringDebitAchPaymentAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringPayment.java b/src/main/java/org/openapitools/client/model/RecurringPayment.java deleted file mode 100644 index 73d7f5d0..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringPayment.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringPayment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - protected String type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public RecurringPayment() { - this.type = this.getClass().getSimpleName(); - } - - public RecurringPayment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public RecurringPayment id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringPayment recurringPayment = (RecurringPayment) o; - return Objects.equals(this.type, recurringPayment.type) && - Objects.equals(this.id, recurringPayment.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringPayment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringPayment is not found in the empty JSON string", RecurringPayment.openapiRequiredFields.toString())); - } - } - - String discriminatorValue = jsonElement.getAsJsonObject().get("type").getAsString(); - switch (discriminatorValue) { - case "recurringCreditAchPayment": - RecurringCreditAchPayment.validateJsonElement(jsonElement); - break; - case "recurringCreditBookPayment": - RecurringCreditBookPayment.validateJsonElement(jsonElement); - break; - case "recurringDebitAchPayment": - RecurringDebitAchPayment.validateJsonElement(jsonElement); - break; - default: - throw new IllegalArgumentException(String.format("The value of the `type` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); - } - } - - - /** - * Create an instance of RecurringPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringPayment - * @throws IOException if the JSON string is invalid with respect to RecurringPayment - */ - public static RecurringPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringPayment.class); - } - - /** - * Convert an instance of RecurringPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringPaymentRelationship.java b/src/main/java/org/openapitools/client/model/RecurringPaymentRelationship.java deleted file mode 100644 index 43bc8655..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringPaymentRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RecurringPaymentRelationshipData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringPaymentRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringPaymentRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private RecurringPaymentRelationshipData data; - - public RecurringPaymentRelationship() { - } - - public RecurringPaymentRelationship data(RecurringPaymentRelationshipData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public RecurringPaymentRelationshipData getData() { - return data; - } - - - public void setData(RecurringPaymentRelationshipData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringPaymentRelationship recurringPaymentRelationship = (RecurringPaymentRelationship) o; - return Objects.equals(this.data, recurringPaymentRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringPaymentRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringPaymentRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringPaymentRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringPaymentRelationship is not found in the empty JSON string", RecurringPaymentRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecurringPaymentRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecurringPaymentRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RecurringPaymentRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - RecurringPaymentRelationshipData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecurringPaymentRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecurringPaymentRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecurringPaymentRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecurringPaymentRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecurringPaymentRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecurringPaymentRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringPaymentRelationship - * @throws IOException if the JSON string is invalid with respect to RecurringPaymentRelationship - */ - public static RecurringPaymentRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringPaymentRelationship.class); - } - - /** - * Convert an instance of RecurringPaymentRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RecurringPaymentRelationshipData.java b/src/main/java/org/openapitools/client/model/RecurringPaymentRelationshipData.java deleted file mode 100644 index 09d5a97d..00000000 --- a/src/main/java/org/openapitools/client/model/RecurringPaymentRelationshipData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RecurringPaymentRelationshipData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecurringPaymentRelationshipData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "recurringPayment"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public RecurringPaymentRelationshipData() { - } - - public RecurringPaymentRelationshipData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public RecurringPaymentRelationshipData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecurringPaymentRelationshipData recurringPaymentRelationshipData = (RecurringPaymentRelationshipData) o; - return Objects.equals(this.type, recurringPaymentRelationshipData.type) && - Objects.equals(this.id, recurringPaymentRelationshipData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecurringPaymentRelationshipData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecurringPaymentRelationshipData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecurringPaymentRelationshipData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecurringPaymentRelationshipData is not found in the empty JSON string", RecurringPaymentRelationshipData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RecurringPaymentRelationshipData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecurringPaymentRelationshipData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RecurringPaymentRelationshipData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecurringPaymentRelationshipData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecurringPaymentRelationshipData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecurringPaymentRelationshipData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecurringPaymentRelationshipData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RecurringPaymentRelationshipData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecurringPaymentRelationshipData given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecurringPaymentRelationshipData - * @throws IOException if the JSON string is invalid with respect to RecurringPaymentRelationshipData - */ - public static RecurringPaymentRelationshipData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecurringPaymentRelationshipData.class); - } - - /** - * Convert an instance of RecurringPaymentRelationshipData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RelatedTransaction.java b/src/main/java/org/openapitools/client/model/RelatedTransaction.java deleted file mode 100644 index 58e07116..00000000 --- a/src/main/java/org/openapitools/client/model/RelatedTransaction.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReceivedPaymentRelationshipsReceivePaymentTransactionData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RelatedTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RelatedTransaction { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ReceivedPaymentRelationshipsReceivePaymentTransactionData data; - - public RelatedTransaction() { - } - - public RelatedTransaction data(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public ReceivedPaymentRelationshipsReceivePaymentTransactionData getData() { - return data; - } - - - public void setData(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RelatedTransaction relatedTransaction = (RelatedTransaction) o; - return Objects.equals(this.data, relatedTransaction.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RelatedTransaction {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RelatedTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RelatedTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RelatedTransaction is not found in the empty JSON string", RelatedTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RelatedTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RelatedTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RelatedTransaction.openapiRequiredFields) { - 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(); - // validate the required field `data` - ReceivedPaymentRelationshipsReceivePaymentTransactionData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RelatedTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RelatedTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RelatedTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RelatedTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RelatedTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RelatedTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of RelatedTransaction - * @throws IOException if the JSON string is invalid with respect to RelatedTransaction - */ - public static RelatedTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RelatedTransaction.class); - } - - /** - * Convert an instance of RelatedTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RelatedTransactionRelationship.java b/src/main/java/org/openapitools/client/model/RelatedTransactionRelationship.java deleted file mode 100644 index 53c763e7..00000000 --- a/src/main/java/org/openapitools/client/model/RelatedTransactionRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReceivedPaymentRelationshipsReceivePaymentTransactionData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RelatedTransactionRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RelatedTransactionRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ReceivedPaymentRelationshipsReceivePaymentTransactionData data; - - public RelatedTransactionRelationship() { - } - - public RelatedTransactionRelationship data(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public ReceivedPaymentRelationshipsReceivePaymentTransactionData getData() { - return data; - } - - - public void setData(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RelatedTransactionRelationship relatedTransactionRelationship = (RelatedTransactionRelationship) o; - return Objects.equals(this.data, relatedTransactionRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RelatedTransactionRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RelatedTransactionRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RelatedTransactionRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RelatedTransactionRelationship is not found in the empty JSON string", RelatedTransactionRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RelatedTransactionRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RelatedTransactionRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RelatedTransactionRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - ReceivedPaymentRelationshipsReceivePaymentTransactionData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RelatedTransactionRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RelatedTransactionRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RelatedTransactionRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RelatedTransactionRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RelatedTransactionRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RelatedTransactionRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of RelatedTransactionRelationship - * @throws IOException if the JSON string is invalid with respect to RelatedTransactionRelationship - */ - public static RelatedTransactionRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RelatedTransactionRelationship.class); - } - - /** - * Convert an instance of RelatedTransactionRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Relationship.java b/src/main/java/org/openapitools/client/model/Relationship.java deleted file mode 100644 index 4a270566..00000000 --- a/src/main/java/org/openapitools/client/model/Relationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RelationshipData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Relationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Relationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private RelationshipData data; - - public Relationship() { - } - - public Relationship data(RelationshipData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public RelationshipData getData() { - return data; - } - - - public void setData(RelationshipData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Relationship relationship = (Relationship) o; - return Objects.equals(this.data, relationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Relationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Relationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Relationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Relationship is not found in the empty JSON string", Relationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Relationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Relationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Relationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - RelationshipData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Relationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Relationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Relationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Relationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Relationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Relationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of Relationship - * @throws IOException if the JSON string is invalid with respect to Relationship - */ - public static Relationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Relationship.class); - } - - /** - * Convert an instance of Relationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RelationshipData.java b/src/main/java/org/openapitools/client/model/RelationshipData.java deleted file mode 100644 index 96add861..00000000 --- a/src/main/java/org/openapitools/client/model/RelationshipData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RelationshipData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RelationshipData { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public RelationshipData() { - } - - public RelationshipData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public RelationshipData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RelationshipData relationshipData = (RelationshipData) o; - return Objects.equals(this.id, relationshipData.id) && - Objects.equals(this.type, relationshipData.type); - } - - @Override - public int hashCode() { - return Objects.hash(id, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RelationshipData {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RelationshipData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RelationshipData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RelationshipData is not found in the empty JSON string", RelationshipData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RelationshipData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RelationshipData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RelationshipData.openapiRequiredFields) { - 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("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())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RelationshipData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RelationshipData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RelationshipData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RelationshipData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RelationshipData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RelationshipData given an JSON string - * - * @param jsonString JSON string - * @return An instance of RelationshipData - * @throws IOException if the JSON string is invalid with respect to RelationshipData - */ - public static RelationshipData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RelationshipData.class); - } - - /** - * Convert an instance of RelationshipData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Relationships.java b/src/main/java/org/openapitools/client/model/Relationships.java deleted file mode 100644 index 1002c220..00000000 --- a/src/main/java/org/openapitools/client/model/Relationships.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RelationshipsAccount; -import org.openapitools.client.model.RelationshipsCustomer; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Relationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Relationships { - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private RelationshipsCustomer customer; - - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private RelationshipsAccount account; - - public Relationships() { - } - - public Relationships customer(RelationshipsCustomer customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nullable - public RelationshipsCustomer getCustomer() { - return customer; - } - - - public void setCustomer(RelationshipsCustomer customer) { - this.customer = customer; - } - - - public Relationships account(RelationshipsAccount account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public RelationshipsAccount getAccount() { - return account; - } - - - public void setAccount(RelationshipsAccount account) { - this.account = account; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Relationships relationships = (Relationships) o; - return Objects.equals(this.customer, relationships.customer) && - Objects.equals(this.account, relationships.account); - } - - @Override - public int hashCode() { - return Objects.hash(customer, account); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Relationships {\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("customer"); - openapiFields.add("account"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Relationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Relationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Relationships is not found in the empty JSON string", Relationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Relationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Relationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Relationships.openapiRequiredFields) { - 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(); - // validate the optional field `customer` - if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { - RelationshipsCustomer.validateJsonElement(jsonObj.get("customer")); - } - // validate the required field `account` - RelationshipsAccount.validateJsonElement(jsonObj.get("account")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Relationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Relationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Relationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Relationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Relationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Relationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of Relationships - * @throws IOException if the JSON string is invalid with respect to Relationships - */ - public static Relationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Relationships.class); - } - - /** - * Convert an instance of Relationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Relationships1.java b/src/main/java/org/openapitools/client/model/Relationships1.java deleted file mode 100644 index 5b01e6d8..00000000 --- a/src/main/java/org/openapitools/client/model/Relationships1.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Relationships1Account; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Relationships1 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Relationships1 { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private Relationships1Account account; - - public Relationships1() { - } - - public Relationships1 account(Relationships1Account account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public Relationships1Account getAccount() { - return account; - } - - - public void setAccount(Relationships1Account account) { - this.account = account; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Relationships1 relationships1 = (Relationships1) o; - return Objects.equals(this.account, relationships1.account); - } - - @Override - public int hashCode() { - return Objects.hash(account); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Relationships1 {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Relationships1 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Relationships1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Relationships1 is not found in the empty JSON string", Relationships1.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Relationships1.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Relationships1` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Relationships1.openapiRequiredFields) { - 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(); - // validate the required field `account` - Relationships1Account.validateJsonElement(jsonObj.get("account")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Relationships1.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Relationships1' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Relationships1.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Relationships1 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Relationships1 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Relationships1 given an JSON string - * - * @param jsonString JSON string - * @return An instance of Relationships1 - * @throws IOException if the JSON string is invalid with respect to Relationships1 - */ - public static Relationships1 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Relationships1.class); - } - - /** - * Convert an instance of Relationships1 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Relationships1Account.java b/src/main/java/org/openapitools/client/model/Relationships1Account.java deleted file mode 100644 index b21e37e7..00000000 --- a/src/main/java/org/openapitools/client/model/Relationships1Account.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Relationships1AccountData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Relationships1Account - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Relationships1Account { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Relationships1AccountData data; - - public Relationships1Account() { - } - - public Relationships1Account data(Relationships1AccountData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public Relationships1AccountData getData() { - return data; - } - - - public void setData(Relationships1AccountData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Relationships1Account relationships1Account = (Relationships1Account) o; - return Objects.equals(this.data, relationships1Account.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Relationships1Account {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Relationships1Account - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Relationships1Account.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Relationships1Account is not found in the empty JSON string", Relationships1Account.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Relationships1Account.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Relationships1Account` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Relationships1Account.openapiRequiredFields) { - 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(); - // validate the required field `data` - Relationships1AccountData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Relationships1Account.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Relationships1Account' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Relationships1Account.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Relationships1Account value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Relationships1Account read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Relationships1Account given an JSON string - * - * @param jsonString JSON string - * @return An instance of Relationships1Account - * @throws IOException if the JSON string is invalid with respect to Relationships1Account - */ - public static Relationships1Account fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Relationships1Account.class); - } - - /** - * Convert an instance of Relationships1Account to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Relationships1AccountData.java b/src/main/java/org/openapitools/client/model/Relationships1AccountData.java deleted file mode 100644 index 21a95111..00000000 --- a/src/main/java/org/openapitools/client/model/Relationships1AccountData.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Relationships1AccountData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Relationships1AccountData { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - ACCOUNT("account"), - - DEPOSITACCOUNT("depositAccount"), - - FINANCIALBUSINESSFBOACCOUNT("financialBusinessFBOAccount"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public Relationships1AccountData() { - } - - public Relationships1AccountData type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public Relationships1AccountData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Relationships1AccountData relationships1AccountData = (Relationships1AccountData) o; - return Objects.equals(this.type, relationships1AccountData.type) && - Objects.equals(this.id, relationships1AccountData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Relationships1AccountData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Relationships1AccountData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Relationships1AccountData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Relationships1AccountData is not found in the empty JSON string", Relationships1AccountData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Relationships1AccountData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Relationships1AccountData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Relationships1AccountData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Relationships1AccountData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Relationships1AccountData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Relationships1AccountData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Relationships1AccountData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Relationships1AccountData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Relationships1AccountData given an JSON string - * - * @param jsonString JSON string - * @return An instance of Relationships1AccountData - * @throws IOException if the JSON string is invalid with respect to Relationships1AccountData - */ - public static Relationships1AccountData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Relationships1AccountData.class); - } - - /** - * Convert an instance of Relationships1AccountData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RelationshipsAccount.java b/src/main/java/org/openapitools/client/model/RelationshipsAccount.java deleted file mode 100644 index 41729b77..00000000 --- a/src/main/java/org/openapitools/client/model/RelationshipsAccount.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RelationshipsAccountData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RelationshipsAccount - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RelationshipsAccount { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private RelationshipsAccountData data; - - public RelationshipsAccount() { - } - - public RelationshipsAccount data(RelationshipsAccountData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public RelationshipsAccountData getData() { - return data; - } - - - public void setData(RelationshipsAccountData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RelationshipsAccount relationshipsAccount = (RelationshipsAccount) o; - return Objects.equals(this.data, relationshipsAccount.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RelationshipsAccount {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RelationshipsAccount - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RelationshipsAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RelationshipsAccount is not found in the empty JSON string", RelationshipsAccount.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RelationshipsAccount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RelationshipsAccount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RelationshipsAccount.openapiRequiredFields) { - 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(); - // validate the required field `data` - RelationshipsAccountData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RelationshipsAccount.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RelationshipsAccount' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RelationshipsAccount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RelationshipsAccount value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RelationshipsAccount read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RelationshipsAccount given an JSON string - * - * @param jsonString JSON string - * @return An instance of RelationshipsAccount - * @throws IOException if the JSON string is invalid with respect to RelationshipsAccount - */ - public static RelationshipsAccount fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RelationshipsAccount.class); - } - - /** - * Convert an instance of RelationshipsAccount to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RelationshipsAccountData.java b/src/main/java/org/openapitools/client/model/RelationshipsAccountData.java deleted file mode 100644 index 1542c47f..00000000 --- a/src/main/java/org/openapitools/client/model/RelationshipsAccountData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RelationshipsAccountData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RelationshipsAccountData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "account"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public RelationshipsAccountData() { - } - - public RelationshipsAccountData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public RelationshipsAccountData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RelationshipsAccountData relationshipsAccountData = (RelationshipsAccountData) o; - return Objects.equals(this.type, relationshipsAccountData.type) && - Objects.equals(this.id, relationshipsAccountData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RelationshipsAccountData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RelationshipsAccountData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RelationshipsAccountData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RelationshipsAccountData is not found in the empty JSON string", RelationshipsAccountData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RelationshipsAccountData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RelationshipsAccountData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RelationshipsAccountData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RelationshipsAccountData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RelationshipsAccountData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RelationshipsAccountData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RelationshipsAccountData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RelationshipsAccountData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RelationshipsAccountData given an JSON string - * - * @param jsonString JSON string - * @return An instance of RelationshipsAccountData - * @throws IOException if the JSON string is invalid with respect to RelationshipsAccountData - */ - public static RelationshipsAccountData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RelationshipsAccountData.class); - } - - /** - * Convert an instance of RelationshipsAccountData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RelationshipsCustomer.java b/src/main/java/org/openapitools/client/model/RelationshipsCustomer.java deleted file mode 100644 index 2cc2b683..00000000 --- a/src/main/java/org/openapitools/client/model/RelationshipsCustomer.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RelationshipsCustomerData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RelationshipsCustomer - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RelationshipsCustomer { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private RelationshipsCustomerData data; - - public RelationshipsCustomer() { - } - - public RelationshipsCustomer data(RelationshipsCustomerData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public RelationshipsCustomerData getData() { - return data; - } - - - public void setData(RelationshipsCustomerData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RelationshipsCustomer relationshipsCustomer = (RelationshipsCustomer) o; - return Objects.equals(this.data, relationshipsCustomer.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RelationshipsCustomer {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RelationshipsCustomer - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RelationshipsCustomer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RelationshipsCustomer is not found in the empty JSON string", RelationshipsCustomer.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RelationshipsCustomer.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RelationshipsCustomer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RelationshipsCustomer.openapiRequiredFields) { - 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(); - // validate the required field `data` - RelationshipsCustomerData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RelationshipsCustomer.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RelationshipsCustomer' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RelationshipsCustomer.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RelationshipsCustomer value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RelationshipsCustomer read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RelationshipsCustomer given an JSON string - * - * @param jsonString JSON string - * @return An instance of RelationshipsCustomer - * @throws IOException if the JSON string is invalid with respect to RelationshipsCustomer - */ - public static RelationshipsCustomer fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RelationshipsCustomer.class); - } - - /** - * Convert an instance of RelationshipsCustomer to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RelationshipsCustomerData.java b/src/main/java/org/openapitools/client/model/RelationshipsCustomerData.java deleted file mode 100644 index 49d38f7f..00000000 --- a/src/main/java/org/openapitools/client/model/RelationshipsCustomerData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RelationshipsCustomerData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RelationshipsCustomerData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "customer"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public RelationshipsCustomerData() { - } - - public RelationshipsCustomerData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public RelationshipsCustomerData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RelationshipsCustomerData relationshipsCustomerData = (RelationshipsCustomerData) o; - return Objects.equals(this.type, relationshipsCustomerData.type) && - Objects.equals(this.id, relationshipsCustomerData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RelationshipsCustomerData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RelationshipsCustomerData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RelationshipsCustomerData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RelationshipsCustomerData is not found in the empty JSON string", RelationshipsCustomerData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RelationshipsCustomerData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RelationshipsCustomerData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RelationshipsCustomerData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RelationshipsCustomerData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RelationshipsCustomerData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RelationshipsCustomerData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RelationshipsCustomerData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RelationshipsCustomerData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RelationshipsCustomerData given an JSON string - * - * @param jsonString JSON string - * @return An instance of RelationshipsCustomerData - * @throws IOException if the JSON string is invalid with respect to RelationshipsCustomerData - */ - public static RelationshipsCustomerData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RelationshipsCustomerData.class); - } - - /** - * Convert an instance of RelationshipsCustomerData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReleaseTransaction.java b/src/main/java/org/openapitools/client/model/ReleaseTransaction.java deleted file mode 100644 index fbdc76c2..00000000 --- a/src/main/java/org/openapitools/client/model/ReleaseTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReleaseTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReleaseTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReleaseTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ReleaseTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public ReleaseTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public ReleaseTransaction attributes(ReleaseTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public ReleaseTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(ReleaseTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public ReleaseTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReleaseTransaction releaseTransaction = (ReleaseTransaction) o; - return Objects.equals(this.attributes, releaseTransaction.attributes) && - Objects.equals(this.relationships, releaseTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReleaseTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReleaseTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReleaseTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReleaseTransaction is not found in the empty JSON string", ReleaseTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReleaseTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReleaseTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReleaseTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReleaseTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReleaseTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReleaseTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReleaseTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReleaseTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReleaseTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReleaseTransaction - * @throws IOException if the JSON string is invalid with respect to ReleaseTransaction - */ - public static ReleaseTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReleaseTransaction.class); - } - - /** - * Convert an instance of ReleaseTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReleaseTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/ReleaseTransactionAllOfAttributes.java deleted file mode 100644 index e5ebee41..00000000 --- a/src/main/java/org/openapitools/client/model/ReleaseTransactionAllOfAttributes.java +++ /dev/null @@ -1,569 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.Counterparty; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReleaseTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReleaseTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_SENDER_NAME = "senderName"; - @SerializedName(SERIALIZED_NAME_SENDER_NAME) - private String senderName; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_SENDER_ACCOUNT_NUMBER = "senderAccountNumber"; - @SerializedName(SERIALIZED_NAME_SENDER_ACCOUNT_NUMBER) - private String senderAccountNumber; - - public static final String SERIALIZED_NAME_SENDER_ADDRESS = "senderAddress"; - @SerializedName(SERIALIZED_NAME_SENDER_ADDRESS) - private Address senderAddress; - - public static final String SERIALIZED_NAME_COUNTERPARTY = "counterparty"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY) - private Counterparty counterparty; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public ReleaseTransactionAllOfAttributes() { - } - - public ReleaseTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public ReleaseTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public ReleaseTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public ReleaseTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public ReleaseTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public ReleaseTransactionAllOfAttributes senderName(String senderName) { - - this.senderName = senderName; - return this; - } - - /** - * Get senderName - * @return senderName - **/ - @javax.annotation.Nullable - public String getSenderName() { - return senderName; - } - - - public void setSenderName(String senderName) { - this.senderName = senderName; - } - - - public ReleaseTransactionAllOfAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public ReleaseTransactionAllOfAttributes senderAccountNumber(String senderAccountNumber) { - - this.senderAccountNumber = senderAccountNumber; - return this; - } - - /** - * Get senderAccountNumber - * @return senderAccountNumber - **/ - @javax.annotation.Nullable - public String getSenderAccountNumber() { - return senderAccountNumber; - } - - - public void setSenderAccountNumber(String senderAccountNumber) { - this.senderAccountNumber = senderAccountNumber; - } - - - public ReleaseTransactionAllOfAttributes senderAddress(Address senderAddress) { - - this.senderAddress = senderAddress; - return this; - } - - /** - * Get senderAddress - * @return senderAddress - **/ - @javax.annotation.Nullable - public Address getSenderAddress() { - return senderAddress; - } - - - public void setSenderAddress(Address senderAddress) { - this.senderAddress = senderAddress; - } - - - public ReleaseTransactionAllOfAttributes counterparty(Counterparty counterparty) { - - this.counterparty = counterparty; - return this; - } - - /** - * Get counterparty - * @return counterparty - **/ - @javax.annotation.Nonnull - public Counterparty getCounterparty() { - return counterparty; - } - - - public void setCounterparty(Counterparty counterparty) { - this.counterparty = counterparty; - } - - - public ReleaseTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReleaseTransactionAllOfAttributes releaseTransactionAllOfAttributes = (ReleaseTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, releaseTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, releaseTransactionAllOfAttributes.direction) && - Objects.equals(this.amount, releaseTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, releaseTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, releaseTransactionAllOfAttributes.summary) && - Objects.equals(this.senderName, releaseTransactionAllOfAttributes.senderName) && - Objects.equals(this.description, releaseTransactionAllOfAttributes.description) && - Objects.equals(this.senderAccountNumber, releaseTransactionAllOfAttributes.senderAccountNumber) && - Objects.equals(this.senderAddress, releaseTransactionAllOfAttributes.senderAddress) && - Objects.equals(this.counterparty, releaseTransactionAllOfAttributes.counterparty) && - Objects.equals(this.tags, releaseTransactionAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, amount, balance, summary, senderName, description, senderAccountNumber, senderAddress, counterparty, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReleaseTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" senderName: ").append(toIndentedString(senderName)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" senderAccountNumber: ").append(toIndentedString(senderAccountNumber)).append("\n"); - sb.append(" senderAddress: ").append(toIndentedString(senderAddress)).append("\n"); - sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("senderName"); - openapiFields.add("description"); - openapiFields.add("senderAccountNumber"); - openapiFields.add("senderAddress"); - openapiFields.add("counterparty"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - openapiRequiredFields.add("counterparty"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReleaseTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReleaseTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReleaseTransactionAllOfAttributes is not found in the empty JSON string", ReleaseTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReleaseTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReleaseTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReleaseTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - if ((jsonObj.get("senderName") != null && !jsonObj.get("senderName").isJsonNull()) && !jsonObj.get("senderName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `senderName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("senderName").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("senderAccountNumber") != null && !jsonObj.get("senderAccountNumber").isJsonNull()) && !jsonObj.get("senderAccountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `senderAccountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("senderAccountNumber").toString())); - } - // validate the optional field `senderAddress` - if (jsonObj.get("senderAddress") != null && !jsonObj.get("senderAddress").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("senderAddress")); - } - // validate the required field `counterparty` - Counterparty.validateJsonElement(jsonObj.get("counterparty")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReleaseTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReleaseTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReleaseTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReleaseTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReleaseTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReleaseTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReleaseTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to ReleaseTransactionAllOfAttributes - */ - public static ReleaseTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReleaseTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of ReleaseTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RepaidPaymentAdvanceTransaction.java b/src/main/java/org/openapitools/client/model/RepaidPaymentAdvanceTransaction.java deleted file mode 100644 index b494abb8..00000000 --- a/src/main/java/org/openapitools/client/model/RepaidPaymentAdvanceTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CheckDepositTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RepaidPaymentAdvanceTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RepaidPaymentAdvanceTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CheckDepositTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public RepaidPaymentAdvanceTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public RepaidPaymentAdvanceTransaction attributes(CheckDepositTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CheckDepositTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CheckDepositTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public RepaidPaymentAdvanceTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RepaidPaymentAdvanceTransaction repaidPaymentAdvanceTransaction = (RepaidPaymentAdvanceTransaction) o; - return Objects.equals(this.attributes, repaidPaymentAdvanceTransaction.attributes) && - Objects.equals(this.relationships, repaidPaymentAdvanceTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RepaidPaymentAdvanceTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RepaidPaymentAdvanceTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RepaidPaymentAdvanceTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RepaidPaymentAdvanceTransaction is not found in the empty JSON string", RepaidPaymentAdvanceTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RepaidPaymentAdvanceTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RepaidPaymentAdvanceTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RepaidPaymentAdvanceTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RepaidPaymentAdvanceTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RepaidPaymentAdvanceTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RepaidPaymentAdvanceTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RepaidPaymentAdvanceTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RepaidPaymentAdvanceTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RepaidPaymentAdvanceTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of RepaidPaymentAdvanceTransaction - * @throws IOException if the JSON string is invalid with respect to RepaidPaymentAdvanceTransaction - */ - public static RepaidPaymentAdvanceTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RepaidPaymentAdvanceTransaction.class); - } - - /** - * Convert an instance of RepaidPaymentAdvanceTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Repayment.java b/src/main/java/org/openapitools/client/model/Repayment.java deleted file mode 100644 index aa555dbb..00000000 --- a/src/main/java/org/openapitools/client/model/Repayment.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Repayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Repayment { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - protected String type; - - public Repayment() { - this.type = this.getClass().getSimpleName(); - } - - public Repayment id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public Repayment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Repayment repayment = (Repayment) o; - return Objects.equals(this.id, repayment.id) && - Objects.equals(this.type, repayment.type); - } - - @Override - public int hashCode() { - return Objects.hash(id, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Repayment {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Repayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Repayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Repayment is not found in the empty JSON string", Repayment.openapiRequiredFields.toString())); - } - } - - String discriminatorValue = jsonElement.getAsJsonObject().get("type").getAsString(); - switch (discriminatorValue) { - case "achRepayment": - AchRepayment.validateJsonElement(jsonElement); - break; - case "bookRepayment": - BookRepayment.validateJsonElement(jsonElement); - break; - default: - throw new IllegalArgumentException(String.format("The value of the `type` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); - } - } - - - /** - * Create an instance of Repayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of Repayment - * @throws IOException if the JSON string is invalid with respect to Repayment - */ - public static Repayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Repayment.class); - } - - /** - * Convert an instance of Repayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RepaymentRelationship.java b/src/main/java/org/openapitools/client/model/RepaymentRelationship.java deleted file mode 100644 index 3f28e333..00000000 --- a/src/main/java/org/openapitools/client/model/RepaymentRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RepaymentRelationshipData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RepaymentRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RepaymentRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private RepaymentRelationshipData data; - - public RepaymentRelationship() { - } - - public RepaymentRelationship data(RepaymentRelationshipData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public RepaymentRelationshipData getData() { - return data; - } - - - public void setData(RepaymentRelationshipData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RepaymentRelationship repaymentRelationship = (RepaymentRelationship) o; - return Objects.equals(this.data, repaymentRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RepaymentRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RepaymentRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RepaymentRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RepaymentRelationship is not found in the empty JSON string", RepaymentRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RepaymentRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RepaymentRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RepaymentRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - RepaymentRelationshipData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RepaymentRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RepaymentRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RepaymentRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RepaymentRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RepaymentRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RepaymentRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of RepaymentRelationship - * @throws IOException if the JSON string is invalid with respect to RepaymentRelationship - */ - public static RepaymentRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RepaymentRelationship.class); - } - - /** - * Convert an instance of RepaymentRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RepaymentRelationshipData.java b/src/main/java/org/openapitools/client/model/RepaymentRelationshipData.java deleted file mode 100644 index 9e9d3e6d..00000000 --- a/src/main/java/org/openapitools/client/model/RepaymentRelationshipData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RepaymentRelationshipData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RepaymentRelationshipData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "repayment"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public RepaymentRelationshipData() { - } - - public RepaymentRelationshipData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public RepaymentRelationshipData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RepaymentRelationshipData repaymentRelationshipData = (RepaymentRelationshipData) o; - return Objects.equals(this.type, repaymentRelationshipData.type) && - Objects.equals(this.id, repaymentRelationshipData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RepaymentRelationshipData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RepaymentRelationshipData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RepaymentRelationshipData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RepaymentRelationshipData is not found in the empty JSON string", RepaymentRelationshipData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RepaymentRelationshipData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RepaymentRelationshipData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RepaymentRelationshipData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RepaymentRelationshipData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RepaymentRelationshipData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RepaymentRelationshipData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RepaymentRelationshipData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RepaymentRelationshipData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RepaymentRelationshipData given an JSON string - * - * @param jsonString JSON string - * @return An instance of RepaymentRelationshipData - * @throws IOException if the JSON string is invalid with respect to RepaymentRelationshipData - */ - public static RepaymentRelationshipData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RepaymentRelationshipData.class); - } - - /** - * Convert an instance of RepaymentRelationshipData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RequireIdVerification.java b/src/main/java/org/openapitools/client/model/RequireIdVerification.java deleted file mode 100644 index 6fd6516d..00000000 --- a/src/main/java/org/openapitools/client/model/RequireIdVerification.java +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RequireIdVerification - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RequireIdVerification { - public static final String SERIALIZED_NAME_INDIVIDUAL = "individual"; - @SerializedName(SERIALIZED_NAME_INDIVIDUAL) - private Boolean individual = false; - - public static final String SERIALIZED_NAME_OFFICER = "officer"; - @SerializedName(SERIALIZED_NAME_OFFICER) - private Boolean officer = false; - - public static final String SERIALIZED_NAME_BENEFICIAL_OWNERS = "beneficialOwners"; - @SerializedName(SERIALIZED_NAME_BENEFICIAL_OWNERS) - private Boolean beneficialOwners = false; - - public RequireIdVerification() { - } - - public RequireIdVerification individual(Boolean individual) { - - this.individual = individual; - return this; - } - - /** - * Get individual - * @return individual - **/ - @javax.annotation.Nullable - public Boolean getIndividual() { - return individual; - } - - - public void setIndividual(Boolean individual) { - this.individual = individual; - } - - - public RequireIdVerification officer(Boolean officer) { - - this.officer = officer; - return this; - } - - /** - * Get officer - * @return officer - **/ - @javax.annotation.Nullable - public Boolean getOfficer() { - return officer; - } - - - public void setOfficer(Boolean officer) { - this.officer = officer; - } - - - public RequireIdVerification beneficialOwners(Boolean beneficialOwners) { - - this.beneficialOwners = beneficialOwners; - return this; - } - - /** - * Get beneficialOwners - * @return beneficialOwners - **/ - @javax.annotation.Nullable - public Boolean getBeneficialOwners() { - return beneficialOwners; - } - - - public void setBeneficialOwners(Boolean beneficialOwners) { - this.beneficialOwners = beneficialOwners; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RequireIdVerification requireIdVerification = (RequireIdVerification) o; - return Objects.equals(this.individual, requireIdVerification.individual) && - Objects.equals(this.officer, requireIdVerification.officer) && - Objects.equals(this.beneficialOwners, requireIdVerification.beneficialOwners); - } - - @Override - public int hashCode() { - return Objects.hash(individual, officer, beneficialOwners); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RequireIdVerification {\n"); - sb.append(" individual: ").append(toIndentedString(individual)).append("\n"); - sb.append(" officer: ").append(toIndentedString(officer)).append("\n"); - sb.append(" beneficialOwners: ").append(toIndentedString(beneficialOwners)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("individual"); - openapiFields.add("officer"); - openapiFields.add("beneficialOwners"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RequireIdVerification - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RequireIdVerification.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RequireIdVerification is not found in the empty JSON string", RequireIdVerification.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RequireIdVerification.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RequireIdVerification` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RequireIdVerification.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RequireIdVerification' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RequireIdVerification.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RequireIdVerification value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RequireIdVerification read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RequireIdVerification given an JSON string - * - * @param jsonString JSON string - * @return An instance of RequireIdVerification - * @throws IOException if the JSON string is invalid with respect to RequireIdVerification - */ - public static RequireIdVerification fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RequireIdVerification.class); - } - - /** - * Convert an instance of RequireIdVerification to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ResponseContact.java b/src/main/java/org/openapitools/client/model/ResponseContact.java deleted file mode 100644 index 11a4130c..00000000 --- a/src/main/java/org/openapitools/client/model/ResponseContact.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.FullName; -import org.openapitools.client.model.Phone; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ResponseContact - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ResponseContact { - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_JWT_SUBJECT = "jwtSubject"; - @SerializedName(SERIALIZED_NAME_JWT_SUBJECT) - private String jwtSubject; - - public ResponseContact() { - } - - public ResponseContact fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nonnull - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public ResponseContact email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public ResponseContact phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public ResponseContact jwtSubject(String jwtSubject) { - - this.jwtSubject = jwtSubject; - return this; - } - - /** - * Get jwtSubject - * @return jwtSubject - **/ - @javax.annotation.Nullable - public String getJwtSubject() { - return jwtSubject; - } - - - public void setJwtSubject(String jwtSubject) { - this.jwtSubject = jwtSubject; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResponseContact responseContact = (ResponseContact) o; - return Objects.equals(this.fullName, responseContact.fullName) && - Objects.equals(this.email, responseContact.email) && - Objects.equals(this.phone, responseContact.phone) && - Objects.equals(this.jwtSubject, responseContact.jwtSubject); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(fullName, email, phone, jwtSubject); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ResponseContact {\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fullName"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("jwtSubject"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("fullName"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ResponseContact - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ResponseContact.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ResponseContact is not found in the empty JSON string", ResponseContact.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ResponseContact.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResponseContact` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ResponseContact.openapiRequiredFields) { - 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(); - // validate the required field `fullName` - FullName.validateJsonElement(jsonObj.get("fullName")); - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); - } - if ((jsonObj.get("jwtSubject") != null && !jsonObj.get("jwtSubject").isJsonNull()) && !jsonObj.get("jwtSubject").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `jwtSubject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jwtSubject").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponseContact.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponseContact' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ResponseContact.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ResponseContact value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResponseContact read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ResponseContact given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResponseContact - * @throws IOException if the JSON string is invalid with respect to ResponseContact - */ - public static ResponseContact fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResponseContact.class); - } - - /** - * Convert an instance of ResponseContact to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReturnCheckPaymentRequest.java b/src/main/java/org/openapitools/client/model/ReturnCheckPaymentRequest.java deleted file mode 100644 index 44e2ef6e..00000000 --- a/src/main/java/org/openapitools/client/model/ReturnCheckPaymentRequest.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReturnCheckPaymentRequestData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReturnCheckPaymentRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReturnCheckPaymentRequest { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ReturnCheckPaymentRequestData data; - - public ReturnCheckPaymentRequest() { - } - - public ReturnCheckPaymentRequest data(ReturnCheckPaymentRequestData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public ReturnCheckPaymentRequestData getData() { - return data; - } - - - public void setData(ReturnCheckPaymentRequestData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReturnCheckPaymentRequest returnCheckPaymentRequest = (ReturnCheckPaymentRequest) o; - return Objects.equals(this.data, returnCheckPaymentRequest.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReturnCheckPaymentRequest {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReturnCheckPaymentRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReturnCheckPaymentRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnCheckPaymentRequest is not found in the empty JSON string", ReturnCheckPaymentRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReturnCheckPaymentRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnCheckPaymentRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - ReturnCheckPaymentRequestData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReturnCheckPaymentRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReturnCheckPaymentRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReturnCheckPaymentRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReturnCheckPaymentRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReturnCheckPaymentRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReturnCheckPaymentRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReturnCheckPaymentRequest - * @throws IOException if the JSON string is invalid with respect to ReturnCheckPaymentRequest - */ - public static ReturnCheckPaymentRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReturnCheckPaymentRequest.class); - } - - /** - * Convert an instance of ReturnCheckPaymentRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReturnCheckPaymentRequestData.java b/src/main/java/org/openapitools/client/model/ReturnCheckPaymentRequestData.java deleted file mode 100644 index 696a457c..00000000 --- a/src/main/java/org/openapitools/client/model/ReturnCheckPaymentRequestData.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReturnCheckPaymentRequestDataAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReturnCheckPaymentRequestData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReturnCheckPaymentRequestData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "checkPaymentReturn"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ReturnCheckPaymentRequestDataAttributes attributes; - - public ReturnCheckPaymentRequestData() { - } - - public ReturnCheckPaymentRequestData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public ReturnCheckPaymentRequestData attributes(ReturnCheckPaymentRequestDataAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public ReturnCheckPaymentRequestDataAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(ReturnCheckPaymentRequestDataAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReturnCheckPaymentRequestData returnCheckPaymentRequestData = (ReturnCheckPaymentRequestData) o; - return Objects.equals(this.type, returnCheckPaymentRequestData.type) && - Objects.equals(this.attributes, returnCheckPaymentRequestData.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReturnCheckPaymentRequestData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReturnCheckPaymentRequestData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReturnCheckPaymentRequestData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnCheckPaymentRequestData is not found in the empty JSON string", ReturnCheckPaymentRequestData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReturnCheckPaymentRequestData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnCheckPaymentRequestData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - ReturnCheckPaymentRequestDataAttributes.validateJsonElement(jsonObj.get("attributes")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReturnCheckPaymentRequestData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReturnCheckPaymentRequestData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReturnCheckPaymentRequestData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReturnCheckPaymentRequestData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReturnCheckPaymentRequestData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReturnCheckPaymentRequestData given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReturnCheckPaymentRequestData - * @throws IOException if the JSON string is invalid with respect to ReturnCheckPaymentRequestData - */ - public static ReturnCheckPaymentRequestData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReturnCheckPaymentRequestData.class); - } - - /** - * Convert an instance of ReturnCheckPaymentRequestData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReturnCheckPaymentRequestDataAttributes.java b/src/main/java/org/openapitools/client/model/ReturnCheckPaymentRequestDataAttributes.java deleted file mode 100644 index a5dc4de4..00000000 --- a/src/main/java/org/openapitools/client/model/ReturnCheckPaymentRequestDataAttributes.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReturnReason; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReturnCheckPaymentRequestDataAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReturnCheckPaymentRequestDataAttributes { - public static final String SERIALIZED_NAME_REASON = "reason"; - @SerializedName(SERIALIZED_NAME_REASON) - private ReturnReason reason; - - public ReturnCheckPaymentRequestDataAttributes() { - } - - public ReturnCheckPaymentRequestDataAttributes reason(ReturnReason reason) { - - this.reason = reason; - return this; - } - - /** - * Get reason - * @return reason - **/ - @javax.annotation.Nullable - public ReturnReason getReason() { - return reason; - } - - - public void setReason(ReturnReason reason) { - this.reason = reason; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReturnCheckPaymentRequestDataAttributes returnCheckPaymentRequestDataAttributes = (ReturnCheckPaymentRequestDataAttributes) o; - return Objects.equals(this.reason, returnCheckPaymentRequestDataAttributes.reason); - } - - @Override - public int hashCode() { - return Objects.hash(reason); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReturnCheckPaymentRequestDataAttributes {\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("reason"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReturnCheckPaymentRequestDataAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReturnCheckPaymentRequestDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnCheckPaymentRequestDataAttributes is not found in the empty JSON string", ReturnCheckPaymentRequestDataAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReturnCheckPaymentRequestDataAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnCheckPaymentRequestDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReturnCheckPaymentRequestDataAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReturnCheckPaymentRequestDataAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReturnCheckPaymentRequestDataAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReturnCheckPaymentRequestDataAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReturnCheckPaymentRequestDataAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReturnCheckPaymentRequestDataAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReturnCheckPaymentRequestDataAttributes - * @throws IOException if the JSON string is invalid with respect to ReturnCheckPaymentRequestDataAttributes - */ - public static ReturnCheckPaymentRequestDataAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReturnCheckPaymentRequestDataAttributes.class); - } - - /** - * Convert an instance of ReturnCheckPaymentRequestDataAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReturnReason.java b/src/main/java/org/openapitools/client/model/ReturnReason.java deleted file mode 100644 index 5ae64896..00000000 --- a/src/main/java/org/openapitools/client/model/ReturnReason.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets returnReason - */ -@JsonAdapter(ReturnReason.Adapter.class) -public enum ReturnReason { - - INSUFFICIENTFUNDS("InsufficientFunds"), - - ACCOUNTCLOSED("AccountClosed"), - - ALTEREDCHECK("AlteredCheck"), - - FORGEDSIGNATURE("ForgedSignature"), - - POSTDATEDCHECK("PostdatedCheck"), - - STOPPAYMENTORDER("StopPaymentOrder"), - - UNAUTHORIZEDDEBIT("UnauthorizedDebit"), - - WRONGAMOUNT("WrongAmount"), - - DUPLICATEPAYMENT("DuplicatePayment"), - - MISSINGSIGNATURE("MissingSignature"), - - IRREGULARENDORSEMENT("IrregularEndorsement"), - - OTHER("Other"); - - private String value; - - ReturnReason(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ReturnReason fromValue(String value) { - for (ReturnReason b : ReturnReason.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ReturnReason enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ReturnReason read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ReturnReason.fromValue(value); - } - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReturnedAchTransaction.java b/src/main/java/org/openapitools/client/model/ReturnedAchTransaction.java deleted file mode 100644 index 9e7ffafb..00000000 --- a/src/main/java/org/openapitools/client/model/ReturnedAchTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReturnedAchTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReturnedAchTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReturnedAchTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ReturnedAchTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public ReturnedAchTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public ReturnedAchTransaction attributes(ReturnedAchTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public ReturnedAchTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(ReturnedAchTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public ReturnedAchTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReturnedAchTransaction returnedAchTransaction = (ReturnedAchTransaction) o; - return Objects.equals(this.attributes, returnedAchTransaction.attributes) && - Objects.equals(this.relationships, returnedAchTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReturnedAchTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReturnedAchTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReturnedAchTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnedAchTransaction is not found in the empty JSON string", ReturnedAchTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReturnedAchTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnedAchTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReturnedAchTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReturnedAchTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReturnedAchTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReturnedAchTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReturnedAchTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReturnedAchTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReturnedAchTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReturnedAchTransaction - * @throws IOException if the JSON string is invalid with respect to ReturnedAchTransaction - */ - public static ReturnedAchTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReturnedAchTransaction.class); - } - - /** - * Convert an instance of ReturnedAchTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReturnedAchTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/ReturnedAchTransactionAllOfAttributes.java deleted file mode 100644 index c0a0b924..00000000 --- a/src/main/java/org/openapitools/client/model/ReturnedAchTransactionAllOfAttributes.java +++ /dev/null @@ -1,570 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReturnedAchTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReturnedAchTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; - @SerializedName(SERIALIZED_NAME_COMPANY_NAME) - private String companyName; - - public static final String SERIALIZED_NAME_COUNTERPARTY_NAME = "counterpartyName"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_NAME) - private String counterpartyName; - - public static final String SERIALIZED_NAME_COUNTERPARTY_ROUTING_NUMBER = "counterpartyRoutingNumber"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_ROUTING_NUMBER) - private String counterpartyRoutingNumber; - - public static final String SERIALIZED_NAME_REASON = "reason"; - @SerializedName(SERIALIZED_NAME_REASON) - private String reason; - - public static final String SERIALIZED_NAME_ACH_REASON = "achReason"; - @SerializedName(SERIALIZED_NAME_ACH_REASON) - private String achReason; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public ReturnedAchTransactionAllOfAttributes() { - } - - public ReturnedAchTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public ReturnedAchTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public ReturnedAchTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public ReturnedAchTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public ReturnedAchTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public ReturnedAchTransactionAllOfAttributes companyName(String companyName) { - - this.companyName = companyName; - return this; - } - - /** - * Get companyName - * @return companyName - **/ - @javax.annotation.Nonnull - public String getCompanyName() { - return companyName; - } - - - public void setCompanyName(String companyName) { - this.companyName = companyName; - } - - - public ReturnedAchTransactionAllOfAttributes counterpartyName(String counterpartyName) { - - this.counterpartyName = counterpartyName; - return this; - } - - /** - * Get counterpartyName - * @return counterpartyName - **/ - @javax.annotation.Nonnull - public String getCounterpartyName() { - return counterpartyName; - } - - - public void setCounterpartyName(String counterpartyName) { - this.counterpartyName = counterpartyName; - } - - - public ReturnedAchTransactionAllOfAttributes counterpartyRoutingNumber(String counterpartyRoutingNumber) { - - this.counterpartyRoutingNumber = counterpartyRoutingNumber; - return this; - } - - /** - * Get counterpartyRoutingNumber - * @return counterpartyRoutingNumber - **/ - @javax.annotation.Nonnull - public String getCounterpartyRoutingNumber() { - return counterpartyRoutingNumber; - } - - - public void setCounterpartyRoutingNumber(String counterpartyRoutingNumber) { - this.counterpartyRoutingNumber = counterpartyRoutingNumber; - } - - - public ReturnedAchTransactionAllOfAttributes reason(String reason) { - - this.reason = reason; - return this; - } - - /** - * Get reason - * @return reason - **/ - @javax.annotation.Nonnull - public String getReason() { - return reason; - } - - - public void setReason(String reason) { - this.reason = reason; - } - - - public ReturnedAchTransactionAllOfAttributes achReason(String achReason) { - - this.achReason = achReason; - return this; - } - - /** - * Get achReason - * @return achReason - **/ - @javax.annotation.Nullable - public String getAchReason() { - return achReason; - } - - - public void setAchReason(String achReason) { - this.achReason = achReason; - } - - - public ReturnedAchTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReturnedAchTransactionAllOfAttributes returnedAchTransactionAllOfAttributes = (ReturnedAchTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, returnedAchTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, returnedAchTransactionAllOfAttributes.direction) && - Objects.equals(this.amount, returnedAchTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, returnedAchTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, returnedAchTransactionAllOfAttributes.summary) && - Objects.equals(this.companyName, returnedAchTransactionAllOfAttributes.companyName) && - Objects.equals(this.counterpartyName, returnedAchTransactionAllOfAttributes.counterpartyName) && - Objects.equals(this.counterpartyRoutingNumber, returnedAchTransactionAllOfAttributes.counterpartyRoutingNumber) && - Objects.equals(this.reason, returnedAchTransactionAllOfAttributes.reason) && - Objects.equals(this.achReason, returnedAchTransactionAllOfAttributes.achReason) && - Objects.equals(this.tags, returnedAchTransactionAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, amount, balance, summary, companyName, counterpartyName, counterpartyRoutingNumber, reason, achReason, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReturnedAchTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); - sb.append(" counterpartyName: ").append(toIndentedString(counterpartyName)).append("\n"); - sb.append(" counterpartyRoutingNumber: ").append(toIndentedString(counterpartyRoutingNumber)).append("\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append(" achReason: ").append(toIndentedString(achReason)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("companyName"); - openapiFields.add("counterpartyName"); - openapiFields.add("counterpartyRoutingNumber"); - openapiFields.add("reason"); - openapiFields.add("achReason"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - openapiRequiredFields.add("companyName"); - openapiRequiredFields.add("counterpartyName"); - openapiRequiredFields.add("counterpartyRoutingNumber"); - openapiRequiredFields.add("reason"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReturnedAchTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReturnedAchTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnedAchTransactionAllOfAttributes is not found in the empty JSON string", ReturnedAchTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReturnedAchTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnedAchTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReturnedAchTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - if (!jsonObj.get("companyName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); - } - if (!jsonObj.get("counterpartyName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `counterpartyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("counterpartyName").toString())); - } - if (!jsonObj.get("counterpartyRoutingNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `counterpartyRoutingNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("counterpartyRoutingNumber").toString())); - } - if (!jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); - } - if ((jsonObj.get("achReason") != null && !jsonObj.get("achReason").isJsonNull()) && !jsonObj.get("achReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `achReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("achReason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReturnedAchTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReturnedAchTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReturnedAchTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReturnedAchTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReturnedAchTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReturnedAchTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReturnedAchTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to ReturnedAchTransactionAllOfAttributes - */ - public static ReturnedAchTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReturnedAchTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of ReturnedAchTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReturnedCheckDepositTransaction.java b/src/main/java/org/openapitools/client/model/ReturnedCheckDepositTransaction.java deleted file mode 100644 index a2b836e5..00000000 --- a/src/main/java/org/openapitools/client/model/ReturnedCheckDepositTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReturnedCheckDepositTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReturnedCheckDepositTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReturnedCheckDepositTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ReturnedCheckDepositTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public ReturnedCheckDepositTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public ReturnedCheckDepositTransaction attributes(ReturnedCheckDepositTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public ReturnedCheckDepositTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(ReturnedCheckDepositTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public ReturnedCheckDepositTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReturnedCheckDepositTransaction returnedCheckDepositTransaction = (ReturnedCheckDepositTransaction) o; - return Objects.equals(this.attributes, returnedCheckDepositTransaction.attributes) && - Objects.equals(this.relationships, returnedCheckDepositTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReturnedCheckDepositTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReturnedCheckDepositTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReturnedCheckDepositTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnedCheckDepositTransaction is not found in the empty JSON string", ReturnedCheckDepositTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReturnedCheckDepositTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnedCheckDepositTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReturnedCheckDepositTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReturnedCheckDepositTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReturnedCheckDepositTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReturnedCheckDepositTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReturnedCheckDepositTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReturnedCheckDepositTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReturnedCheckDepositTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReturnedCheckDepositTransaction - * @throws IOException if the JSON string is invalid with respect to ReturnedCheckDepositTransaction - */ - public static ReturnedCheckDepositTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReturnedCheckDepositTransaction.class); - } - - /** - * Convert an instance of ReturnedCheckDepositTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReturnedCheckDepositTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/ReturnedCheckDepositTransactionAllOfAttributes.java deleted file mode 100644 index c3bfd8e0..00000000 --- a/src/main/java/org/openapitools/client/model/ReturnedCheckDepositTransactionAllOfAttributes.java +++ /dev/null @@ -1,442 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReturnedCheckDepositTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReturnedCheckDepositTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_REASON = "reason"; - @SerializedName(SERIALIZED_NAME_REASON) - private String reason; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public ReturnedCheckDepositTransactionAllOfAttributes() { - } - - public ReturnedCheckDepositTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public ReturnedCheckDepositTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public ReturnedCheckDepositTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public ReturnedCheckDepositTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public ReturnedCheckDepositTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public ReturnedCheckDepositTransactionAllOfAttributes reason(String reason) { - - this.reason = reason; - return this; - } - - /** - * Get reason - * @return reason - **/ - @javax.annotation.Nullable - public String getReason() { - return reason; - } - - - public void setReason(String reason) { - this.reason = reason; - } - - - public ReturnedCheckDepositTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReturnedCheckDepositTransactionAllOfAttributes returnedCheckDepositTransactionAllOfAttributes = (ReturnedCheckDepositTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, returnedCheckDepositTransactionAllOfAttributes.createdAt) && - Objects.equals(this.amount, returnedCheckDepositTransactionAllOfAttributes.amount) && - Objects.equals(this.direction, returnedCheckDepositTransactionAllOfAttributes.direction) && - Objects.equals(this.balance, returnedCheckDepositTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, returnedCheckDepositTransactionAllOfAttributes.summary) && - Objects.equals(this.reason, returnedCheckDepositTransactionAllOfAttributes.reason) && - Objects.equals(this.tags, returnedCheckDepositTransactionAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, amount, direction, balance, summary, reason, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReturnedCheckDepositTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("amount"); - openapiFields.add("direction"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("reason"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReturnedCheckDepositTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReturnedCheckDepositTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnedCheckDepositTransactionAllOfAttributes is not found in the empty JSON string", ReturnedCheckDepositTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReturnedCheckDepositTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnedCheckDepositTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReturnedCheckDepositTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReturnedCheckDepositTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReturnedCheckDepositTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReturnedCheckDepositTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReturnedCheckDepositTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReturnedCheckDepositTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReturnedCheckDepositTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReturnedCheckDepositTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to ReturnedCheckDepositTransactionAllOfAttributes - */ - public static ReturnedCheckDepositTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReturnedCheckDepositTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of ReturnedCheckDepositTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReturnedCheckPaymentTransaction.java b/src/main/java/org/openapitools/client/model/ReturnedCheckPaymentTransaction.java deleted file mode 100644 index dadb174d..00000000 --- a/src/main/java/org/openapitools/client/model/ReturnedCheckPaymentTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReturnedCheckPaymentTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReturnedCheckPaymentTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReturnedCheckPaymentTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ReturnedCheckPaymentTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public ReturnedCheckPaymentTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public ReturnedCheckPaymentTransaction attributes(ReturnedCheckPaymentTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public ReturnedCheckPaymentTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(ReturnedCheckPaymentTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public ReturnedCheckPaymentTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReturnedCheckPaymentTransaction returnedCheckPaymentTransaction = (ReturnedCheckPaymentTransaction) o; - return Objects.equals(this.attributes, returnedCheckPaymentTransaction.attributes) && - Objects.equals(this.relationships, returnedCheckPaymentTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReturnedCheckPaymentTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReturnedCheckPaymentTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReturnedCheckPaymentTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnedCheckPaymentTransaction is not found in the empty JSON string", ReturnedCheckPaymentTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReturnedCheckPaymentTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnedCheckPaymentTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReturnedCheckPaymentTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReturnedCheckPaymentTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReturnedCheckPaymentTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReturnedCheckPaymentTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReturnedCheckPaymentTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReturnedCheckPaymentTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReturnedCheckPaymentTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReturnedCheckPaymentTransaction - * @throws IOException if the JSON string is invalid with respect to ReturnedCheckPaymentTransaction - */ - public static ReturnedCheckPaymentTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReturnedCheckPaymentTransaction.class); - } - - /** - * Convert an instance of ReturnedCheckPaymentTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReturnedCheckPaymentTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/ReturnedCheckPaymentTransactionAllOfAttributes.java deleted file mode 100644 index 87531568..00000000 --- a/src/main/java/org/openapitools/client/model/ReturnedCheckPaymentTransactionAllOfAttributes.java +++ /dev/null @@ -1,443 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReturnedCheckPaymentTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReturnedCheckPaymentTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_REASON = "reason"; - @SerializedName(SERIALIZED_NAME_REASON) - private String reason; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public ReturnedCheckPaymentTransactionAllOfAttributes() { - } - - public ReturnedCheckPaymentTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public ReturnedCheckPaymentTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public ReturnedCheckPaymentTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public ReturnedCheckPaymentTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public ReturnedCheckPaymentTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public ReturnedCheckPaymentTransactionAllOfAttributes reason(String reason) { - - this.reason = reason; - return this; - } - - /** - * Get reason - * @return reason - **/ - @javax.annotation.Nonnull - public String getReason() { - return reason; - } - - - public void setReason(String reason) { - this.reason = reason; - } - - - public ReturnedCheckPaymentTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReturnedCheckPaymentTransactionAllOfAttributes returnedCheckPaymentTransactionAllOfAttributes = (ReturnedCheckPaymentTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, returnedCheckPaymentTransactionAllOfAttributes.createdAt) && - Objects.equals(this.amount, returnedCheckPaymentTransactionAllOfAttributes.amount) && - Objects.equals(this.direction, returnedCheckPaymentTransactionAllOfAttributes.direction) && - Objects.equals(this.balance, returnedCheckPaymentTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, returnedCheckPaymentTransactionAllOfAttributes.summary) && - Objects.equals(this.reason, returnedCheckPaymentTransactionAllOfAttributes.reason) && - Objects.equals(this.tags, returnedCheckPaymentTransactionAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, amount, direction, balance, summary, reason, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReturnedCheckPaymentTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("amount"); - openapiFields.add("direction"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("reason"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - openapiRequiredFields.add("reason"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReturnedCheckPaymentTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReturnedCheckPaymentTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnedCheckPaymentTransactionAllOfAttributes is not found in the empty JSON string", ReturnedCheckPaymentTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReturnedCheckPaymentTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnedCheckPaymentTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReturnedCheckPaymentTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - if (!jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReturnedCheckPaymentTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReturnedCheckPaymentTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReturnedCheckPaymentTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReturnedCheckPaymentTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReturnedCheckPaymentTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReturnedCheckPaymentTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReturnedCheckPaymentTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to ReturnedCheckPaymentTransactionAllOfAttributes - */ - public static ReturnedCheckPaymentTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReturnedCheckPaymentTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of ReturnedCheckPaymentTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReturnedReceivedAchTransaction.java b/src/main/java/org/openapitools/client/model/ReturnedReceivedAchTransaction.java deleted file mode 100644 index 0918d2f3..00000000 --- a/src/main/java/org/openapitools/client/model/ReturnedReceivedAchTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReturnedReceivedAchTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReturnedReceivedAchTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReturnedReceivedAchTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ReturnedReceivedAchTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public ReturnedReceivedAchTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public ReturnedReceivedAchTransaction attributes(ReturnedReceivedAchTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public ReturnedReceivedAchTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(ReturnedReceivedAchTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public ReturnedReceivedAchTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReturnedReceivedAchTransaction returnedReceivedAchTransaction = (ReturnedReceivedAchTransaction) o; - return Objects.equals(this.attributes, returnedReceivedAchTransaction.attributes) && - Objects.equals(this.relationships, returnedReceivedAchTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReturnedReceivedAchTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReturnedReceivedAchTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReturnedReceivedAchTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnedReceivedAchTransaction is not found in the empty JSON string", ReturnedReceivedAchTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReturnedReceivedAchTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnedReceivedAchTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReturnedReceivedAchTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReturnedReceivedAchTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReturnedReceivedAchTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReturnedReceivedAchTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReturnedReceivedAchTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReturnedReceivedAchTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReturnedReceivedAchTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReturnedReceivedAchTransaction - * @throws IOException if the JSON string is invalid with respect to ReturnedReceivedAchTransaction - */ - public static ReturnedReceivedAchTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReturnedReceivedAchTransaction.class); - } - - /** - * Convert an instance of ReturnedReceivedAchTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReturnedReceivedAchTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/ReturnedReceivedAchTransactionAllOfAttributes.java deleted file mode 100644 index 73f75eb4..00000000 --- a/src/main/java/org/openapitools/client/model/ReturnedReceivedAchTransactionAllOfAttributes.java +++ /dev/null @@ -1,475 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReturnedReceivedAchTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReturnedReceivedAchTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; - @SerializedName(SERIALIZED_NAME_COMPANY_NAME) - private String companyName; - - public static final String SERIALIZED_NAME_REASON = "reason"; - @SerializedName(SERIALIZED_NAME_REASON) - private String reason; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public ReturnedReceivedAchTransactionAllOfAttributes() { - } - - public ReturnedReceivedAchTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public ReturnedReceivedAchTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public ReturnedReceivedAchTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public ReturnedReceivedAchTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public ReturnedReceivedAchTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public ReturnedReceivedAchTransactionAllOfAttributes companyName(String companyName) { - - this.companyName = companyName; - return this; - } - - /** - * Get companyName - * @return companyName - **/ - @javax.annotation.Nonnull - public String getCompanyName() { - return companyName; - } - - - public void setCompanyName(String companyName) { - this.companyName = companyName; - } - - - public ReturnedReceivedAchTransactionAllOfAttributes reason(String reason) { - - this.reason = reason; - return this; - } - - /** - * Get reason - * @return reason - **/ - @javax.annotation.Nonnull - public String getReason() { - return reason; - } - - - public void setReason(String reason) { - this.reason = reason; - } - - - public ReturnedReceivedAchTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReturnedReceivedAchTransactionAllOfAttributes returnedReceivedAchTransactionAllOfAttributes = (ReturnedReceivedAchTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, returnedReceivedAchTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, returnedReceivedAchTransactionAllOfAttributes.direction) && - Objects.equals(this.amount, returnedReceivedAchTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, returnedReceivedAchTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, returnedReceivedAchTransactionAllOfAttributes.summary) && - Objects.equals(this.companyName, returnedReceivedAchTransactionAllOfAttributes.companyName) && - Objects.equals(this.reason, returnedReceivedAchTransactionAllOfAttributes.reason) && - Objects.equals(this.tags, returnedReceivedAchTransactionAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, amount, balance, summary, companyName, reason, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReturnedReceivedAchTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("companyName"); - openapiFields.add("reason"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - openapiRequiredFields.add("companyName"); - openapiRequiredFields.add("reason"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReturnedReceivedAchTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReturnedReceivedAchTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnedReceivedAchTransactionAllOfAttributes is not found in the empty JSON string", ReturnedReceivedAchTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReturnedReceivedAchTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnedReceivedAchTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReturnedReceivedAchTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - if (!jsonObj.get("companyName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); - } - if (!jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReturnedReceivedAchTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReturnedReceivedAchTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReturnedReceivedAchTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReturnedReceivedAchTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReturnedReceivedAchTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReturnedReceivedAchTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReturnedReceivedAchTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to ReturnedReceivedAchTransactionAllOfAttributes - */ - public static ReturnedReceivedAchTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReturnedReceivedAchTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of ReturnedReceivedAchTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReturnedRelationship.java b/src/main/java/org/openapitools/client/model/ReturnedRelationship.java deleted file mode 100644 index a4cba874..00000000 --- a/src/main/java/org/openapitools/client/model/ReturnedRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReceivedPaymentRelationshipsReceivePaymentTransactionData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReturnedRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReturnedRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ReceivedPaymentRelationshipsReceivePaymentTransactionData data; - - public ReturnedRelationship() { - } - - public ReturnedRelationship data(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public ReceivedPaymentRelationshipsReceivePaymentTransactionData getData() { - return data; - } - - - public void setData(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReturnedRelationship returnedRelationship = (ReturnedRelationship) o; - return Objects.equals(this.data, returnedRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReturnedRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReturnedRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReturnedRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnedRelationship is not found in the empty JSON string", ReturnedRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReturnedRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnedRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReturnedRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - ReceivedPaymentRelationshipsReceivePaymentTransactionData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReturnedRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReturnedRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReturnedRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReturnedRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReturnedRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReturnedRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReturnedRelationship - * @throws IOException if the JSON string is invalid with respect to ReturnedRelationship - */ - public static ReturnedRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReturnedRelationship.class); - } - - /** - * Convert an instance of ReturnedRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReversalTransaction.java b/src/main/java/org/openapitools/client/model/ReversalTransaction.java deleted file mode 100644 index 788aa5dc..00000000 --- a/src/main/java/org/openapitools/client/model/ReversalTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReversalTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReversalTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReversalTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ReversalTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public ReversalTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public ReversalTransaction attributes(ReversalTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public ReversalTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(ReversalTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public ReversalTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReversalTransaction reversalTransaction = (ReversalTransaction) o; - return Objects.equals(this.attributes, reversalTransaction.attributes) && - Objects.equals(this.relationships, reversalTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReversalTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReversalTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReversalTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReversalTransaction is not found in the empty JSON string", ReversalTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReversalTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReversalTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReversalTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReversalTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReversalTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReversalTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReversalTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReversalTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReversalTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReversalTransaction - * @throws IOException if the JSON string is invalid with respect to ReversalTransaction - */ - public static ReversalTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReversalTransaction.class); - } - - /** - * Convert an instance of ReversalTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/ReversalTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/ReversalTransactionAllOfAttributes.java deleted file mode 100644 index 3c60693b..00000000 --- a/src/main/java/org/openapitools/client/model/ReversalTransactionAllOfAttributes.java +++ /dev/null @@ -1,514 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReversalTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReversalTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_CARD_LAST4_DIGITS = "cardLast4Digits"; - @SerializedName(SERIALIZED_NAME_CARD_LAST4_DIGITS) - private String cardLast4Digits; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_NETWORK_TRANSACTION_ID = "networkTransactionId"; - @SerializedName(SERIALIZED_NAME_NETWORK_TRANSACTION_ID) - private String networkTransactionId; - - public static final String SERIALIZED_NAME_INTERNATIONAL_SERVICE_FEE = "internationalServiceFee"; - @SerializedName(SERIALIZED_NAME_INTERNATIONAL_SERVICE_FEE) - private Integer internationalServiceFee; - - public ReversalTransactionAllOfAttributes() { - } - - public ReversalTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public ReversalTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public ReversalTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public ReversalTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public ReversalTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public ReversalTransactionAllOfAttributes cardLast4Digits(String cardLast4Digits) { - - this.cardLast4Digits = cardLast4Digits; - return this; - } - - /** - * Get cardLast4Digits - * @return cardLast4Digits - **/ - @javax.annotation.Nonnull - public String getCardLast4Digits() { - return cardLast4Digits; - } - - - public void setCardLast4Digits(String cardLast4Digits) { - this.cardLast4Digits = cardLast4Digits; - } - - - public ReversalTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public ReversalTransactionAllOfAttributes networkTransactionId(String networkTransactionId) { - - this.networkTransactionId = networkTransactionId; - return this; - } - - /** - * Get networkTransactionId - * @return networkTransactionId - **/ - @javax.annotation.Nullable - public String getNetworkTransactionId() { - return networkTransactionId; - } - - - public void setNetworkTransactionId(String networkTransactionId) { - this.networkTransactionId = networkTransactionId; - } - - - public ReversalTransactionAllOfAttributes internationalServiceFee(Integer internationalServiceFee) { - - this.internationalServiceFee = internationalServiceFee; - return this; - } - - /** - * Get internationalServiceFee - * @return internationalServiceFee - **/ - @javax.annotation.Nullable - public Integer getInternationalServiceFee() { - return internationalServiceFee; - } - - - public void setInternationalServiceFee(Integer internationalServiceFee) { - this.internationalServiceFee = internationalServiceFee; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReversalTransactionAllOfAttributes reversalTransactionAllOfAttributes = (ReversalTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, reversalTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, reversalTransactionAllOfAttributes.direction) && - Objects.equals(this.amount, reversalTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, reversalTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, reversalTransactionAllOfAttributes.summary) && - Objects.equals(this.cardLast4Digits, reversalTransactionAllOfAttributes.cardLast4Digits) && - Objects.equals(this.tags, reversalTransactionAllOfAttributes.tags) && - Objects.equals(this.networkTransactionId, reversalTransactionAllOfAttributes.networkTransactionId) && - Objects.equals(this.internationalServiceFee, reversalTransactionAllOfAttributes.internationalServiceFee); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, amount, balance, summary, cardLast4Digits, tags, networkTransactionId, internationalServiceFee); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReversalTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" cardLast4Digits: ").append(toIndentedString(cardLast4Digits)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" networkTransactionId: ").append(toIndentedString(networkTransactionId)).append("\n"); - sb.append(" internationalServiceFee: ").append(toIndentedString(internationalServiceFee)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("cardLast4Digits"); - openapiFields.add("tags"); - openapiFields.add("networkTransactionId"); - openapiFields.add("internationalServiceFee"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - openapiRequiredFields.add("cardLast4Digits"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReversalTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReversalTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReversalTransactionAllOfAttributes is not found in the empty JSON string", ReversalTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReversalTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReversalTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReversalTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - if (!jsonObj.get("cardLast4Digits").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardLast4Digits` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardLast4Digits").toString())); - } - if ((jsonObj.get("networkTransactionId") != null && !jsonObj.get("networkTransactionId").isJsonNull()) && !jsonObj.get("networkTransactionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `networkTransactionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("networkTransactionId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReversalTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReversalTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReversalTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReversalTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReversalTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReversalTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReversalTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to ReversalTransactionAllOfAttributes - */ - public static ReversalTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReversalTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of ReversalTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Revocability.java b/src/main/java/org/openapitools/client/model/Revocability.java deleted file mode 100644 index 403aae4b..00000000 --- a/src/main/java/org/openapitools/client/model/Revocability.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets revocability - */ -@JsonAdapter(Revocability.Adapter.class) -public enum Revocability { - - REVOCABLE("Revocable"), - - IRREVOCABLE("Irrevocable"); - - private String value; - - Revocability(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static Revocability fromValue(String value) { - for (Revocability b : Revocability.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final Revocability enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public Revocability read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return Revocability.fromValue(value); - } - } -} - diff --git a/src/main/java/org/openapitools/client/model/Reward.java b/src/main/java/org/openapitools/client/model/Reward.java deleted file mode 100644 index 603a9e8c..00000000 --- a/src/main/java/org/openapitools/client/model/Reward.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RewardAttributes; -import org.openapitools.client.model.RewardRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Reward - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Reward { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "reward"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private RewardAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private RewardRelationships relationships; - - public Reward() { - } - - public Reward type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public Reward id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public Reward attributes(RewardAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public RewardAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(RewardAttributes attributes) { - this.attributes = attributes; - } - - - public Reward relationships(RewardRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public RewardRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(RewardRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Reward reward = (Reward) o; - return Objects.equals(this.type, reward.type) && - Objects.equals(this.id, reward.id) && - Objects.equals(this.attributes, reward.attributes) && - Objects.equals(this.relationships, reward.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Reward {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Reward - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Reward.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Reward is not found in the empty JSON string", Reward.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Reward.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Reward` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Reward.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - // validate the required field `attributes` - RewardAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - RewardRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Reward.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Reward' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Reward.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Reward value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Reward read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Reward given an JSON string - * - * @param jsonString JSON string - * @return An instance of Reward - * @throws IOException if the JSON string is invalid with respect to Reward - */ - public static Reward fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Reward.class); - } - - /** - * Convert an instance of Reward to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RewardAttributes.java b/src/main/java/org/openapitools/client/model/RewardAttributes.java deleted file mode 100644 index 788beda3..00000000 --- a/src/main/java/org/openapitools/client/model/RewardAttributes.java +++ /dev/null @@ -1,415 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RewardAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RewardAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - REJECTED("Rejected"), - - SENT("Sent"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_REJECT_REASON = "rejectReason"; - @SerializedName(SERIALIZED_NAME_REJECT_REASON) - private String rejectReason; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public RewardAttributes() { - } - - public RewardAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public RewardAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public RewardAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public RewardAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public RewardAttributes rejectReason(String rejectReason) { - - this.rejectReason = rejectReason; - return this; - } - - /** - * Get rejectReason - * @return rejectReason - **/ - @javax.annotation.Nullable - public String getRejectReason() { - return rejectReason; - } - - - public void setRejectReason(String rejectReason) { - this.rejectReason = rejectReason; - } - - - public RewardAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nonnull - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RewardAttributes rewardAttributes = (RewardAttributes) o; - return Objects.equals(this.createdAt, rewardAttributes.createdAt) && - Objects.equals(this.amount, rewardAttributes.amount) && - Objects.equals(this.description, rewardAttributes.description) && - Objects.equals(this.status, rewardAttributes.status) && - Objects.equals(this.rejectReason, rewardAttributes.rejectReason) && - Objects.equals(this.tags, rewardAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, amount, description, status, rejectReason, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RewardAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" rejectReason: ").append(toIndentedString(rejectReason)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("amount"); - openapiFields.add("description"); - openapiFields.add("status"); - openapiFields.add("rejectReason"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("tags"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RewardAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RewardAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RewardAttributes is not found in the empty JSON string", RewardAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RewardAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RewardAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RewardAttributes.openapiRequiredFields) { - 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("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if (!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())); - } - if ((jsonObj.get("rejectReason") != null && !jsonObj.get("rejectReason").isJsonNull()) && !jsonObj.get("rejectReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `rejectReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rejectReason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RewardAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RewardAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RewardAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RewardAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RewardAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RewardAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of RewardAttributes - * @throws IOException if the JSON string is invalid with respect to RewardAttributes - */ - public static RewardAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RewardAttributes.class); - } - - /** - * Convert an instance of RewardAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RewardRelationship.java b/src/main/java/org/openapitools/client/model/RewardRelationship.java deleted file mode 100644 index 7e6ca8df..00000000 --- a/src/main/java/org/openapitools/client/model/RewardRelationship.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RewardRelationshipData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RewardRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RewardRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private RewardRelationshipData data; - - public RewardRelationship() { - } - - public RewardRelationship data(RewardRelationshipData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public RewardRelationshipData getData() { - return data; - } - - - public void setData(RewardRelationshipData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RewardRelationship rewardRelationship = (RewardRelationship) o; - return Objects.equals(this.data, rewardRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RewardRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RewardRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RewardRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RewardRelationship is not found in the empty JSON string", RewardRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RewardRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RewardRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - RewardRelationshipData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RewardRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RewardRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RewardRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RewardRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RewardRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RewardRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of RewardRelationship - * @throws IOException if the JSON string is invalid with respect to RewardRelationship - */ - public static RewardRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RewardRelationship.class); - } - - /** - * Convert an instance of RewardRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RewardRelationshipData.java b/src/main/java/org/openapitools/client/model/RewardRelationshipData.java deleted file mode 100644 index b37e37dc..00000000 --- a/src/main/java/org/openapitools/client/model/RewardRelationshipData.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RewardRelationshipData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RewardRelationshipData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "reward"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public RewardRelationshipData() { - } - - public RewardRelationshipData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public RewardRelationshipData id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RewardRelationshipData rewardRelationshipData = (RewardRelationshipData) o; - return Objects.equals(this.type, rewardRelationshipData.type) && - Objects.equals(this.id, rewardRelationshipData.id); - } - - @Override - public int hashCode() { - return Objects.hash(type, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RewardRelationshipData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RewardRelationshipData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RewardRelationshipData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RewardRelationshipData is not found in the empty JSON string", RewardRelationshipData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RewardRelationshipData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RewardRelationshipData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RewardRelationshipData.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RewardRelationshipData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RewardRelationshipData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RewardRelationshipData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RewardRelationshipData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RewardRelationshipData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RewardRelationshipData given an JSON string - * - * @param jsonString JSON string - * @return An instance of RewardRelationshipData - * @throws IOException if the JSON string is invalid with respect to RewardRelationshipData - */ - public static RewardRelationshipData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RewardRelationshipData.class); - } - - /** - * Convert an instance of RewardRelationshipData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RewardRelationships.java b/src/main/java/org/openapitools/client/model/RewardRelationships.java deleted file mode 100644 index d8a6c7c3..00000000 --- a/src/main/java/org/openapitools/client/model/RewardRelationships.java +++ /dev/null @@ -1,376 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CardRelationship; -import org.openapitools.client.model.Relationship; -import org.openapitools.client.model.TransactionRelationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RewardRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RewardRelationships { - public static final String SERIALIZED_NAME_RECEIVING_ACCOUNT = "receivingAccount"; - @SerializedName(SERIALIZED_NAME_RECEIVING_ACCOUNT) - private Relationship receivingAccount; - - public static final String SERIALIZED_NAME_FUNDING_ACCOUNT = "fundingAccount"; - @SerializedName(SERIALIZED_NAME_FUNDING_ACCOUNT) - private Relationship fundingAccount; - - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private Relationship customer; - - public static final String SERIALIZED_NAME_REWARDED_TRANSACTION = "rewardedTransaction"; - @SerializedName(SERIALIZED_NAME_REWARDED_TRANSACTION) - private Relationship rewardedTransaction; - - public static final String SERIALIZED_NAME_TRANSACTION = "transaction"; - @SerializedName(SERIALIZED_NAME_TRANSACTION) - private TransactionRelationship transaction; - - public static final String SERIALIZED_NAME_CARD = "card"; - @SerializedName(SERIALIZED_NAME_CARD) - private CardRelationship card; - - public RewardRelationships() { - } - - public RewardRelationships receivingAccount(Relationship receivingAccount) { - - this.receivingAccount = receivingAccount; - return this; - } - - /** - * Get receivingAccount - * @return receivingAccount - **/ - @javax.annotation.Nonnull - public Relationship getReceivingAccount() { - return receivingAccount; - } - - - public void setReceivingAccount(Relationship receivingAccount) { - this.receivingAccount = receivingAccount; - } - - - public RewardRelationships fundingAccount(Relationship fundingAccount) { - - this.fundingAccount = fundingAccount; - return this; - } - - /** - * Get fundingAccount - * @return fundingAccount - **/ - @javax.annotation.Nonnull - public Relationship getFundingAccount() { - return fundingAccount; - } - - - public void setFundingAccount(Relationship fundingAccount) { - this.fundingAccount = fundingAccount; - } - - - public RewardRelationships customer(Relationship customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nonnull - public Relationship getCustomer() { - return customer; - } - - - public void setCustomer(Relationship customer) { - this.customer = customer; - } - - - public RewardRelationships rewardedTransaction(Relationship rewardedTransaction) { - - this.rewardedTransaction = rewardedTransaction; - return this; - } - - /** - * Get rewardedTransaction - * @return rewardedTransaction - **/ - @javax.annotation.Nullable - public Relationship getRewardedTransaction() { - return rewardedTransaction; - } - - - public void setRewardedTransaction(Relationship rewardedTransaction) { - this.rewardedTransaction = rewardedTransaction; - } - - - public RewardRelationships transaction(TransactionRelationship transaction) { - - this.transaction = transaction; - return this; - } - - /** - * Get transaction - * @return transaction - **/ - @javax.annotation.Nullable - public TransactionRelationship getTransaction() { - return transaction; - } - - - public void setTransaction(TransactionRelationship transaction) { - this.transaction = transaction; - } - - - public RewardRelationships card(CardRelationship card) { - - this.card = card; - return this; - } - - /** - * Get card - * @return card - **/ - @javax.annotation.Nullable - public CardRelationship getCard() { - return card; - } - - - public void setCard(CardRelationship card) { - this.card = card; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RewardRelationships rewardRelationships = (RewardRelationships) o; - return Objects.equals(this.receivingAccount, rewardRelationships.receivingAccount) && - Objects.equals(this.fundingAccount, rewardRelationships.fundingAccount) && - Objects.equals(this.customer, rewardRelationships.customer) && - Objects.equals(this.rewardedTransaction, rewardRelationships.rewardedTransaction) && - Objects.equals(this.transaction, rewardRelationships.transaction) && - Objects.equals(this.card, rewardRelationships.card); - } - - @Override - public int hashCode() { - return Objects.hash(receivingAccount, fundingAccount, customer, rewardedTransaction, transaction, card); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RewardRelationships {\n"); - sb.append(" receivingAccount: ").append(toIndentedString(receivingAccount)).append("\n"); - sb.append(" fundingAccount: ").append(toIndentedString(fundingAccount)).append("\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" rewardedTransaction: ").append(toIndentedString(rewardedTransaction)).append("\n"); - sb.append(" transaction: ").append(toIndentedString(transaction)).append("\n"); - sb.append(" card: ").append(toIndentedString(card)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("receivingAccount"); - openapiFields.add("fundingAccount"); - openapiFields.add("customer"); - openapiFields.add("rewardedTransaction"); - openapiFields.add("transaction"); - openapiFields.add("card"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("receivingAccount"); - openapiRequiredFields.add("fundingAccount"); - openapiRequiredFields.add("customer"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RewardRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RewardRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RewardRelationships is not found in the empty JSON string", RewardRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RewardRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RewardRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RewardRelationships.openapiRequiredFields) { - 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(); - // validate the required field `receivingAccount` - Relationship.validateJsonElement(jsonObj.get("receivingAccount")); - // validate the required field `fundingAccount` - Relationship.validateJsonElement(jsonObj.get("fundingAccount")); - // validate the required field `customer` - Relationship.validateJsonElement(jsonObj.get("customer")); - // validate the optional field `rewardedTransaction` - if (jsonObj.get("rewardedTransaction") != null && !jsonObj.get("rewardedTransaction").isJsonNull()) { - Relationship.validateJsonElement(jsonObj.get("rewardedTransaction")); - } - // validate the optional field `transaction` - if (jsonObj.get("transaction") != null && !jsonObj.get("transaction").isJsonNull()) { - TransactionRelationship.validateJsonElement(jsonObj.get("transaction")); - } - // validate the optional field `card` - if (jsonObj.get("card") != null && !jsonObj.get("card").isJsonNull()) { - CardRelationship.validateJsonElement(jsonObj.get("card")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RewardRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RewardRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RewardRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RewardRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RewardRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RewardRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of RewardRelationships - * @throws IOException if the JSON string is invalid with respect to RewardRelationships - */ - public static RewardRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RewardRelationships.class); - } - - /** - * Convert an instance of RewardRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RewardTransaction.java b/src/main/java/org/openapitools/client/model/RewardTransaction.java deleted file mode 100644 index dbcc668f..00000000 --- a/src/main/java/org/openapitools/client/model/RewardTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RewardTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RewardTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RewardTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private RewardTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public RewardTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public RewardTransaction attributes(RewardTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public RewardTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(RewardTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public RewardTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RewardTransaction rewardTransaction = (RewardTransaction) o; - return Objects.equals(this.attributes, rewardTransaction.attributes) && - Objects.equals(this.relationships, rewardTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RewardTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RewardTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RewardTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RewardTransaction is not found in the empty JSON string", RewardTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RewardTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RewardTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RewardTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RewardTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RewardTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RewardTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RewardTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RewardTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RewardTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of RewardTransaction - * @throws IOException if the JSON string is invalid with respect to RewardTransaction - */ - public static RewardTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RewardTransaction.class); - } - - /** - * Convert an instance of RewardTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/RewardTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/RewardTransactionAllOfAttributes.java deleted file mode 100644 index a32b508c..00000000 --- a/src/main/java/org/openapitools/client/model/RewardTransactionAllOfAttributes.java +++ /dev/null @@ -1,443 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.Counterparty; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * RewardTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RewardTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_RECEIVER_COUNTERPARTY = "receiverCounterparty"; - @SerializedName(SERIALIZED_NAME_RECEIVER_COUNTERPARTY) - private Counterparty receiverCounterparty; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public RewardTransactionAllOfAttributes() { - } - - public RewardTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public RewardTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public RewardTransactionAllOfAttributes receiverCounterparty(Counterparty receiverCounterparty) { - - this.receiverCounterparty = receiverCounterparty; - return this; - } - - /** - * Get receiverCounterparty - * @return receiverCounterparty - **/ - @javax.annotation.Nonnull - public Counterparty getReceiverCounterparty() { - return receiverCounterparty; - } - - - public void setReceiverCounterparty(Counterparty receiverCounterparty) { - this.receiverCounterparty = receiverCounterparty; - } - - - public RewardTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public RewardTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public RewardTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public RewardTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RewardTransactionAllOfAttributes rewardTransactionAllOfAttributes = (RewardTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, rewardTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, rewardTransactionAllOfAttributes.direction) && - Objects.equals(this.receiverCounterparty, rewardTransactionAllOfAttributes.receiverCounterparty) && - Objects.equals(this.amount, rewardTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, rewardTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, rewardTransactionAllOfAttributes.summary) && - Objects.equals(this.tags, rewardTransactionAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, receiverCounterparty, amount, balance, summary, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RewardTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" receiverCounterparty: ").append(toIndentedString(receiverCounterparty)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("receiverCounterparty"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("receiverCounterparty"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RewardTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RewardTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RewardTransactionAllOfAttributes is not found in the empty JSON string", RewardTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!RewardTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RewardTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RewardTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - // validate the required field `receiverCounterparty` - Counterparty.validateJsonElement(jsonObj.get("receiverCounterparty")); - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RewardTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RewardTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RewardTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RewardTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RewardTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RewardTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of RewardTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to RewardTransactionAllOfAttributes - */ - public static RewardTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RewardTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of RewardTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Schedule.java b/src/main/java/org/openapitools/client/model/Schedule.java deleted file mode 100644 index 6a22fb36..00000000 --- a/src/main/java/org/openapitools/client/model/Schedule.java +++ /dev/null @@ -1,406 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Schedule - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Schedule { - public static final String SERIALIZED_NAME_START_TIME = "startTime"; - @SerializedName(SERIALIZED_NAME_START_TIME) - private LocalDate startTime; - - public static final String SERIALIZED_NAME_END_TIME = "endTime"; - @SerializedName(SERIALIZED_NAME_END_TIME) - private LocalDate endTime; - - /** - * Gets or Sets interval - */ - @JsonAdapter(IntervalEnum.Adapter.class) - public enum IntervalEnum { - MONTHLY("Monthly"); - - private String value; - - IntervalEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static IntervalEnum fromValue(String value) { - for (IntervalEnum b : IntervalEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final IntervalEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public IntervalEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return IntervalEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_INTERVAL = "interval"; - @SerializedName(SERIALIZED_NAME_INTERVAL) - private IntervalEnum interval; - - public static final String SERIALIZED_NAME_DAY_OF_MONTH = "dayOfMonth"; - @SerializedName(SERIALIZED_NAME_DAY_OF_MONTH) - private Integer dayOfMonth; - - public static final String SERIALIZED_NAME_NEXT_SCHEDULED_ACTION = "nextScheduledAction"; - @SerializedName(SERIALIZED_NAME_NEXT_SCHEDULED_ACTION) - private LocalDate nextScheduledAction; - - public static final String SERIALIZED_NAME_TOTAL_NUMBER_OF_PAYMENTS = "totalNumberOfPayments"; - @SerializedName(SERIALIZED_NAME_TOTAL_NUMBER_OF_PAYMENTS) - private Integer totalNumberOfPayments; - - public Schedule() { - } - - public Schedule startTime(LocalDate startTime) { - - this.startTime = startTime; - return this; - } - - /** - * Get startTime - * @return startTime - **/ - @javax.annotation.Nullable - public LocalDate getStartTime() { - return startTime; - } - - - public void setStartTime(LocalDate startTime) { - this.startTime = startTime; - } - - - public Schedule endTime(LocalDate endTime) { - - this.endTime = endTime; - return this; - } - - /** - * Get endTime - * @return endTime - **/ - @javax.annotation.Nullable - public LocalDate getEndTime() { - return endTime; - } - - - public void setEndTime(LocalDate endTime) { - this.endTime = endTime; - } - - - public Schedule interval(IntervalEnum interval) { - - this.interval = interval; - return this; - } - - /** - * Get interval - * @return interval - **/ - @javax.annotation.Nonnull - public IntervalEnum getInterval() { - return interval; - } - - - public void setInterval(IntervalEnum interval) { - this.interval = interval; - } - - - public Schedule dayOfMonth(Integer dayOfMonth) { - - this.dayOfMonth = dayOfMonth; - return this; - } - - /** - * Get dayOfMonth - * minimum: -5 - * maximum: 28 - * @return dayOfMonth - **/ - @javax.annotation.Nullable - public Integer getDayOfMonth() { - return dayOfMonth; - } - - - public void setDayOfMonth(Integer dayOfMonth) { - this.dayOfMonth = dayOfMonth; - } - - - public Schedule nextScheduledAction(LocalDate nextScheduledAction) { - - this.nextScheduledAction = nextScheduledAction; - return this; - } - - /** - * Get nextScheduledAction - * @return nextScheduledAction - **/ - @javax.annotation.Nonnull - public LocalDate getNextScheduledAction() { - return nextScheduledAction; - } - - - public void setNextScheduledAction(LocalDate nextScheduledAction) { - this.nextScheduledAction = nextScheduledAction; - } - - - public Schedule totalNumberOfPayments(Integer totalNumberOfPayments) { - - this.totalNumberOfPayments = totalNumberOfPayments; - return this; - } - - /** - * Get totalNumberOfPayments - * minimum: 1 - * @return totalNumberOfPayments - **/ - @javax.annotation.Nullable - public Integer getTotalNumberOfPayments() { - return totalNumberOfPayments; - } - - - public void setTotalNumberOfPayments(Integer totalNumberOfPayments) { - this.totalNumberOfPayments = totalNumberOfPayments; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Schedule schedule = (Schedule) o; - return Objects.equals(this.startTime, schedule.startTime) && - Objects.equals(this.endTime, schedule.endTime) && - Objects.equals(this.interval, schedule.interval) && - Objects.equals(this.dayOfMonth, schedule.dayOfMonth) && - Objects.equals(this.nextScheduledAction, schedule.nextScheduledAction) && - Objects.equals(this.totalNumberOfPayments, schedule.totalNumberOfPayments); - } - - @Override - public int hashCode() { - return Objects.hash(startTime, endTime, interval, dayOfMonth, nextScheduledAction, totalNumberOfPayments); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Schedule {\n"); - sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); - sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); - sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); - sb.append(" dayOfMonth: ").append(toIndentedString(dayOfMonth)).append("\n"); - sb.append(" nextScheduledAction: ").append(toIndentedString(nextScheduledAction)).append("\n"); - sb.append(" totalNumberOfPayments: ").append(toIndentedString(totalNumberOfPayments)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("startTime"); - openapiFields.add("endTime"); - openapiFields.add("interval"); - openapiFields.add("dayOfMonth"); - openapiFields.add("nextScheduledAction"); - openapiFields.add("totalNumberOfPayments"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("interval"); - openapiRequiredFields.add("nextScheduledAction"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Schedule - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Schedule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Schedule is not found in the empty JSON string", Schedule.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Schedule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Schedule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Schedule.openapiRequiredFields) { - 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("interval").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `interval` to be a primitive type in the JSON string but got `%s`", jsonObj.get("interval").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Schedule.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Schedule' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Schedule.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Schedule value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Schedule read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Schedule given an JSON string - * - * @param jsonString JSON string - * @return An instance of Schedule - * @throws IOException if the JSON string is invalid with respect to Schedule - */ - public static Schedule fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Schedule.class); - } - - /** - * Convert an instance of Schedule to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Schedule1.java b/src/main/java/org/openapitools/client/model/Schedule1.java deleted file mode 100644 index 0b321e32..00000000 --- a/src/main/java/org/openapitools/client/model/Schedule1.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.Arrays; -import org.openapitools.client.model.MonthlySchedule; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -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 com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import org.openapitools.client.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Schedule1 extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(Schedule1.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Schedule1.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Schedule1' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterMonthlySchedule = gson.getDelegateAdapter(this, TypeToken.get(MonthlySchedule.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Schedule1 value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `MonthlySchedule` - if (value.getActualInstance() instanceof MonthlySchedule) { - JsonElement element = adapterMonthlySchedule.toJsonTree((MonthlySchedule)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: MonthlySchedule"); - } - - @Override - public Schedule1 read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize MonthlySchedule - try { - // validate the JSON object to see if any exception is thrown - MonthlySchedule.validateJsonElement(jsonElement); - actualAdapter = adapterMonthlySchedule; - match++; - log.log(Level.FINER, "Input data matches schema 'MonthlySchedule'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for MonthlySchedule failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'MonthlySchedule'", e); - } - - if (match == 1) { - Schedule1 ret = new Schedule1(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for Schedule1: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public Schedule1() { - super("oneOf", Boolean.FALSE); - } - - public Schedule1(MonthlySchedule o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("MonthlySchedule", MonthlySchedule.class); - } - - @Override - public Map> getSchemas() { - return Schedule1.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * MonthlySchedule - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof MonthlySchedule) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be MonthlySchedule"); - } - - /** - * Get the actual instance, which can be the following: - * MonthlySchedule - * - * @return The actual instance (MonthlySchedule) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `MonthlySchedule`. If the actual instance is not `MonthlySchedule`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `MonthlySchedule` - * @throws ClassCastException if the instance is not `MonthlySchedule` - */ - public MonthlySchedule getMonthlySchedule() throws ClassCastException { - return (MonthlySchedule)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Schedule1 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with MonthlySchedule - try { - MonthlySchedule.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for MonthlySchedule failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for Schedule1 with oneOf schemas: MonthlySchedule. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of Schedule1 given an JSON string - * - * @param jsonString JSON string - * @return An instance of Schedule1 - * @throws IOException if the JSON string is invalid with respect to Schedule1 - */ - public static Schedule1 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Schedule1.class); - } - - /** - * Convert an instance of Schedule1 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/SettlementTransaction.java b/src/main/java/org/openapitools/client/model/SettlementTransaction.java deleted file mode 100644 index 30678894..00000000 --- a/src/main/java/org/openapitools/client/model/SettlementTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CheckDepositTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * SettlementTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SettlementTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CheckDepositTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public SettlementTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public SettlementTransaction attributes(CheckDepositTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CheckDepositTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CheckDepositTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public SettlementTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SettlementTransaction settlementTransaction = (SettlementTransaction) o; - return Objects.equals(this.attributes, settlementTransaction.attributes) && - Objects.equals(this.relationships, settlementTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SettlementTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SettlementTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SettlementTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SettlementTransaction is not found in the empty JSON string", SettlementTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SettlementTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SettlementTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SettlementTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SettlementTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SettlementTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SettlementTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SettlementTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SettlementTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SettlementTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of SettlementTransaction - * @throws IOException if the JSON string is invalid with respect to SettlementTransaction - */ - public static SettlementTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SettlementTransaction.class); - } - - /** - * Convert an instance of SettlementTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/SoleProprietorshipAnnualRevenue.java b/src/main/java/org/openapitools/client/model/SoleProprietorshipAnnualRevenue.java deleted file mode 100644 index f3c2eabd..00000000 --- a/src/main/java/org/openapitools/client/model/SoleProprietorshipAnnualRevenue.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets soleProprietorshipAnnualRevenue - */ -@JsonAdapter(SoleProprietorshipAnnualRevenue.Adapter.class) -public enum SoleProprietorshipAnnualRevenue { - - UPTO50K("UpTo50k"), - - BETWEEN50KAND100K("Between50kAnd100k"), - - BETWEEN100KAND200K("Between100kAnd200k"), - - BETWEEN200KAND500K("Between200kAnd500k"), - - OVER500K("Over500k"); - - private String value; - - SoleProprietorshipAnnualRevenue(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static SoleProprietorshipAnnualRevenue fromValue(String value) { - for (SoleProprietorshipAnnualRevenue b : SoleProprietorshipAnnualRevenue.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final SoleProprietorshipAnnualRevenue enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public SoleProprietorshipAnnualRevenue read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return SoleProprietorshipAnnualRevenue.fromValue(value); - } - } -} - diff --git a/src/main/java/org/openapitools/client/model/SoleProprietorshipNumberOfEmployees.java b/src/main/java/org/openapitools/client/model/SoleProprietorshipNumberOfEmployees.java deleted file mode 100644 index 6248d366..00000000 --- a/src/main/java/org/openapitools/client/model/SoleProprietorshipNumberOfEmployees.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets soleProprietorshipNumberOfEmployees - */ -@JsonAdapter(SoleProprietorshipNumberOfEmployees.Adapter.class) -public enum SoleProprietorshipNumberOfEmployees { - - ONE("One"), - - BETWEEN2AND5("Between2And5"), - - BETWEEN5AND10("Between5And10"), - - OVER10("Over10"); - - private String value; - - SoleProprietorshipNumberOfEmployees(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static SoleProprietorshipNumberOfEmployees fromValue(String value) { - for (SoleProprietorshipNumberOfEmployees b : SoleProprietorshipNumberOfEmployees.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final SoleProprietorshipNumberOfEmployees enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public SoleProprietorshipNumberOfEmployees read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return SoleProprietorshipNumberOfEmployees.fromValue(value); - } - } -} - diff --git a/src/main/java/org/openapitools/client/model/SourceOfFunds.java b/src/main/java/org/openapitools/client/model/SourceOfFunds.java deleted file mode 100644 index 6ee311f5..00000000 --- a/src/main/java/org/openapitools/client/model/SourceOfFunds.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets sourceOfFunds - */ -@JsonAdapter(SourceOfFunds.Adapter.class) -public enum SourceOfFunds { - - INHERITANCE("Inheritance"), - - SALARY("Salary"), - - SAVINGS("Savings"), - - INVESTMENTRETURNS("InvestmentReturns"), - - GIFTS("Gifts"); - - private String value; - - SourceOfFunds(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static SourceOfFunds fromValue(String value) { - for (SourceOfFunds b : SourceOfFunds.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final SourceOfFunds enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public SourceOfFunds read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return SourceOfFunds.fromValue(value); - } - } -} - diff --git a/src/main/java/org/openapitools/client/model/SourceOfIncome.java b/src/main/java/org/openapitools/client/model/SourceOfIncome.java deleted file mode 100644 index 4431deed..00000000 --- a/src/main/java/org/openapitools/client/model/SourceOfIncome.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets sourceOfIncome - */ -@JsonAdapter(SourceOfIncome.Adapter.class) -public enum SourceOfIncome { - - EMPLOYMENTORPAYROLLINCOME("EmploymentOrPayrollIncome"), - - PARTTIMEORCONTRACTORINCOME("PartTimeOrContractorIncome"), - - INHERITANCESANDGIFTS("InheritancesAndGifts"), - - PERSONALINVESTMENTS("PersonalInvestments"), - - BUSINESSOWNERSHIPINTERESTS("BusinessOwnershipInterests"), - - GOVERNMENTBENEFITS("GovernmentBenefits"); - - private String value; - - SourceOfIncome(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static SourceOfIncome fromValue(String value) { - for (SourceOfIncome b : SourceOfIncome.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final SourceOfIncome enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public SourceOfIncome read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return SourceOfIncome.fromValue(value); - } - } -} - diff --git a/src/main/java/org/openapitools/client/model/SponsoredInterestTransaction.java b/src/main/java/org/openapitools/client/model/SponsoredInterestTransaction.java deleted file mode 100644 index d141d611..00000000 --- a/src/main/java/org/openapitools/client/model/SponsoredInterestTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CheckDepositTransactionAllOfAttributes; -import org.openapitools.client.model.Transaction; -import org.openapitools.client.model.TransactionRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * SponsoredInterestTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SponsoredInterestTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private CheckDepositTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public SponsoredInterestTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public SponsoredInterestTransaction attributes(CheckDepositTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public CheckDepositTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(CheckDepositTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public SponsoredInterestTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SponsoredInterestTransaction sponsoredInterestTransaction = (SponsoredInterestTransaction) o; - return Objects.equals(this.attributes, sponsoredInterestTransaction.attributes) && - Objects.equals(this.relationships, sponsoredInterestTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SponsoredInterestTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SponsoredInterestTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SponsoredInterestTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SponsoredInterestTransaction is not found in the empty JSON string", SponsoredInterestTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SponsoredInterestTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SponsoredInterestTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SponsoredInterestTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SponsoredInterestTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SponsoredInterestTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SponsoredInterestTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SponsoredInterestTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SponsoredInterestTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SponsoredInterestTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of SponsoredInterestTransaction - * @throws IOException if the JSON string is invalid with respect to SponsoredInterestTransaction - */ - public static SponsoredInterestTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SponsoredInterestTransaction.class); - } - - /** - * Convert an instance of SponsoredInterestTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Statement.java b/src/main/java/org/openapitools/client/model/Statement.java deleted file mode 100644 index 573666c3..00000000 --- a/src/main/java/org/openapitools/client/model/Statement.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.StatementAttributes; -import org.openapitools.client.model.StatementRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Statement - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Statement { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private StatementAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private StatementRelationships relationships; - - public Statement() { - } - - public Statement type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public Statement id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public Statement attributes(StatementAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public StatementAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(StatementAttributes attributes) { - this.attributes = attributes; - } - - - public Statement relationships(StatementRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public StatementRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(StatementRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Statement statement = (Statement) o; - return Objects.equals(this.type, statement.type) && - Objects.equals(this.id, statement.id) && - Objects.equals(this.attributes, statement.attributes) && - Objects.equals(this.relationships, statement.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Statement {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Statement - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Statement.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Statement is not found in the empty JSON string", Statement.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Statement.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Statement` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Statement.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - // validate the required field `attributes` - StatementAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - StatementRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Statement.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Statement' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Statement.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Statement value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Statement read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Statement given an JSON string - * - * @param jsonString JSON string - * @return An instance of Statement - * @throws IOException if the JSON string is invalid with respect to Statement - */ - public static Statement fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Statement.class); - } - - /** - * Convert an instance of Statement to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/StatementAttributes.java b/src/main/java/org/openapitools/client/model/StatementAttributes.java deleted file mode 100644 index 4ed25c5f..00000000 --- a/src/main/java/org/openapitools/client/model/StatementAttributes.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * StatementAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StatementAttributes { - public static final String SERIALIZED_NAME_PERIOD = "period"; - @SerializedName(SERIALIZED_NAME_PERIOD) - private String period; - - public StatementAttributes() { - } - - public StatementAttributes period(String period) { - - this.period = period; - return this; - } - - /** - * Get period - * @return period - **/ - @javax.annotation.Nullable - public String getPeriod() { - return period; - } - - - public void setPeriod(String period) { - this.period = period; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StatementAttributes statementAttributes = (StatementAttributes) o; - return Objects.equals(this.period, statementAttributes.period); - } - - @Override - public int hashCode() { - return Objects.hash(period); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StatementAttributes {\n"); - sb.append(" period: ").append(toIndentedString(period)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("period"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to StatementAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!StatementAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StatementAttributes is not found in the empty JSON string", StatementAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!StatementAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StatementAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("period") != null && !jsonObj.get("period").isJsonNull()) && !jsonObj.get("period").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `period` to be a primitive type in the JSON string but got `%s`", jsonObj.get("period").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StatementAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StatementAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StatementAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StatementAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StatementAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StatementAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of StatementAttributes - * @throws IOException if the JSON string is invalid with respect to StatementAttributes - */ - public static StatementAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StatementAttributes.class); - } - - /** - * Convert an instance of StatementAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/StatementRelationships.java b/src/main/java/org/openapitools/client/model/StatementRelationships.java deleted file mode 100644 index b2f43977..00000000 --- a/src/main/java/org/openapitools/client/model/StatementRelationships.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CustomersRelationship; -import org.openapitools.client.model.Relationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * StatementRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StatementRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private Relationship account; - - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private Relationship customer; - - public static final String SERIALIZED_NAME_CUSTOMERS = "customers"; - @SerializedName(SERIALIZED_NAME_CUSTOMERS) - private CustomersRelationship customers; - - public StatementRelationships() { - } - - public StatementRelationships account(Relationship account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nullable - public Relationship getAccount() { - return account; - } - - - public void setAccount(Relationship account) { - this.account = account; - } - - - public StatementRelationships customer(Relationship customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nullable - public Relationship getCustomer() { - return customer; - } - - - public void setCustomer(Relationship customer) { - this.customer = customer; - } - - - public StatementRelationships customers(CustomersRelationship customers) { - - this.customers = customers; - return this; - } - - /** - * Get customers - * @return customers - **/ - @javax.annotation.Nullable - public CustomersRelationship getCustomers() { - return customers; - } - - - public void setCustomers(CustomersRelationship customers) { - this.customers = customers; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StatementRelationships statementRelationships = (StatementRelationships) o; - return Objects.equals(this.account, statementRelationships.account) && - Objects.equals(this.customer, statementRelationships.customer) && - Objects.equals(this.customers, statementRelationships.customers); - } - - @Override - public int hashCode() { - return Objects.hash(account, customer, customers); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StatementRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" customers: ").append(toIndentedString(customers)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - openapiFields.add("customer"); - openapiFields.add("customers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to StatementRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!StatementRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StatementRelationships is not found in the empty JSON string", StatementRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!StatementRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StatementRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `account` - if (jsonObj.get("account") != null && !jsonObj.get("account").isJsonNull()) { - Relationship.validateJsonElement(jsonObj.get("account")); - } - // validate the optional field `customer` - if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { - Relationship.validateJsonElement(jsonObj.get("customer")); - } - // validate the optional field `customers` - if (jsonObj.get("customers") != null && !jsonObj.get("customers").isJsonNull()) { - CustomersRelationship.validateJsonElement(jsonObj.get("customers")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StatementRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StatementRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StatementRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StatementRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StatementRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StatementRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of StatementRelationships - * @throws IOException if the JSON string is invalid with respect to StatementRelationships - */ - public static StatementRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StatementRelationships.class); - } - - /** - * Convert an instance of StatementRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/StatusEvent.java b/src/main/java/org/openapitools/client/model/StatusEvent.java deleted file mode 100644 index 9c454483..00000000 --- a/src/main/java/org/openapitools/client/model/StatusEvent.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.StatusEventStatus; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * StatusEvent - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StatusEvent { - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private String updatedAt; - - public static final String SERIALIZED_NAME_UPDATED_BY = "updatedBy"; - @SerializedName(SERIALIZED_NAME_UPDATED_BY) - private String updatedBy; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEventStatus status; - - public StatusEvent() { - } - - public StatusEvent updatedAt(String updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public String getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - } - - - public StatusEvent updatedBy(String updatedBy) { - - this.updatedBy = updatedBy; - return this; - } - - /** - * Get updatedBy - * @return updatedBy - **/ - @javax.annotation.Nullable - public String getUpdatedBy() { - return updatedBy; - } - - - public void setUpdatedBy(String updatedBy) { - this.updatedBy = updatedBy; - } - - - public StatusEvent status(StatusEventStatus status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEventStatus getStatus() { - return status; - } - - - public void setStatus(StatusEventStatus status) { - this.status = status; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StatusEvent statusEvent = (StatusEvent) o; - return Objects.equals(this.updatedAt, statusEvent.updatedAt) && - Objects.equals(this.updatedBy, statusEvent.updatedBy) && - Objects.equals(this.status, statusEvent.status); - } - - @Override - public int hashCode() { - return Objects.hash(updatedAt, updatedBy, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StatusEvent {\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" updatedBy: ").append(toIndentedString(updatedBy)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("updatedAt"); - openapiFields.add("updatedBy"); - openapiFields.add("status"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("status"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to StatusEvent - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!StatusEvent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StatusEvent is not found in the empty JSON string", StatusEvent.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!StatusEvent.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StatusEvent` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StatusEvent.openapiRequiredFields) { - 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("updatedAt") != null && !jsonObj.get("updatedAt").isJsonNull()) && !jsonObj.get("updatedAt").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `updatedAt` to be a primitive type in the JSON string but got `%s`", jsonObj.get("updatedAt").toString())); - } - if ((jsonObj.get("updatedBy") != null && !jsonObj.get("updatedBy").isJsonNull()) && !jsonObj.get("updatedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `updatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("updatedBy").toString())); - } - // validate the required field `status` - StatusEventStatus.validateJsonElement(jsonObj.get("status")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StatusEvent.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StatusEvent' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StatusEvent.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StatusEvent value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StatusEvent read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StatusEvent given an JSON string - * - * @param jsonString JSON string - * @return An instance of StatusEvent - * @throws IOException if the JSON string is invalid with respect to StatusEvent - */ - public static StatusEvent fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StatusEvent.class); - } - - /** - * Convert an instance of StatusEvent to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/StatusEventStatus.java b/src/main/java/org/openapitools/client/model/StatusEventStatus.java deleted file mode 100644 index 3fd5ecc9..00000000 --- a/src/main/java/org/openapitools/client/model/StatusEventStatus.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CheckDepositStatus; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * StatusEventStatus - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StatusEventStatus { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private CheckDepositStatus type; - - public StatusEventStatus() { - } - - public StatusEventStatus type(CheckDepositStatus type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public CheckDepositStatus getType() { - return type; - } - - - public void setType(CheckDepositStatus type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StatusEventStatus statusEventStatus = (StatusEventStatus) o; - return Objects.equals(this.type, statusEventStatus.type); - } - - @Override - public int hashCode() { - return Objects.hash(type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StatusEventStatus {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to StatusEventStatus - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!StatusEventStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StatusEventStatus is not found in the empty JSON string", StatusEventStatus.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!StatusEventStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StatusEventStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StatusEventStatus.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StatusEventStatus' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StatusEventStatus.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StatusEventStatus value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StatusEventStatus read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StatusEventStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of StatusEventStatus - * @throws IOException if the JSON string is invalid with respect to StatusEventStatus - */ - public static StatusEventStatus fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StatusEventStatus.class); - } - - /** - * Convert an instance of StatusEventStatus to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/StopPayment.java b/src/main/java/org/openapitools/client/model/StopPayment.java deleted file mode 100644 index a1020147..00000000 --- a/src/main/java/org/openapitools/client/model/StopPayment.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.StopPaymentAttributes; -import org.openapitools.client.model.StopPaymentRelationships; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * StopPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StopPayment { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "stopPayment"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private StopPaymentAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private StopPaymentRelationships relationships; - - public StopPayment() { - } - - public StopPayment type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public StopPayment id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public StopPayment attributes(StopPaymentAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public StopPaymentAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(StopPaymentAttributes attributes) { - this.attributes = attributes; - } - - - public StopPayment relationships(StopPaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public StopPaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(StopPaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopPayment stopPayment = (StopPayment) o; - return Objects.equals(this.type, stopPayment.type) && - Objects.equals(this.id, stopPayment.id) && - Objects.equals(this.attributes, stopPayment.attributes) && - Objects.equals(this.relationships, stopPayment.relationships); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, attributes, relationships); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StopPayment {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to StopPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!StopPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StopPayment is not found in the empty JSON string", StopPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!StopPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StopPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StopPayment.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - // validate the required field `attributes` - StopPaymentAttributes.validateJsonElement(jsonObj.get("attributes")); - // validate the required field `relationships` - StopPaymentRelationships.validateJsonElement(jsonObj.get("relationships")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StopPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StopPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StopPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StopPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StopPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StopPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of StopPayment - * @throws IOException if the JSON string is invalid with respect to StopPayment - */ - public static StopPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StopPayment.class); - } - - /** - * Convert an instance of StopPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/StopPaymentAttributes.java b/src/main/java/org/openapitools/client/model/StopPaymentAttributes.java deleted file mode 100644 index 7a4defa0..00000000 --- a/src/main/java/org/openapitools/client/model/StopPaymentAttributes.java +++ /dev/null @@ -1,411 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * StopPaymentAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StopPaymentAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - ACTIVE("Active"), - - DISABLED("Disabled"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_CHECK_NUMBER = "checkNumber"; - @SerializedName(SERIALIZED_NAME_CHECK_NUMBER) - private String checkNumber; - - public StopPaymentAttributes() { - } - - public StopPaymentAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public StopPaymentAttributes updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public StopPaymentAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public StopPaymentAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public StopPaymentAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public StopPaymentAttributes checkNumber(String checkNumber) { - - this.checkNumber = checkNumber; - return this; - } - - /** - * Get checkNumber - * @return checkNumber - **/ - @javax.annotation.Nonnull - public String getCheckNumber() { - return checkNumber; - } - - - public void setCheckNumber(String checkNumber) { - this.checkNumber = checkNumber; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopPaymentAttributes stopPaymentAttributes = (StopPaymentAttributes) o; - return Objects.equals(this.createdAt, stopPaymentAttributes.createdAt) && - Objects.equals(this.updatedAt, stopPaymentAttributes.updatedAt) && - Objects.equals(this.amount, stopPaymentAttributes.amount) && - Objects.equals(this.status, stopPaymentAttributes.status) && - Objects.equals(this.tags, stopPaymentAttributes.tags) && - Objects.equals(this.checkNumber, stopPaymentAttributes.checkNumber); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, updatedAt, amount, status, tags, checkNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StopPaymentAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" checkNumber: ").append(toIndentedString(checkNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("amount"); - openapiFields.add("status"); - openapiFields.add("tags"); - openapiFields.add("checkNumber"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("updatedAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("checkNumber"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to StopPaymentAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!StopPaymentAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StopPaymentAttributes is not found in the empty JSON string", StopPaymentAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!StopPaymentAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StopPaymentAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StopPaymentAttributes.openapiRequiredFields) { - 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("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())); - } - if (!jsonObj.get("checkNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `checkNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("checkNumber").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StopPaymentAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StopPaymentAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StopPaymentAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StopPaymentAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StopPaymentAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StopPaymentAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of StopPaymentAttributes - * @throws IOException if the JSON string is invalid with respect to StopPaymentAttributes - */ - public static StopPaymentAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StopPaymentAttributes.class); - } - - /** - * Convert an instance of StopPaymentAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/StopPaymentListResponse.java b/src/main/java/org/openapitools/client/model/StopPaymentListResponse.java deleted file mode 100644 index f2b30678..00000000 --- a/src/main/java/org/openapitools/client/model/StopPaymentListResponse.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.StopPayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * StopPaymentListResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StopPaymentListResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public StopPaymentListResponse() { - } - - public StopPaymentListResponse data(List data) { - - this.data = data; - return this; - } - - public StopPaymentListResponse addDataItem(StopPayment dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopPaymentListResponse stopPaymentListResponse = (StopPaymentListResponse) o; - return Objects.equals(this.data, stopPaymentListResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StopPaymentListResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to StopPaymentListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!StopPaymentListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StopPaymentListResponse is not found in the empty JSON string", StopPaymentListResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!StopPaymentListResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StopPaymentListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - StopPayment.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StopPaymentListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StopPaymentListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StopPaymentListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StopPaymentListResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StopPaymentListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StopPaymentListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of StopPaymentListResponse - * @throws IOException if the JSON string is invalid with respect to StopPaymentListResponse - */ - public static StopPaymentListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StopPaymentListResponse.class); - } - - /** - * Convert an instance of StopPaymentListResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/StopPaymentRelationships.java b/src/main/java/org/openapitools/client/model/StopPaymentRelationships.java deleted file mode 100644 index 51a7ea6d..00000000 --- a/src/main/java/org/openapitools/client/model/StopPaymentRelationships.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CustomersRelationship; -import org.openapitools.client.model.ReceivedPaymentRelationshipsCustomer; -import org.openapitools.client.model.RecurringAchPaymentRelationshipsAccount; -import org.openapitools.client.model.StopPaymentRelationshipsCheckPayments; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * StopPaymentRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StopPaymentRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private RecurringAchPaymentRelationshipsAccount account; - - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private ReceivedPaymentRelationshipsCustomer customer; - - public static final String SERIALIZED_NAME_CUSTOMERS = "customers"; - @SerializedName(SERIALIZED_NAME_CUSTOMERS) - private CustomersRelationship customers; - - public static final String SERIALIZED_NAME_CHECK_PAYMENTS = "checkPayments"; - @SerializedName(SERIALIZED_NAME_CHECK_PAYMENTS) - private StopPaymentRelationshipsCheckPayments checkPayments; - - public StopPaymentRelationships() { - } - - public StopPaymentRelationships account(RecurringAchPaymentRelationshipsAccount account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public RecurringAchPaymentRelationshipsAccount getAccount() { - return account; - } - - - public void setAccount(RecurringAchPaymentRelationshipsAccount account) { - this.account = account; - } - - - public StopPaymentRelationships customer(ReceivedPaymentRelationshipsCustomer customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nonnull - public ReceivedPaymentRelationshipsCustomer getCustomer() { - return customer; - } - - - public void setCustomer(ReceivedPaymentRelationshipsCustomer customer) { - this.customer = customer; - } - - - public StopPaymentRelationships customers(CustomersRelationship customers) { - - this.customers = customers; - return this; - } - - /** - * Get customers - * @return customers - **/ - @javax.annotation.Nullable - public CustomersRelationship getCustomers() { - return customers; - } - - - public void setCustomers(CustomersRelationship customers) { - this.customers = customers; - } - - - public StopPaymentRelationships checkPayments(StopPaymentRelationshipsCheckPayments checkPayments) { - - this.checkPayments = checkPayments; - return this; - } - - /** - * Get checkPayments - * @return checkPayments - **/ - @javax.annotation.Nullable - public StopPaymentRelationshipsCheckPayments getCheckPayments() { - return checkPayments; - } - - - public void setCheckPayments(StopPaymentRelationshipsCheckPayments checkPayments) { - this.checkPayments = checkPayments; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopPaymentRelationships stopPaymentRelationships = (StopPaymentRelationships) o; - return Objects.equals(this.account, stopPaymentRelationships.account) && - Objects.equals(this.customer, stopPaymentRelationships.customer) && - Objects.equals(this.customers, stopPaymentRelationships.customers) && - Objects.equals(this.checkPayments, stopPaymentRelationships.checkPayments); - } - - @Override - public int hashCode() { - return Objects.hash(account, customer, customers, checkPayments); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StopPaymentRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" customers: ").append(toIndentedString(customers)).append("\n"); - sb.append(" checkPayments: ").append(toIndentedString(checkPayments)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - openapiFields.add("customer"); - openapiFields.add("customers"); - openapiFields.add("checkPayments"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account"); - openapiRequiredFields.add("customer"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to StopPaymentRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!StopPaymentRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StopPaymentRelationships is not found in the empty JSON string", StopPaymentRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!StopPaymentRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StopPaymentRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StopPaymentRelationships.openapiRequiredFields) { - 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(); - // validate the required field `account` - RecurringAchPaymentRelationshipsAccount.validateJsonElement(jsonObj.get("account")); - // validate the required field `customer` - ReceivedPaymentRelationshipsCustomer.validateJsonElement(jsonObj.get("customer")); - // validate the optional field `customers` - if (jsonObj.get("customers") != null && !jsonObj.get("customers").isJsonNull()) { - CustomersRelationship.validateJsonElement(jsonObj.get("customers")); - } - // validate the optional field `checkPayments` - if (jsonObj.get("checkPayments") != null && !jsonObj.get("checkPayments").isJsonNull()) { - StopPaymentRelationshipsCheckPayments.validateJsonElement(jsonObj.get("checkPayments")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StopPaymentRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StopPaymentRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StopPaymentRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StopPaymentRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StopPaymentRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StopPaymentRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of StopPaymentRelationships - * @throws IOException if the JSON string is invalid with respect to StopPaymentRelationships - */ - public static StopPaymentRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StopPaymentRelationships.class); - } - - /** - * Convert an instance of StopPaymentRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/StopPaymentRelationshipsCheckPayments.java b/src/main/java/org/openapitools/client/model/StopPaymentRelationshipsCheckPayments.java deleted file mode 100644 index d68adcac..00000000 --- a/src/main/java/org/openapitools/client/model/StopPaymentRelationshipsCheckPayments.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.StopPaymentRelationshipsCheckPaymentsDataInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * StopPaymentRelationshipsCheckPayments - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StopPaymentRelationshipsCheckPayments { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); - - public StopPaymentRelationshipsCheckPayments() { - } - - public StopPaymentRelationshipsCheckPayments data(List data) { - - this.data = data; - return this; - } - - public StopPaymentRelationshipsCheckPayments addDataItem(StopPaymentRelationshipsCheckPaymentsDataInner dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopPaymentRelationshipsCheckPayments stopPaymentRelationshipsCheckPayments = (StopPaymentRelationshipsCheckPayments) o; - return Objects.equals(this.data, stopPaymentRelationshipsCheckPayments.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StopPaymentRelationshipsCheckPayments {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to StopPaymentRelationshipsCheckPayments - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!StopPaymentRelationshipsCheckPayments.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StopPaymentRelationshipsCheckPayments is not found in the empty JSON string", StopPaymentRelationshipsCheckPayments.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!StopPaymentRelationshipsCheckPayments.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StopPaymentRelationshipsCheckPayments` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StopPaymentRelationshipsCheckPayments.openapiRequiredFields) { - 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(); - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - StopPaymentRelationshipsCheckPaymentsDataInner.validateJsonElement(jsonArraydata.get(i)); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StopPaymentRelationshipsCheckPayments.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StopPaymentRelationshipsCheckPayments' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StopPaymentRelationshipsCheckPayments.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StopPaymentRelationshipsCheckPayments value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StopPaymentRelationshipsCheckPayments read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StopPaymentRelationshipsCheckPayments given an JSON string - * - * @param jsonString JSON string - * @return An instance of StopPaymentRelationshipsCheckPayments - * @throws IOException if the JSON string is invalid with respect to StopPaymentRelationshipsCheckPayments - */ - public static StopPaymentRelationshipsCheckPayments fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StopPaymentRelationshipsCheckPayments.class); - } - - /** - * Convert an instance of StopPaymentRelationshipsCheckPayments to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/StopPaymentRelationshipsCheckPaymentsDataInner.java b/src/main/java/org/openapitools/client/model/StopPaymentRelationshipsCheckPaymentsDataInner.java deleted file mode 100644 index 61b852e4..00000000 --- a/src/main/java/org/openapitools/client/model/StopPaymentRelationshipsCheckPaymentsDataInner.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * StopPaymentRelationshipsCheckPaymentsDataInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StopPaymentRelationshipsCheckPaymentsDataInner { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "checkPayment"; - - public StopPaymentRelationshipsCheckPaymentsDataInner() { - } - - public StopPaymentRelationshipsCheckPaymentsDataInner id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public StopPaymentRelationshipsCheckPaymentsDataInner type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopPaymentRelationshipsCheckPaymentsDataInner stopPaymentRelationshipsCheckPaymentsDataInner = (StopPaymentRelationshipsCheckPaymentsDataInner) o; - return Objects.equals(this.id, stopPaymentRelationshipsCheckPaymentsDataInner.id) && - Objects.equals(this.type, stopPaymentRelationshipsCheckPaymentsDataInner.type); - } - - @Override - public int hashCode() { - return Objects.hash(id, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StopPaymentRelationshipsCheckPaymentsDataInner {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to StopPaymentRelationshipsCheckPaymentsDataInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!StopPaymentRelationshipsCheckPaymentsDataInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StopPaymentRelationshipsCheckPaymentsDataInner is not found in the empty JSON string", StopPaymentRelationshipsCheckPaymentsDataInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!StopPaymentRelationshipsCheckPaymentsDataInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StopPaymentRelationshipsCheckPaymentsDataInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - 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())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StopPaymentRelationshipsCheckPaymentsDataInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StopPaymentRelationshipsCheckPaymentsDataInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StopPaymentRelationshipsCheckPaymentsDataInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StopPaymentRelationshipsCheckPaymentsDataInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StopPaymentRelationshipsCheckPaymentsDataInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StopPaymentRelationshipsCheckPaymentsDataInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of StopPaymentRelationshipsCheckPaymentsDataInner - * @throws IOException if the JSON string is invalid with respect to StopPaymentRelationshipsCheckPaymentsDataInner - */ - public static StopPaymentRelationshipsCheckPaymentsDataInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StopPaymentRelationshipsCheckPaymentsDataInner.class); - } - - /** - * Convert an instance of StopPaymentRelationshipsCheckPaymentsDataInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/StopPaymentResponse.java b/src/main/java/org/openapitools/client/model/StopPaymentResponse.java deleted file mode 100644 index 694a96ae..00000000 --- a/src/main/java/org/openapitools/client/model/StopPaymentResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.StopPayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * StopPaymentResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StopPaymentResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private StopPayment data; - - public StopPaymentResponse() { - } - - public StopPaymentResponse data(StopPayment data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public StopPayment getData() { - return data; - } - - - public void setData(StopPayment data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StopPaymentResponse stopPaymentResponse = (StopPaymentResponse) o; - return Objects.equals(this.data, stopPaymentResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StopPaymentResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to StopPaymentResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!StopPaymentResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StopPaymentResponse is not found in the empty JSON string", StopPaymentResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!StopPaymentResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StopPaymentResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - StopPayment.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StopPaymentResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StopPaymentResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StopPaymentResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StopPaymentResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StopPaymentResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StopPaymentResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of StopPaymentResponse - * @throws IOException if the JSON string is invalid with respect to StopPaymentResponse - */ - public static StopPaymentResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StopPaymentResponse.class); - } - - /** - * Convert an instance of StopPaymentResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Transaction.java b/src/main/java/org/openapitools/client/model/Transaction.java deleted file mode 100644 index 190ca09f..00000000 --- a/src/main/java/org/openapitools/client/model/Transaction.java +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Transaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Transaction { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - protected String type; - - public Transaction() { - this.type = this.getClass().getSimpleName(); - } - - public Transaction id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public Transaction type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Transaction transaction = (Transaction) o; - return Objects.equals(this.id, transaction.id) && - Objects.equals(this.type, transaction.type); - } - - @Override - public int hashCode() { - return Objects.hash(id, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Transaction {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Transaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Transaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Transaction is not found in the empty JSON string", Transaction.openapiRequiredFields.toString())); - } - } - - String discriminatorValue = jsonElement.getAsJsonObject().get("type").getAsString(); - switch (discriminatorValue) { - case "accountLowBalanceClosureTransaction": - AccountLowBalanceClosureTransaction.validateJsonElement(jsonElement); - break; - case "adjustmentTransaction": - AdjustmentTransaction.validateJsonElement(jsonElement); - break; - case "atmTransaction": - AtmTransaction.validateJsonElement(jsonElement); - break; - case "bankRepaymentTransaction": - BankRepaymentTransaction.validateJsonElement(jsonElement); - break; - case "billPayTransaction": - BillPayTransaction.validateJsonElement(jsonElement); - break; - case "bookTransaction": - BookTransaction.validateJsonElement(jsonElement); - break; - case "cardTransaction": - CardTransaction.validateJsonElement(jsonElement); - break; - case "cashDepositTransaction": - CashDepositTransaction.validateJsonElement(jsonElement); - break; - case "chargebackTransaction": - ChargebackTransaction.validateJsonElement(jsonElement); - break; - case "checkDepositTransaction": - CheckDepositTransaction.validateJsonElement(jsonElement); - break; - case "checkPaymentTransaction": - CheckPaymentTransaction.validateJsonElement(jsonElement); - break; - case "customerRepaymentReturnedTransaction": - CustomerRepaymentReturnedTransaction.validateJsonElement(jsonElement); - break; - case "customerRepaymentTransaction": - CustomerRepaymentTransaction.validateJsonElement(jsonElement); - break; - case "dishonoredAchTransaction": - DishonoredAchTransaction.validateJsonElement(jsonElement); - break; - case "disputeSettlementTransaction": - DisputeSettlementTransaction.validateJsonElement(jsonElement); - break; - case "disputeTransaction": - DisputeTransaction.validateJsonElement(jsonElement); - break; - case "feeTransaction": - FeeTransaction.validateJsonElement(jsonElement); - break; - case "interchangeTransaction": - InterchangeTransaction.validateJsonElement(jsonElement); - break; - case "interestShareTransaction": - InterestShareTransaction.validateJsonElement(jsonElement); - break; - case "interestTransaction": - InterestTransaction.validateJsonElement(jsonElement); - break; - case "negativeBalanceCoverageTransaction": - NegativeBalanceCoverageTransaction.validateJsonElement(jsonElement); - break; - case "originatedAchTransaction": - OriginatedAchTransaction.validateJsonElement(jsonElement); - break; - case "paymentAdvanceTransaction": - PaymentAdvanceTransaction.validateJsonElement(jsonElement); - break; - case "purchaseTransaction": - PurchaseTransaction.validateJsonElement(jsonElement); - break; - case "receivedAchTransaction": - ReceivedAchTransaction.validateJsonElement(jsonElement); - break; - case "releaseTransaction": - ReleaseTransaction.validateJsonElement(jsonElement); - break; - case "repaidPaymentAdvanceTransaction": - RepaidPaymentAdvanceTransaction.validateJsonElement(jsonElement); - break; - case "returnedAchTransaction": - ReturnedAchTransaction.validateJsonElement(jsonElement); - break; - case "returnedCheckDepositTransaction": - ReturnedCheckDepositTransaction.validateJsonElement(jsonElement); - break; - case "returnedCheckPaymentTransaction": - ReturnedCheckPaymentTransaction.validateJsonElement(jsonElement); - break; - case "returnedReceivedAchTransaction": - ReturnedReceivedAchTransaction.validateJsonElement(jsonElement); - break; - case "reversalTransaction": - ReversalTransaction.validateJsonElement(jsonElement); - break; - case "rewardTransaction": - RewardTransaction.validateJsonElement(jsonElement); - break; - case "settlementTransaction": - SettlementTransaction.validateJsonElement(jsonElement); - break; - case "sponsoredInterestTransaction": - SponsoredInterestTransaction.validateJsonElement(jsonElement); - break; - case "wireTransaction": - WireTransaction.validateJsonElement(jsonElement); - break; - default: - throw new IllegalArgumentException(String.format("The value of the `type` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); - } - } - - - /** - * Create an instance of Transaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of Transaction - * @throws IOException if the JSON string is invalid with respect to Transaction - */ - public static Transaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Transaction.class); - } - - /** - * Convert an instance of Transaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/TransactionRelationship.java b/src/main/java/org/openapitools/client/model/TransactionRelationship.java deleted file mode 100644 index deb9c323..00000000 --- a/src/main/java/org/openapitools/client/model/TransactionRelationship.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReceivedPaymentRelationshipsReceivePaymentTransactionData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * TransactionRelationship - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class TransactionRelationship { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ReceivedPaymentRelationshipsReceivePaymentTransactionData data; - - public TransactionRelationship() { - } - - public TransactionRelationship data(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public ReceivedPaymentRelationshipsReceivePaymentTransactionData getData() { - return data; - } - - - public void setData(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TransactionRelationship transactionRelationship = (TransactionRelationship) o; - return Objects.equals(this.data, transactionRelationship.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TransactionRelationship {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TransactionRelationship - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TransactionRelationship.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TransactionRelationship is not found in the empty JSON string", TransactionRelationship.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TransactionRelationship.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TransactionRelationship` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : TransactionRelationship.openapiRequiredFields) { - 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(); - // validate the required field `data` - ReceivedPaymentRelationshipsReceivePaymentTransactionData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TransactionRelationship.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TransactionRelationship' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TransactionRelationship.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TransactionRelationship value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TransactionRelationship read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of TransactionRelationship given an JSON string - * - * @param jsonString JSON string - * @return An instance of TransactionRelationship - * @throws IOException if the JSON string is invalid with respect to TransactionRelationship - */ - public static TransactionRelationship fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TransactionRelationship.class); - } - - /** - * Convert an instance of TransactionRelationship to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/TransactionRelationships.java b/src/main/java/org/openapitools/client/model/TransactionRelationships.java deleted file mode 100644 index b1e52377..00000000 --- a/src/main/java/org/openapitools/client/model/TransactionRelationships.java +++ /dev/null @@ -1,941 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AccountRelationship2; -import org.openapitools.client.model.AuthorizationRelationship; -import org.openapitools.client.model.AuthorizationRequestRelationship; -import org.openapitools.client.model.CardRelationship; -import org.openapitools.client.model.ChargebackRelationship; -import org.openapitools.client.model.CheckDepositRelationship; -import org.openapitools.client.model.CheckPaymentRelationship; -import org.openapitools.client.model.CounterpartyAccountRelationship1; -import org.openapitools.client.model.CounterpartyCustomerRelationship; -import org.openapitools.client.model.CustomerRelationship; -import org.openapitools.client.model.CustomersRelationship; -import org.openapitools.client.model.IncomingAchRelationship; -import org.openapitools.client.model.OrgRelationship; -import org.openapitools.client.model.PaymentRelationship; -import org.openapitools.client.model.ReceivedPaymentRelationship; -import org.openapitools.client.model.ReceivingAccountRelationship; -import org.openapitools.client.model.RecurringPaymentRelationship; -import org.openapitools.client.model.RelatedTransaction; -import org.openapitools.client.model.RelatedTransactionRelationship; -import org.openapitools.client.model.RepaymentRelationship; -import org.openapitools.client.model.ReturnedRelationship; -import org.openapitools.client.model.RewardRelationship; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * TransactionRelationships - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class TransactionRelationships { - public static final String SERIALIZED_NAME_ACCOUNT = "account"; - @SerializedName(SERIALIZED_NAME_ACCOUNT) - private AccountRelationship2 account; - - public static final String SERIALIZED_NAME_RECEIVING_ACCOUNT = "receivingAccount"; - @SerializedName(SERIALIZED_NAME_RECEIVING_ACCOUNT) - private ReceivingAccountRelationship receivingAccount; - - public static final String SERIALIZED_NAME_CUSTOMER = "customer"; - @SerializedName(SERIALIZED_NAME_CUSTOMER) - private CustomerRelationship customer; - - public static final String SERIALIZED_NAME_CUSTOMERS = "customers"; - @SerializedName(SERIALIZED_NAME_CUSTOMERS) - private CustomersRelationship customers; - - public static final String SERIALIZED_NAME_COUNTERPARTY_ACCOUNT = "counterpartyAccount"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_ACCOUNT) - private CounterpartyAccountRelationship1 counterpartyAccount; - - public static final String SERIALIZED_NAME_COUNTERPARTY_CUSTOMER = "counterpartyCustomer"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY_CUSTOMER) - private CounterpartyCustomerRelationship counterpartyCustomer; - - public static final String SERIALIZED_NAME_RELATED_TRANSACTION = "relatedTransaction"; - @SerializedName(SERIALIZED_NAME_RELATED_TRANSACTION) - private RelatedTransactionRelationship relatedTransaction; - - public static final String SERIALIZED_NAME_DISPUTED_TRANSACTION = "disputedTransaction"; - @SerializedName(SERIALIZED_NAME_DISPUTED_TRANSACTION) - private RelatedTransaction disputedTransaction; - - public static final String SERIALIZED_NAME_AUTHORIZATION = "authorization"; - @SerializedName(SERIALIZED_NAME_AUTHORIZATION) - private AuthorizationRelationship authorization; - - public static final String SERIALIZED_NAME_RETURNED = "returned"; - @SerializedName(SERIALIZED_NAME_RETURNED) - private ReturnedRelationship returned; - - public static final String SERIALIZED_NAME_PAYMENT = "payment"; - @SerializedName(SERIALIZED_NAME_PAYMENT) - private PaymentRelationship payment; - - public static final String SERIALIZED_NAME_CHECK_PAYMENT = "checkPayment"; - @SerializedName(SERIALIZED_NAME_CHECK_PAYMENT) - private CheckPaymentRelationship checkPayment; - - public static final String SERIALIZED_NAME_REPAYMENT = "repayment"; - @SerializedName(SERIALIZED_NAME_REPAYMENT) - private RepaymentRelationship repayment; - - public static final String SERIALIZED_NAME_RECURRING_PAYMENT = "recurringPayment"; - @SerializedName(SERIALIZED_NAME_RECURRING_PAYMENT) - private RecurringPaymentRelationship recurringPayment; - - public static final String SERIALIZED_NAME_ORG = "org"; - @SerializedName(SERIALIZED_NAME_ORG) - private OrgRelationship org; - - public static final String SERIALIZED_NAME_CARD = "card"; - @SerializedName(SERIALIZED_NAME_CARD) - private CardRelationship card; - - public static final String SERIALIZED_NAME_INCOMING_ACH = "incomingAch"; - @SerializedName(SERIALIZED_NAME_INCOMING_ACH) - private IncomingAchRelationship incomingAch; - - public static final String SERIALIZED_NAME_CHECK_DEPOSIT = "checkDeposit"; - @SerializedName(SERIALIZED_NAME_CHECK_DEPOSIT) - private CheckDepositRelationship checkDeposit; - - public static final String SERIALIZED_NAME_AUTHORIZATION_REQUEST = "authorizationRequest"; - @SerializedName(SERIALIZED_NAME_AUTHORIZATION_REQUEST) - private AuthorizationRequestRelationship authorizationRequest; - - public static final String SERIALIZED_NAME_PAYMENT_ADVANCE_TRANSACTION = "paymentAdvanceTransaction"; - @SerializedName(SERIALIZED_NAME_PAYMENT_ADVANCE_TRANSACTION) - private RelatedTransaction paymentAdvanceTransaction; - - public static final String SERIALIZED_NAME_RECEIVED_PAYMENT = "receivedPayment"; - @SerializedName(SERIALIZED_NAME_RECEIVED_PAYMENT) - private ReceivedPaymentRelationship receivedPayment; - - public static final String SERIALIZED_NAME_CHARGEBACK = "chargeback"; - @SerializedName(SERIALIZED_NAME_CHARGEBACK) - private ChargebackRelationship chargeback; - - public static final String SERIALIZED_NAME_REWARD = "reward"; - @SerializedName(SERIALIZED_NAME_REWARD) - private RewardRelationship reward; - - public TransactionRelationships() { - } - - public TransactionRelationships account(AccountRelationship2 account) { - - this.account = account; - return this; - } - - /** - * Get account - * @return account - **/ - @javax.annotation.Nonnull - public AccountRelationship2 getAccount() { - return account; - } - - - public void setAccount(AccountRelationship2 account) { - this.account = account; - } - - - public TransactionRelationships receivingAccount(ReceivingAccountRelationship receivingAccount) { - - this.receivingAccount = receivingAccount; - return this; - } - - /** - * Get receivingAccount - * @return receivingAccount - **/ - @javax.annotation.Nullable - public ReceivingAccountRelationship getReceivingAccount() { - return receivingAccount; - } - - - public void setReceivingAccount(ReceivingAccountRelationship receivingAccount) { - this.receivingAccount = receivingAccount; - } - - - public TransactionRelationships customer(CustomerRelationship customer) { - - this.customer = customer; - return this; - } - - /** - * Get customer - * @return customer - **/ - @javax.annotation.Nullable - public CustomerRelationship getCustomer() { - return customer; - } - - - public void setCustomer(CustomerRelationship customer) { - this.customer = customer; - } - - - public TransactionRelationships customers(CustomersRelationship customers) { - - this.customers = customers; - return this; - } - - /** - * Get customers - * @return customers - **/ - @javax.annotation.Nullable - public CustomersRelationship getCustomers() { - return customers; - } - - - public void setCustomers(CustomersRelationship customers) { - this.customers = customers; - } - - - public TransactionRelationships counterpartyAccount(CounterpartyAccountRelationship1 counterpartyAccount) { - - this.counterpartyAccount = counterpartyAccount; - return this; - } - - /** - * Get counterpartyAccount - * @return counterpartyAccount - **/ - @javax.annotation.Nullable - public CounterpartyAccountRelationship1 getCounterpartyAccount() { - return counterpartyAccount; - } - - - public void setCounterpartyAccount(CounterpartyAccountRelationship1 counterpartyAccount) { - this.counterpartyAccount = counterpartyAccount; - } - - - public TransactionRelationships counterpartyCustomer(CounterpartyCustomerRelationship counterpartyCustomer) { - - this.counterpartyCustomer = counterpartyCustomer; - return this; - } - - /** - * Get counterpartyCustomer - * @return counterpartyCustomer - **/ - @javax.annotation.Nullable - public CounterpartyCustomerRelationship getCounterpartyCustomer() { - return counterpartyCustomer; - } - - - public void setCounterpartyCustomer(CounterpartyCustomerRelationship counterpartyCustomer) { - this.counterpartyCustomer = counterpartyCustomer; - } - - - public TransactionRelationships relatedTransaction(RelatedTransactionRelationship relatedTransaction) { - - this.relatedTransaction = relatedTransaction; - return this; - } - - /** - * Get relatedTransaction - * @return relatedTransaction - **/ - @javax.annotation.Nullable - public RelatedTransactionRelationship getRelatedTransaction() { - return relatedTransaction; - } - - - public void setRelatedTransaction(RelatedTransactionRelationship relatedTransaction) { - this.relatedTransaction = relatedTransaction; - } - - - public TransactionRelationships disputedTransaction(RelatedTransaction disputedTransaction) { - - this.disputedTransaction = disputedTransaction; - return this; - } - - /** - * Get disputedTransaction - * @return disputedTransaction - **/ - @javax.annotation.Nullable - public RelatedTransaction getDisputedTransaction() { - return disputedTransaction; - } - - - public void setDisputedTransaction(RelatedTransaction disputedTransaction) { - this.disputedTransaction = disputedTransaction; - } - - - public TransactionRelationships authorization(AuthorizationRelationship authorization) { - - this.authorization = authorization; - return this; - } - - /** - * Get authorization - * @return authorization - **/ - @javax.annotation.Nullable - public AuthorizationRelationship getAuthorization() { - return authorization; - } - - - public void setAuthorization(AuthorizationRelationship authorization) { - this.authorization = authorization; - } - - - public TransactionRelationships returned(ReturnedRelationship returned) { - - this.returned = returned; - return this; - } - - /** - * Get returned - * @return returned - **/ - @javax.annotation.Nullable - public ReturnedRelationship getReturned() { - return returned; - } - - - public void setReturned(ReturnedRelationship returned) { - this.returned = returned; - } - - - public TransactionRelationships payment(PaymentRelationship payment) { - - this.payment = payment; - return this; - } - - /** - * Get payment - * @return payment - **/ - @javax.annotation.Nullable - public PaymentRelationship getPayment() { - return payment; - } - - - public void setPayment(PaymentRelationship payment) { - this.payment = payment; - } - - - public TransactionRelationships checkPayment(CheckPaymentRelationship checkPayment) { - - this.checkPayment = checkPayment; - return this; - } - - /** - * Get checkPayment - * @return checkPayment - **/ - @javax.annotation.Nullable - public CheckPaymentRelationship getCheckPayment() { - return checkPayment; - } - - - public void setCheckPayment(CheckPaymentRelationship checkPayment) { - this.checkPayment = checkPayment; - } - - - public TransactionRelationships repayment(RepaymentRelationship repayment) { - - this.repayment = repayment; - return this; - } - - /** - * Get repayment - * @return repayment - **/ - @javax.annotation.Nullable - public RepaymentRelationship getRepayment() { - return repayment; - } - - - public void setRepayment(RepaymentRelationship repayment) { - this.repayment = repayment; - } - - - public TransactionRelationships recurringPayment(RecurringPaymentRelationship recurringPayment) { - - this.recurringPayment = recurringPayment; - return this; - } - - /** - * Get recurringPayment - * @return recurringPayment - **/ - @javax.annotation.Nullable - public RecurringPaymentRelationship getRecurringPayment() { - return recurringPayment; - } - - - public void setRecurringPayment(RecurringPaymentRelationship recurringPayment) { - this.recurringPayment = recurringPayment; - } - - - public TransactionRelationships org(OrgRelationship org) { - - this.org = org; - return this; - } - - /** - * Get org - * @return org - **/ - @javax.annotation.Nullable - public OrgRelationship getOrg() { - return org; - } - - - public void setOrg(OrgRelationship org) { - this.org = org; - } - - - public TransactionRelationships card(CardRelationship card) { - - this.card = card; - return this; - } - - /** - * Get card - * @return card - **/ - @javax.annotation.Nullable - public CardRelationship getCard() { - return card; - } - - - public void setCard(CardRelationship card) { - this.card = card; - } - - - public TransactionRelationships incomingAch(IncomingAchRelationship incomingAch) { - - this.incomingAch = incomingAch; - return this; - } - - /** - * Get incomingAch - * @return incomingAch - **/ - @javax.annotation.Nullable - public IncomingAchRelationship getIncomingAch() { - return incomingAch; - } - - - public void setIncomingAch(IncomingAchRelationship incomingAch) { - this.incomingAch = incomingAch; - } - - - public TransactionRelationships checkDeposit(CheckDepositRelationship checkDeposit) { - - this.checkDeposit = checkDeposit; - return this; - } - - /** - * Get checkDeposit - * @return checkDeposit - **/ - @javax.annotation.Nullable - public CheckDepositRelationship getCheckDeposit() { - return checkDeposit; - } - - - public void setCheckDeposit(CheckDepositRelationship checkDeposit) { - this.checkDeposit = checkDeposit; - } - - - public TransactionRelationships authorizationRequest(AuthorizationRequestRelationship authorizationRequest) { - - this.authorizationRequest = authorizationRequest; - return this; - } - - /** - * Get authorizationRequest - * @return authorizationRequest - **/ - @javax.annotation.Nullable - public AuthorizationRequestRelationship getAuthorizationRequest() { - return authorizationRequest; - } - - - public void setAuthorizationRequest(AuthorizationRequestRelationship authorizationRequest) { - this.authorizationRequest = authorizationRequest; - } - - - public TransactionRelationships paymentAdvanceTransaction(RelatedTransaction paymentAdvanceTransaction) { - - this.paymentAdvanceTransaction = paymentAdvanceTransaction; - return this; - } - - /** - * Get paymentAdvanceTransaction - * @return paymentAdvanceTransaction - **/ - @javax.annotation.Nullable - public RelatedTransaction getPaymentAdvanceTransaction() { - return paymentAdvanceTransaction; - } - - - public void setPaymentAdvanceTransaction(RelatedTransaction paymentAdvanceTransaction) { - this.paymentAdvanceTransaction = paymentAdvanceTransaction; - } - - - public TransactionRelationships receivedPayment(ReceivedPaymentRelationship receivedPayment) { - - this.receivedPayment = receivedPayment; - return this; - } - - /** - * Get receivedPayment - * @return receivedPayment - **/ - @javax.annotation.Nullable - public ReceivedPaymentRelationship getReceivedPayment() { - return receivedPayment; - } - - - public void setReceivedPayment(ReceivedPaymentRelationship receivedPayment) { - this.receivedPayment = receivedPayment; - } - - - public TransactionRelationships chargeback(ChargebackRelationship chargeback) { - - this.chargeback = chargeback; - return this; - } - - /** - * Get chargeback - * @return chargeback - **/ - @javax.annotation.Nullable - public ChargebackRelationship getChargeback() { - return chargeback; - } - - - public void setChargeback(ChargebackRelationship chargeback) { - this.chargeback = chargeback; - } - - - public TransactionRelationships reward(RewardRelationship reward) { - - this.reward = reward; - return this; - } - - /** - * Get reward - * @return reward - **/ - @javax.annotation.Nullable - public RewardRelationship getReward() { - return reward; - } - - - public void setReward(RewardRelationship reward) { - this.reward = reward; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TransactionRelationships transactionRelationships = (TransactionRelationships) o; - return Objects.equals(this.account, transactionRelationships.account) && - Objects.equals(this.receivingAccount, transactionRelationships.receivingAccount) && - Objects.equals(this.customer, transactionRelationships.customer) && - Objects.equals(this.customers, transactionRelationships.customers) && - Objects.equals(this.counterpartyAccount, transactionRelationships.counterpartyAccount) && - Objects.equals(this.counterpartyCustomer, transactionRelationships.counterpartyCustomer) && - Objects.equals(this.relatedTransaction, transactionRelationships.relatedTransaction) && - Objects.equals(this.disputedTransaction, transactionRelationships.disputedTransaction) && - Objects.equals(this.authorization, transactionRelationships.authorization) && - Objects.equals(this.returned, transactionRelationships.returned) && - Objects.equals(this.payment, transactionRelationships.payment) && - Objects.equals(this.checkPayment, transactionRelationships.checkPayment) && - Objects.equals(this.repayment, transactionRelationships.repayment) && - Objects.equals(this.recurringPayment, transactionRelationships.recurringPayment) && - Objects.equals(this.org, transactionRelationships.org) && - Objects.equals(this.card, transactionRelationships.card) && - Objects.equals(this.incomingAch, transactionRelationships.incomingAch) && - Objects.equals(this.checkDeposit, transactionRelationships.checkDeposit) && - Objects.equals(this.authorizationRequest, transactionRelationships.authorizationRequest) && - Objects.equals(this.paymentAdvanceTransaction, transactionRelationships.paymentAdvanceTransaction) && - Objects.equals(this.receivedPayment, transactionRelationships.receivedPayment) && - Objects.equals(this.chargeback, transactionRelationships.chargeback) && - Objects.equals(this.reward, transactionRelationships.reward); - } - - @Override - public int hashCode() { - return Objects.hash(account, receivingAccount, customer, customers, counterpartyAccount, counterpartyCustomer, relatedTransaction, disputedTransaction, authorization, returned, payment, checkPayment, repayment, recurringPayment, org, card, incomingAch, checkDeposit, authorizationRequest, paymentAdvanceTransaction, receivedPayment, chargeback, reward); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TransactionRelationships {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" receivingAccount: ").append(toIndentedString(receivingAccount)).append("\n"); - sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); - sb.append(" customers: ").append(toIndentedString(customers)).append("\n"); - sb.append(" counterpartyAccount: ").append(toIndentedString(counterpartyAccount)).append("\n"); - sb.append(" counterpartyCustomer: ").append(toIndentedString(counterpartyCustomer)).append("\n"); - sb.append(" relatedTransaction: ").append(toIndentedString(relatedTransaction)).append("\n"); - sb.append(" disputedTransaction: ").append(toIndentedString(disputedTransaction)).append("\n"); - sb.append(" authorization: ").append(toIndentedString(authorization)).append("\n"); - sb.append(" returned: ").append(toIndentedString(returned)).append("\n"); - sb.append(" payment: ").append(toIndentedString(payment)).append("\n"); - sb.append(" checkPayment: ").append(toIndentedString(checkPayment)).append("\n"); - sb.append(" repayment: ").append(toIndentedString(repayment)).append("\n"); - sb.append(" recurringPayment: ").append(toIndentedString(recurringPayment)).append("\n"); - sb.append(" org: ").append(toIndentedString(org)).append("\n"); - sb.append(" card: ").append(toIndentedString(card)).append("\n"); - sb.append(" incomingAch: ").append(toIndentedString(incomingAch)).append("\n"); - sb.append(" checkDeposit: ").append(toIndentedString(checkDeposit)).append("\n"); - sb.append(" authorizationRequest: ").append(toIndentedString(authorizationRequest)).append("\n"); - sb.append(" paymentAdvanceTransaction: ").append(toIndentedString(paymentAdvanceTransaction)).append("\n"); - sb.append(" receivedPayment: ").append(toIndentedString(receivedPayment)).append("\n"); - sb.append(" chargeback: ").append(toIndentedString(chargeback)).append("\n"); - sb.append(" reward: ").append(toIndentedString(reward)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account"); - openapiFields.add("receivingAccount"); - openapiFields.add("customer"); - openapiFields.add("customers"); - openapiFields.add("counterpartyAccount"); - openapiFields.add("counterpartyCustomer"); - openapiFields.add("relatedTransaction"); - openapiFields.add("disputedTransaction"); - openapiFields.add("authorization"); - openapiFields.add("returned"); - openapiFields.add("payment"); - openapiFields.add("checkPayment"); - openapiFields.add("repayment"); - openapiFields.add("recurringPayment"); - openapiFields.add("org"); - openapiFields.add("card"); - openapiFields.add("incomingAch"); - openapiFields.add("checkDeposit"); - openapiFields.add("authorizationRequest"); - openapiFields.add("paymentAdvanceTransaction"); - openapiFields.add("receivedPayment"); - openapiFields.add("chargeback"); - openapiFields.add("reward"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TransactionRelationships - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TransactionRelationships.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TransactionRelationships is not found in the empty JSON string", TransactionRelationships.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TransactionRelationships.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TransactionRelationships` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : TransactionRelationships.openapiRequiredFields) { - 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(); - // validate the required field `account` - AccountRelationship2.validateJsonElement(jsonObj.get("account")); - // validate the optional field `receivingAccount` - if (jsonObj.get("receivingAccount") != null && !jsonObj.get("receivingAccount").isJsonNull()) { - ReceivingAccountRelationship.validateJsonElement(jsonObj.get("receivingAccount")); - } - // validate the optional field `customer` - if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { - CustomerRelationship.validateJsonElement(jsonObj.get("customer")); - } - // validate the optional field `customers` - if (jsonObj.get("customers") != null && !jsonObj.get("customers").isJsonNull()) { - CustomersRelationship.validateJsonElement(jsonObj.get("customers")); - } - // validate the optional field `counterpartyAccount` - if (jsonObj.get("counterpartyAccount") != null && !jsonObj.get("counterpartyAccount").isJsonNull()) { - CounterpartyAccountRelationship1.validateJsonElement(jsonObj.get("counterpartyAccount")); - } - // validate the optional field `counterpartyCustomer` - if (jsonObj.get("counterpartyCustomer") != null && !jsonObj.get("counterpartyCustomer").isJsonNull()) { - CounterpartyCustomerRelationship.validateJsonElement(jsonObj.get("counterpartyCustomer")); - } - // validate the optional field `relatedTransaction` - if (jsonObj.get("relatedTransaction") != null && !jsonObj.get("relatedTransaction").isJsonNull()) { - RelatedTransactionRelationship.validateJsonElement(jsonObj.get("relatedTransaction")); - } - // validate the optional field `disputedTransaction` - if (jsonObj.get("disputedTransaction") != null && !jsonObj.get("disputedTransaction").isJsonNull()) { - RelatedTransaction.validateJsonElement(jsonObj.get("disputedTransaction")); - } - // validate the optional field `authorization` - if (jsonObj.get("authorization") != null && !jsonObj.get("authorization").isJsonNull()) { - AuthorizationRelationship.validateJsonElement(jsonObj.get("authorization")); - } - // validate the optional field `returned` - if (jsonObj.get("returned") != null && !jsonObj.get("returned").isJsonNull()) { - ReturnedRelationship.validateJsonElement(jsonObj.get("returned")); - } - // validate the optional field `payment` - if (jsonObj.get("payment") != null && !jsonObj.get("payment").isJsonNull()) { - PaymentRelationship.validateJsonElement(jsonObj.get("payment")); - } - // validate the optional field `checkPayment` - if (jsonObj.get("checkPayment") != null && !jsonObj.get("checkPayment").isJsonNull()) { - CheckPaymentRelationship.validateJsonElement(jsonObj.get("checkPayment")); - } - // validate the optional field `repayment` - if (jsonObj.get("repayment") != null && !jsonObj.get("repayment").isJsonNull()) { - RepaymentRelationship.validateJsonElement(jsonObj.get("repayment")); - } - // validate the optional field `recurringPayment` - if (jsonObj.get("recurringPayment") != null && !jsonObj.get("recurringPayment").isJsonNull()) { - RecurringPaymentRelationship.validateJsonElement(jsonObj.get("recurringPayment")); - } - // validate the optional field `org` - if (jsonObj.get("org") != null && !jsonObj.get("org").isJsonNull()) { - OrgRelationship.validateJsonElement(jsonObj.get("org")); - } - // validate the optional field `card` - if (jsonObj.get("card") != null && !jsonObj.get("card").isJsonNull()) { - CardRelationship.validateJsonElement(jsonObj.get("card")); - } - // validate the optional field `incomingAch` - if (jsonObj.get("incomingAch") != null && !jsonObj.get("incomingAch").isJsonNull()) { - IncomingAchRelationship.validateJsonElement(jsonObj.get("incomingAch")); - } - // validate the optional field `checkDeposit` - if (jsonObj.get("checkDeposit") != null && !jsonObj.get("checkDeposit").isJsonNull()) { - CheckDepositRelationship.validateJsonElement(jsonObj.get("checkDeposit")); - } - // validate the optional field `authorizationRequest` - if (jsonObj.get("authorizationRequest") != null && !jsonObj.get("authorizationRequest").isJsonNull()) { - AuthorizationRequestRelationship.validateJsonElement(jsonObj.get("authorizationRequest")); - } - // validate the optional field `paymentAdvanceTransaction` - if (jsonObj.get("paymentAdvanceTransaction") != null && !jsonObj.get("paymentAdvanceTransaction").isJsonNull()) { - RelatedTransaction.validateJsonElement(jsonObj.get("paymentAdvanceTransaction")); - } - // validate the optional field `receivedPayment` - if (jsonObj.get("receivedPayment") != null && !jsonObj.get("receivedPayment").isJsonNull()) { - ReceivedPaymentRelationship.validateJsonElement(jsonObj.get("receivedPayment")); - } - // validate the optional field `chargeback` - if (jsonObj.get("chargeback") != null && !jsonObj.get("chargeback").isJsonNull()) { - ChargebackRelationship.validateJsonElement(jsonObj.get("chargeback")); - } - // validate the optional field `reward` - if (jsonObj.get("reward") != null && !jsonObj.get("reward").isJsonNull()) { - RewardRelationship.validateJsonElement(jsonObj.get("reward")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TransactionRelationships.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TransactionRelationships' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TransactionRelationships.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TransactionRelationships value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TransactionRelationships read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of TransactionRelationships given an JSON string - * - * @param jsonString JSON string - * @return An instance of TransactionRelationships - * @throws IOException if the JSON string is invalid with respect to TransactionRelationships - */ - public static TransactionRelationships fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TransactionRelationships.class); - } - - /** - * Convert an instance of TransactionRelationships to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/TrustApplication.java b/src/main/java/org/openapitools/client/model/TrustApplication.java deleted file mode 100644 index f8f54189..00000000 --- a/src/main/java/org/openapitools/client/model/TrustApplication.java +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Application; -import org.openapitools.client.model.ApplicationRelationships; -import org.openapitools.client.model.TrustApplicationAllOfAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * TrustApplication - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class TrustApplication extends Application { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private TrustApplicationAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private ApplicationRelationships relationships; - - public TrustApplication() { - this.type = this.getClass().getSimpleName(); - } - - public TrustApplication attributes(TrustApplicationAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public TrustApplicationAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(TrustApplicationAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public TrustApplication relationships(ApplicationRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public ApplicationRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(ApplicationRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TrustApplication trustApplication = (TrustApplication) o; - return Objects.equals(this.attributes, trustApplication.attributes) && - Objects.equals(this.relationships, trustApplication.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TrustApplication {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TrustApplication - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TrustApplication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TrustApplication is not found in the empty JSON string", TrustApplication.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TrustApplication.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TrustApplication` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : TrustApplication.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TrustApplication.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TrustApplication' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TrustApplication.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TrustApplication value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TrustApplication read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of TrustApplication given an JSON string - * - * @param jsonString JSON string - * @return An instance of TrustApplication - * @throws IOException if the JSON string is invalid with respect to TrustApplication - */ - public static TrustApplication fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TrustApplication.class); - } - - /** - * Convert an instance of TrustApplication to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/TrustApplicationAllOfAttributes.java b/src/main/java/org/openapitools/client/model/TrustApplicationAllOfAttributes.java deleted file mode 100644 index 0290de23..00000000 --- a/src/main/java/org/openapitools/client/model/TrustApplicationAllOfAttributes.java +++ /dev/null @@ -1,1127 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ApplicationStatus; -import org.openapitools.client.model.Grantor; -import org.openapitools.client.model.Revocability; -import org.openapitools.client.model.SourceOfFunds; -import org.openapitools.client.model.TrustContact; -import org.openapitools.client.model.Trustee; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * TrustApplicationAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class TrustApplicationAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private ApplicationStatus status; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - private String message; - - public static final String SERIALIZED_NAME_EVALUATION_OUTCOME = "evaluationOutcome"; - @SerializedName(SERIALIZED_NAME_EVALUATION_OUTCOME) - private String evaluationOutcome; - - public static final String SERIALIZED_NAME_EVALUATION_ID = "evaluationId"; - @SerializedName(SERIALIZED_NAME_EVALUATION_ID) - private String evaluationId; - - public static final String SERIALIZED_NAME_EVALUATION_ENTITY_ID = "evaluationEntityId"; - @SerializedName(SERIALIZED_NAME_EVALUATION_ENTITY_ID) - private String evaluationEntityId; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_DATE_OF_INCORPORATION = "dateOfIncorporation"; - @SerializedName(SERIALIZED_NAME_DATE_OF_INCORPORATION) - private LocalDate dateOfIncorporation; - - public static final String SERIALIZED_NAME_STATE_OF_INCORPORATION = "stateOfIncorporation"; - @SerializedName(SERIALIZED_NAME_STATE_OF_INCORPORATION) - private String stateOfIncorporation; - - public static final String SERIALIZED_NAME_REVOCABILITY = "revocability"; - @SerializedName(SERIALIZED_NAME_REVOCABILITY) - private Revocability revocability; - - public static final String SERIALIZED_NAME_SOURCE_OF_FUNDS = "sourceOfFunds"; - @SerializedName(SERIALIZED_NAME_SOURCE_OF_FUNDS) - private SourceOfFunds sourceOfFunds; - - public static final String SERIALIZED_NAME_TAX_ID = "taxId"; - @SerializedName(SERIALIZED_NAME_TAX_ID) - private String taxId; - - public static final String SERIALIZED_NAME_CONTACT = "contact"; - @SerializedName(SERIALIZED_NAME_CONTACT) - private TrustContact contact; - - public static final String SERIALIZED_NAME_TRUSTEES = "trustees"; - @SerializedName(SERIALIZED_NAME_TRUSTEES) - private List trustees; - - public static final String SERIALIZED_NAME_GRANTOR = "grantor"; - @SerializedName(SERIALIZED_NAME_GRANTOR) - private Grantor grantor; - - public static final String SERIALIZED_NAME_IP = "ip"; - @SerializedName(SERIALIZED_NAME_IP) - private String ip; - - /** - * Gets or Sets decisionMethod - */ - @JsonAdapter(DecisionMethodEnum.Adapter.class) - public enum DecisionMethodEnum { - MANUALLY("Manually"), - - AUTOMATICALLY("Automatically"); - - private String value; - - DecisionMethodEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DecisionMethodEnum fromValue(String value) { - for (DecisionMethodEnum b : DecisionMethodEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DecisionMethodEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DecisionMethodEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DecisionMethodEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DECISION_METHOD = "decisionMethod"; - @SerializedName(SERIALIZED_NAME_DECISION_METHOD) - private DecisionMethodEnum decisionMethod; - - public static final String SERIALIZED_NAME_DECISION_USER_ID = "decisionUserId"; - @SerializedName(SERIALIZED_NAME_DECISION_USER_ID) - private String decisionUserId; - - public static final String SERIALIZED_NAME_DECISION_REASON = "decisionReason"; - @SerializedName(SERIALIZED_NAME_DECISION_REASON) - private String decisionReason; - - public static final String SERIALIZED_NAME_DECISION_DATE_TIME = "decisionDateTime"; - @SerializedName(SERIALIZED_NAME_DECISION_DATE_TIME) - private OffsetDateTime decisionDateTime; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - /** - * Gets or Sets riskRate - */ - @JsonAdapter(RiskRateEnum.Adapter.class) - public enum RiskRateEnum { - LOW("low"), - - MEDIUM("medium"), - - HIGH("high"); - - private String value; - - RiskRateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static RiskRateEnum fromValue(String value) { - for (RiskRateEnum b : RiskRateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final RiskRateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public RiskRateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return RiskRateEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_RISK_RATE = "riskRate"; - @SerializedName(SERIALIZED_NAME_RISK_RATE) - private RiskRateEnum riskRate; - - public static final String SERIALIZED_NAME_EVALUATION_FLAGS = "evaluationFlags"; - @SerializedName(SERIALIZED_NAME_EVALUATION_FLAGS) - private List evaluationFlags; - - public static final String SERIALIZED_NAME_IP_LOCATION_DETAILS = "ipLocationDetails"; - @SerializedName(SERIALIZED_NAME_IP_LOCATION_DETAILS) - private Object ipLocationDetails; - - public static final String SERIALIZED_NAME_PHONE_LOCATION_DETAILS = "phoneLocationDetails"; - @SerializedName(SERIALIZED_NAME_PHONE_LOCATION_DETAILS) - private Object phoneLocationDetails; - - public static final String SERIALIZED_NAME_ARCHIVED = "archived"; - @SerializedName(SERIALIZED_NAME_ARCHIVED) - private Boolean archived; - - public TrustApplicationAllOfAttributes() { - } - - public TrustApplicationAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public TrustApplicationAllOfAttributes updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public TrustApplicationAllOfAttributes status(ApplicationStatus status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public ApplicationStatus getStatus() { - return status; - } - - - public void setStatus(ApplicationStatus status) { - this.status = status; - } - - - public TrustApplicationAllOfAttributes message(String message) { - - this.message = message; - return this; - } - - /** - * Get message - * @return message - **/ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - - public void setMessage(String message) { - this.message = message; - } - - - public TrustApplicationAllOfAttributes evaluationOutcome(String evaluationOutcome) { - - this.evaluationOutcome = evaluationOutcome; - return this; - } - - /** - * Get evaluationOutcome - * @return evaluationOutcome - **/ - @javax.annotation.Nullable - public String getEvaluationOutcome() { - return evaluationOutcome; - } - - - public void setEvaluationOutcome(String evaluationOutcome) { - this.evaluationOutcome = evaluationOutcome; - } - - - public TrustApplicationAllOfAttributes evaluationId(String evaluationId) { - - this.evaluationId = evaluationId; - return this; - } - - /** - * Get evaluationId - * @return evaluationId - **/ - @javax.annotation.Nullable - public String getEvaluationId() { - return evaluationId; - } - - - public void setEvaluationId(String evaluationId) { - this.evaluationId = evaluationId; - } - - - public TrustApplicationAllOfAttributes evaluationEntityId(String evaluationEntityId) { - - this.evaluationEntityId = evaluationEntityId; - return this; - } - - /** - * Get evaluationEntityId - * @return evaluationEntityId - **/ - @javax.annotation.Nullable - public String getEvaluationEntityId() { - return evaluationEntityId; - } - - - public void setEvaluationEntityId(String evaluationEntityId) { - this.evaluationEntityId = evaluationEntityId; - } - - - public TrustApplicationAllOfAttributes name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public TrustApplicationAllOfAttributes dateOfIncorporation(LocalDate dateOfIncorporation) { - - this.dateOfIncorporation = dateOfIncorporation; - return this; - } - - /** - * Get dateOfIncorporation - * @return dateOfIncorporation - **/ - @javax.annotation.Nullable - public LocalDate getDateOfIncorporation() { - return dateOfIncorporation; - } - - - public void setDateOfIncorporation(LocalDate dateOfIncorporation) { - this.dateOfIncorporation = dateOfIncorporation; - } - - - public TrustApplicationAllOfAttributes stateOfIncorporation(String stateOfIncorporation) { - - this.stateOfIncorporation = stateOfIncorporation; - return this; - } - - /** - * Get stateOfIncorporation - * @return stateOfIncorporation - **/ - @javax.annotation.Nonnull - public String getStateOfIncorporation() { - return stateOfIncorporation; - } - - - public void setStateOfIncorporation(String stateOfIncorporation) { - this.stateOfIncorporation = stateOfIncorporation; - } - - - public TrustApplicationAllOfAttributes revocability(Revocability revocability) { - - this.revocability = revocability; - return this; - } - - /** - * Get revocability - * @return revocability - **/ - @javax.annotation.Nullable - public Revocability getRevocability() { - return revocability; - } - - - public void setRevocability(Revocability revocability) { - this.revocability = revocability; - } - - - public TrustApplicationAllOfAttributes sourceOfFunds(SourceOfFunds sourceOfFunds) { - - this.sourceOfFunds = sourceOfFunds; - return this; - } - - /** - * Get sourceOfFunds - * @return sourceOfFunds - **/ - @javax.annotation.Nullable - public SourceOfFunds getSourceOfFunds() { - return sourceOfFunds; - } - - - public void setSourceOfFunds(SourceOfFunds sourceOfFunds) { - this.sourceOfFunds = sourceOfFunds; - } - - - public TrustApplicationAllOfAttributes taxId(String taxId) { - - this.taxId = taxId; - return this; - } - - /** - * Get taxId - * @return taxId - **/ - @javax.annotation.Nullable - public String getTaxId() { - return taxId; - } - - - public void setTaxId(String taxId) { - this.taxId = taxId; - } - - - public TrustApplicationAllOfAttributes contact(TrustContact contact) { - - this.contact = contact; - return this; - } - - /** - * Get contact - * @return contact - **/ - @javax.annotation.Nonnull - public TrustContact getContact() { - return contact; - } - - - public void setContact(TrustContact contact) { - this.contact = contact; - } - - - public TrustApplicationAllOfAttributes trustees(List trustees) { - - this.trustees = trustees; - return this; - } - - public TrustApplicationAllOfAttributes addTrusteesItem(Trustee trusteesItem) { - if (this.trustees == null) { - this.trustees = new ArrayList<>(); - } - this.trustees.add(trusteesItem); - return this; - } - - /** - * Get trustees - * @return trustees - **/ - @javax.annotation.Nullable - public List getTrustees() { - return trustees; - } - - - public void setTrustees(List trustees) { - this.trustees = trustees; - } - - - public TrustApplicationAllOfAttributes grantor(Grantor grantor) { - - this.grantor = grantor; - return this; - } - - /** - * Get grantor - * @return grantor - **/ - @javax.annotation.Nullable - public Grantor getGrantor() { - return grantor; - } - - - public void setGrantor(Grantor grantor) { - this.grantor = grantor; - } - - - public TrustApplicationAllOfAttributes ip(String ip) { - - this.ip = ip; - return this; - } - - /** - * Get ip - * @return ip - **/ - @javax.annotation.Nullable - public String getIp() { - return ip; - } - - - public void setIp(String ip) { - this.ip = ip; - } - - - public TrustApplicationAllOfAttributes decisionMethod(DecisionMethodEnum decisionMethod) { - - this.decisionMethod = decisionMethod; - return this; - } - - /** - * Get decisionMethod - * @return decisionMethod - **/ - @javax.annotation.Nullable - public DecisionMethodEnum getDecisionMethod() { - return decisionMethod; - } - - - public void setDecisionMethod(DecisionMethodEnum decisionMethod) { - this.decisionMethod = decisionMethod; - } - - - public TrustApplicationAllOfAttributes decisionUserId(String decisionUserId) { - - this.decisionUserId = decisionUserId; - return this; - } - - /** - * Get decisionUserId - * @return decisionUserId - **/ - @javax.annotation.Nullable - public String getDecisionUserId() { - return decisionUserId; - } - - - public void setDecisionUserId(String decisionUserId) { - this.decisionUserId = decisionUserId; - } - - - public TrustApplicationAllOfAttributes decisionReason(String decisionReason) { - - this.decisionReason = decisionReason; - return this; - } - - /** - * Get decisionReason - * @return decisionReason - **/ - @javax.annotation.Nullable - public String getDecisionReason() { - return decisionReason; - } - - - public void setDecisionReason(String decisionReason) { - this.decisionReason = decisionReason; - } - - - public TrustApplicationAllOfAttributes decisionDateTime(OffsetDateTime decisionDateTime) { - - this.decisionDateTime = decisionDateTime; - return this; - } - - /** - * Get decisionDateTime - * @return decisionDateTime - **/ - @javax.annotation.Nullable - public OffsetDateTime getDecisionDateTime() { - return decisionDateTime; - } - - - public void setDecisionDateTime(OffsetDateTime decisionDateTime) { - this.decisionDateTime = decisionDateTime; - } - - - public TrustApplicationAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public TrustApplicationAllOfAttributes riskRate(RiskRateEnum riskRate) { - - this.riskRate = riskRate; - return this; - } - - /** - * Get riskRate - * @return riskRate - **/ - @javax.annotation.Nullable - public RiskRateEnum getRiskRate() { - return riskRate; - } - - - public void setRiskRate(RiskRateEnum riskRate) { - this.riskRate = riskRate; - } - - - public TrustApplicationAllOfAttributes evaluationFlags(List evaluationFlags) { - - this.evaluationFlags = evaluationFlags; - return this; - } - - public TrustApplicationAllOfAttributes addEvaluationFlagsItem(String evaluationFlagsItem) { - if (this.evaluationFlags == null) { - this.evaluationFlags = new ArrayList<>(); - } - this.evaluationFlags.add(evaluationFlagsItem); - return this; - } - - /** - * Get evaluationFlags - * @return evaluationFlags - **/ - @javax.annotation.Nullable - public List getEvaluationFlags() { - return evaluationFlags; - } - - - public void setEvaluationFlags(List evaluationFlags) { - this.evaluationFlags = evaluationFlags; - } - - - public TrustApplicationAllOfAttributes ipLocationDetails(Object ipLocationDetails) { - - this.ipLocationDetails = ipLocationDetails; - return this; - } - - /** - * Get ipLocationDetails - * @return ipLocationDetails - **/ - @javax.annotation.Nullable - public Object getIpLocationDetails() { - return ipLocationDetails; - } - - - public void setIpLocationDetails(Object ipLocationDetails) { - this.ipLocationDetails = ipLocationDetails; - } - - - public TrustApplicationAllOfAttributes phoneLocationDetails(Object phoneLocationDetails) { - - this.phoneLocationDetails = phoneLocationDetails; - return this; - } - - /** - * Get phoneLocationDetails - * @return phoneLocationDetails - **/ - @javax.annotation.Nullable - public Object getPhoneLocationDetails() { - return phoneLocationDetails; - } - - - public void setPhoneLocationDetails(Object phoneLocationDetails) { - this.phoneLocationDetails = phoneLocationDetails; - } - - - public TrustApplicationAllOfAttributes archived(Boolean archived) { - - this.archived = archived; - return this; - } - - /** - * Get archived - * @return archived - **/ - @javax.annotation.Nullable - public Boolean getArchived() { - return archived; - } - - - public void setArchived(Boolean archived) { - this.archived = archived; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TrustApplicationAllOfAttributes trustApplicationAllOfAttributes = (TrustApplicationAllOfAttributes) o; - return Objects.equals(this.createdAt, trustApplicationAllOfAttributes.createdAt) && - Objects.equals(this.updatedAt, trustApplicationAllOfAttributes.updatedAt) && - Objects.equals(this.status, trustApplicationAllOfAttributes.status) && - Objects.equals(this.message, trustApplicationAllOfAttributes.message) && - Objects.equals(this.evaluationOutcome, trustApplicationAllOfAttributes.evaluationOutcome) && - Objects.equals(this.evaluationId, trustApplicationAllOfAttributes.evaluationId) && - Objects.equals(this.evaluationEntityId, trustApplicationAllOfAttributes.evaluationEntityId) && - Objects.equals(this.name, trustApplicationAllOfAttributes.name) && - Objects.equals(this.dateOfIncorporation, trustApplicationAllOfAttributes.dateOfIncorporation) && - Objects.equals(this.stateOfIncorporation, trustApplicationAllOfAttributes.stateOfIncorporation) && - Objects.equals(this.revocability, trustApplicationAllOfAttributes.revocability) && - Objects.equals(this.sourceOfFunds, trustApplicationAllOfAttributes.sourceOfFunds) && - Objects.equals(this.taxId, trustApplicationAllOfAttributes.taxId) && - Objects.equals(this.contact, trustApplicationAllOfAttributes.contact) && - Objects.equals(this.trustees, trustApplicationAllOfAttributes.trustees) && - Objects.equals(this.grantor, trustApplicationAllOfAttributes.grantor) && - Objects.equals(this.ip, trustApplicationAllOfAttributes.ip) && - Objects.equals(this.decisionMethod, trustApplicationAllOfAttributes.decisionMethod) && - Objects.equals(this.decisionUserId, trustApplicationAllOfAttributes.decisionUserId) && - Objects.equals(this.decisionReason, trustApplicationAllOfAttributes.decisionReason) && - Objects.equals(this.decisionDateTime, trustApplicationAllOfAttributes.decisionDateTime) && - Objects.equals(this.tags, trustApplicationAllOfAttributes.tags) && - Objects.equals(this.riskRate, trustApplicationAllOfAttributes.riskRate) && - Objects.equals(this.evaluationFlags, trustApplicationAllOfAttributes.evaluationFlags) && - Objects.equals(this.ipLocationDetails, trustApplicationAllOfAttributes.ipLocationDetails) && - Objects.equals(this.phoneLocationDetails, trustApplicationAllOfAttributes.phoneLocationDetails) && - Objects.equals(this.archived, trustApplicationAllOfAttributes.archived); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, updatedAt, status, message, evaluationOutcome, evaluationId, evaluationEntityId, name, dateOfIncorporation, stateOfIncorporation, revocability, sourceOfFunds, taxId, contact, trustees, grantor, ip, decisionMethod, decisionUserId, decisionReason, decisionDateTime, tags, riskRate, evaluationFlags, ipLocationDetails, phoneLocationDetails, archived); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TrustApplicationAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" evaluationOutcome: ").append(toIndentedString(evaluationOutcome)).append("\n"); - sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); - sb.append(" evaluationEntityId: ").append(toIndentedString(evaluationEntityId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" dateOfIncorporation: ").append(toIndentedString(dateOfIncorporation)).append("\n"); - sb.append(" stateOfIncorporation: ").append(toIndentedString(stateOfIncorporation)).append("\n"); - sb.append(" revocability: ").append(toIndentedString(revocability)).append("\n"); - sb.append(" sourceOfFunds: ").append(toIndentedString(sourceOfFunds)).append("\n"); - sb.append(" taxId: ").append(toIndentedString(taxId)).append("\n"); - sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); - sb.append(" trustees: ").append(toIndentedString(trustees)).append("\n"); - sb.append(" grantor: ").append(toIndentedString(grantor)).append("\n"); - sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); - sb.append(" decisionMethod: ").append(toIndentedString(decisionMethod)).append("\n"); - sb.append(" decisionUserId: ").append(toIndentedString(decisionUserId)).append("\n"); - sb.append(" decisionReason: ").append(toIndentedString(decisionReason)).append("\n"); - sb.append(" decisionDateTime: ").append(toIndentedString(decisionDateTime)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" riskRate: ").append(toIndentedString(riskRate)).append("\n"); - sb.append(" evaluationFlags: ").append(toIndentedString(evaluationFlags)).append("\n"); - sb.append(" ipLocationDetails: ").append(toIndentedString(ipLocationDetails)).append("\n"); - sb.append(" phoneLocationDetails: ").append(toIndentedString(phoneLocationDetails)).append("\n"); - sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("status"); - openapiFields.add("message"); - openapiFields.add("evaluationOutcome"); - openapiFields.add("evaluationId"); - openapiFields.add("evaluationEntityId"); - openapiFields.add("name"); - openapiFields.add("dateOfIncorporation"); - openapiFields.add("stateOfIncorporation"); - openapiFields.add("revocability"); - openapiFields.add("sourceOfFunds"); - openapiFields.add("taxId"); - openapiFields.add("contact"); - openapiFields.add("trustees"); - openapiFields.add("grantor"); - openapiFields.add("ip"); - openapiFields.add("decisionMethod"); - openapiFields.add("decisionUserId"); - openapiFields.add("decisionReason"); - openapiFields.add("decisionDateTime"); - openapiFields.add("tags"); - openapiFields.add("riskRate"); - openapiFields.add("evaluationFlags"); - openapiFields.add("ipLocationDetails"); - openapiFields.add("phoneLocationDetails"); - openapiFields.add("archived"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("stateOfIncorporation"); - openapiRequiredFields.add("contact"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TrustApplicationAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TrustApplicationAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TrustApplicationAllOfAttributes is not found in the empty JSON string", TrustApplicationAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TrustApplicationAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TrustApplicationAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : TrustApplicationAllOfAttributes.openapiRequiredFields) { - 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") != null && !jsonObj.get("message").isJsonNull()) && !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())); - } - if ((jsonObj.get("evaluationOutcome") != null && !jsonObj.get("evaluationOutcome").isJsonNull()) && !jsonObj.get("evaluationOutcome").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationOutcome` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationOutcome").toString())); - } - if ((jsonObj.get("evaluationId") != null && !jsonObj.get("evaluationId").isJsonNull()) && !jsonObj.get("evaluationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationId").toString())); - } - if ((jsonObj.get("evaluationEntityId") != null && !jsonObj.get("evaluationEntityId").isJsonNull()) && !jsonObj.get("evaluationEntityId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationEntityId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationEntityId").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if (!jsonObj.get("stateOfIncorporation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `stateOfIncorporation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stateOfIncorporation").toString())); - } - if ((jsonObj.get("taxId") != null && !jsonObj.get("taxId").isJsonNull()) && !jsonObj.get("taxId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `taxId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxId").toString())); - } - // validate the required field `contact` - TrustContact.validateJsonElement(jsonObj.get("contact")); - if (jsonObj.get("trustees") != null && !jsonObj.get("trustees").isJsonNull()) { - JsonArray jsonArraytrustees = jsonObj.getAsJsonArray("trustees"); - if (jsonArraytrustees != null) { - // ensure the json data is an array - if (!jsonObj.get("trustees").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `trustees` to be an array in the JSON string but got `%s`", jsonObj.get("trustees").toString())); - } - - // validate the optional field `trustees` (array) - for (int i = 0; i < jsonArraytrustees.size(); i++) { - Trustee.validateJsonElement(jsonArraytrustees.get(i)); - }; - } - } - // validate the optional field `grantor` - if (jsonObj.get("grantor") != null && !jsonObj.get("grantor").isJsonNull()) { - Grantor.validateJsonElement(jsonObj.get("grantor")); - } - if ((jsonObj.get("ip") != null && !jsonObj.get("ip").isJsonNull()) && !jsonObj.get("ip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip").toString())); - } - if ((jsonObj.get("decisionMethod") != null && !jsonObj.get("decisionMethod").isJsonNull()) && !jsonObj.get("decisionMethod").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `decisionMethod` to be a primitive type in the JSON string but got `%s`", jsonObj.get("decisionMethod").toString())); - } - if ((jsonObj.get("decisionUserId") != null && !jsonObj.get("decisionUserId").isJsonNull()) && !jsonObj.get("decisionUserId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `decisionUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("decisionUserId").toString())); - } - if ((jsonObj.get("decisionReason") != null && !jsonObj.get("decisionReason").isJsonNull()) && !jsonObj.get("decisionReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `decisionReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("decisionReason").toString())); - } - if ((jsonObj.get("riskRate") != null && !jsonObj.get("riskRate").isJsonNull()) && !jsonObj.get("riskRate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `riskRate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("riskRate").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("evaluationFlags") != null && !jsonObj.get("evaluationFlags").isJsonNull() && !jsonObj.get("evaluationFlags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `evaluationFlags` to be an array in the JSON string but got `%s`", jsonObj.get("evaluationFlags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TrustApplicationAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TrustApplicationAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TrustApplicationAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TrustApplicationAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TrustApplicationAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of TrustApplicationAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of TrustApplicationAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to TrustApplicationAllOfAttributes - */ - public static TrustApplicationAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TrustApplicationAllOfAttributes.class); - } - - /** - * Convert an instance of TrustApplicationAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/TrustContact.java b/src/main/java/org/openapitools/client/model/TrustContact.java deleted file mode 100644 index c642f23a..00000000 --- a/src/main/java/org/openapitools/client/model/TrustContact.java +++ /dev/null @@ -1,350 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Address; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Phone; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * TrustContact - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class TrustContact { - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_JWT_SUBJECT = "jwtSubject"; - @SerializedName(SERIALIZED_NAME_JWT_SUBJECT) - private String jwtSubject; - - public TrustContact() { - } - - public TrustContact fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nullable - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public TrustContact email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public TrustContact phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public TrustContact address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public TrustContact jwtSubject(String jwtSubject) { - - this.jwtSubject = jwtSubject; - return this; - } - - /** - * Get jwtSubject - * @return jwtSubject - **/ - @javax.annotation.Nullable - public String getJwtSubject() { - return jwtSubject; - } - - - public void setJwtSubject(String jwtSubject) { - this.jwtSubject = jwtSubject; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TrustContact trustContact = (TrustContact) o; - return Objects.equals(this.fullName, trustContact.fullName) && - Objects.equals(this.email, trustContact.email) && - Objects.equals(this.phone, trustContact.phone) && - Objects.equals(this.address, trustContact.address) && - Objects.equals(this.jwtSubject, trustContact.jwtSubject); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(fullName, email, phone, address, jwtSubject); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TrustContact {\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fullName"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("address"); - openapiFields.add("jwtSubject"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TrustContact - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TrustContact.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TrustContact is not found in the empty JSON string", TrustContact.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TrustContact.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TrustContact` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `fullName` - if (jsonObj.get("fullName") != null && !jsonObj.get("fullName").isJsonNull()) { - FullName.validateJsonElement(jsonObj.get("fullName")); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); - } - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("address")); - } - if ((jsonObj.get("jwtSubject") != null && !jsonObj.get("jwtSubject").isJsonNull()) && !jsonObj.get("jwtSubject").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `jwtSubject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jwtSubject").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TrustContact.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TrustContact' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TrustContact.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TrustContact value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TrustContact read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of TrustContact given an JSON string - * - * @param jsonString JSON string - * @return An instance of TrustContact - * @throws IOException if the JSON string is invalid with respect to TrustContact - */ - public static TrustContact fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TrustContact.class); - } - - /** - * Convert an instance of TrustContact to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/TrustCustomer.java b/src/main/java/org/openapitools/client/model/TrustCustomer.java deleted file mode 100644 index 762dee42..00000000 --- a/src/main/java/org/openapitools/client/model/TrustCustomer.java +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Customer; -import org.openapitools.client.model.CustomerRelationships; -import org.openapitools.client.model.TrustCustomerAllOfAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * TrustCustomer - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class TrustCustomer extends Customer { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private TrustCustomerAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private CustomerRelationships relationships; - - public TrustCustomer() { - this.type = this.getClass().getSimpleName(); - } - - public TrustCustomer attributes(TrustCustomerAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public TrustCustomerAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(TrustCustomerAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public TrustCustomer relationships(CustomerRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public CustomerRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(CustomerRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TrustCustomer trustCustomer = (TrustCustomer) o; - return Objects.equals(this.attributes, trustCustomer.attributes) && - Objects.equals(this.relationships, trustCustomer.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TrustCustomer {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TrustCustomer - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TrustCustomer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TrustCustomer is not found in the empty JSON string", TrustCustomer.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TrustCustomer.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TrustCustomer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TrustCustomer.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TrustCustomer' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TrustCustomer.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TrustCustomer value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TrustCustomer read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of TrustCustomer given an JSON string - * - * @param jsonString JSON string - * @return An instance of TrustCustomer - * @throws IOException if the JSON string is invalid with respect to TrustCustomer - */ - public static TrustCustomer fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TrustCustomer.class); - } - - /** - * Convert an instance of TrustCustomer to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/TrustCustomerAllOfAttributes.java b/src/main/java/org/openapitools/client/model/TrustCustomerAllOfAttributes.java deleted file mode 100644 index e92e6ad6..00000000 --- a/src/main/java/org/openapitools/client/model/TrustCustomerAllOfAttributes.java +++ /dev/null @@ -1,728 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.AuthorizedUser; -import org.openapitools.client.model.Revocability; -import org.openapitools.client.model.SourceOfFunds; -import org.openapitools.client.model.TrustContact; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * TrustCustomerAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class TrustCustomerAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_STATE_OF_INCORPORATION = "stateOfIncorporation"; - @SerializedName(SERIALIZED_NAME_STATE_OF_INCORPORATION) - private String stateOfIncorporation; - - public static final String SERIALIZED_NAME_CONTACT = "contact"; - @SerializedName(SERIALIZED_NAME_CONTACT) - private TrustContact contact; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_REVOCABILITY = "revocability"; - @SerializedName(SERIALIZED_NAME_REVOCABILITY) - private Revocability revocability; - - public static final String SERIALIZED_NAME_SOURCE_OF_FUNDS = "sourceOfFunds"; - @SerializedName(SERIALIZED_NAME_SOURCE_OF_FUNDS) - private SourceOfFunds sourceOfFunds; - - public static final String SERIALIZED_NAME_TAX_ID = "taxId"; - @SerializedName(SERIALIZED_NAME_TAX_ID) - private String taxId; - - /** - * Gets or Sets riskRate - */ - @JsonAdapter(RiskRateEnum.Adapter.class) - public enum RiskRateEnum { - LOW("low"), - - MEDIUM("medium"), - - HIGH("high"); - - private String value; - - RiskRateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static RiskRateEnum fromValue(String value) { - for (RiskRateEnum b : RiskRateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final RiskRateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public RiskRateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return RiskRateEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_RISK_RATE = "riskRate"; - @SerializedName(SERIALIZED_NAME_RISK_RATE) - private RiskRateEnum riskRate; - - public static final String SERIALIZED_NAME_AUTHORIZED_USERS = "authorizedUsers"; - @SerializedName(SERIALIZED_NAME_AUTHORIZED_USERS) - private List authorizedUsers; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - ACTIVE("Active"), - - ARCHIVED("Archived"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - /** - * Gets or Sets archiveReason - */ - @JsonAdapter(ArchiveReasonEnum.Adapter.class) - public enum ArchiveReasonEnum { - INACTIVE("Inactive"), - - FRAUDACHACTIVITY("FraudACHActivity"), - - FRAUDCARDACTIVITY("FraudCardActivity"), - - FRAUDCHECKACTIVITY("FraudCheckActivity"), - - FRAUDAPPLICATIONHISTORY("FraudApplicationHistory"), - - FRAUDACCOUNTACTIVITY("FraudAccountActivity"), - - FRAUDCLIENTIDENTIFIED("FraudClientIdentified"), - - FRAUDLINKEDTOFRAUDULENTCUSTOMER("FraudLinkedToFraudulentCustomer"); - - private String value; - - ArchiveReasonEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ArchiveReasonEnum fromValue(String value) { - for (ArchiveReasonEnum b : ArchiveReasonEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ArchiveReasonEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ArchiveReasonEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ArchiveReasonEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_ARCHIVE_REASON = "archiveReason"; - @SerializedName(SERIALIZED_NAME_ARCHIVE_REASON) - private ArchiveReasonEnum archiveReason; - - public TrustCustomerAllOfAttributes() { - } - - public TrustCustomerAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public TrustCustomerAllOfAttributes name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public TrustCustomerAllOfAttributes stateOfIncorporation(String stateOfIncorporation) { - - this.stateOfIncorporation = stateOfIncorporation; - return this; - } - - /** - * Get stateOfIncorporation - * @return stateOfIncorporation - **/ - @javax.annotation.Nonnull - public String getStateOfIncorporation() { - return stateOfIncorporation; - } - - - public void setStateOfIncorporation(String stateOfIncorporation) { - this.stateOfIncorporation = stateOfIncorporation; - } - - - public TrustCustomerAllOfAttributes contact(TrustContact contact) { - - this.contact = contact; - return this; - } - - /** - * Get contact - * @return contact - **/ - @javax.annotation.Nonnull - public TrustContact getContact() { - return contact; - } - - - public void setContact(TrustContact contact) { - this.contact = contact; - } - - - public TrustCustomerAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public TrustCustomerAllOfAttributes revocability(Revocability revocability) { - - this.revocability = revocability; - return this; - } - - /** - * Get revocability - * @return revocability - **/ - @javax.annotation.Nullable - public Revocability getRevocability() { - return revocability; - } - - - public void setRevocability(Revocability revocability) { - this.revocability = revocability; - } - - - public TrustCustomerAllOfAttributes sourceOfFunds(SourceOfFunds sourceOfFunds) { - - this.sourceOfFunds = sourceOfFunds; - return this; - } - - /** - * Get sourceOfFunds - * @return sourceOfFunds - **/ - @javax.annotation.Nullable - public SourceOfFunds getSourceOfFunds() { - return sourceOfFunds; - } - - - public void setSourceOfFunds(SourceOfFunds sourceOfFunds) { - this.sourceOfFunds = sourceOfFunds; - } - - - public TrustCustomerAllOfAttributes taxId(String taxId) { - - this.taxId = taxId; - return this; - } - - /** - * Get taxId - * @return taxId - **/ - @javax.annotation.Nullable - public String getTaxId() { - return taxId; - } - - - public void setTaxId(String taxId) { - this.taxId = taxId; - } - - - public TrustCustomerAllOfAttributes riskRate(RiskRateEnum riskRate) { - - this.riskRate = riskRate; - return this; - } - - /** - * Get riskRate - * @return riskRate - **/ - @javax.annotation.Nullable - public RiskRateEnum getRiskRate() { - return riskRate; - } - - - public void setRiskRate(RiskRateEnum riskRate) { - this.riskRate = riskRate; - } - - - public TrustCustomerAllOfAttributes authorizedUsers(List authorizedUsers) { - - this.authorizedUsers = authorizedUsers; - return this; - } - - public TrustCustomerAllOfAttributes addAuthorizedUsersItem(AuthorizedUser authorizedUsersItem) { - if (this.authorizedUsers == null) { - this.authorizedUsers = new ArrayList<>(); - } - this.authorizedUsers.add(authorizedUsersItem); - return this; - } - - /** - * Get authorizedUsers - * @return authorizedUsers - **/ - @javax.annotation.Nullable - public List getAuthorizedUsers() { - return authorizedUsers; - } - - - public void setAuthorizedUsers(List authorizedUsers) { - this.authorizedUsers = authorizedUsers; - } - - - public TrustCustomerAllOfAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public TrustCustomerAllOfAttributes archiveReason(ArchiveReasonEnum archiveReason) { - - this.archiveReason = archiveReason; - return this; - } - - /** - * Get archiveReason - * @return archiveReason - **/ - @javax.annotation.Nullable - public ArchiveReasonEnum getArchiveReason() { - return archiveReason; - } - - - public void setArchiveReason(ArchiveReasonEnum archiveReason) { - this.archiveReason = archiveReason; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TrustCustomerAllOfAttributes trustCustomerAllOfAttributes = (TrustCustomerAllOfAttributes) o; - return Objects.equals(this.createdAt, trustCustomerAllOfAttributes.createdAt) && - Objects.equals(this.name, trustCustomerAllOfAttributes.name) && - Objects.equals(this.stateOfIncorporation, trustCustomerAllOfAttributes.stateOfIncorporation) && - Objects.equals(this.contact, trustCustomerAllOfAttributes.contact) && - Objects.equals(this.tags, trustCustomerAllOfAttributes.tags) && - Objects.equals(this.revocability, trustCustomerAllOfAttributes.revocability) && - Objects.equals(this.sourceOfFunds, trustCustomerAllOfAttributes.sourceOfFunds) && - Objects.equals(this.taxId, trustCustomerAllOfAttributes.taxId) && - Objects.equals(this.riskRate, trustCustomerAllOfAttributes.riskRate) && - Objects.equals(this.authorizedUsers, trustCustomerAllOfAttributes.authorizedUsers) && - Objects.equals(this.status, trustCustomerAllOfAttributes.status) && - Objects.equals(this.archiveReason, trustCustomerAllOfAttributes.archiveReason); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, name, stateOfIncorporation, contact, tags, revocability, sourceOfFunds, taxId, riskRate, authorizedUsers, status, archiveReason); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TrustCustomerAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" stateOfIncorporation: ").append(toIndentedString(stateOfIncorporation)).append("\n"); - sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" revocability: ").append(toIndentedString(revocability)).append("\n"); - sb.append(" sourceOfFunds: ").append(toIndentedString(sourceOfFunds)).append("\n"); - sb.append(" taxId: ").append(toIndentedString(taxId)).append("\n"); - sb.append(" riskRate: ").append(toIndentedString(riskRate)).append("\n"); - sb.append(" authorizedUsers: ").append(toIndentedString(authorizedUsers)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" archiveReason: ").append(toIndentedString(archiveReason)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("name"); - openapiFields.add("stateOfIncorporation"); - openapiFields.add("contact"); - openapiFields.add("tags"); - openapiFields.add("revocability"); - openapiFields.add("sourceOfFunds"); - openapiFields.add("taxId"); - openapiFields.add("riskRate"); - openapiFields.add("authorizedUsers"); - openapiFields.add("status"); - openapiFields.add("archiveReason"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("stateOfIncorporation"); - openapiRequiredFields.add("contact"); - openapiRequiredFields.add("status"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TrustCustomerAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TrustCustomerAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TrustCustomerAllOfAttributes is not found in the empty JSON string", TrustCustomerAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TrustCustomerAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TrustCustomerAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : TrustCustomerAllOfAttributes.openapiRequiredFields) { - 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("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if (!jsonObj.get("stateOfIncorporation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `stateOfIncorporation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stateOfIncorporation").toString())); - } - // validate the required field `contact` - TrustContact.validateJsonElement(jsonObj.get("contact")); - if ((jsonObj.get("taxId") != null && !jsonObj.get("taxId").isJsonNull()) && !jsonObj.get("taxId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `taxId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxId").toString())); - } - if ((jsonObj.get("riskRate") != null && !jsonObj.get("riskRate").isJsonNull()) && !jsonObj.get("riskRate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `riskRate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("riskRate").toString())); - } - if (jsonObj.get("authorizedUsers") != null && !jsonObj.get("authorizedUsers").isJsonNull()) { - JsonArray jsonArrayauthorizedUsers = jsonObj.getAsJsonArray("authorizedUsers"); - if (jsonArrayauthorizedUsers != null) { - // ensure the json data is an array - if (!jsonObj.get("authorizedUsers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `authorizedUsers` to be an array in the JSON string but got `%s`", jsonObj.get("authorizedUsers").toString())); - } - - // validate the optional field `authorizedUsers` (array) - for (int i = 0; i < jsonArrayauthorizedUsers.size(); i++) { - AuthorizedUser.validateJsonElement(jsonArrayauthorizedUsers.get(i)); - }; - } - } - if (!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())); - } - if ((jsonObj.get("archiveReason") != null && !jsonObj.get("archiveReason").isJsonNull()) && !jsonObj.get("archiveReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `archiveReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("archiveReason").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TrustCustomerAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TrustCustomerAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TrustCustomerAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TrustCustomerAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TrustCustomerAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of TrustCustomerAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of TrustCustomerAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to TrustCustomerAllOfAttributes - */ - public static TrustCustomerAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TrustCustomerAllOfAttributes.class); - } - - /** - * Convert an instance of TrustCustomerAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/Trustee.java b/src/main/java/org/openapitools/client/model/Trustee.java deleted file mode 100644 index 4e55220b..00000000 --- a/src/main/java/org/openapitools/client/model/Trustee.java +++ /dev/null @@ -1,466 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.util.Arrays; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.FullName; -import org.openapitools.client.model.Phone; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Trustee - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Trustee { - public static final String SERIALIZED_NAME_FULL_NAME = "fullName"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private FullName fullName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_SSN = "ssn"; - @SerializedName(SERIALIZED_NAME_SSN) - private String ssn; - - public static final String SERIALIZED_NAME_PASSPORT = "passport"; - @SerializedName(SERIALIZED_NAME_PASSPORT) - private String passport; - - public static final String SERIALIZED_NAME_NATIONALITY = "nationality"; - @SerializedName(SERIALIZED_NAME_NATIONALITY) - private String nationality; - - public static final String SERIALIZED_NAME_MATRICULA_CONSULAR = "matriculaConsular"; - @SerializedName(SERIALIZED_NAME_MATRICULA_CONSULAR) - private String matriculaConsular; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_DATE_OF_BIRTH = "dateOfBirth"; - @SerializedName(SERIALIZED_NAME_DATE_OF_BIRTH) - private LocalDate dateOfBirth; - - public Trustee() { - } - - public Trustee fullName(FullName fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nonnull - public FullName getFullName() { - return fullName; - } - - - public void setFullName(FullName fullName) { - this.fullName = fullName; - } - - - public Trustee email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nonnull - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public Trustee phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nonnull - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public Trustee ssn(String ssn) { - - this.ssn = ssn; - return this; - } - - /** - * Get ssn - * @return ssn - **/ - @javax.annotation.Nullable - public String getSsn() { - return ssn; - } - - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - - public Trustee passport(String passport) { - - this.passport = passport; - return this; - } - - /** - * Get passport - * @return passport - **/ - @javax.annotation.Nullable - public String getPassport() { - return passport; - } - - - public void setPassport(String passport) { - this.passport = passport; - } - - - public Trustee nationality(String nationality) { - - this.nationality = nationality; - return this; - } - - /** - * Get nationality - * @return nationality - **/ - @javax.annotation.Nullable - public String getNationality() { - return nationality; - } - - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - - public Trustee matriculaConsular(String matriculaConsular) { - - this.matriculaConsular = matriculaConsular; - return this; - } - - /** - * Get matriculaConsular - * @return matriculaConsular - **/ - @javax.annotation.Nullable - public String getMatriculaConsular() { - return matriculaConsular; - } - - - public void setMatriculaConsular(String matriculaConsular) { - this.matriculaConsular = matriculaConsular; - } - - - public Trustee address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nonnull - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public Trustee dateOfBirth(LocalDate dateOfBirth) { - - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Get dateOfBirth - * @return dateOfBirth - **/ - @javax.annotation.Nonnull - public LocalDate getDateOfBirth() { - return dateOfBirth; - } - - - public void setDateOfBirth(LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Trustee trustee = (Trustee) o; - return Objects.equals(this.fullName, trustee.fullName) && - Objects.equals(this.email, trustee.email) && - Objects.equals(this.phone, trustee.phone) && - Objects.equals(this.ssn, trustee.ssn) && - Objects.equals(this.passport, trustee.passport) && - Objects.equals(this.nationality, trustee.nationality) && - Objects.equals(this.matriculaConsular, trustee.matriculaConsular) && - Objects.equals(this.address, trustee.address) && - Objects.equals(this.dateOfBirth, trustee.dateOfBirth); - } - - @Override - public int hashCode() { - return Objects.hash(fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Trustee {\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); - sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); - sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); - sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fullName"); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("ssn"); - openapiFields.add("passport"); - openapiFields.add("nationality"); - openapiFields.add("matriculaConsular"); - openapiFields.add("address"); - openapiFields.add("dateOfBirth"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("fullName"); - openapiRequiredFields.add("email"); - openapiRequiredFields.add("phone"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("dateOfBirth"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Trustee - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Trustee.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Trustee is not found in the empty JSON string", Trustee.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Trustee.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Trustee` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Trustee.openapiRequiredFields) { - 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(); - // validate the required field `fullName` - FullName.validateJsonElement(jsonObj.get("fullName")); - if (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the required field `phone` - Phone.validateJsonElement(jsonObj.get("phone")); - if ((jsonObj.get("ssn") != null && !jsonObj.get("ssn").isJsonNull()) && !jsonObj.get("ssn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ssn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ssn").toString())); - } - if ((jsonObj.get("passport") != null && !jsonObj.get("passport").isJsonNull()) && !jsonObj.get("passport").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `passport` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passport").toString())); - } - if ((jsonObj.get("nationality") != null && !jsonObj.get("nationality").isJsonNull()) && !jsonObj.get("nationality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nationality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nationality").toString())); - } - if ((jsonObj.get("matriculaConsular") != null && !jsonObj.get("matriculaConsular").isJsonNull()) && !jsonObj.get("matriculaConsular").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `matriculaConsular` to be a primitive type in the JSON string but got `%s`", jsonObj.get("matriculaConsular").toString())); - } - // validate the required field `address` - Address.validateJsonElement(jsonObj.get("address")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Trustee.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Trustee' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Trustee.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Trustee value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Trustee read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Trustee given an JSON string - * - * @param jsonString JSON string - * @return An instance of Trustee - * @throws IOException if the JSON string is invalid with respect to Trustee - */ - public static Trustee fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Trustee.class); - } - - /** - * Convert an instance of Trustee to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitAccountResponse.java b/src/main/java/org/openapitools/client/model/UnitAccountResponse.java deleted file mode 100644 index 8d264f69..00000000 --- a/src/main/java/org/openapitools/client/model/UnitAccountResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Account; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitAccountResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitAccountResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Account data; - - public UnitAccountResponse() { - } - - public UnitAccountResponse data(Account data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Account getData() { - return data; - } - - - public void setData(Account data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitAccountResponse unitAccountResponse = (UnitAccountResponse) o; - return Objects.equals(this.data, unitAccountResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitAccountResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitAccountResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitAccountResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitAccountResponse is not found in the empty JSON string", UnitAccountResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitAccountResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitAccountResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Account.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitAccountResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitAccountResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitAccountResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitAccountResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitAccountResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitAccountResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitAccountResponse - * @throws IOException if the JSON string is invalid with respect to UnitAccountResponse - */ - public static UnitAccountResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitAccountResponse.class); - } - - /** - * Convert an instance of UnitAccountResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitAccountResponseWithIncluded.java b/src/main/java/org/openapitools/client/model/UnitAccountResponseWithIncluded.java deleted file mode 100644 index c8bb4245..00000000 --- a/src/main/java/org/openapitools/client/model/UnitAccountResponseWithIncluded.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Account; -import org.openapitools.client.model.Customer; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitAccountResponseWithIncluded - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitAccountResponseWithIncluded { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Account data; - - public static final String SERIALIZED_NAME_INCLUDED = "included"; - @SerializedName(SERIALIZED_NAME_INCLUDED) - private List included; - - public UnitAccountResponseWithIncluded() { - } - - public UnitAccountResponseWithIncluded data(Account data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Account getData() { - return data; - } - - - public void setData(Account data) { - this.data = data; - } - - - public UnitAccountResponseWithIncluded included(List included) { - - this.included = included; - return this; - } - - public UnitAccountResponseWithIncluded addIncludedItem(Customer includedItem) { - if (this.included == null) { - this.included = new ArrayList<>(); - } - this.included.add(includedItem); - return this; - } - - /** - * Get included - * @return included - **/ - @javax.annotation.Nullable - public List getIncluded() { - return included; - } - - - public void setIncluded(List included) { - this.included = included; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitAccountResponseWithIncluded unitAccountResponseWithIncluded = (UnitAccountResponseWithIncluded) o; - return Objects.equals(this.data, unitAccountResponseWithIncluded.data) && - Objects.equals(this.included, unitAccountResponseWithIncluded.included); - } - - @Override - public int hashCode() { - return Objects.hash(data, included); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitAccountResponseWithIncluded {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" included: ").append(toIndentedString(included)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("included"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitAccountResponseWithIncluded - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitAccountResponseWithIncluded.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitAccountResponseWithIncluded is not found in the empty JSON string", UnitAccountResponseWithIncluded.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitAccountResponseWithIncluded.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitAccountResponseWithIncluded` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Account.validateJsonElement(jsonObj.get("data")); - } - if (jsonObj.get("included") != null && !jsonObj.get("included").isJsonNull()) { - JsonArray jsonArrayincluded = jsonObj.getAsJsonArray("included"); - if (jsonArrayincluded != null) { - // ensure the json data is an array - if (!jsonObj.get("included").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `included` to be an array in the JSON string but got `%s`", jsonObj.get("included").toString())); - } - - // validate the optional field `included` (array) - for (int i = 0; i < jsonArrayincluded.size(); i++) { - Customer.validateJsonElement(jsonArrayincluded.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitAccountResponseWithIncluded.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitAccountResponseWithIncluded' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitAccountResponseWithIncluded.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitAccountResponseWithIncluded value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitAccountResponseWithIncluded read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitAccountResponseWithIncluded given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitAccountResponseWithIncluded - * @throws IOException if the JSON string is invalid with respect to UnitAccountResponseWithIncluded - */ - public static UnitAccountResponseWithIncluded fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitAccountResponseWithIncluded.class); - } - - /** - * Convert an instance of UnitAccountResponseWithIncluded to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitAccountsListResponse.java b/src/main/java/org/openapitools/client/model/UnitAccountsListResponse.java deleted file mode 100644 index 9ce183be..00000000 --- a/src/main/java/org/openapitools/client/model/UnitAccountsListResponse.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Account; -import org.openapitools.client.model.Customer; -import org.openapitools.client.model.PaginationMeta; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitAccountsListResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitAccountsListResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public static final String SERIALIZED_NAME_INCLUDED = "included"; - @SerializedName(SERIALIZED_NAME_INCLUDED) - private List included; - - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - private PaginationMeta meta; - - public UnitAccountsListResponse() { - } - - public UnitAccountsListResponse data(List data) { - - this.data = data; - return this; - } - - public UnitAccountsListResponse addDataItem(Account dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - public UnitAccountsListResponse included(List included) { - - this.included = included; - return this; - } - - public UnitAccountsListResponse addIncludedItem(Customer includedItem) { - if (this.included == null) { - this.included = new ArrayList<>(); - } - this.included.add(includedItem); - return this; - } - - /** - * Get included - * @return included - **/ - @javax.annotation.Nullable - public List getIncluded() { - return included; - } - - - public void setIncluded(List included) { - this.included = included; - } - - - public UnitAccountsListResponse meta(PaginationMeta meta) { - - this.meta = meta; - return this; - } - - /** - * Get meta - * @return meta - **/ - @javax.annotation.Nullable - public PaginationMeta getMeta() { - return meta; - } - - - public void setMeta(PaginationMeta meta) { - this.meta = meta; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitAccountsListResponse unitAccountsListResponse = (UnitAccountsListResponse) o; - return Objects.equals(this.data, unitAccountsListResponse.data) && - Objects.equals(this.included, unitAccountsListResponse.included) && - Objects.equals(this.meta, unitAccountsListResponse.meta); - } - - @Override - public int hashCode() { - return Objects.hash(data, included, meta); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitAccountsListResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" included: ").append(toIndentedString(included)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("included"); - openapiFields.add("meta"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitAccountsListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitAccountsListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitAccountsListResponse is not found in the empty JSON string", UnitAccountsListResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitAccountsListResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitAccountsListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - Account.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - if (jsonObj.get("included") != null && !jsonObj.get("included").isJsonNull()) { - JsonArray jsonArrayincluded = jsonObj.getAsJsonArray("included"); - if (jsonArrayincluded != null) { - // ensure the json data is an array - if (!jsonObj.get("included").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `included` to be an array in the JSON string but got `%s`", jsonObj.get("included").toString())); - } - - // validate the optional field `included` (array) - for (int i = 0; i < jsonArrayincluded.size(); i++) { - Customer.validateJsonElement(jsonArrayincluded.get(i)); - }; - } - } - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - PaginationMeta.validateJsonElement(jsonObj.get("meta")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitAccountsListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitAccountsListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitAccountsListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitAccountsListResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitAccountsListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitAccountsListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitAccountsListResponse - * @throws IOException if the JSON string is invalid with respect to UnitAccountsListResponse - */ - public static UnitAccountsListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitAccountsListResponse.class); - } - - /** - * Convert an instance of UnitAccountsListResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitApiTokenResponse.java b/src/main/java/org/openapitools/client/model/UnitApiTokenResponse.java deleted file mode 100644 index 2740744d..00000000 --- a/src/main/java/org/openapitools/client/model/UnitApiTokenResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ApiToken; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitApiTokenResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitApiTokenResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ApiToken data; - - public UnitApiTokenResponse() { - } - - public UnitApiTokenResponse data(ApiToken data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public ApiToken getData() { - return data; - } - - - public void setData(ApiToken data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitApiTokenResponse unitApiTokenResponse = (UnitApiTokenResponse) o; - return Objects.equals(this.data, unitApiTokenResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitApiTokenResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitApiTokenResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitApiTokenResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitApiTokenResponse is not found in the empty JSON string", UnitApiTokenResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitApiTokenResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitApiTokenResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - ApiToken.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitApiTokenResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitApiTokenResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitApiTokenResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitApiTokenResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitApiTokenResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitApiTokenResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitApiTokenResponse - * @throws IOException if the JSON string is invalid with respect to UnitApiTokenResponse - */ - public static UnitApiTokenResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitApiTokenResponse.class); - } - - /** - * Convert an instance of UnitApiTokenResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitApplicationFormResponse.java b/src/main/java/org/openapitools/client/model/UnitApplicationFormResponse.java deleted file mode 100644 index 7ead45d7..00000000 --- a/src/main/java/org/openapitools/client/model/UnitApplicationFormResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ApplicationForm; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitApplicationFormResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitApplicationFormResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ApplicationForm data; - - public UnitApplicationFormResponse() { - } - - public UnitApplicationFormResponse data(ApplicationForm data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public ApplicationForm getData() { - return data; - } - - - public void setData(ApplicationForm data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitApplicationFormResponse unitApplicationFormResponse = (UnitApplicationFormResponse) o; - return Objects.equals(this.data, unitApplicationFormResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitApplicationFormResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitApplicationFormResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitApplicationFormResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitApplicationFormResponse is not found in the empty JSON string", UnitApplicationFormResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitApplicationFormResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitApplicationFormResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - ApplicationForm.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitApplicationFormResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitApplicationFormResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitApplicationFormResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitApplicationFormResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitApplicationFormResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitApplicationFormResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitApplicationFormResponse - * @throws IOException if the JSON string is invalid with respect to UnitApplicationFormResponse - */ - public static UnitApplicationFormResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitApplicationFormResponse.class); - } - - /** - * Convert an instance of UnitApplicationFormResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitApplicationFormResponseWithIncluded.java b/src/main/java/org/openapitools/client/model/UnitApplicationFormResponseWithIncluded.java deleted file mode 100644 index caced348..00000000 --- a/src/main/java/org/openapitools/client/model/UnitApplicationFormResponseWithIncluded.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Application; -import org.openapitools.client.model.ApplicationForm; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitApplicationFormResponseWithIncluded - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitApplicationFormResponseWithIncluded { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ApplicationForm data; - - public static final String SERIALIZED_NAME_INCLUDED = "included"; - @SerializedName(SERIALIZED_NAME_INCLUDED) - private Application included; - - public UnitApplicationFormResponseWithIncluded() { - } - - public UnitApplicationFormResponseWithIncluded data(ApplicationForm data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public ApplicationForm getData() { - return data; - } - - - public void setData(ApplicationForm data) { - this.data = data; - } - - - public UnitApplicationFormResponseWithIncluded included(Application included) { - - this.included = included; - return this; - } - - /** - * Get included - * @return included - **/ - @javax.annotation.Nullable - public Application getIncluded() { - return included; - } - - - public void setIncluded(Application included) { - this.included = included; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitApplicationFormResponseWithIncluded unitApplicationFormResponseWithIncluded = (UnitApplicationFormResponseWithIncluded) o; - return Objects.equals(this.data, unitApplicationFormResponseWithIncluded.data) && - Objects.equals(this.included, unitApplicationFormResponseWithIncluded.included); - } - - @Override - public int hashCode() { - return Objects.hash(data, included); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitApplicationFormResponseWithIncluded {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" included: ").append(toIndentedString(included)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("included"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitApplicationFormResponseWithIncluded - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitApplicationFormResponseWithIncluded.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitApplicationFormResponseWithIncluded is not found in the empty JSON string", UnitApplicationFormResponseWithIncluded.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitApplicationFormResponseWithIncluded.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitApplicationFormResponseWithIncluded` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - ApplicationForm.validateJsonElement(jsonObj.get("data")); - } - // validate the optional field `included` - if (jsonObj.get("included") != null && !jsonObj.get("included").isJsonNull()) { - Application.validateJsonElement(jsonObj.get("included")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitApplicationFormResponseWithIncluded.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitApplicationFormResponseWithIncluded' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitApplicationFormResponseWithIncluded.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitApplicationFormResponseWithIncluded value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitApplicationFormResponseWithIncluded read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitApplicationFormResponseWithIncluded given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitApplicationFormResponseWithIncluded - * @throws IOException if the JSON string is invalid with respect to UnitApplicationFormResponseWithIncluded - */ - public static UnitApplicationFormResponseWithIncluded fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitApplicationFormResponseWithIncluded.class); - } - - /** - * Convert an instance of UnitApplicationFormResponseWithIncluded to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitApplicationFormsListResponse.java b/src/main/java/org/openapitools/client/model/UnitApplicationFormsListResponse.java deleted file mode 100644 index 287bb53b..00000000 --- a/src/main/java/org/openapitools/client/model/UnitApplicationFormsListResponse.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ApplicationForm; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitApplicationFormsListResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitApplicationFormsListResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public UnitApplicationFormsListResponse() { - } - - public UnitApplicationFormsListResponse data(List data) { - - this.data = data; - return this; - } - - public UnitApplicationFormsListResponse addDataItem(ApplicationForm dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitApplicationFormsListResponse unitApplicationFormsListResponse = (UnitApplicationFormsListResponse) o; - return Objects.equals(this.data, unitApplicationFormsListResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitApplicationFormsListResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitApplicationFormsListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitApplicationFormsListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitApplicationFormsListResponse is not found in the empty JSON string", UnitApplicationFormsListResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitApplicationFormsListResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitApplicationFormsListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - ApplicationForm.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitApplicationFormsListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitApplicationFormsListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitApplicationFormsListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitApplicationFormsListResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitApplicationFormsListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitApplicationFormsListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitApplicationFormsListResponse - * @throws IOException if the JSON string is invalid with respect to UnitApplicationFormsListResponse - */ - public static UnitApplicationFormsListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitApplicationFormsListResponse.class); - } - - /** - * Convert an instance of UnitApplicationFormsListResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitApplicationResponseWithIncluded.java b/src/main/java/org/openapitools/client/model/UnitApplicationResponseWithIncluded.java deleted file mode 100644 index bd667701..00000000 --- a/src/main/java/org/openapitools/client/model/UnitApplicationResponseWithIncluded.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Application; -import org.openapitools.client.model.IncludedResourceInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitApplicationResponseWithIncluded - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitApplicationResponseWithIncluded { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Application data; - - public static final String SERIALIZED_NAME_INCLUDED = "included"; - @SerializedName(SERIALIZED_NAME_INCLUDED) - private List included; - - public UnitApplicationResponseWithIncluded() { - } - - public UnitApplicationResponseWithIncluded data(Application data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Application getData() { - return data; - } - - - public void setData(Application data) { - this.data = data; - } - - - public UnitApplicationResponseWithIncluded included(List included) { - - this.included = included; - return this; - } - - public UnitApplicationResponseWithIncluded addIncludedItem(IncludedResourceInner includedItem) { - if (this.included == null) { - this.included = new ArrayList<>(); - } - this.included.add(includedItem); - return this; - } - - /** - * Get included - * @return included - **/ - @javax.annotation.Nullable - public List getIncluded() { - return included; - } - - - public void setIncluded(List included) { - this.included = included; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitApplicationResponseWithIncluded unitApplicationResponseWithIncluded = (UnitApplicationResponseWithIncluded) o; - return Objects.equals(this.data, unitApplicationResponseWithIncluded.data) && - Objects.equals(this.included, unitApplicationResponseWithIncluded.included); - } - - @Override - public int hashCode() { - return Objects.hash(data, included); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitApplicationResponseWithIncluded {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" included: ").append(toIndentedString(included)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("included"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitApplicationResponseWithIncluded - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitApplicationResponseWithIncluded.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitApplicationResponseWithIncluded is not found in the empty JSON string", UnitApplicationResponseWithIncluded.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitApplicationResponseWithIncluded.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitApplicationResponseWithIncluded` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Application.validateJsonElement(jsonObj.get("data")); - } - if (jsonObj.get("included") != null && !jsonObj.get("included").isJsonNull()) { - JsonArray jsonArrayincluded = jsonObj.getAsJsonArray("included"); - if (jsonArrayincluded != null) { - // ensure the json data is an array - if (!jsonObj.get("included").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `included` to be an array in the JSON string but got `%s`", jsonObj.get("included").toString())); - } - - // validate the optional field `included` (array) - for (int i = 0; i < jsonArrayincluded.size(); i++) { - IncludedResourceInner.validateJsonElement(jsonArrayincluded.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitApplicationResponseWithIncluded.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitApplicationResponseWithIncluded' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitApplicationResponseWithIncluded.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitApplicationResponseWithIncluded value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitApplicationResponseWithIncluded read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitApplicationResponseWithIncluded given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitApplicationResponseWithIncluded - * @throws IOException if the JSON string is invalid with respect to UnitApplicationResponseWithIncluded - */ - public static UnitApplicationResponseWithIncluded fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitApplicationResponseWithIncluded.class); - } - - /** - * Convert an instance of UnitApplicationResponseWithIncluded to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitAuthorizationRequestResponse.java b/src/main/java/org/openapitools/client/model/UnitAuthorizationRequestResponse.java deleted file mode 100644 index de8772bf..00000000 --- a/src/main/java/org/openapitools/client/model/UnitAuthorizationRequestResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AuthorizationRequest; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitAuthorizationRequestResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitAuthorizationRequestResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private AuthorizationRequest data; - - public UnitAuthorizationRequestResponse() { - } - - public UnitAuthorizationRequestResponse data(AuthorizationRequest data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public AuthorizationRequest getData() { - return data; - } - - - public void setData(AuthorizationRequest data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitAuthorizationRequestResponse unitAuthorizationRequestResponse = (UnitAuthorizationRequestResponse) o; - return Objects.equals(this.data, unitAuthorizationRequestResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitAuthorizationRequestResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitAuthorizationRequestResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitAuthorizationRequestResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitAuthorizationRequestResponse is not found in the empty JSON string", UnitAuthorizationRequestResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitAuthorizationRequestResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitAuthorizationRequestResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - AuthorizationRequest.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitAuthorizationRequestResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitAuthorizationRequestResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitAuthorizationRequestResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitAuthorizationRequestResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitAuthorizationRequestResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitAuthorizationRequestResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitAuthorizationRequestResponse - * @throws IOException if the JSON string is invalid with respect to UnitAuthorizationRequestResponse - */ - public static UnitAuthorizationRequestResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitAuthorizationRequestResponse.class); - } - - /** - * Convert an instance of UnitAuthorizationRequestResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitAuthorizationRequestsResponse.java b/src/main/java/org/openapitools/client/model/UnitAuthorizationRequestsResponse.java deleted file mode 100644 index 3170d712..00000000 --- a/src/main/java/org/openapitools/client/model/UnitAuthorizationRequestsResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AuthorizationRequest; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitAuthorizationRequestsResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitAuthorizationRequestsResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private AuthorizationRequest data; - - public UnitAuthorizationRequestsResponse() { - } - - public UnitAuthorizationRequestsResponse data(AuthorizationRequest data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public AuthorizationRequest getData() { - return data; - } - - - public void setData(AuthorizationRequest data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitAuthorizationRequestsResponse unitAuthorizationRequestsResponse = (UnitAuthorizationRequestsResponse) o; - return Objects.equals(this.data, unitAuthorizationRequestsResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitAuthorizationRequestsResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitAuthorizationRequestsResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitAuthorizationRequestsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitAuthorizationRequestsResponse is not found in the empty JSON string", UnitAuthorizationRequestsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitAuthorizationRequestsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitAuthorizationRequestsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - AuthorizationRequest.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitAuthorizationRequestsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitAuthorizationRequestsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitAuthorizationRequestsResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitAuthorizationRequestsResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitAuthorizationRequestsResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitAuthorizationRequestsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitAuthorizationRequestsResponse - * @throws IOException if the JSON string is invalid with respect to UnitAuthorizationRequestsResponse - */ - public static UnitAuthorizationRequestsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitAuthorizationRequestsResponse.class); - } - - /** - * Convert an instance of UnitAuthorizationRequestsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitAuthorizationResponse.java b/src/main/java/org/openapitools/client/model/UnitAuthorizationResponse.java deleted file mode 100644 index 7985c4f1..00000000 --- a/src/main/java/org/openapitools/client/model/UnitAuthorizationResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Authorization; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitAuthorizationResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitAuthorizationResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Authorization data; - - public UnitAuthorizationResponse() { - } - - public UnitAuthorizationResponse data(Authorization data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Authorization getData() { - return data; - } - - - public void setData(Authorization data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitAuthorizationResponse unitAuthorizationResponse = (UnitAuthorizationResponse) o; - return Objects.equals(this.data, unitAuthorizationResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitAuthorizationResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitAuthorizationResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitAuthorizationResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitAuthorizationResponse is not found in the empty JSON string", UnitAuthorizationResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitAuthorizationResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitAuthorizationResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Authorization.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitAuthorizationResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitAuthorizationResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitAuthorizationResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitAuthorizationResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitAuthorizationResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitAuthorizationResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitAuthorizationResponse - * @throws IOException if the JSON string is invalid with respect to UnitAuthorizationResponse - */ - public static UnitAuthorizationResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitAuthorizationResponse.class); - } - - /** - * Convert an instance of UnitAuthorizationResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitCancelApplicationResponse.java b/src/main/java/org/openapitools/client/model/UnitCancelApplicationResponse.java deleted file mode 100644 index 1f35dae0..00000000 --- a/src/main/java/org/openapitools/client/model/UnitCancelApplicationResponse.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Application; -import org.openapitools.client.model.Document; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitCancelApplicationResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitCancelApplicationResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Application data; - - public static final String SERIALIZED_NAME_INCLUDED = "included"; - @SerializedName(SERIALIZED_NAME_INCLUDED) - private List included; - - public UnitCancelApplicationResponse() { - } - - public UnitCancelApplicationResponse data(Application data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Application getData() { - return data; - } - - - public void setData(Application data) { - this.data = data; - } - - - public UnitCancelApplicationResponse included(List included) { - - this.included = included; - return this; - } - - public UnitCancelApplicationResponse addIncludedItem(Document includedItem) { - if (this.included == null) { - this.included = new ArrayList<>(); - } - this.included.add(includedItem); - return this; - } - - /** - * Get included - * @return included - **/ - @javax.annotation.Nullable - public List getIncluded() { - return included; - } - - - public void setIncluded(List included) { - this.included = included; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitCancelApplicationResponse unitCancelApplicationResponse = (UnitCancelApplicationResponse) o; - return Objects.equals(this.data, unitCancelApplicationResponse.data) && - Objects.equals(this.included, unitCancelApplicationResponse.included); - } - - @Override - public int hashCode() { - return Objects.hash(data, included); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitCancelApplicationResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" included: ").append(toIndentedString(included)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("included"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitCancelApplicationResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitCancelApplicationResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitCancelApplicationResponse is not found in the empty JSON string", UnitCancelApplicationResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitCancelApplicationResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitCancelApplicationResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Application.validateJsonElement(jsonObj.get("data")); - } - if (jsonObj.get("included") != null && !jsonObj.get("included").isJsonNull()) { - JsonArray jsonArrayincluded = jsonObj.getAsJsonArray("included"); - if (jsonArrayincluded != null) { - // ensure the json data is an array - if (!jsonObj.get("included").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `included` to be an array in the JSON string but got `%s`", jsonObj.get("included").toString())); - } - - // validate the optional field `included` (array) - for (int i = 0; i < jsonArrayincluded.size(); i++) { - Document.validateJsonElement(jsonArrayincluded.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitCancelApplicationResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitCancelApplicationResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitCancelApplicationResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitCancelApplicationResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitCancelApplicationResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitCancelApplicationResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitCancelApplicationResponse - * @throws IOException if the JSON string is invalid with respect to UnitCancelApplicationResponse - */ - public static UnitCancelApplicationResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitCancelApplicationResponse.class); - } - - /** - * Convert an instance of UnitCancelApplicationResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitCardResponse.java b/src/main/java/org/openapitools/client/model/UnitCardResponse.java deleted file mode 100644 index 657e506c..00000000 --- a/src/main/java/org/openapitools/client/model/UnitCardResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Card; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitCardResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitCardResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Card data; - - public UnitCardResponse() { - } - - public UnitCardResponse data(Card data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Card getData() { - return data; - } - - - public void setData(Card data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitCardResponse unitCardResponse = (UnitCardResponse) o; - return Objects.equals(this.data, unitCardResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitCardResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitCardResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitCardResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitCardResponse is not found in the empty JSON string", UnitCardResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitCardResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitCardResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Card.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitCardResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitCardResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitCardResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitCardResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitCardResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitCardResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitCardResponse - * @throws IOException if the JSON string is invalid with respect to UnitCardResponse - */ - public static UnitCardResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitCardResponse.class); - } - - /** - * Convert an instance of UnitCardResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitCardResponse1.java b/src/main/java/org/openapitools/client/model/UnitCardResponse1.java deleted file mode 100644 index b75f5081..00000000 --- a/src/main/java/org/openapitools/client/model/UnitCardResponse1.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Card; -import org.openapitools.client.model.IncludedResourceInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitCardResponse1 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitCardResponse1 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Card data; - - public static final String SERIALIZED_NAME_INCLUDED = "included"; - @SerializedName(SERIALIZED_NAME_INCLUDED) - private List> included; - - public UnitCardResponse1() { - } - - public UnitCardResponse1 data(Card data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Card getData() { - return data; - } - - - public void setData(Card data) { - this.data = data; - } - - - public UnitCardResponse1 included(List> included) { - - this.included = included; - return this; - } - - public UnitCardResponse1 addIncludedItem(List includedItem) { - if (this.included == null) { - this.included = new ArrayList<>(); - } - this.included.add(includedItem); - return this; - } - - /** - * Get included - * @return included - **/ - @javax.annotation.Nullable - public List> getIncluded() { - return included; - } - - - public void setIncluded(List> included) { - this.included = included; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitCardResponse1 unitCardResponse1 = (UnitCardResponse1) o; - return Objects.equals(this.data, unitCardResponse1.data) && - Objects.equals(this.included, unitCardResponse1.included); - } - - @Override - public int hashCode() { - return Objects.hash(data, included); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitCardResponse1 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" included: ").append(toIndentedString(included)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("included"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitCardResponse1 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitCardResponse1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitCardResponse1 is not found in the empty JSON string", UnitCardResponse1.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitCardResponse1.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitCardResponse1` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Card.validateJsonElement(jsonObj.get("data")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("included") != null && !jsonObj.get("included").isJsonNull() && !jsonObj.get("included").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `included` to be an array in the JSON string but got `%s`", jsonObj.get("included").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitCardResponse1.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitCardResponse1' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitCardResponse1.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitCardResponse1 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitCardResponse1 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitCardResponse1 given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitCardResponse1 - * @throws IOException if the JSON string is invalid with respect to UnitCardResponse1 - */ - public static UnitCardResponse1 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitCardResponse1.class); - } - - /** - * Convert an instance of UnitCardResponse1 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitCardResponse2.java b/src/main/java/org/openapitools/client/model/UnitCardResponse2.java deleted file mode 100644 index 30f77ac2..00000000 --- a/src/main/java/org/openapitools/client/model/UnitCardResponse2.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PinStatus; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitCardResponse2 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitCardResponse2 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private PinStatus data; - - public UnitCardResponse2() { - } - - public UnitCardResponse2 data(PinStatus data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public PinStatus getData() { - return data; - } - - - public void setData(PinStatus data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitCardResponse2 unitCardResponse2 = (UnitCardResponse2) o; - return Objects.equals(this.data, unitCardResponse2.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitCardResponse2 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitCardResponse2 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitCardResponse2.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitCardResponse2 is not found in the empty JSON string", UnitCardResponse2.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitCardResponse2.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitCardResponse2` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - PinStatus.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitCardResponse2.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitCardResponse2' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitCardResponse2.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitCardResponse2 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitCardResponse2 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitCardResponse2 given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitCardResponse2 - * @throws IOException if the JSON string is invalid with respect to UnitCardResponse2 - */ - public static UnitCardResponse2 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitCardResponse2.class); - } - - /** - * Convert an instance of UnitCardResponse2 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitCardResponse3.java b/src/main/java/org/openapitools/client/model/UnitCardResponse3.java deleted file mode 100644 index 3571e03d..00000000 --- a/src/main/java/org/openapitools/client/model/UnitCardResponse3.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Limits1; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitCardResponse3 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitCardResponse3 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Limits1 data; - - public UnitCardResponse3() { - } - - public UnitCardResponse3 data(Limits1 data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Limits1 getData() { - return data; - } - - - public void setData(Limits1 data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitCardResponse3 unitCardResponse3 = (UnitCardResponse3) o; - return Objects.equals(this.data, unitCardResponse3.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitCardResponse3 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitCardResponse3 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitCardResponse3.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitCardResponse3 is not found in the empty JSON string", UnitCardResponse3.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitCardResponse3.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitCardResponse3` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Limits1.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitCardResponse3.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitCardResponse3' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitCardResponse3.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitCardResponse3 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitCardResponse3 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitCardResponse3 given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitCardResponse3 - * @throws IOException if the JSON string is invalid with respect to UnitCardResponse3 - */ - public static UnitCardResponse3 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitCardResponse3.class); - } - - /** - * Convert an instance of UnitCardResponse3 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitCardResponseCardsList.java b/src/main/java/org/openapitools/client/model/UnitCardResponseCardsList.java deleted file mode 100644 index 45d21f47..00000000 --- a/src/main/java/org/openapitools/client/model/UnitCardResponseCardsList.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Card; -import org.openapitools.client.model.IncludedResourceInner; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitCardResponseCardsList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitCardResponseCardsList { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public static final String SERIALIZED_NAME_INCLUDED = "included"; - @SerializedName(SERIALIZED_NAME_INCLUDED) - private List> included; - - public UnitCardResponseCardsList() { - } - - public UnitCardResponseCardsList data(List data) { - - this.data = data; - return this; - } - - public UnitCardResponseCardsList addDataItem(Card dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - public UnitCardResponseCardsList included(List> included) { - - this.included = included; - return this; - } - - public UnitCardResponseCardsList addIncludedItem(List includedItem) { - if (this.included == null) { - this.included = new ArrayList<>(); - } - this.included.add(includedItem); - return this; - } - - /** - * Get included - * @return included - **/ - @javax.annotation.Nullable - public List> getIncluded() { - return included; - } - - - public void setIncluded(List> included) { - this.included = included; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitCardResponseCardsList unitCardResponseCardsList = (UnitCardResponseCardsList) o; - return Objects.equals(this.data, unitCardResponseCardsList.data) && - Objects.equals(this.included, unitCardResponseCardsList.included); - } - - @Override - public int hashCode() { - return Objects.hash(data, included); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitCardResponseCardsList {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" included: ").append(toIndentedString(included)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("included"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitCardResponseCardsList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitCardResponseCardsList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitCardResponseCardsList is not found in the empty JSON string", UnitCardResponseCardsList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitCardResponseCardsList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitCardResponseCardsList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - Card.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("included") != null && !jsonObj.get("included").isJsonNull() && !jsonObj.get("included").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `included` to be an array in the JSON string but got `%s`", jsonObj.get("included").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitCardResponseCardsList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitCardResponseCardsList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitCardResponseCardsList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitCardResponseCardsList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitCardResponseCardsList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitCardResponseCardsList given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitCardResponseCardsList - * @throws IOException if the JSON string is invalid with respect to UnitCardResponseCardsList - */ - public static UnitCardResponseCardsList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitCardResponseCardsList.class); - } - - /** - * Convert an instance of UnitCardResponseCardsList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitCheckDepositResponse.java b/src/main/java/org/openapitools/client/model/UnitCheckDepositResponse.java deleted file mode 100644 index e54295e9..00000000 --- a/src/main/java/org/openapitools/client/model/UnitCheckDepositResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CheckDeposit; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitCheckDepositResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitCheckDepositResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CheckDeposit data; - - public UnitCheckDepositResponse() { - } - - public UnitCheckDepositResponse data(CheckDeposit data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CheckDeposit getData() { - return data; - } - - - public void setData(CheckDeposit data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitCheckDepositResponse unitCheckDepositResponse = (UnitCheckDepositResponse) o; - return Objects.equals(this.data, unitCheckDepositResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitCheckDepositResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitCheckDepositResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitCheckDepositResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitCheckDepositResponse is not found in the empty JSON string", UnitCheckDepositResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitCheckDepositResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitCheckDepositResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CheckDeposit.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitCheckDepositResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitCheckDepositResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitCheckDepositResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitCheckDepositResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitCheckDepositResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitCheckDepositResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitCheckDepositResponse - * @throws IOException if the JSON string is invalid with respect to UnitCheckDepositResponse - */ - public static UnitCheckDepositResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitCheckDepositResponse.class); - } - - /** - * Convert an instance of UnitCheckDepositResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitCheckDepositResponse1.java b/src/main/java/org/openapitools/client/model/UnitCheckDepositResponse1.java deleted file mode 100644 index bfc7fda9..00000000 --- a/src/main/java/org/openapitools/client/model/UnitCheckDepositResponse1.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitCheckDepositResponse1 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitCheckDepositResponse1 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private String data; - - public UnitCheckDepositResponse1() { - } - - public UnitCheckDepositResponse1 data(String data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public String getData() { - return data; - } - - - public void setData(String data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitCheckDepositResponse1 unitCheckDepositResponse1 = (UnitCheckDepositResponse1) o; - return Objects.equals(this.data, unitCheckDepositResponse1.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitCheckDepositResponse1 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitCheckDepositResponse1 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitCheckDepositResponse1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitCheckDepositResponse1 is not found in the empty JSON string", UnitCheckDepositResponse1.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitCheckDepositResponse1.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitCheckDepositResponse1` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) && !jsonObj.get("data").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitCheckDepositResponse1.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitCheckDepositResponse1' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitCheckDepositResponse1.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitCheckDepositResponse1 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitCheckDepositResponse1 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitCheckDepositResponse1 given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitCheckDepositResponse1 - * @throws IOException if the JSON string is invalid with respect to UnitCheckDepositResponse1 - */ - public static UnitCheckDepositResponse1 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitCheckDepositResponse1.class); - } - - /** - * Convert an instance of UnitCheckDepositResponse1 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitCheckPaymentResponse.java b/src/main/java/org/openapitools/client/model/UnitCheckPaymentResponse.java deleted file mode 100644 index b910ce39..00000000 --- a/src/main/java/org/openapitools/client/model/UnitCheckPaymentResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CheckPayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitCheckPaymentResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitCheckPaymentResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CheckPayment data; - - public UnitCheckPaymentResponse() { - } - - public UnitCheckPaymentResponse data(CheckPayment data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CheckPayment getData() { - return data; - } - - - public void setData(CheckPayment data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitCheckPaymentResponse unitCheckPaymentResponse = (UnitCheckPaymentResponse) o; - return Objects.equals(this.data, unitCheckPaymentResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitCheckPaymentResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitCheckPaymentResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitCheckPaymentResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitCheckPaymentResponse is not found in the empty JSON string", UnitCheckPaymentResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitCheckPaymentResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitCheckPaymentResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CheckPayment.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitCheckPaymentResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitCheckPaymentResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitCheckPaymentResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitCheckPaymentResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitCheckPaymentResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitCheckPaymentResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitCheckPaymentResponse - * @throws IOException if the JSON string is invalid with respect to UnitCheckPaymentResponse - */ - public static UnitCheckPaymentResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitCheckPaymentResponse.class); - } - - /** - * Convert an instance of UnitCheckPaymentResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitCounterpartiesListResponse.java b/src/main/java/org/openapitools/client/model/UnitCounterpartiesListResponse.java deleted file mode 100644 index f801f770..00000000 --- a/src/main/java/org/openapitools/client/model/UnitCounterpartiesListResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Counterparty1; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitCounterpartiesListResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitCounterpartiesListResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Counterparty1 data; - - public UnitCounterpartiesListResponse() { - } - - public UnitCounterpartiesListResponse data(Counterparty1 data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Counterparty1 getData() { - return data; - } - - - public void setData(Counterparty1 data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitCounterpartiesListResponse unitCounterpartiesListResponse = (UnitCounterpartiesListResponse) o; - return Objects.equals(this.data, unitCounterpartiesListResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitCounterpartiesListResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitCounterpartiesListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitCounterpartiesListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitCounterpartiesListResponse is not found in the empty JSON string", UnitCounterpartiesListResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitCounterpartiesListResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitCounterpartiesListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Counterparty1.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitCounterpartiesListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitCounterpartiesListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitCounterpartiesListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitCounterpartiesListResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitCounterpartiesListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitCounterpartiesListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitCounterpartiesListResponse - * @throws IOException if the JSON string is invalid with respect to UnitCounterpartiesListResponse - */ - public static UnitCounterpartiesListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitCounterpartiesListResponse.class); - } - - /** - * Convert an instance of UnitCounterpartiesListResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitCounterpartyResponse.java b/src/main/java/org/openapitools/client/model/UnitCounterpartyResponse.java deleted file mode 100644 index 2b8298c9..00000000 --- a/src/main/java/org/openapitools/client/model/UnitCounterpartyResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Counterparty1; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitCounterpartyResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitCounterpartyResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Counterparty1 data; - - public UnitCounterpartyResponse() { - } - - public UnitCounterpartyResponse data(Counterparty1 data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Counterparty1 getData() { - return data; - } - - - public void setData(Counterparty1 data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitCounterpartyResponse unitCounterpartyResponse = (UnitCounterpartyResponse) o; - return Objects.equals(this.data, unitCounterpartyResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitCounterpartyResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitCounterpartyResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitCounterpartyResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitCounterpartyResponse is not found in the empty JSON string", UnitCounterpartyResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitCounterpartyResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitCounterpartyResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Counterparty1.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitCounterpartyResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitCounterpartyResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitCounterpartyResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitCounterpartyResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitCounterpartyResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitCounterpartyResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitCounterpartyResponse - * @throws IOException if the JSON string is invalid with respect to UnitCounterpartyResponse - */ - public static UnitCounterpartyResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitCounterpartyResponse.class); - } - - /** - * Convert an instance of UnitCounterpartyResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitCounterpartyResponse1.java b/src/main/java/org/openapitools/client/model/UnitCounterpartyResponse1.java deleted file mode 100644 index a0609983..00000000 --- a/src/main/java/org/openapitools/client/model/UnitCounterpartyResponse1.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CounterpartyBalance; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitCounterpartyResponse1 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitCounterpartyResponse1 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CounterpartyBalance data; - - public UnitCounterpartyResponse1() { - } - - public UnitCounterpartyResponse1 data(CounterpartyBalance data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CounterpartyBalance getData() { - return data; - } - - - public void setData(CounterpartyBalance data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitCounterpartyResponse1 unitCounterpartyResponse1 = (UnitCounterpartyResponse1) o; - return Objects.equals(this.data, unitCounterpartyResponse1.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitCounterpartyResponse1 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitCounterpartyResponse1 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitCounterpartyResponse1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitCounterpartyResponse1 is not found in the empty JSON string", UnitCounterpartyResponse1.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitCounterpartyResponse1.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitCounterpartyResponse1` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CounterpartyBalance.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitCounterpartyResponse1.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitCounterpartyResponse1' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitCounterpartyResponse1.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitCounterpartyResponse1 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitCounterpartyResponse1 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitCounterpartyResponse1 given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitCounterpartyResponse1 - * @throws IOException if the JSON string is invalid with respect to UnitCounterpartyResponse1 - */ - public static UnitCounterpartyResponse1 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitCounterpartyResponse1.class); - } - - /** - * Convert an instance of UnitCounterpartyResponse1 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitCreateApplicationResponse.java b/src/main/java/org/openapitools/client/model/UnitCreateApplicationResponse.java deleted file mode 100644 index cc721376..00000000 --- a/src/main/java/org/openapitools/client/model/UnitCreateApplicationResponse.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Application; -import org.openapitools.client.model.Document; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitCreateApplicationResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitCreateApplicationResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Application data; - - public static final String SERIALIZED_NAME_INCLUDED = "included"; - @SerializedName(SERIALIZED_NAME_INCLUDED) - private List included; - - public UnitCreateApplicationResponse() { - } - - public UnitCreateApplicationResponse data(Application data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Application getData() { - return data; - } - - - public void setData(Application data) { - this.data = data; - } - - - public UnitCreateApplicationResponse included(List included) { - - this.included = included; - return this; - } - - public UnitCreateApplicationResponse addIncludedItem(Document includedItem) { - if (this.included == null) { - this.included = new ArrayList<>(); - } - this.included.add(includedItem); - return this; - } - - /** - * Get included - * @return included - **/ - @javax.annotation.Nullable - public List getIncluded() { - return included; - } - - - public void setIncluded(List included) { - this.included = included; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitCreateApplicationResponse unitCreateApplicationResponse = (UnitCreateApplicationResponse) o; - return Objects.equals(this.data, unitCreateApplicationResponse.data) && - Objects.equals(this.included, unitCreateApplicationResponse.included); - } - - @Override - public int hashCode() { - return Objects.hash(data, included); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitCreateApplicationResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" included: ").append(toIndentedString(included)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("included"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitCreateApplicationResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitCreateApplicationResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitCreateApplicationResponse is not found in the empty JSON string", UnitCreateApplicationResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitCreateApplicationResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitCreateApplicationResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Application.validateJsonElement(jsonObj.get("data")); - } - if (jsonObj.get("included") != null && !jsonObj.get("included").isJsonNull()) { - JsonArray jsonArrayincluded = jsonObj.getAsJsonArray("included"); - if (jsonArrayincluded != null) { - // ensure the json data is an array - if (!jsonObj.get("included").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `included` to be an array in the JSON string but got `%s`", jsonObj.get("included").toString())); - } - - // validate the optional field `included` (array) - for (int i = 0; i < jsonArrayincluded.size(); i++) { - Document.validateJsonElement(jsonArrayincluded.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitCreateApplicationResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitCreateApplicationResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitCreateApplicationResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitCreateApplicationResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitCreateApplicationResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitCreateApplicationResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitCreateApplicationResponse - * @throws IOException if the JSON string is invalid with respect to UnitCreateApplicationResponse - */ - public static UnitCreateApplicationResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitCreateApplicationResponse.class); - } - - /** - * Convert an instance of UnitCreateApplicationResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitCustomerResponse.java b/src/main/java/org/openapitools/client/model/UnitCustomerResponse.java deleted file mode 100644 index c53b7a06..00000000 --- a/src/main/java/org/openapitools/client/model/UnitCustomerResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Customer; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitCustomerResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitCustomerResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Customer data; - - public UnitCustomerResponse() { - } - - public UnitCustomerResponse data(Customer data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Customer getData() { - return data; - } - - - public void setData(Customer data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitCustomerResponse unitCustomerResponse = (UnitCustomerResponse) o; - return Objects.equals(this.data, unitCustomerResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitCustomerResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitCustomerResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitCustomerResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitCustomerResponse is not found in the empty JSON string", UnitCustomerResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitCustomerResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitCustomerResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Customer.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitCustomerResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitCustomerResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitCustomerResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitCustomerResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitCustomerResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitCustomerResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitCustomerResponse - * @throws IOException if the JSON string is invalid with respect to UnitCustomerResponse - */ - public static UnitCustomerResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitCustomerResponse.class); - } - - /** - * Convert an instance of UnitCustomerResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitCustomerTokenResponse.java b/src/main/java/org/openapitools/client/model/UnitCustomerTokenResponse.java deleted file mode 100644 index e5bb2454..00000000 --- a/src/main/java/org/openapitools/client/model/UnitCustomerTokenResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CustomerToken; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitCustomerTokenResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitCustomerTokenResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CustomerToken data; - - public UnitCustomerTokenResponse() { - } - - public UnitCustomerTokenResponse data(CustomerToken data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CustomerToken getData() { - return data; - } - - - public void setData(CustomerToken data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitCustomerTokenResponse unitCustomerTokenResponse = (UnitCustomerTokenResponse) o; - return Objects.equals(this.data, unitCustomerTokenResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitCustomerTokenResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitCustomerTokenResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitCustomerTokenResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitCustomerTokenResponse is not found in the empty JSON string", UnitCustomerTokenResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitCustomerTokenResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitCustomerTokenResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CustomerToken.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitCustomerTokenResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitCustomerTokenResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitCustomerTokenResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitCustomerTokenResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitCustomerTokenResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitCustomerTokenResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitCustomerTokenResponse - * @throws IOException if the JSON string is invalid with respect to UnitCustomerTokenResponse - */ - public static UnitCustomerTokenResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitCustomerTokenResponse.class); - } - - /** - * Convert an instance of UnitCustomerTokenResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitCustomerTokenVerificationResponse.java b/src/main/java/org/openapitools/client/model/UnitCustomerTokenVerificationResponse.java deleted file mode 100644 index 3325887f..00000000 --- a/src/main/java/org/openapitools/client/model/UnitCustomerTokenVerificationResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.CustomerTokenVerification; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitCustomerTokenVerificationResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitCustomerTokenVerificationResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private CustomerTokenVerification data; - - public UnitCustomerTokenVerificationResponse() { - } - - public UnitCustomerTokenVerificationResponse data(CustomerTokenVerification data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public CustomerTokenVerification getData() { - return data; - } - - - public void setData(CustomerTokenVerification data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitCustomerTokenVerificationResponse unitCustomerTokenVerificationResponse = (UnitCustomerTokenVerificationResponse) o; - return Objects.equals(this.data, unitCustomerTokenVerificationResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitCustomerTokenVerificationResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitCustomerTokenVerificationResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitCustomerTokenVerificationResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitCustomerTokenVerificationResponse is not found in the empty JSON string", UnitCustomerTokenVerificationResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitCustomerTokenVerificationResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitCustomerTokenVerificationResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CustomerTokenVerification.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitCustomerTokenVerificationResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitCustomerTokenVerificationResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitCustomerTokenVerificationResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitCustomerTokenVerificationResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitCustomerTokenVerificationResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitCustomerTokenVerificationResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitCustomerTokenVerificationResponse - * @throws IOException if the JSON string is invalid with respect to UnitCustomerTokenVerificationResponse - */ - public static UnitCustomerTokenVerificationResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitCustomerTokenVerificationResponse.class); - } - - /** - * Convert an instance of UnitCustomerTokenVerificationResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitCustomersListResponse.java b/src/main/java/org/openapitools/client/model/UnitCustomersListResponse.java deleted file mode 100644 index b50717e7..00000000 --- a/src/main/java/org/openapitools/client/model/UnitCustomersListResponse.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Customer; -import org.openapitools.client.model.PaginationMeta; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitCustomersListResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitCustomersListResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - private PaginationMeta meta; - - public UnitCustomersListResponse() { - } - - public UnitCustomersListResponse data(List data) { - - this.data = data; - return this; - } - - public UnitCustomersListResponse addDataItem(Customer dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - public UnitCustomersListResponse meta(PaginationMeta meta) { - - this.meta = meta; - return this; - } - - /** - * Get meta - * @return meta - **/ - @javax.annotation.Nullable - public PaginationMeta getMeta() { - return meta; - } - - - public void setMeta(PaginationMeta meta) { - this.meta = meta; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitCustomersListResponse unitCustomersListResponse = (UnitCustomersListResponse) o; - return Objects.equals(this.data, unitCustomersListResponse.data) && - Objects.equals(this.meta, unitCustomersListResponse.meta); - } - - @Override - public int hashCode() { - return Objects.hash(data, meta); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitCustomersListResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("meta"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitCustomersListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitCustomersListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitCustomersListResponse is not found in the empty JSON string", UnitCustomersListResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitCustomersListResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitCustomersListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - Customer.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - PaginationMeta.validateJsonElement(jsonObj.get("meta")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitCustomersListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitCustomersListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitCustomersListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitCustomersListResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitCustomersListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitCustomersListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitCustomersListResponse - * @throws IOException if the JSON string is invalid with respect to UnitCustomersListResponse - */ - public static UnitCustomersListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitCustomersListResponse.class); - } - - /** - * Convert an instance of UnitCustomersListResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitDisputeResponse.java b/src/main/java/org/openapitools/client/model/UnitDisputeResponse.java deleted file mode 100644 index 2374bcc6..00000000 --- a/src/main/java/org/openapitools/client/model/UnitDisputeResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Dispute; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitDisputeResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitDisputeResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Dispute data; - - public UnitDisputeResponse() { - } - - public UnitDisputeResponse data(Dispute data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Dispute getData() { - return data; - } - - - public void setData(Dispute data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitDisputeResponse unitDisputeResponse = (UnitDisputeResponse) o; - return Objects.equals(this.data, unitDisputeResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitDisputeResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitDisputeResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitDisputeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitDisputeResponse is not found in the empty JSON string", UnitDisputeResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitDisputeResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitDisputeResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Dispute.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitDisputeResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitDisputeResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitDisputeResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitDisputeResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitDisputeResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitDisputeResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitDisputeResponse - * @throws IOException if the JSON string is invalid with respect to UnitDisputeResponse - */ - public static UnitDisputeResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitDisputeResponse.class); - } - - /** - * Convert an instance of UnitDisputeResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitDocumentResponse.java b/src/main/java/org/openapitools/client/model/UnitDocumentResponse.java deleted file mode 100644 index cdfa5561..00000000 --- a/src/main/java/org/openapitools/client/model/UnitDocumentResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Document; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitDocumentResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitDocumentResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Document data; - - public UnitDocumentResponse() { - } - - public UnitDocumentResponse data(Document data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Document getData() { - return data; - } - - - public void setData(Document data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitDocumentResponse unitDocumentResponse = (UnitDocumentResponse) o; - return Objects.equals(this.data, unitDocumentResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitDocumentResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitDocumentResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitDocumentResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitDocumentResponse is not found in the empty JSON string", UnitDocumentResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitDocumentResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitDocumentResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Document.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitDocumentResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitDocumentResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitDocumentResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitDocumentResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitDocumentResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitDocumentResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitDocumentResponse - * @throws IOException if the JSON string is invalid with respect to UnitDocumentResponse - */ - public static UnitDocumentResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitDocumentResponse.class); - } - - /** - * Convert an instance of UnitDocumentResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitEventListResponse.java b/src/main/java/org/openapitools/client/model/UnitEventListResponse.java deleted file mode 100644 index 04138d1c..00000000 --- a/src/main/java/org/openapitools/client/model/UnitEventListResponse.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Event; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitEventListResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitEventListResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public UnitEventListResponse() { - } - - public UnitEventListResponse data(List data) { - - this.data = data; - return this; - } - - public UnitEventListResponse addDataItem(Event dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitEventListResponse unitEventListResponse = (UnitEventListResponse) o; - return Objects.equals(this.data, unitEventListResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitEventListResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitEventListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitEventListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitEventListResponse is not found in the empty JSON string", UnitEventListResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitEventListResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitEventListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - Event.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitEventListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitEventListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitEventListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitEventListResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitEventListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitEventListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitEventListResponse - * @throws IOException if the JSON string is invalid with respect to UnitEventListResponse - */ - public static UnitEventListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitEventListResponse.class); - } - - /** - * Convert an instance of UnitEventListResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitEventResponse.java b/src/main/java/org/openapitools/client/model/UnitEventResponse.java deleted file mode 100644 index b385660a..00000000 --- a/src/main/java/org/openapitools/client/model/UnitEventResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Event; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitEventResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitEventResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Event data; - - public UnitEventResponse() { - } - - public UnitEventResponse data(Event data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Event getData() { - return data; - } - - - public void setData(Event data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitEventResponse unitEventResponse = (UnitEventResponse) o; - return Objects.equals(this.data, unitEventResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitEventResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitEventResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitEventResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitEventResponse is not found in the empty JSON string", UnitEventResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitEventResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitEventResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Event.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitEventResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitEventResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitEventResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitEventResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitEventResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitEventResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitEventResponse - * @throws IOException if the JSON string is invalid with respect to UnitEventResponse - */ - public static UnitEventResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitEventResponse.class); - } - - /** - * Convert an instance of UnitEventResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitEventResponse1.java b/src/main/java/org/openapitools/client/model/UnitEventResponse1.java deleted file mode 100644 index 9700a187..00000000 --- a/src/main/java/org/openapitools/client/model/UnitEventResponse1.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Event; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitEventResponse1 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitEventResponse1 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Event data; - - public UnitEventResponse1() { - } - - public UnitEventResponse1 data(Event data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Event getData() { - return data; - } - - - public void setData(Event data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitEventResponse1 unitEventResponse1 = (UnitEventResponse1) o; - return Objects.equals(this.data, unitEventResponse1.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitEventResponse1 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitEventResponse1 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitEventResponse1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitEventResponse1 is not found in the empty JSON string", UnitEventResponse1.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitEventResponse1.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitEventResponse1` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Event.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitEventResponse1.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitEventResponse1' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitEventResponse1.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitEventResponse1 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitEventResponse1 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitEventResponse1 given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitEventResponse1 - * @throws IOException if the JSON string is invalid with respect to UnitEventResponse1 - */ - public static UnitEventResponse1 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitEventResponse1.class); - } - - /** - * Convert an instance of UnitEventResponse1 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitFeeResponse.java b/src/main/java/org/openapitools/client/model/UnitFeeResponse.java deleted file mode 100644 index 2b56e38b..00000000 --- a/src/main/java/org/openapitools/client/model/UnitFeeResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Fee; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitFeeResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitFeeResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Fee data; - - public UnitFeeResponse() { - } - - public UnitFeeResponse data(Fee data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Fee getData() { - return data; - } - - - public void setData(Fee data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitFeeResponse unitFeeResponse = (UnitFeeResponse) o; - return Objects.equals(this.data, unitFeeResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitFeeResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitFeeResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitFeeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitFeeResponse is not found in the empty JSON string", UnitFeeResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitFeeResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitFeeResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Fee.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitFeeResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitFeeResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitFeeResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitFeeResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitFeeResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitFeeResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitFeeResponse - * @throws IOException if the JSON string is invalid with respect to UnitFeeResponse - */ - public static UnitFeeResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitFeeResponse.class); - } - - /** - * Convert an instance of UnitFeeResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitGetAccountEndOfDayListResponse.java b/src/main/java/org/openapitools/client/model/UnitGetAccountEndOfDayListResponse.java deleted file mode 100644 index d8d10981..00000000 --- a/src/main/java/org/openapitools/client/model/UnitGetAccountEndOfDayListResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.AccountEndOfDay; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitGetAccountEndOfDayListResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitGetAccountEndOfDayListResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private AccountEndOfDay data; - - public UnitGetAccountEndOfDayListResponse() { - } - - public UnitGetAccountEndOfDayListResponse data(AccountEndOfDay data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public AccountEndOfDay getData() { - return data; - } - - - public void setData(AccountEndOfDay data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitGetAccountEndOfDayListResponse unitGetAccountEndOfDayListResponse = (UnitGetAccountEndOfDayListResponse) o; - return Objects.equals(this.data, unitGetAccountEndOfDayListResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitGetAccountEndOfDayListResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitGetAccountEndOfDayListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitGetAccountEndOfDayListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitGetAccountEndOfDayListResponse is not found in the empty JSON string", UnitGetAccountEndOfDayListResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitGetAccountEndOfDayListResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitGetAccountEndOfDayListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - AccountEndOfDay.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitGetAccountEndOfDayListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitGetAccountEndOfDayListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitGetAccountEndOfDayListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitGetAccountEndOfDayListResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitGetAccountEndOfDayListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitGetAccountEndOfDayListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitGetAccountEndOfDayListResponse - * @throws IOException if the JSON string is invalid with respect to UnitGetAccountEndOfDayListResponse - */ - public static UnitGetAccountEndOfDayListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitGetAccountEndOfDayListResponse.class); - } - - /** - * Convert an instance of UnitGetAccountEndOfDayListResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitGetAccountLimitsResponse.java b/src/main/java/org/openapitools/client/model/UnitGetAccountLimitsResponse.java deleted file mode 100644 index 93e738eb..00000000 --- a/src/main/java/org/openapitools/client/model/UnitGetAccountLimitsResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Limits; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitGetAccountLimitsResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitGetAccountLimitsResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Limits data; - - public UnitGetAccountLimitsResponse() { - } - - public UnitGetAccountLimitsResponse data(Limits data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Limits getData() { - return data; - } - - - public void setData(Limits data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitGetAccountLimitsResponse unitGetAccountLimitsResponse = (UnitGetAccountLimitsResponse) o; - return Objects.equals(this.data, unitGetAccountLimitsResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitGetAccountLimitsResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitGetAccountLimitsResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitGetAccountLimitsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitGetAccountLimitsResponse is not found in the empty JSON string", UnitGetAccountLimitsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitGetAccountLimitsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitGetAccountLimitsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Limits.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitGetAccountLimitsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitGetAccountLimitsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitGetAccountLimitsResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitGetAccountLimitsResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitGetAccountLimitsResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitGetAccountLimitsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitGetAccountLimitsResponse - * @throws IOException if the JSON string is invalid with respect to UnitGetAccountLimitsResponse - */ - public static UnitGetAccountLimitsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitGetAccountLimitsResponse.class); - } - - /** - * Convert an instance of UnitGetAccountLimitsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitInstitutionResponse.java b/src/main/java/org/openapitools/client/model/UnitInstitutionResponse.java deleted file mode 100644 index 03fea6bf..00000000 --- a/src/main/java/org/openapitools/client/model/UnitInstitutionResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Institution; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitInstitutionResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitInstitutionResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Institution data; - - public UnitInstitutionResponse() { - } - - public UnitInstitutionResponse data(Institution data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Institution getData() { - return data; - } - - - public void setData(Institution data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitInstitutionResponse unitInstitutionResponse = (UnitInstitutionResponse) o; - return Objects.equals(this.data, unitInstitutionResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitInstitutionResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitInstitutionResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitInstitutionResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitInstitutionResponse is not found in the empty JSON string", UnitInstitutionResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitInstitutionResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitInstitutionResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Institution.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitInstitutionResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitInstitutionResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitInstitutionResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitInstitutionResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitInstitutionResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitInstitutionResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitInstitutionResponse - * @throws IOException if the JSON string is invalid with respect to UnitInstitutionResponse - */ - public static UnitInstitutionResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitInstitutionResponse.class); - } - - /** - * Convert an instance of UnitInstitutionResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitListApplicationsResponse.java b/src/main/java/org/openapitools/client/model/UnitListApplicationsResponse.java deleted file mode 100644 index 9df33823..00000000 --- a/src/main/java/org/openapitools/client/model/UnitListApplicationsResponse.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Application; -import org.openapitools.client.model.PaginationMeta; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitListApplicationsResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitListApplicationsResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - private PaginationMeta meta; - - public UnitListApplicationsResponse() { - } - - public UnitListApplicationsResponse data(List data) { - - this.data = data; - return this; - } - - public UnitListApplicationsResponse addDataItem(Application dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - public UnitListApplicationsResponse meta(PaginationMeta meta) { - - this.meta = meta; - return this; - } - - /** - * Get meta - * @return meta - **/ - @javax.annotation.Nullable - public PaginationMeta getMeta() { - return meta; - } - - - public void setMeta(PaginationMeta meta) { - this.meta = meta; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitListApplicationsResponse unitListApplicationsResponse = (UnitListApplicationsResponse) o; - return Objects.equals(this.data, unitListApplicationsResponse.data) && - Objects.equals(this.meta, unitListApplicationsResponse.meta); - } - - @Override - public int hashCode() { - return Objects.hash(data, meta); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitListApplicationsResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("meta"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitListApplicationsResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitListApplicationsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitListApplicationsResponse is not found in the empty JSON string", UnitListApplicationsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitListApplicationsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitListApplicationsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - Application.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - PaginationMeta.validateJsonElement(jsonObj.get("meta")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitListApplicationsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitListApplicationsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitListApplicationsResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitListApplicationsResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitListApplicationsResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitListApplicationsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitListApplicationsResponse - * @throws IOException if the JSON string is invalid with respect to UnitListApplicationsResponse - */ - public static UnitListApplicationsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitListApplicationsResponse.class); - } - - /** - * Convert an instance of UnitListApplicationsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitListAuthorizationRequestsResponse.java b/src/main/java/org/openapitools/client/model/UnitListAuthorizationRequestsResponse.java deleted file mode 100644 index d5faa8e5..00000000 --- a/src/main/java/org/openapitools/client/model/UnitListAuthorizationRequestsResponse.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.AuthorizationRequest; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitListAuthorizationRequestsResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitListAuthorizationRequestsResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public UnitListAuthorizationRequestsResponse() { - } - - public UnitListAuthorizationRequestsResponse data(List data) { - - this.data = data; - return this; - } - - public UnitListAuthorizationRequestsResponse addDataItem(AuthorizationRequest dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitListAuthorizationRequestsResponse unitListAuthorizationRequestsResponse = (UnitListAuthorizationRequestsResponse) o; - return Objects.equals(this.data, unitListAuthorizationRequestsResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitListAuthorizationRequestsResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitListAuthorizationRequestsResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitListAuthorizationRequestsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitListAuthorizationRequestsResponse is not found in the empty JSON string", UnitListAuthorizationRequestsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitListAuthorizationRequestsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitListAuthorizationRequestsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - AuthorizationRequest.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitListAuthorizationRequestsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitListAuthorizationRequestsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitListAuthorizationRequestsResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitListAuthorizationRequestsResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitListAuthorizationRequestsResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitListAuthorizationRequestsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitListAuthorizationRequestsResponse - * @throws IOException if the JSON string is invalid with respect to UnitListAuthorizationRequestsResponse - */ - public static UnitListAuthorizationRequestsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitListAuthorizationRequestsResponse.class); - } - - /** - * Convert an instance of UnitListAuthorizationRequestsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitListAuthorizationsResponse.java b/src/main/java/org/openapitools/client/model/UnitListAuthorizationsResponse.java deleted file mode 100644 index 038fe573..00000000 --- a/src/main/java/org/openapitools/client/model/UnitListAuthorizationsResponse.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Authorization; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitListAuthorizationsResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitListAuthorizationsResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public UnitListAuthorizationsResponse() { - } - - public UnitListAuthorizationsResponse data(List data) { - - this.data = data; - return this; - } - - public UnitListAuthorizationsResponse addDataItem(Authorization dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitListAuthorizationsResponse unitListAuthorizationsResponse = (UnitListAuthorizationsResponse) o; - return Objects.equals(this.data, unitListAuthorizationsResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitListAuthorizationsResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitListAuthorizationsResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitListAuthorizationsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitListAuthorizationsResponse is not found in the empty JSON string", UnitListAuthorizationsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitListAuthorizationsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitListAuthorizationsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - Authorization.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitListAuthorizationsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitListAuthorizationsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitListAuthorizationsResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitListAuthorizationsResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitListAuthorizationsResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitListAuthorizationsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitListAuthorizationsResponse - * @throws IOException if the JSON string is invalid with respect to UnitListAuthorizationsResponse - */ - public static UnitListAuthorizationsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitListAuthorizationsResponse.class); - } - - /** - * Convert an instance of UnitListAuthorizationsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitListCheckDepositsResponse.java b/src/main/java/org/openapitools/client/model/UnitListCheckDepositsResponse.java deleted file mode 100644 index 8b2df1b7..00000000 --- a/src/main/java/org/openapitools/client/model/UnitListCheckDepositsResponse.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.CheckDeposit; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitListCheckDepositsResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitListCheckDepositsResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public UnitListCheckDepositsResponse() { - } - - public UnitListCheckDepositsResponse data(List data) { - - this.data = data; - return this; - } - - public UnitListCheckDepositsResponse addDataItem(CheckDeposit dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitListCheckDepositsResponse unitListCheckDepositsResponse = (UnitListCheckDepositsResponse) o; - return Objects.equals(this.data, unitListCheckDepositsResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitListCheckDepositsResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitListCheckDepositsResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitListCheckDepositsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitListCheckDepositsResponse is not found in the empty JSON string", UnitListCheckDepositsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitListCheckDepositsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitListCheckDepositsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - CheckDeposit.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitListCheckDepositsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitListCheckDepositsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitListCheckDepositsResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitListCheckDepositsResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitListCheckDepositsResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitListCheckDepositsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitListCheckDepositsResponse - * @throws IOException if the JSON string is invalid with respect to UnitListCheckDepositsResponse - */ - public static UnitListCheckDepositsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitListCheckDepositsResponse.class); - } - - /** - * Convert an instance of UnitListCheckDepositsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitListCheckPaymentsResponse.java b/src/main/java/org/openapitools/client/model/UnitListCheckPaymentsResponse.java deleted file mode 100644 index a405a2cb..00000000 --- a/src/main/java/org/openapitools/client/model/UnitListCheckPaymentsResponse.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.CheckPayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitListCheckPaymentsResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitListCheckPaymentsResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public UnitListCheckPaymentsResponse() { - } - - public UnitListCheckPaymentsResponse data(List data) { - - this.data = data; - return this; - } - - public UnitListCheckPaymentsResponse addDataItem(CheckPayment dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitListCheckPaymentsResponse unitListCheckPaymentsResponse = (UnitListCheckPaymentsResponse) o; - return Objects.equals(this.data, unitListCheckPaymentsResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitListCheckPaymentsResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitListCheckPaymentsResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitListCheckPaymentsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitListCheckPaymentsResponse is not found in the empty JSON string", UnitListCheckPaymentsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitListCheckPaymentsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitListCheckPaymentsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - CheckPayment.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitListCheckPaymentsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitListCheckPaymentsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitListCheckPaymentsResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitListCheckPaymentsResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitListCheckPaymentsResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitListCheckPaymentsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitListCheckPaymentsResponse - * @throws IOException if the JSON string is invalid with respect to UnitListCheckPaymentsResponse - */ - public static UnitListCheckPaymentsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitListCheckPaymentsResponse.class); - } - - /** - * Convert an instance of UnitListCheckPaymentsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitListDocumentsResponse.java b/src/main/java/org/openapitools/client/model/UnitListDocumentsResponse.java deleted file mode 100644 index 9012615b..00000000 --- a/src/main/java/org/openapitools/client/model/UnitListDocumentsResponse.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Document; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitListDocumentsResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitListDocumentsResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public UnitListDocumentsResponse() { - } - - public UnitListDocumentsResponse data(List data) { - - this.data = data; - return this; - } - - public UnitListDocumentsResponse addDataItem(Document dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitListDocumentsResponse unitListDocumentsResponse = (UnitListDocumentsResponse) o; - return Objects.equals(this.data, unitListDocumentsResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitListDocumentsResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitListDocumentsResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitListDocumentsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitListDocumentsResponse is not found in the empty JSON string", UnitListDocumentsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitListDocumentsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitListDocumentsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - Document.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitListDocumentsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitListDocumentsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitListDocumentsResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitListDocumentsResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitListDocumentsResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitListDocumentsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitListDocumentsResponse - * @throws IOException if the JSON string is invalid with respect to UnitListDocumentsResponse - */ - public static UnitListDocumentsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitListDocumentsResponse.class); - } - - /** - * Convert an instance of UnitListDocumentsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitOrgApiTokensListResponse.java b/src/main/java/org/openapitools/client/model/UnitOrgApiTokensListResponse.java deleted file mode 100644 index e6346167..00000000 --- a/src/main/java/org/openapitools/client/model/UnitOrgApiTokensListResponse.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ApiToken; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitOrgApiTokensListResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitOrgApiTokensListResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public UnitOrgApiTokensListResponse() { - } - - public UnitOrgApiTokensListResponse data(List data) { - - this.data = data; - return this; - } - - public UnitOrgApiTokensListResponse addDataItem(ApiToken dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitOrgApiTokensListResponse unitOrgApiTokensListResponse = (UnitOrgApiTokensListResponse) o; - return Objects.equals(this.data, unitOrgApiTokensListResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitOrgApiTokensListResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitOrgApiTokensListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitOrgApiTokensListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitOrgApiTokensListResponse is not found in the empty JSON string", UnitOrgApiTokensListResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitOrgApiTokensListResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitOrgApiTokensListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - ApiToken.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitOrgApiTokensListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitOrgApiTokensListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitOrgApiTokensListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitOrgApiTokensListResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitOrgApiTokensListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitOrgApiTokensListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitOrgApiTokensListResponse - * @throws IOException if the JSON string is invalid with respect to UnitOrgApiTokensListResponse - */ - public static UnitOrgApiTokensListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitOrgApiTokensListResponse.class); - } - - /** - * Convert an instance of UnitOrgApiTokensListResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitPaymentResponse.java b/src/main/java/org/openapitools/client/model/UnitPaymentResponse.java deleted file mode 100644 index 80af107f..00000000 --- a/src/main/java/org/openapitools/client/model/UnitPaymentResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Payment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitPaymentResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitPaymentResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Payment data; - - public UnitPaymentResponse() { - } - - public UnitPaymentResponse data(Payment data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Payment getData() { - return data; - } - - - public void setData(Payment data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitPaymentResponse unitPaymentResponse = (UnitPaymentResponse) o; - return Objects.equals(this.data, unitPaymentResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitPaymentResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitPaymentResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitPaymentResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitPaymentResponse is not found in the empty JSON string", UnitPaymentResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitPaymentResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitPaymentResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Payment.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitPaymentResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitPaymentResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitPaymentResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitPaymentResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitPaymentResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitPaymentResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitPaymentResponse - * @throws IOException if the JSON string is invalid with respect to UnitPaymentResponse - */ - public static UnitPaymentResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitPaymentResponse.class); - } - - /** - * Convert an instance of UnitPaymentResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitPaymentResponseWithIncluded.java b/src/main/java/org/openapitools/client/model/UnitPaymentResponseWithIncluded.java deleted file mode 100644 index 03dfe83a..00000000 --- a/src/main/java/org/openapitools/client/model/UnitPaymentResponseWithIncluded.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.IncludedResourceInner; -import org.openapitools.client.model.Payment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitPaymentResponseWithIncluded - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitPaymentResponseWithIncluded { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Payment data; - - public static final String SERIALIZED_NAME_INCLUDED = "included"; - @SerializedName(SERIALIZED_NAME_INCLUDED) - private List included; - - public UnitPaymentResponseWithIncluded() { - } - - public UnitPaymentResponseWithIncluded data(Payment data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Payment getData() { - return data; - } - - - public void setData(Payment data) { - this.data = data; - } - - - public UnitPaymentResponseWithIncluded included(List included) { - - this.included = included; - return this; - } - - public UnitPaymentResponseWithIncluded addIncludedItem(IncludedResourceInner includedItem) { - if (this.included == null) { - this.included = new ArrayList<>(); - } - this.included.add(includedItem); - return this; - } - - /** - * Get included - * @return included - **/ - @javax.annotation.Nullable - public List getIncluded() { - return included; - } - - - public void setIncluded(List included) { - this.included = included; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitPaymentResponseWithIncluded unitPaymentResponseWithIncluded = (UnitPaymentResponseWithIncluded) o; - return Objects.equals(this.data, unitPaymentResponseWithIncluded.data) && - Objects.equals(this.included, unitPaymentResponseWithIncluded.included); - } - - @Override - public int hashCode() { - return Objects.hash(data, included); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitPaymentResponseWithIncluded {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" included: ").append(toIndentedString(included)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("included"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitPaymentResponseWithIncluded - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitPaymentResponseWithIncluded.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitPaymentResponseWithIncluded is not found in the empty JSON string", UnitPaymentResponseWithIncluded.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitPaymentResponseWithIncluded.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitPaymentResponseWithIncluded` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Payment.validateJsonElement(jsonObj.get("data")); - } - if (jsonObj.get("included") != null && !jsonObj.get("included").isJsonNull()) { - JsonArray jsonArrayincluded = jsonObj.getAsJsonArray("included"); - if (jsonArrayincluded != null) { - // ensure the json data is an array - if (!jsonObj.get("included").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `included` to be an array in the JSON string but got `%s`", jsonObj.get("included").toString())); - } - - // validate the optional field `included` (array) - for (int i = 0; i < jsonArrayincluded.size(); i++) { - IncludedResourceInner.validateJsonElement(jsonArrayincluded.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitPaymentResponseWithIncluded.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitPaymentResponseWithIncluded' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitPaymentResponseWithIncluded.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitPaymentResponseWithIncluded value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitPaymentResponseWithIncluded read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitPaymentResponseWithIncluded given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitPaymentResponseWithIncluded - * @throws IOException if the JSON string is invalid with respect to UnitPaymentResponseWithIncluded - */ - public static UnitPaymentResponseWithIncluded fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitPaymentResponseWithIncluded.class); - } - - /** - * Convert an instance of UnitPaymentResponseWithIncluded to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitPaymentsListResponse.java b/src/main/java/org/openapitools/client/model/UnitPaymentsListResponse.java deleted file mode 100644 index c2482411..00000000 --- a/src/main/java/org/openapitools/client/model/UnitPaymentsListResponse.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.IncludedResourceInner; -import org.openapitools.client.model.PaginationMeta; -import org.openapitools.client.model.Payment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitPaymentsListResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitPaymentsListResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public static final String SERIALIZED_NAME_INCLUDED = "included"; - @SerializedName(SERIALIZED_NAME_INCLUDED) - private List included; - - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - private PaginationMeta meta; - - public UnitPaymentsListResponse() { - } - - public UnitPaymentsListResponse data(List data) { - - this.data = data; - return this; - } - - public UnitPaymentsListResponse addDataItem(Payment dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - public UnitPaymentsListResponse included(List included) { - - this.included = included; - return this; - } - - public UnitPaymentsListResponse addIncludedItem(IncludedResourceInner includedItem) { - if (this.included == null) { - this.included = new ArrayList<>(); - } - this.included.add(includedItem); - return this; - } - - /** - * Get included - * @return included - **/ - @javax.annotation.Nullable - public List getIncluded() { - return included; - } - - - public void setIncluded(List included) { - this.included = included; - } - - - public UnitPaymentsListResponse meta(PaginationMeta meta) { - - this.meta = meta; - return this; - } - - /** - * Get meta - * @return meta - **/ - @javax.annotation.Nullable - public PaginationMeta getMeta() { - return meta; - } - - - public void setMeta(PaginationMeta meta) { - this.meta = meta; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitPaymentsListResponse unitPaymentsListResponse = (UnitPaymentsListResponse) o; - return Objects.equals(this.data, unitPaymentsListResponse.data) && - Objects.equals(this.included, unitPaymentsListResponse.included) && - Objects.equals(this.meta, unitPaymentsListResponse.meta); - } - - @Override - public int hashCode() { - return Objects.hash(data, included, meta); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitPaymentsListResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" included: ").append(toIndentedString(included)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("included"); - openapiFields.add("meta"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitPaymentsListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitPaymentsListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitPaymentsListResponse is not found in the empty JSON string", UnitPaymentsListResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitPaymentsListResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitPaymentsListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - Payment.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - if (jsonObj.get("included") != null && !jsonObj.get("included").isJsonNull()) { - JsonArray jsonArrayincluded = jsonObj.getAsJsonArray("included"); - if (jsonArrayincluded != null) { - // ensure the json data is an array - if (!jsonObj.get("included").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `included` to be an array in the JSON string but got `%s`", jsonObj.get("included").toString())); - } - - // validate the optional field `included` (array) - for (int i = 0; i < jsonArrayincluded.size(); i++) { - IncludedResourceInner.validateJsonElement(jsonArrayincluded.get(i)); - }; - } - } - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - PaginationMeta.validateJsonElement(jsonObj.get("meta")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitPaymentsListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitPaymentsListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitPaymentsListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitPaymentsListResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitPaymentsListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitPaymentsListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitPaymentsListResponse - * @throws IOException if the JSON string is invalid with respect to UnitPaymentsListResponse - */ - public static UnitPaymentsListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitPaymentsListResponse.class); - } - - /** - * Convert an instance of UnitPaymentsListResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitReceivedPaymentListResponse.java b/src/main/java/org/openapitools/client/model/UnitReceivedPaymentListResponse.java deleted file mode 100644 index dd3d59f2..00000000 --- a/src/main/java/org/openapitools/client/model/UnitReceivedPaymentListResponse.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.IncludedResourceInner; -import org.openapitools.client.model.PaginationMeta; -import org.openapitools.client.model.ReceivedPayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitReceivedPaymentListResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitReceivedPaymentListResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public static final String SERIALIZED_NAME_INCLUDED = "included"; - @SerializedName(SERIALIZED_NAME_INCLUDED) - private List included; - - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - private PaginationMeta meta; - - public UnitReceivedPaymentListResponse() { - } - - public UnitReceivedPaymentListResponse data(List data) { - - this.data = data; - return this; - } - - public UnitReceivedPaymentListResponse addDataItem(ReceivedPayment dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - public UnitReceivedPaymentListResponse included(List included) { - - this.included = included; - return this; - } - - public UnitReceivedPaymentListResponse addIncludedItem(IncludedResourceInner includedItem) { - if (this.included == null) { - this.included = new ArrayList<>(); - } - this.included.add(includedItem); - return this; - } - - /** - * Get included - * @return included - **/ - @javax.annotation.Nullable - public List getIncluded() { - return included; - } - - - public void setIncluded(List included) { - this.included = included; - } - - - public UnitReceivedPaymentListResponse meta(PaginationMeta meta) { - - this.meta = meta; - return this; - } - - /** - * Get meta - * @return meta - **/ - @javax.annotation.Nullable - public PaginationMeta getMeta() { - return meta; - } - - - public void setMeta(PaginationMeta meta) { - this.meta = meta; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitReceivedPaymentListResponse unitReceivedPaymentListResponse = (UnitReceivedPaymentListResponse) o; - return Objects.equals(this.data, unitReceivedPaymentListResponse.data) && - Objects.equals(this.included, unitReceivedPaymentListResponse.included) && - Objects.equals(this.meta, unitReceivedPaymentListResponse.meta); - } - - @Override - public int hashCode() { - return Objects.hash(data, included, meta); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitReceivedPaymentListResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" included: ").append(toIndentedString(included)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("included"); - openapiFields.add("meta"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitReceivedPaymentListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitReceivedPaymentListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitReceivedPaymentListResponse is not found in the empty JSON string", UnitReceivedPaymentListResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitReceivedPaymentListResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitReceivedPaymentListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - ReceivedPayment.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - if (jsonObj.get("included") != null && !jsonObj.get("included").isJsonNull()) { - JsonArray jsonArrayincluded = jsonObj.getAsJsonArray("included"); - if (jsonArrayincluded != null) { - // ensure the json data is an array - if (!jsonObj.get("included").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `included` to be an array in the JSON string but got `%s`", jsonObj.get("included").toString())); - } - - // validate the optional field `included` (array) - for (int i = 0; i < jsonArrayincluded.size(); i++) { - IncludedResourceInner.validateJsonElement(jsonArrayincluded.get(i)); - }; - } - } - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - PaginationMeta.validateJsonElement(jsonObj.get("meta")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitReceivedPaymentListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitReceivedPaymentListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitReceivedPaymentListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitReceivedPaymentListResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitReceivedPaymentListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitReceivedPaymentListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitReceivedPaymentListResponse - * @throws IOException if the JSON string is invalid with respect to UnitReceivedPaymentListResponse - */ - public static UnitReceivedPaymentListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitReceivedPaymentListResponse.class); - } - - /** - * Convert an instance of UnitReceivedPaymentListResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitReceivedPaymentResponse.java b/src/main/java/org/openapitools/client/model/UnitReceivedPaymentResponse.java deleted file mode 100644 index 222cc1c6..00000000 --- a/src/main/java/org/openapitools/client/model/UnitReceivedPaymentResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ReceivedPayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitReceivedPaymentResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitReceivedPaymentResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ReceivedPayment data; - - public UnitReceivedPaymentResponse() { - } - - public UnitReceivedPaymentResponse data(ReceivedPayment data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public ReceivedPayment getData() { - return data; - } - - - public void setData(ReceivedPayment data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitReceivedPaymentResponse unitReceivedPaymentResponse = (UnitReceivedPaymentResponse) o; - return Objects.equals(this.data, unitReceivedPaymentResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitReceivedPaymentResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitReceivedPaymentResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitReceivedPaymentResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitReceivedPaymentResponse is not found in the empty JSON string", UnitReceivedPaymentResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitReceivedPaymentResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitReceivedPaymentResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - ReceivedPayment.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitReceivedPaymentResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitReceivedPaymentResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitReceivedPaymentResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitReceivedPaymentResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitReceivedPaymentResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitReceivedPaymentResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitReceivedPaymentResponse - * @throws IOException if the JSON string is invalid with respect to UnitReceivedPaymentResponse - */ - public static UnitReceivedPaymentResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitReceivedPaymentResponse.class); - } - - /** - * Convert an instance of UnitReceivedPaymentResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitReceivedPaymentResponseWithIncluded.java b/src/main/java/org/openapitools/client/model/UnitReceivedPaymentResponseWithIncluded.java deleted file mode 100644 index e48995a6..00000000 --- a/src/main/java/org/openapitools/client/model/UnitReceivedPaymentResponseWithIncluded.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.IncludedResourceInner; -import org.openapitools.client.model.ReceivedPayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitReceivedPaymentResponseWithIncluded - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitReceivedPaymentResponseWithIncluded { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private ReceivedPayment data; - - public static final String SERIALIZED_NAME_INCLUDED = "included"; - @SerializedName(SERIALIZED_NAME_INCLUDED) - private List included; - - public UnitReceivedPaymentResponseWithIncluded() { - } - - public UnitReceivedPaymentResponseWithIncluded data(ReceivedPayment data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public ReceivedPayment getData() { - return data; - } - - - public void setData(ReceivedPayment data) { - this.data = data; - } - - - public UnitReceivedPaymentResponseWithIncluded included(List included) { - - this.included = included; - return this; - } - - public UnitReceivedPaymentResponseWithIncluded addIncludedItem(IncludedResourceInner includedItem) { - if (this.included == null) { - this.included = new ArrayList<>(); - } - this.included.add(includedItem); - return this; - } - - /** - * Get included - * @return included - **/ - @javax.annotation.Nullable - public List getIncluded() { - return included; - } - - - public void setIncluded(List included) { - this.included = included; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitReceivedPaymentResponseWithIncluded unitReceivedPaymentResponseWithIncluded = (UnitReceivedPaymentResponseWithIncluded) o; - return Objects.equals(this.data, unitReceivedPaymentResponseWithIncluded.data) && - Objects.equals(this.included, unitReceivedPaymentResponseWithIncluded.included); - } - - @Override - public int hashCode() { - return Objects.hash(data, included); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitReceivedPaymentResponseWithIncluded {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" included: ").append(toIndentedString(included)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("included"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitReceivedPaymentResponseWithIncluded - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitReceivedPaymentResponseWithIncluded.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitReceivedPaymentResponseWithIncluded is not found in the empty JSON string", UnitReceivedPaymentResponseWithIncluded.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitReceivedPaymentResponseWithIncluded.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitReceivedPaymentResponseWithIncluded` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - ReceivedPayment.validateJsonElement(jsonObj.get("data")); - } - if (jsonObj.get("included") != null && !jsonObj.get("included").isJsonNull()) { - JsonArray jsonArrayincluded = jsonObj.getAsJsonArray("included"); - if (jsonArrayincluded != null) { - // ensure the json data is an array - if (!jsonObj.get("included").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `included` to be an array in the JSON string but got `%s`", jsonObj.get("included").toString())); - } - - // validate the optional field `included` (array) - for (int i = 0; i < jsonArrayincluded.size(); i++) { - IncludedResourceInner.validateJsonElement(jsonArrayincluded.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitReceivedPaymentResponseWithIncluded.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitReceivedPaymentResponseWithIncluded' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitReceivedPaymentResponseWithIncluded.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitReceivedPaymentResponseWithIncluded value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitReceivedPaymentResponseWithIncluded read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitReceivedPaymentResponseWithIncluded given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitReceivedPaymentResponseWithIncluded - * @throws IOException if the JSON string is invalid with respect to UnitReceivedPaymentResponseWithIncluded - */ - public static UnitReceivedPaymentResponseWithIncluded fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitReceivedPaymentResponseWithIncluded.class); - } - - /** - * Convert an instance of UnitReceivedPaymentResponseWithIncluded to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitRecurringPaymentListResponse.java b/src/main/java/org/openapitools/client/model/UnitRecurringPaymentListResponse.java deleted file mode 100644 index 5521f921..00000000 --- a/src/main/java/org/openapitools/client/model/UnitRecurringPaymentListResponse.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.PaginationMeta; -import org.openapitools.client.model.RecurringPayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitRecurringPaymentListResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitRecurringPaymentListResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - private PaginationMeta meta; - - public UnitRecurringPaymentListResponse() { - } - - public UnitRecurringPaymentListResponse data(List data) { - - this.data = data; - return this; - } - - public UnitRecurringPaymentListResponse addDataItem(RecurringPayment dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - public UnitRecurringPaymentListResponse meta(PaginationMeta meta) { - - this.meta = meta; - return this; - } - - /** - * Get meta - * @return meta - **/ - @javax.annotation.Nullable - public PaginationMeta getMeta() { - return meta; - } - - - public void setMeta(PaginationMeta meta) { - this.meta = meta; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitRecurringPaymentListResponse unitRecurringPaymentListResponse = (UnitRecurringPaymentListResponse) o; - return Objects.equals(this.data, unitRecurringPaymentListResponse.data) && - Objects.equals(this.meta, unitRecurringPaymentListResponse.meta); - } - - @Override - public int hashCode() { - return Objects.hash(data, meta); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitRecurringPaymentListResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("meta"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitRecurringPaymentListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitRecurringPaymentListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitRecurringPaymentListResponse is not found in the empty JSON string", UnitRecurringPaymentListResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitRecurringPaymentListResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitRecurringPaymentListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - RecurringPayment.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - PaginationMeta.validateJsonElement(jsonObj.get("meta")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitRecurringPaymentListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitRecurringPaymentListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitRecurringPaymentListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitRecurringPaymentListResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitRecurringPaymentListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitRecurringPaymentListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitRecurringPaymentListResponse - * @throws IOException if the JSON string is invalid with respect to UnitRecurringPaymentListResponse - */ - public static UnitRecurringPaymentListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitRecurringPaymentListResponse.class); - } - - /** - * Convert an instance of UnitRecurringPaymentListResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitRecurringPaymentResponse.java b/src/main/java/org/openapitools/client/model/UnitRecurringPaymentResponse.java deleted file mode 100644 index 5ac9c4f2..00000000 --- a/src/main/java/org/openapitools/client/model/UnitRecurringPaymentResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.RecurringPayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitRecurringPaymentResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitRecurringPaymentResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private RecurringPayment data; - - public UnitRecurringPaymentResponse() { - } - - public UnitRecurringPaymentResponse data(RecurringPayment data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public RecurringPayment getData() { - return data; - } - - - public void setData(RecurringPayment data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitRecurringPaymentResponse unitRecurringPaymentResponse = (UnitRecurringPaymentResponse) o; - return Objects.equals(this.data, unitRecurringPaymentResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitRecurringPaymentResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitRecurringPaymentResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitRecurringPaymentResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitRecurringPaymentResponse is not found in the empty JSON string", UnitRecurringPaymentResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitRecurringPaymentResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitRecurringPaymentResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - RecurringPayment.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitRecurringPaymentResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitRecurringPaymentResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitRecurringPaymentResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitRecurringPaymentResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitRecurringPaymentResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitRecurringPaymentResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitRecurringPaymentResponse - * @throws IOException if the JSON string is invalid with respect to UnitRecurringPaymentResponse - */ - public static UnitRecurringPaymentResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitRecurringPaymentResponse.class); - } - - /** - * Convert an instance of UnitRecurringPaymentResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitRepaymentResponse.java b/src/main/java/org/openapitools/client/model/UnitRepaymentResponse.java deleted file mode 100644 index 75c183c7..00000000 --- a/src/main/java/org/openapitools/client/model/UnitRepaymentResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Repayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitRepaymentResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitRepaymentResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Repayment data; - - public UnitRepaymentResponse() { - } - - public UnitRepaymentResponse data(Repayment data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Repayment getData() { - return data; - } - - - public void setData(Repayment data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitRepaymentResponse unitRepaymentResponse = (UnitRepaymentResponse) o; - return Objects.equals(this.data, unitRepaymentResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitRepaymentResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitRepaymentResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitRepaymentResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitRepaymentResponse is not found in the empty JSON string", UnitRepaymentResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitRepaymentResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitRepaymentResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Repayment.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitRepaymentResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitRepaymentResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitRepaymentResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitRepaymentResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitRepaymentResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitRepaymentResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitRepaymentResponse - * @throws IOException if the JSON string is invalid with respect to UnitRepaymentResponse - */ - public static UnitRepaymentResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitRepaymentResponse.class); - } - - /** - * Convert an instance of UnitRepaymentResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitRepaymentsListResponse.java b/src/main/java/org/openapitools/client/model/UnitRepaymentsListResponse.java deleted file mode 100644 index 5b55fa03..00000000 --- a/src/main/java/org/openapitools/client/model/UnitRepaymentsListResponse.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.PaginationMeta; -import org.openapitools.client.model.Repayment; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitRepaymentsListResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitRepaymentsListResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - private PaginationMeta meta; - - public UnitRepaymentsListResponse() { - } - - public UnitRepaymentsListResponse data(List data) { - - this.data = data; - return this; - } - - public UnitRepaymentsListResponse addDataItem(Repayment dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - public UnitRepaymentsListResponse meta(PaginationMeta meta) { - - this.meta = meta; - return this; - } - - /** - * Get meta - * @return meta - **/ - @javax.annotation.Nullable - public PaginationMeta getMeta() { - return meta; - } - - - public void setMeta(PaginationMeta meta) { - this.meta = meta; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitRepaymentsListResponse unitRepaymentsListResponse = (UnitRepaymentsListResponse) o; - return Objects.equals(this.data, unitRepaymentsListResponse.data) && - Objects.equals(this.meta, unitRepaymentsListResponse.meta); - } - - @Override - public int hashCode() { - return Objects.hash(data, meta); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitRepaymentsListResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("meta"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitRepaymentsListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitRepaymentsListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitRepaymentsListResponse is not found in the empty JSON string", UnitRepaymentsListResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitRepaymentsListResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitRepaymentsListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - Repayment.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - PaginationMeta.validateJsonElement(jsonObj.get("meta")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitRepaymentsListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitRepaymentsListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitRepaymentsListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitRepaymentsListResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitRepaymentsListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitRepaymentsListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitRepaymentsListResponse - * @throws IOException if the JSON string is invalid with respect to UnitRepaymentsListResponse - */ - public static UnitRepaymentsListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitRepaymentsListResponse.class); - } - - /** - * Convert an instance of UnitRepaymentsListResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitRewardResponse.java b/src/main/java/org/openapitools/client/model/UnitRewardResponse.java deleted file mode 100644 index 3a8fa9e8..00000000 --- a/src/main/java/org/openapitools/client/model/UnitRewardResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Reward; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitRewardResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitRewardResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Reward data; - - public UnitRewardResponse() { - } - - public UnitRewardResponse data(Reward data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Reward getData() { - return data; - } - - - public void setData(Reward data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitRewardResponse unitRewardResponse = (UnitRewardResponse) o; - return Objects.equals(this.data, unitRewardResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitRewardResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitRewardResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitRewardResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitRewardResponse is not found in the empty JSON string", UnitRewardResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitRewardResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitRewardResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Reward.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitRewardResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitRewardResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitRewardResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitRewardResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitRewardResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitRewardResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitRewardResponse - * @throws IOException if the JSON string is invalid with respect to UnitRewardResponse - */ - public static UnitRewardResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitRewardResponse.class); - } - - /** - * Convert an instance of UnitRewardResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitRewardsListResponse.java b/src/main/java/org/openapitools/client/model/UnitRewardsListResponse.java deleted file mode 100644 index c1b0bab0..00000000 --- a/src/main/java/org/openapitools/client/model/UnitRewardsListResponse.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Reward; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitRewardsListResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitRewardsListResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public UnitRewardsListResponse() { - } - - public UnitRewardsListResponse data(List data) { - - this.data = data; - return this; - } - - public UnitRewardsListResponse addDataItem(Reward dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitRewardsListResponse unitRewardsListResponse = (UnitRewardsListResponse) o; - return Objects.equals(this.data, unitRewardsListResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitRewardsListResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitRewardsListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitRewardsListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitRewardsListResponse is not found in the empty JSON string", UnitRewardsListResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitRewardsListResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitRewardsListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - Reward.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitRewardsListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitRewardsListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitRewardsListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitRewardsListResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitRewardsListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitRewardsListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitRewardsListResponse - * @throws IOException if the JSON string is invalid with respect to UnitRewardsListResponse - */ - public static UnitRewardsListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitRewardsListResponse.class); - } - - /** - * Convert an instance of UnitRewardsListResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitStatementsResponse.java b/src/main/java/org/openapitools/client/model/UnitStatementsResponse.java deleted file mode 100644 index 64678d61..00000000 --- a/src/main/java/org/openapitools/client/model/UnitStatementsResponse.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Statement; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitStatementsResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitStatementsResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public UnitStatementsResponse() { - } - - public UnitStatementsResponse data(List data) { - - this.data = data; - return this; - } - - public UnitStatementsResponse addDataItem(Statement dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitStatementsResponse unitStatementsResponse = (UnitStatementsResponse) o; - return Objects.equals(this.data, unitStatementsResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitStatementsResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitStatementsResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitStatementsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitStatementsResponse is not found in the empty JSON string", UnitStatementsResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitStatementsResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitStatementsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - Statement.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitStatementsResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitStatementsResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitStatementsResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitStatementsResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitStatementsResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitStatementsResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitStatementsResponse - * @throws IOException if the JSON string is invalid with respect to UnitStatementsResponse - */ - public static UnitStatementsResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitStatementsResponse.class); - } - - /** - * Convert an instance of UnitStatementsResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitTransactionResponse.java b/src/main/java/org/openapitools/client/model/UnitTransactionResponse.java deleted file mode 100644 index 18ca3510..00000000 --- a/src/main/java/org/openapitools/client/model/UnitTransactionResponse.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.IncludedResourceInner; -import org.openapitools.client.model.Transaction; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitTransactionResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitTransactionResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Transaction data; - - public static final String SERIALIZED_NAME_INCLUDED = "included"; - @SerializedName(SERIALIZED_NAME_INCLUDED) - private List included; - - public UnitTransactionResponse() { - } - - public UnitTransactionResponse data(Transaction data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Transaction getData() { - return data; - } - - - public void setData(Transaction data) { - this.data = data; - } - - - public UnitTransactionResponse included(List included) { - - this.included = included; - return this; - } - - public UnitTransactionResponse addIncludedItem(IncludedResourceInner includedItem) { - if (this.included == null) { - this.included = new ArrayList<>(); - } - this.included.add(includedItem); - return this; - } - - /** - * Get included - * @return included - **/ - @javax.annotation.Nullable - public List getIncluded() { - return included; - } - - - public void setIncluded(List included) { - this.included = included; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitTransactionResponse unitTransactionResponse = (UnitTransactionResponse) o; - return Objects.equals(this.data, unitTransactionResponse.data) && - Objects.equals(this.included, unitTransactionResponse.included); - } - - @Override - public int hashCode() { - return Objects.hash(data, included); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitTransactionResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" included: ").append(toIndentedString(included)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("included"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitTransactionResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitTransactionResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitTransactionResponse is not found in the empty JSON string", UnitTransactionResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitTransactionResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitTransactionResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Transaction.validateJsonElement(jsonObj.get("data")); - } - if (jsonObj.get("included") != null && !jsonObj.get("included").isJsonNull()) { - JsonArray jsonArrayincluded = jsonObj.getAsJsonArray("included"); - if (jsonArrayincluded != null) { - // ensure the json data is an array - if (!jsonObj.get("included").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `included` to be an array in the JSON string but got `%s`", jsonObj.get("included").toString())); - } - - // validate the optional field `included` (array) - for (int i = 0; i < jsonArrayincluded.size(); i++) { - IncludedResourceInner.validateJsonElement(jsonArrayincluded.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitTransactionResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitTransactionResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitTransactionResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitTransactionResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitTransactionResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitTransactionResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitTransactionResponse - * @throws IOException if the JSON string is invalid with respect to UnitTransactionResponse - */ - public static UnitTransactionResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitTransactionResponse.class); - } - - /** - * Convert an instance of UnitTransactionResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitTransactionResponse1.java b/src/main/java/org/openapitools/client/model/UnitTransactionResponse1.java deleted file mode 100644 index 74bdc5d7..00000000 --- a/src/main/java/org/openapitools/client/model/UnitTransactionResponse1.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Transaction; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitTransactionResponse1 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitTransactionResponse1 { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Transaction data; - - public UnitTransactionResponse1() { - } - - public UnitTransactionResponse1 data(Transaction data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Transaction getData() { - return data; - } - - - public void setData(Transaction data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitTransactionResponse1 unitTransactionResponse1 = (UnitTransactionResponse1) o; - return Objects.equals(this.data, unitTransactionResponse1.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitTransactionResponse1 {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitTransactionResponse1 - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitTransactionResponse1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitTransactionResponse1 is not found in the empty JSON string", UnitTransactionResponse1.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitTransactionResponse1.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitTransactionResponse1` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Transaction.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitTransactionResponse1.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitTransactionResponse1' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitTransactionResponse1.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitTransactionResponse1 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitTransactionResponse1 read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitTransactionResponse1 given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitTransactionResponse1 - * @throws IOException if the JSON string is invalid with respect to UnitTransactionResponse1 - */ - public static UnitTransactionResponse1 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitTransactionResponse1.class); - } - - /** - * Convert an instance of UnitTransactionResponse1 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitTransactionsListResponse.java b/src/main/java/org/openapitools/client/model/UnitTransactionsListResponse.java deleted file mode 100644 index 67009da9..00000000 --- a/src/main/java/org/openapitools/client/model/UnitTransactionsListResponse.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.IncludedResourceInner; -import org.openapitools.client.model.PaginationMeta; -import org.openapitools.client.model.Transaction; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitTransactionsListResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitTransactionsListResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public static final String SERIALIZED_NAME_INCLUDED = "included"; - @SerializedName(SERIALIZED_NAME_INCLUDED) - private List included; - - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - private PaginationMeta meta; - - public UnitTransactionsListResponse() { - } - - public UnitTransactionsListResponse data(List data) { - - this.data = data; - return this; - } - - public UnitTransactionsListResponse addDataItem(Transaction dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - public UnitTransactionsListResponse included(List included) { - - this.included = included; - return this; - } - - public UnitTransactionsListResponse addIncludedItem(IncludedResourceInner includedItem) { - if (this.included == null) { - this.included = new ArrayList<>(); - } - this.included.add(includedItem); - return this; - } - - /** - * Get included - * @return included - **/ - @javax.annotation.Nullable - public List getIncluded() { - return included; - } - - - public void setIncluded(List included) { - this.included = included; - } - - - public UnitTransactionsListResponse meta(PaginationMeta meta) { - - this.meta = meta; - return this; - } - - /** - * Get meta - * @return meta - **/ - @javax.annotation.Nullable - public PaginationMeta getMeta() { - return meta; - } - - - public void setMeta(PaginationMeta meta) { - this.meta = meta; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitTransactionsListResponse unitTransactionsListResponse = (UnitTransactionsListResponse) o; - return Objects.equals(this.data, unitTransactionsListResponse.data) && - Objects.equals(this.included, unitTransactionsListResponse.included) && - Objects.equals(this.meta, unitTransactionsListResponse.meta); - } - - @Override - public int hashCode() { - return Objects.hash(data, included, meta); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitTransactionsListResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" included: ").append(toIndentedString(included)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("included"); - openapiFields.add("meta"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitTransactionsListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitTransactionsListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitTransactionsListResponse is not found in the empty JSON string", UnitTransactionsListResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitTransactionsListResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitTransactionsListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - Transaction.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - if (jsonObj.get("included") != null && !jsonObj.get("included").isJsonNull()) { - JsonArray jsonArrayincluded = jsonObj.getAsJsonArray("included"); - if (jsonArrayincluded != null) { - // ensure the json data is an array - if (!jsonObj.get("included").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `included` to be an array in the JSON string but got `%s`", jsonObj.get("included").toString())); - } - - // validate the optional field `included` (array) - for (int i = 0; i < jsonArrayincluded.size(); i++) { - IncludedResourceInner.validateJsonElement(jsonArrayincluded.get(i)); - }; - } - } - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - PaginationMeta.validateJsonElement(jsonObj.get("meta")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitTransactionsListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitTransactionsListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitTransactionsListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitTransactionsListResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitTransactionsListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitTransactionsListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitTransactionsListResponse - * @throws IOException if the JSON string is invalid with respect to UnitTransactionsListResponse - */ - public static UnitTransactionsListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitTransactionsListResponse.class); - } - - /** - * Convert an instance of UnitTransactionsListResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitWebhookResponse.java b/src/main/java/org/openapitools/client/model/UnitWebhookResponse.java deleted file mode 100644 index a9007a2f..00000000 --- a/src/main/java/org/openapitools/client/model/UnitWebhookResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Webhook; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitWebhookResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitWebhookResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Webhook data; - - public UnitWebhookResponse() { - } - - public UnitWebhookResponse data(Webhook data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public Webhook getData() { - return data; - } - - - public void setData(Webhook data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitWebhookResponse unitWebhookResponse = (UnitWebhookResponse) o; - return Objects.equals(this.data, unitWebhookResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitWebhookResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitWebhookResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitWebhookResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitWebhookResponse is not found in the empty JSON string", UnitWebhookResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitWebhookResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitWebhookResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - Webhook.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitWebhookResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitWebhookResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitWebhookResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitWebhookResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitWebhookResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitWebhookResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitWebhookResponse - * @throws IOException if the JSON string is invalid with respect to UnitWebhookResponse - */ - public static UnitWebhookResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitWebhookResponse.class); - } - - /** - * Convert an instance of UnitWebhookResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UnitWebhooksListResponse.java b/src/main/java/org/openapitools/client/model/UnitWebhooksListResponse.java deleted file mode 100644 index 3cb90a14..00000000 --- a/src/main/java/org/openapitools/client/model/UnitWebhooksListResponse.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Webhook; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UnitWebhooksListResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnitWebhooksListResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public UnitWebhooksListResponse() { - } - - public UnitWebhooksListResponse data(List data) { - - this.data = data; - return this; - } - - public UnitWebhooksListResponse addDataItem(Webhook dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnitWebhooksListResponse unitWebhooksListResponse = (UnitWebhooksListResponse) o; - return Objects.equals(this.data, unitWebhooksListResponse.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnitWebhooksListResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UnitWebhooksListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UnitWebhooksListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnitWebhooksListResponse is not found in the empty JSON string", UnitWebhooksListResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UnitWebhooksListResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnitWebhooksListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - Webhook.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnitWebhooksListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnitWebhooksListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnitWebhooksListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnitWebhooksListResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnitWebhooksListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnitWebhooksListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnitWebhooksListResponse - * @throws IOException if the JSON string is invalid with respect to UnitWebhooksListResponse - */ - public static UnitWebhooksListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnitWebhooksListResponse.class); - } - - /** - * Convert an instance of UnitWebhooksListResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateApplication.java b/src/main/java/org/openapitools/client/model/UpdateApplication.java deleted file mode 100644 index e7599d19..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateApplication.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.UpdateApplicationData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateApplication - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateApplication { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private UpdateApplicationData data; - - public UpdateApplication() { - } - - public UpdateApplication data(UpdateApplicationData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public UpdateApplicationData getData() { - return data; - } - - - public void setData(UpdateApplicationData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateApplication updateApplication = (UpdateApplication) o; - return Objects.equals(this.data, updateApplication.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateApplication {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateApplication - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateApplication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateApplication is not found in the empty JSON string", UpdateApplication.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateApplication.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateApplication` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateApplication.openapiRequiredFields) { - 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(); - // validate the required field `data` - UpdateApplicationData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateApplication.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateApplication' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateApplication.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateApplication value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateApplication read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateApplication given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateApplication - * @throws IOException if the JSON string is invalid with respect to UpdateApplication - */ - public static UpdateApplication fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateApplication.class); - } - - /** - * Convert an instance of UpdateApplication to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateApplicationData.java b/src/main/java/org/openapitools/client/model/UpdateApplicationData.java deleted file mode 100644 index e5e412e5..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateApplicationData.java +++ /dev/null @@ -1,475 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchBusinessApplication; -import org.openapitools.client.model.PatchBusinessApplicationBeneficialOwner; -import org.openapitools.client.model.PatchBusinessApplicationOfficer; -import org.openapitools.client.model.PatchIndividualApplication; -import org.openapitools.client.model.PatchSoleProprietorApplication; -import org.openapitools.client.model.PatchTrustApplication; -import org.openapitools.client.model.PatchTrustApplicationAttributes; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -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 com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import org.openapitools.client.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateApplicationData extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(UpdateApplicationData.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateApplicationData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateApplicationData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterPatchBusinessApplication = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessApplication.class)); - final TypeAdapter adapterPatchBusinessApplicationOfficer = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessApplicationOfficer.class)); - final TypeAdapter adapterPatchBusinessApplicationBeneficialOwner = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessApplicationBeneficialOwner.class)); - final TypeAdapter adapterPatchSoleProprietorApplication = gson.getDelegateAdapter(this, TypeToken.get(PatchSoleProprietorApplication.class)); - final TypeAdapter adapterPatchIndividualApplication = gson.getDelegateAdapter(this, TypeToken.get(PatchIndividualApplication.class)); - final TypeAdapter adapterPatchTrustApplication = gson.getDelegateAdapter(this, TypeToken.get(PatchTrustApplication.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateApplicationData value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `PatchBusinessApplication` - if (value.getActualInstance() instanceof PatchBusinessApplication) { - JsonElement element = adapterPatchBusinessApplication.toJsonTree((PatchBusinessApplication)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `PatchBusinessApplicationOfficer` - if (value.getActualInstance() instanceof PatchBusinessApplicationOfficer) { - JsonElement element = adapterPatchBusinessApplicationOfficer.toJsonTree((PatchBusinessApplicationOfficer)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `PatchBusinessApplicationBeneficialOwner` - if (value.getActualInstance() instanceof PatchBusinessApplicationBeneficialOwner) { - JsonElement element = adapterPatchBusinessApplicationBeneficialOwner.toJsonTree((PatchBusinessApplicationBeneficialOwner)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `PatchSoleProprietorApplication` - if (value.getActualInstance() instanceof PatchSoleProprietorApplication) { - JsonElement element = adapterPatchSoleProprietorApplication.toJsonTree((PatchSoleProprietorApplication)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `PatchIndividualApplication` - if (value.getActualInstance() instanceof PatchIndividualApplication) { - JsonElement element = adapterPatchIndividualApplication.toJsonTree((PatchIndividualApplication)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `PatchTrustApplication` - if (value.getActualInstance() instanceof PatchTrustApplication) { - JsonElement element = adapterPatchTrustApplication.toJsonTree((PatchTrustApplication)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: PatchBusinessApplication, PatchBusinessApplicationBeneficialOwner, PatchBusinessApplicationOfficer, PatchIndividualApplication, PatchSoleProprietorApplication, PatchTrustApplication"); - } - - @Override - public UpdateApplicationData read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize PatchBusinessApplication - try { - // validate the JSON object to see if any exception is thrown - PatchBusinessApplication.validateJsonElement(jsonElement); - actualAdapter = adapterPatchBusinessApplication; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchBusinessApplication'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchBusinessApplication failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchBusinessApplication'", e); - } - // deserialize PatchBusinessApplicationOfficer - try { - // validate the JSON object to see if any exception is thrown - PatchBusinessApplicationOfficer.validateJsonElement(jsonElement); - actualAdapter = adapterPatchBusinessApplicationOfficer; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchBusinessApplicationOfficer'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchBusinessApplicationOfficer failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchBusinessApplicationOfficer'", e); - } - // deserialize PatchBusinessApplicationBeneficialOwner - try { - // validate the JSON object to see if any exception is thrown - PatchBusinessApplicationBeneficialOwner.validateJsonElement(jsonElement); - actualAdapter = adapterPatchBusinessApplicationBeneficialOwner; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchBusinessApplicationBeneficialOwner'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchBusinessApplicationBeneficialOwner failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchBusinessApplicationBeneficialOwner'", e); - } - // deserialize PatchSoleProprietorApplication - try { - // validate the JSON object to see if any exception is thrown - PatchSoleProprietorApplication.validateJsonElement(jsonElement); - actualAdapter = adapterPatchSoleProprietorApplication; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchSoleProprietorApplication'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchSoleProprietorApplication failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchSoleProprietorApplication'", e); - } - // deserialize PatchIndividualApplication - try { - // validate the JSON object to see if any exception is thrown - PatchIndividualApplication.validateJsonElement(jsonElement); - actualAdapter = adapterPatchIndividualApplication; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchIndividualApplication'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchIndividualApplication failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchIndividualApplication'", e); - } - // deserialize PatchTrustApplication - try { - // validate the JSON object to see if any exception is thrown - PatchTrustApplication.validateJsonElement(jsonElement); - actualAdapter = adapterPatchTrustApplication; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchTrustApplication'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchTrustApplication failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchTrustApplication'", e); - } - - if (match == 1) { - UpdateApplicationData ret = new UpdateApplicationData(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for UpdateApplicationData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public UpdateApplicationData() { - super("oneOf", Boolean.FALSE); - } - - public UpdateApplicationData(PatchBusinessApplication o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public UpdateApplicationData(PatchBusinessApplicationBeneficialOwner o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public UpdateApplicationData(PatchBusinessApplicationOfficer o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public UpdateApplicationData(PatchIndividualApplication o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public UpdateApplicationData(PatchSoleProprietorApplication o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public UpdateApplicationData(PatchTrustApplication o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("PatchBusinessApplication", PatchBusinessApplication.class); - schemas.put("PatchBusinessApplicationOfficer", PatchBusinessApplicationOfficer.class); - schemas.put("PatchBusinessApplicationBeneficialOwner", PatchBusinessApplicationBeneficialOwner.class); - schemas.put("PatchSoleProprietorApplication", PatchSoleProprietorApplication.class); - schemas.put("PatchIndividualApplication", PatchIndividualApplication.class); - schemas.put("PatchTrustApplication", PatchTrustApplication.class); - } - - @Override - public Map> getSchemas() { - return UpdateApplicationData.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * PatchBusinessApplication, PatchBusinessApplicationBeneficialOwner, PatchBusinessApplicationOfficer, PatchIndividualApplication, PatchSoleProprietorApplication, PatchTrustApplication - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof PatchBusinessApplication) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof PatchBusinessApplicationOfficer) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof PatchBusinessApplicationBeneficialOwner) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof PatchSoleProprietorApplication) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof PatchIndividualApplication) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof PatchTrustApplication) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be PatchBusinessApplication, PatchBusinessApplicationBeneficialOwner, PatchBusinessApplicationOfficer, PatchIndividualApplication, PatchSoleProprietorApplication, PatchTrustApplication"); - } - - /** - * Get the actual instance, which can be the following: - * PatchBusinessApplication, PatchBusinessApplicationBeneficialOwner, PatchBusinessApplicationOfficer, PatchIndividualApplication, PatchSoleProprietorApplication, PatchTrustApplication - * - * @return The actual instance (PatchBusinessApplication, PatchBusinessApplicationBeneficialOwner, PatchBusinessApplicationOfficer, PatchIndividualApplication, PatchSoleProprietorApplication, PatchTrustApplication) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `PatchBusinessApplication`. If the actual instance is not `PatchBusinessApplication`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchBusinessApplication` - * @throws ClassCastException if the instance is not `PatchBusinessApplication` - */ - public PatchBusinessApplication getPatchBusinessApplication() throws ClassCastException { - return (PatchBusinessApplication)super.getActualInstance(); - } - /** - * Get the actual instance of `PatchBusinessApplicationOfficer`. If the actual instance is not `PatchBusinessApplicationOfficer`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchBusinessApplicationOfficer` - * @throws ClassCastException if the instance is not `PatchBusinessApplicationOfficer` - */ - public PatchBusinessApplicationOfficer getPatchBusinessApplicationOfficer() throws ClassCastException { - return (PatchBusinessApplicationOfficer)super.getActualInstance(); - } - /** - * Get the actual instance of `PatchBusinessApplicationBeneficialOwner`. If the actual instance is not `PatchBusinessApplicationBeneficialOwner`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchBusinessApplicationBeneficialOwner` - * @throws ClassCastException if the instance is not `PatchBusinessApplicationBeneficialOwner` - */ - public PatchBusinessApplicationBeneficialOwner getPatchBusinessApplicationBeneficialOwner() throws ClassCastException { - return (PatchBusinessApplicationBeneficialOwner)super.getActualInstance(); - } - /** - * Get the actual instance of `PatchSoleProprietorApplication`. If the actual instance is not `PatchSoleProprietorApplication`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchSoleProprietorApplication` - * @throws ClassCastException if the instance is not `PatchSoleProprietorApplication` - */ - public PatchSoleProprietorApplication getPatchSoleProprietorApplication() throws ClassCastException { - return (PatchSoleProprietorApplication)super.getActualInstance(); - } - /** - * Get the actual instance of `PatchIndividualApplication`. If the actual instance is not `PatchIndividualApplication`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchIndividualApplication` - * @throws ClassCastException if the instance is not `PatchIndividualApplication` - */ - public PatchIndividualApplication getPatchIndividualApplication() throws ClassCastException { - return (PatchIndividualApplication)super.getActualInstance(); - } - /** - * Get the actual instance of `PatchTrustApplication`. If the actual instance is not `PatchTrustApplication`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchTrustApplication` - * @throws ClassCastException if the instance is not `PatchTrustApplication` - */ - public PatchTrustApplication getPatchTrustApplication() throws ClassCastException { - return (PatchTrustApplication)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateApplicationData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with PatchBusinessApplication - try { - PatchBusinessApplication.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchBusinessApplication failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with PatchBusinessApplicationOfficer - try { - PatchBusinessApplicationOfficer.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchBusinessApplicationOfficer failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with PatchBusinessApplicationBeneficialOwner - try { - PatchBusinessApplicationBeneficialOwner.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchBusinessApplicationBeneficialOwner failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with PatchSoleProprietorApplication - try { - PatchSoleProprietorApplication.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchSoleProprietorApplication failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with PatchIndividualApplication - try { - PatchIndividualApplication.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchIndividualApplication failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with PatchTrustApplication - try { - PatchTrustApplication.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchTrustApplication failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for UpdateApplicationData with oneOf schemas: PatchBusinessApplication, PatchBusinessApplicationBeneficialOwner, PatchBusinessApplicationOfficer, PatchIndividualApplication, PatchSoleProprietorApplication, PatchTrustApplication. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of UpdateApplicationData given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateApplicationData - * @throws IOException if the JSON string is invalid with respect to UpdateApplicationData - */ - public static UpdateApplicationData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateApplicationData.class); - } - - /** - * Convert an instance of UpdateApplicationData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateBusinessCustomer.java b/src/main/java/org/openapitools/client/model/UpdateBusinessCustomer.java deleted file mode 100644 index 4159969d..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateBusinessCustomer.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.UpdateBusinessCustomerAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateBusinessCustomer - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateBusinessCustomer { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private UpdateBusinessCustomerAttributes attributes; - - public UpdateBusinessCustomer() { - } - - public UpdateBusinessCustomer type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public UpdateBusinessCustomer attributes(UpdateBusinessCustomerAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public UpdateBusinessCustomerAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(UpdateBusinessCustomerAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateBusinessCustomer updateBusinessCustomer = (UpdateBusinessCustomer) o; - return Objects.equals(this.type, updateBusinessCustomer.type) && - Objects.equals(this.attributes, updateBusinessCustomer.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateBusinessCustomer {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateBusinessCustomer - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateBusinessCustomer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateBusinessCustomer is not found in the empty JSON string", UpdateBusinessCustomer.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateBusinessCustomer.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateBusinessCustomer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - UpdateBusinessCustomerAttributes.validateJsonElement(jsonObj.get("attributes")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateBusinessCustomer.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateBusinessCustomer' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateBusinessCustomer.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateBusinessCustomer value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateBusinessCustomer read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateBusinessCustomer given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateBusinessCustomer - * @throws IOException if the JSON string is invalid with respect to UpdateBusinessCustomer - */ - public static UpdateBusinessCustomer fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateBusinessCustomer.class); - } - - /** - * Convert an instance of UpdateBusinessCustomer to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateBusinessCustomerAttributes.java b/src/main/java/org/openapitools/client/model/UpdateBusinessCustomerAttributes.java deleted file mode 100644 index 69e8bd5a..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateBusinessCustomerAttributes.java +++ /dev/null @@ -1,431 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.AuthorizedUser; -import org.openapitools.client.model.Phone; -import org.openapitools.client.model.ResponseContact; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateBusinessCustomerAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateBusinessCustomerAttributes { - public static final String SERIALIZED_NAME_DBA = "dba"; - @SerializedName(SERIALIZED_NAME_DBA) - private String dba; - - public static final String SERIALIZED_NAME_EIN = "ein"; - @SerializedName(SERIALIZED_NAME_EIN) - private String ein; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_CONTACT = "contact"; - @SerializedName(SERIALIZED_NAME_CONTACT) - private ResponseContact contact; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_AUTHORIZED_USERS = "authorizedUsers"; - @SerializedName(SERIALIZED_NAME_AUTHORIZED_USERS) - private List authorizedUsers; - - public UpdateBusinessCustomerAttributes() { - } - - public UpdateBusinessCustomerAttributes dba(String dba) { - - this.dba = dba; - return this; - } - - /** - * Get dba - * @return dba - **/ - @javax.annotation.Nullable - public String getDba() { - return dba; - } - - - public void setDba(String dba) { - this.dba = dba; - } - - - public UpdateBusinessCustomerAttributes ein(String ein) { - - this.ein = ein; - return this; - } - - /** - * Get ein - * @return ein - **/ - @javax.annotation.Nullable - public String getEin() { - return ein; - } - - - public void setEin(String ein) { - this.ein = ein; - } - - - public UpdateBusinessCustomerAttributes phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public UpdateBusinessCustomerAttributes address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public UpdateBusinessCustomerAttributes contact(ResponseContact contact) { - - this.contact = contact; - return this; - } - - /** - * Get contact - * @return contact - **/ - @javax.annotation.Nullable - public ResponseContact getContact() { - return contact; - } - - - public void setContact(ResponseContact contact) { - this.contact = contact; - } - - - public UpdateBusinessCustomerAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public UpdateBusinessCustomerAttributes authorizedUsers(List authorizedUsers) { - - this.authorizedUsers = authorizedUsers; - return this; - } - - public UpdateBusinessCustomerAttributes addAuthorizedUsersItem(AuthorizedUser authorizedUsersItem) { - if (this.authorizedUsers == null) { - this.authorizedUsers = new ArrayList<>(); - } - this.authorizedUsers.add(authorizedUsersItem); - return this; - } - - /** - * Get authorizedUsers - * @return authorizedUsers - **/ - @javax.annotation.Nullable - public List getAuthorizedUsers() { - return authorizedUsers; - } - - - public void setAuthorizedUsers(List authorizedUsers) { - this.authorizedUsers = authorizedUsers; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateBusinessCustomerAttributes updateBusinessCustomerAttributes = (UpdateBusinessCustomerAttributes) o; - return Objects.equals(this.dba, updateBusinessCustomerAttributes.dba) && - Objects.equals(this.ein, updateBusinessCustomerAttributes.ein) && - Objects.equals(this.phone, updateBusinessCustomerAttributes.phone) && - Objects.equals(this.address, updateBusinessCustomerAttributes.address) && - Objects.equals(this.contact, updateBusinessCustomerAttributes.contact) && - Objects.equals(this.tags, updateBusinessCustomerAttributes.tags) && - Objects.equals(this.authorizedUsers, updateBusinessCustomerAttributes.authorizedUsers); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(dba, ein, phone, address, contact, tags, authorizedUsers); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateBusinessCustomerAttributes {\n"); - sb.append(" dba: ").append(toIndentedString(dba)).append("\n"); - sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" authorizedUsers: ").append(toIndentedString(authorizedUsers)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("dba"); - openapiFields.add("ein"); - openapiFields.add("phone"); - openapiFields.add("address"); - openapiFields.add("contact"); - openapiFields.add("tags"); - openapiFields.add("authorizedUsers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateBusinessCustomerAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateBusinessCustomerAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateBusinessCustomerAttributes is not found in the empty JSON string", UpdateBusinessCustomerAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateBusinessCustomerAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateBusinessCustomerAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("dba") != null && !jsonObj.get("dba").isJsonNull()) && !jsonObj.get("dba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dba").toString())); - } - if ((jsonObj.get("ein") != null && !jsonObj.get("ein").isJsonNull()) && !jsonObj.get("ein").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ein` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ein").toString())); - } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); - } - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("address")); - } - // validate the optional field `contact` - if (jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) { - ResponseContact.validateJsonElement(jsonObj.get("contact")); - } - if (jsonObj.get("authorizedUsers") != null && !jsonObj.get("authorizedUsers").isJsonNull()) { - JsonArray jsonArrayauthorizedUsers = jsonObj.getAsJsonArray("authorizedUsers"); - if (jsonArrayauthorizedUsers != null) { - // ensure the json data is an array - if (!jsonObj.get("authorizedUsers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `authorizedUsers` to be an array in the JSON string but got `%s`", jsonObj.get("authorizedUsers").toString())); - } - - // validate the optional field `authorizedUsers` (array) - for (int i = 0; i < jsonArrayauthorizedUsers.size(); i++) { - AuthorizedUser.validateJsonElement(jsonArrayauthorizedUsers.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateBusinessCustomerAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateBusinessCustomerAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateBusinessCustomerAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateBusinessCustomerAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateBusinessCustomerAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateBusinessCustomerAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateBusinessCustomerAttributes - * @throws IOException if the JSON string is invalid with respect to UpdateBusinessCustomerAttributes - */ - public static UpdateBusinessCustomerAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateBusinessCustomerAttributes.class); - } - - /** - * Convert an instance of UpdateBusinessCustomerAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateCard.java b/src/main/java/org/openapitools/client/model/UpdateCard.java deleted file mode 100644 index 1e63ba2f..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateCard.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.UpdateCardData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateCard - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateCard { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private UpdateCardData data; - - public UpdateCard() { - } - - public UpdateCard data(UpdateCardData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public UpdateCardData getData() { - return data; - } - - - public void setData(UpdateCardData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateCard updateCard = (UpdateCard) o; - return Objects.equals(this.data, updateCard.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateCard {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateCard - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCard is not found in the empty JSON string", UpdateCard.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateCard.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateCard` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateCard.openapiRequiredFields) { - 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(); - // validate the required field `data` - UpdateCardData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateCard.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateCard' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateCard value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateCard read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateCard given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateCard - * @throws IOException if the JSON string is invalid with respect to UpdateCard - */ - public static UpdateCard fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateCard.class); - } - - /** - * Convert an instance of UpdateCard to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateCardData.java b/src/main/java/org/openapitools/client/model/UpdateCardData.java deleted file mode 100644 index c7ebd4a7..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateCardData.java +++ /dev/null @@ -1,475 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchBusinessCreditCard; -import org.openapitools.client.model.PatchBusinessDebitCard; -import org.openapitools.client.model.PatchBusinessVirtualCreditCard; -import org.openapitools.client.model.PatchBusinessVirtualDebitCard; -import org.openapitools.client.model.PatchBusinessVirtualDebitCardAttributes; -import org.openapitools.client.model.PatchIndividualDebitCard; -import org.openapitools.client.model.PatchIndividualVirtualDebitCard; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -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 com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import org.openapitools.client.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateCardData extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(UpdateCardData.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateCardData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateCardData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterPatchIndividualDebitCard = gson.getDelegateAdapter(this, TypeToken.get(PatchIndividualDebitCard.class)); - final TypeAdapter adapterPatchIndividualVirtualDebitCard = gson.getDelegateAdapter(this, TypeToken.get(PatchIndividualVirtualDebitCard.class)); - final TypeAdapter adapterPatchBusinessDebitCard = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessDebitCard.class)); - final TypeAdapter adapterPatchBusinessVirtualDebitCard = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessVirtualDebitCard.class)); - final TypeAdapter adapterPatchBusinessCreditCard = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessCreditCard.class)); - final TypeAdapter adapterPatchBusinessVirtualCreditCard = gson.getDelegateAdapter(this, TypeToken.get(PatchBusinessVirtualCreditCard.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateCardData value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `PatchIndividualDebitCard` - if (value.getActualInstance() instanceof PatchIndividualDebitCard) { - JsonElement element = adapterPatchIndividualDebitCard.toJsonTree((PatchIndividualDebitCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `PatchIndividualVirtualDebitCard` - if (value.getActualInstance() instanceof PatchIndividualVirtualDebitCard) { - JsonElement element = adapterPatchIndividualVirtualDebitCard.toJsonTree((PatchIndividualVirtualDebitCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `PatchBusinessDebitCard` - if (value.getActualInstance() instanceof PatchBusinessDebitCard) { - JsonElement element = adapterPatchBusinessDebitCard.toJsonTree((PatchBusinessDebitCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `PatchBusinessVirtualDebitCard` - if (value.getActualInstance() instanceof PatchBusinessVirtualDebitCard) { - JsonElement element = adapterPatchBusinessVirtualDebitCard.toJsonTree((PatchBusinessVirtualDebitCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `PatchBusinessCreditCard` - if (value.getActualInstance() instanceof PatchBusinessCreditCard) { - JsonElement element = adapterPatchBusinessCreditCard.toJsonTree((PatchBusinessCreditCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `PatchBusinessVirtualCreditCard` - if (value.getActualInstance() instanceof PatchBusinessVirtualCreditCard) { - JsonElement element = adapterPatchBusinessVirtualCreditCard.toJsonTree((PatchBusinessVirtualCreditCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: PatchBusinessCreditCard, PatchBusinessDebitCard, PatchBusinessVirtualCreditCard, PatchBusinessVirtualDebitCard, PatchIndividualDebitCard, PatchIndividualVirtualDebitCard"); - } - - @Override - public UpdateCardData read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize PatchIndividualDebitCard - try { - // validate the JSON object to see if any exception is thrown - PatchIndividualDebitCard.validateJsonElement(jsonElement); - actualAdapter = adapterPatchIndividualDebitCard; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchIndividualDebitCard'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchIndividualDebitCard failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchIndividualDebitCard'", e); - } - // deserialize PatchIndividualVirtualDebitCard - try { - // validate the JSON object to see if any exception is thrown - PatchIndividualVirtualDebitCard.validateJsonElement(jsonElement); - actualAdapter = adapterPatchIndividualVirtualDebitCard; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchIndividualVirtualDebitCard'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchIndividualVirtualDebitCard failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchIndividualVirtualDebitCard'", e); - } - // deserialize PatchBusinessDebitCard - try { - // validate the JSON object to see if any exception is thrown - PatchBusinessDebitCard.validateJsonElement(jsonElement); - actualAdapter = adapterPatchBusinessDebitCard; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchBusinessDebitCard'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchBusinessDebitCard failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchBusinessDebitCard'", e); - } - // deserialize PatchBusinessVirtualDebitCard - try { - // validate the JSON object to see if any exception is thrown - PatchBusinessVirtualDebitCard.validateJsonElement(jsonElement); - actualAdapter = adapterPatchBusinessVirtualDebitCard; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchBusinessVirtualDebitCard'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchBusinessVirtualDebitCard failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchBusinessVirtualDebitCard'", e); - } - // deserialize PatchBusinessCreditCard - try { - // validate the JSON object to see if any exception is thrown - PatchBusinessCreditCard.validateJsonElement(jsonElement); - actualAdapter = adapterPatchBusinessCreditCard; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchBusinessCreditCard'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchBusinessCreditCard failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchBusinessCreditCard'", e); - } - // deserialize PatchBusinessVirtualCreditCard - try { - // validate the JSON object to see if any exception is thrown - PatchBusinessVirtualCreditCard.validateJsonElement(jsonElement); - actualAdapter = adapterPatchBusinessVirtualCreditCard; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchBusinessVirtualCreditCard'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchBusinessVirtualCreditCard failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchBusinessVirtualCreditCard'", e); - } - - if (match == 1) { - UpdateCardData ret = new UpdateCardData(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for UpdateCardData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public UpdateCardData() { - super("oneOf", Boolean.FALSE); - } - - public UpdateCardData(PatchBusinessCreditCard o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public UpdateCardData(PatchBusinessDebitCard o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public UpdateCardData(PatchBusinessVirtualCreditCard o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public UpdateCardData(PatchBusinessVirtualDebitCard o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public UpdateCardData(PatchIndividualDebitCard o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public UpdateCardData(PatchIndividualVirtualDebitCard o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("PatchIndividualDebitCard", PatchIndividualDebitCard.class); - schemas.put("PatchIndividualVirtualDebitCard", PatchIndividualVirtualDebitCard.class); - schemas.put("PatchBusinessDebitCard", PatchBusinessDebitCard.class); - schemas.put("PatchBusinessVirtualDebitCard", PatchBusinessVirtualDebitCard.class); - schemas.put("PatchBusinessCreditCard", PatchBusinessCreditCard.class); - schemas.put("PatchBusinessVirtualCreditCard", PatchBusinessVirtualCreditCard.class); - } - - @Override - public Map> getSchemas() { - return UpdateCardData.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * PatchBusinessCreditCard, PatchBusinessDebitCard, PatchBusinessVirtualCreditCard, PatchBusinessVirtualDebitCard, PatchIndividualDebitCard, PatchIndividualVirtualDebitCard - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof PatchIndividualDebitCard) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof PatchIndividualVirtualDebitCard) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof PatchBusinessDebitCard) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof PatchBusinessVirtualDebitCard) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof PatchBusinessCreditCard) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof PatchBusinessVirtualCreditCard) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be PatchBusinessCreditCard, PatchBusinessDebitCard, PatchBusinessVirtualCreditCard, PatchBusinessVirtualDebitCard, PatchIndividualDebitCard, PatchIndividualVirtualDebitCard"); - } - - /** - * Get the actual instance, which can be the following: - * PatchBusinessCreditCard, PatchBusinessDebitCard, PatchBusinessVirtualCreditCard, PatchBusinessVirtualDebitCard, PatchIndividualDebitCard, PatchIndividualVirtualDebitCard - * - * @return The actual instance (PatchBusinessCreditCard, PatchBusinessDebitCard, PatchBusinessVirtualCreditCard, PatchBusinessVirtualDebitCard, PatchIndividualDebitCard, PatchIndividualVirtualDebitCard) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `PatchIndividualDebitCard`. If the actual instance is not `PatchIndividualDebitCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchIndividualDebitCard` - * @throws ClassCastException if the instance is not `PatchIndividualDebitCard` - */ - public PatchIndividualDebitCard getPatchIndividualDebitCard() throws ClassCastException { - return (PatchIndividualDebitCard)super.getActualInstance(); - } - /** - * Get the actual instance of `PatchIndividualVirtualDebitCard`. If the actual instance is not `PatchIndividualVirtualDebitCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchIndividualVirtualDebitCard` - * @throws ClassCastException if the instance is not `PatchIndividualVirtualDebitCard` - */ - public PatchIndividualVirtualDebitCard getPatchIndividualVirtualDebitCard() throws ClassCastException { - return (PatchIndividualVirtualDebitCard)super.getActualInstance(); - } - /** - * Get the actual instance of `PatchBusinessDebitCard`. If the actual instance is not `PatchBusinessDebitCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchBusinessDebitCard` - * @throws ClassCastException if the instance is not `PatchBusinessDebitCard` - */ - public PatchBusinessDebitCard getPatchBusinessDebitCard() throws ClassCastException { - return (PatchBusinessDebitCard)super.getActualInstance(); - } - /** - * Get the actual instance of `PatchBusinessVirtualDebitCard`. If the actual instance is not `PatchBusinessVirtualDebitCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchBusinessVirtualDebitCard` - * @throws ClassCastException if the instance is not `PatchBusinessVirtualDebitCard` - */ - public PatchBusinessVirtualDebitCard getPatchBusinessVirtualDebitCard() throws ClassCastException { - return (PatchBusinessVirtualDebitCard)super.getActualInstance(); - } - /** - * Get the actual instance of `PatchBusinessCreditCard`. If the actual instance is not `PatchBusinessCreditCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchBusinessCreditCard` - * @throws ClassCastException if the instance is not `PatchBusinessCreditCard` - */ - public PatchBusinessCreditCard getPatchBusinessCreditCard() throws ClassCastException { - return (PatchBusinessCreditCard)super.getActualInstance(); - } - /** - * Get the actual instance of `PatchBusinessVirtualCreditCard`. If the actual instance is not `PatchBusinessVirtualCreditCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchBusinessVirtualCreditCard` - * @throws ClassCastException if the instance is not `PatchBusinessVirtualCreditCard` - */ - public PatchBusinessVirtualCreditCard getPatchBusinessVirtualCreditCard() throws ClassCastException { - return (PatchBusinessVirtualCreditCard)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateCardData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with PatchIndividualDebitCard - try { - PatchIndividualDebitCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchIndividualDebitCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with PatchIndividualVirtualDebitCard - try { - PatchIndividualVirtualDebitCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchIndividualVirtualDebitCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with PatchBusinessDebitCard - try { - PatchBusinessDebitCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchBusinessDebitCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with PatchBusinessVirtualDebitCard - try { - PatchBusinessVirtualDebitCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchBusinessVirtualDebitCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with PatchBusinessCreditCard - try { - PatchBusinessCreditCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchBusinessCreditCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with PatchBusinessVirtualCreditCard - try { - PatchBusinessVirtualCreditCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchBusinessVirtualCreditCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for UpdateCardData with oneOf schemas: PatchBusinessCreditCard, PatchBusinessDebitCard, PatchBusinessVirtualCreditCard, PatchBusinessVirtualDebitCard, PatchIndividualDebitCard, PatchIndividualVirtualDebitCard. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of UpdateCardData given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateCardData - * @throws IOException if the JSON string is invalid with respect to UpdateCardData - */ - public static UpdateCardData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateCardData.class); - } - - /** - * Convert an instance of UpdateCardData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateCheckDeposit.java b/src/main/java/org/openapitools/client/model/UpdateCheckDeposit.java deleted file mode 100644 index ea7cb26b..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateCheckDeposit.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchCheckDeposit; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateCheckDeposit - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateCheckDeposit { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private PatchCheckDeposit data; - - public UpdateCheckDeposit() { - } - - public UpdateCheckDeposit data(PatchCheckDeposit data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public PatchCheckDeposit getData() { - return data; - } - - - public void setData(PatchCheckDeposit data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateCheckDeposit updateCheckDeposit = (UpdateCheckDeposit) o; - return Objects.equals(this.data, updateCheckDeposit.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateCheckDeposit {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateCheckDeposit - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateCheckDeposit.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCheckDeposit is not found in the empty JSON string", UpdateCheckDeposit.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateCheckDeposit.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateCheckDeposit` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateCheckDeposit.openapiRequiredFields) { - 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(); - // validate the required field `data` - PatchCheckDeposit.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateCheckDeposit.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateCheckDeposit' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateCheckDeposit.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateCheckDeposit value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateCheckDeposit read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateCheckDeposit given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateCheckDeposit - * @throws IOException if the JSON string is invalid with respect to UpdateCheckDeposit - */ - public static UpdateCheckDeposit fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateCheckDeposit.class); - } - - /** - * Convert an instance of UpdateCheckDeposit to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateCounterparty.java b/src/main/java/org/openapitools/client/model/UpdateCounterparty.java deleted file mode 100644 index 37b740b9..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateCounterparty.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.UpdateCounterpartyData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateCounterparty - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateCounterparty { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private UpdateCounterpartyData data; - - public UpdateCounterparty() { - } - - public UpdateCounterparty data(UpdateCounterpartyData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public UpdateCounterpartyData getData() { - return data; - } - - - public void setData(UpdateCounterpartyData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateCounterparty updateCounterparty = (UpdateCounterparty) o; - return Objects.equals(this.data, updateCounterparty.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateCounterparty {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateCounterparty - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateCounterparty.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCounterparty is not found in the empty JSON string", UpdateCounterparty.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateCounterparty.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateCounterparty` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateCounterparty.openapiRequiredFields) { - 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(); - // validate the required field `data` - UpdateCounterpartyData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateCounterparty.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateCounterparty' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateCounterparty.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateCounterparty value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateCounterparty read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateCounterparty given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateCounterparty - * @throws IOException if the JSON string is invalid with respect to UpdateCounterparty - */ - public static UpdateCounterparty fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateCounterparty.class); - } - - /** - * Convert an instance of UpdateCounterparty to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateCounterpartyData.java b/src/main/java/org/openapitools/client/model/UpdateCounterpartyData.java deleted file mode 100644 index 9d678945..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateCounterpartyData.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchCounterparty; -import org.openapitools.client.model.PatchCounterpartyAttributes; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -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 com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import org.openapitools.client.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateCounterpartyData extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(UpdateCounterpartyData.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateCounterpartyData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateCounterpartyData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterPatchCounterparty = gson.getDelegateAdapter(this, TypeToken.get(PatchCounterparty.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateCounterpartyData value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `PatchCounterparty` - if (value.getActualInstance() instanceof PatchCounterparty) { - JsonElement element = adapterPatchCounterparty.toJsonTree((PatchCounterparty)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: PatchCounterparty"); - } - - @Override - public UpdateCounterpartyData read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize PatchCounterparty - try { - // validate the JSON object to see if any exception is thrown - PatchCounterparty.validateJsonElement(jsonElement); - actualAdapter = adapterPatchCounterparty; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchCounterparty'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchCounterparty failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchCounterparty'", e); - } - - if (match == 1) { - UpdateCounterpartyData ret = new UpdateCounterpartyData(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for UpdateCounterpartyData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public UpdateCounterpartyData() { - super("oneOf", Boolean.FALSE); - } - - public UpdateCounterpartyData(PatchCounterparty o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("PatchCounterparty", PatchCounterparty.class); - } - - @Override - public Map> getSchemas() { - return UpdateCounterpartyData.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * PatchCounterparty - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof PatchCounterparty) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be PatchCounterparty"); - } - - /** - * Get the actual instance, which can be the following: - * PatchCounterparty - * - * @return The actual instance (PatchCounterparty) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `PatchCounterparty`. If the actual instance is not `PatchCounterparty`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchCounterparty` - * @throws ClassCastException if the instance is not `PatchCounterparty` - */ - public PatchCounterparty getPatchCounterparty() throws ClassCastException { - return (PatchCounterparty)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateCounterpartyData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with PatchCounterparty - try { - PatchCounterparty.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchCounterparty failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for UpdateCounterpartyData with oneOf schemas: PatchCounterparty. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of UpdateCounterpartyData given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateCounterpartyData - * @throws IOException if the JSON string is invalid with respect to UpdateCounterpartyData - */ - public static UpdateCounterpartyData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateCounterpartyData.class); - } - - /** - * Convert an instance of UpdateCounterpartyData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateCreditAccount.java b/src/main/java/org/openapitools/client/model/UpdateCreditAccount.java deleted file mode 100644 index 4bf69b38..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateCreditAccount.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.UpdateCreditAccountAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateCreditAccount - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateCreditAccount { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "creditAccount"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private UpdateCreditAccountAttributes attributes; - - public UpdateCreditAccount() { - } - - public UpdateCreditAccount type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public UpdateCreditAccount attributes(UpdateCreditAccountAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public UpdateCreditAccountAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(UpdateCreditAccountAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateCreditAccount updateCreditAccount = (UpdateCreditAccount) o; - return Objects.equals(this.type, updateCreditAccount.type) && - Objects.equals(this.attributes, updateCreditAccount.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateCreditAccount {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateCreditAccount - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateCreditAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCreditAccount is not found in the empty JSON string", UpdateCreditAccount.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateCreditAccount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateCreditAccount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateCreditAccount.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - UpdateCreditAccountAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateCreditAccount.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateCreditAccount' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateCreditAccount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateCreditAccount value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateCreditAccount read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateCreditAccount given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateCreditAccount - * @throws IOException if the JSON string is invalid with respect to UpdateCreditAccount - */ - public static UpdateCreditAccount fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateCreditAccount.class); - } - - /** - * Convert an instance of UpdateCreditAccount to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateCreditAccountAttributes.java b/src/main/java/org/openapitools/client/model/UpdateCreditAccountAttributes.java deleted file mode 100644 index 35885b5f..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateCreditAccountAttributes.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateCreditAccountAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateCreditAccountAttributes { - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_CREDIT_LIMIT = "creditLimit"; - @SerializedName(SERIALIZED_NAME_CREDIT_LIMIT) - private Integer creditLimit; - - public UpdateCreditAccountAttributes() { - } - - public UpdateCreditAccountAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public UpdateCreditAccountAttributes creditLimit(Integer creditLimit) { - - this.creditLimit = creditLimit; - return this; - } - - /** - * Get creditLimit - * @return creditLimit - **/ - @javax.annotation.Nullable - public Integer getCreditLimit() { - return creditLimit; - } - - - public void setCreditLimit(Integer creditLimit) { - this.creditLimit = creditLimit; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateCreditAccountAttributes updateCreditAccountAttributes = (UpdateCreditAccountAttributes) o; - return Objects.equals(this.tags, updateCreditAccountAttributes.tags) && - Objects.equals(this.creditLimit, updateCreditAccountAttributes.creditLimit); - } - - @Override - public int hashCode() { - return Objects.hash(tags, creditLimit); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateCreditAccountAttributes {\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" creditLimit: ").append(toIndentedString(creditLimit)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tags"); - openapiFields.add("creditLimit"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateCreditAccountAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateCreditAccountAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCreditAccountAttributes is not found in the empty JSON string", UpdateCreditAccountAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateCreditAccountAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateCreditAccountAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateCreditAccountAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateCreditAccountAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateCreditAccountAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateCreditAccountAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateCreditAccountAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateCreditAccountAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateCreditAccountAttributes - * @throws IOException if the JSON string is invalid with respect to UpdateCreditAccountAttributes - */ - public static UpdateCreditAccountAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateCreditAccountAttributes.class); - } - - /** - * Convert an instance of UpdateCreditAccountAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateCustomer.java b/src/main/java/org/openapitools/client/model/UpdateCustomer.java deleted file mode 100644 index 5f2470ff..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateCustomer.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.UpdateCustomerData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateCustomer - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateCustomer { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private UpdateCustomerData data; - - public UpdateCustomer() { - } - - public UpdateCustomer data(UpdateCustomerData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public UpdateCustomerData getData() { - return data; - } - - - public void setData(UpdateCustomerData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateCustomer updateCustomer = (UpdateCustomer) o; - return Objects.equals(this.data, updateCustomer.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateCustomer {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateCustomer - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateCustomer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCustomer is not found in the empty JSON string", UpdateCustomer.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateCustomer.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateCustomer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - UpdateCustomerData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateCustomer.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateCustomer' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateCustomer.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateCustomer value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateCustomer read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateCustomer given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateCustomer - * @throws IOException if the JSON string is invalid with respect to UpdateCustomer - */ - public static UpdateCustomer fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateCustomer.class); - } - - /** - * Convert an instance of UpdateCustomer to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateCustomerData.java b/src/main/java/org/openapitools/client/model/UpdateCustomerData.java deleted file mode 100644 index 14be704c..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateCustomerData.java +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.UpdateBusinessCustomer; -import org.openapitools.client.model.UpdateIndividualCustomer; -import org.openapitools.client.model.UpdateTrustCustomer; -import org.openapitools.client.model.UpdateTrustCustomerAttributes; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -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 com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import org.openapitools.client.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateCustomerData extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(UpdateCustomerData.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateCustomerData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateCustomerData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterUpdateIndividualCustomer = gson.getDelegateAdapter(this, TypeToken.get(UpdateIndividualCustomer.class)); - final TypeAdapter adapterUpdateBusinessCustomer = gson.getDelegateAdapter(this, TypeToken.get(UpdateBusinessCustomer.class)); - final TypeAdapter adapterUpdateTrustCustomer = gson.getDelegateAdapter(this, TypeToken.get(UpdateTrustCustomer.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateCustomerData value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `UpdateIndividualCustomer` - if (value.getActualInstance() instanceof UpdateIndividualCustomer) { - JsonElement element = adapterUpdateIndividualCustomer.toJsonTree((UpdateIndividualCustomer)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `UpdateBusinessCustomer` - if (value.getActualInstance() instanceof UpdateBusinessCustomer) { - JsonElement element = adapterUpdateBusinessCustomer.toJsonTree((UpdateBusinessCustomer)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `UpdateTrustCustomer` - if (value.getActualInstance() instanceof UpdateTrustCustomer) { - JsonElement element = adapterUpdateTrustCustomer.toJsonTree((UpdateTrustCustomer)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: UpdateBusinessCustomer, UpdateIndividualCustomer, UpdateTrustCustomer"); - } - - @Override - public UpdateCustomerData read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize UpdateIndividualCustomer - try { - // validate the JSON object to see if any exception is thrown - UpdateIndividualCustomer.validateJsonElement(jsonElement); - actualAdapter = adapterUpdateIndividualCustomer; - match++; - log.log(Level.FINER, "Input data matches schema 'UpdateIndividualCustomer'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for UpdateIndividualCustomer failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'UpdateIndividualCustomer'", e); - } - // deserialize UpdateBusinessCustomer - try { - // validate the JSON object to see if any exception is thrown - UpdateBusinessCustomer.validateJsonElement(jsonElement); - actualAdapter = adapterUpdateBusinessCustomer; - match++; - log.log(Level.FINER, "Input data matches schema 'UpdateBusinessCustomer'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for UpdateBusinessCustomer failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'UpdateBusinessCustomer'", e); - } - // deserialize UpdateTrustCustomer - try { - // validate the JSON object to see if any exception is thrown - UpdateTrustCustomer.validateJsonElement(jsonElement); - actualAdapter = adapterUpdateTrustCustomer; - match++; - log.log(Level.FINER, "Input data matches schema 'UpdateTrustCustomer'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for UpdateTrustCustomer failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'UpdateTrustCustomer'", e); - } - - if (match == 1) { - UpdateCustomerData ret = new UpdateCustomerData(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for UpdateCustomerData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public UpdateCustomerData() { - super("oneOf", Boolean.FALSE); - } - - public UpdateCustomerData(UpdateBusinessCustomer o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public UpdateCustomerData(UpdateIndividualCustomer o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public UpdateCustomerData(UpdateTrustCustomer o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("UpdateIndividualCustomer", UpdateIndividualCustomer.class); - schemas.put("UpdateBusinessCustomer", UpdateBusinessCustomer.class); - schemas.put("UpdateTrustCustomer", UpdateTrustCustomer.class); - } - - @Override - public Map> getSchemas() { - return UpdateCustomerData.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * UpdateBusinessCustomer, UpdateIndividualCustomer, UpdateTrustCustomer - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof UpdateIndividualCustomer) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof UpdateBusinessCustomer) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof UpdateTrustCustomer) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be UpdateBusinessCustomer, UpdateIndividualCustomer, UpdateTrustCustomer"); - } - - /** - * Get the actual instance, which can be the following: - * UpdateBusinessCustomer, UpdateIndividualCustomer, UpdateTrustCustomer - * - * @return The actual instance (UpdateBusinessCustomer, UpdateIndividualCustomer, UpdateTrustCustomer) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `UpdateIndividualCustomer`. If the actual instance is not `UpdateIndividualCustomer`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `UpdateIndividualCustomer` - * @throws ClassCastException if the instance is not `UpdateIndividualCustomer` - */ - public UpdateIndividualCustomer getUpdateIndividualCustomer() throws ClassCastException { - return (UpdateIndividualCustomer)super.getActualInstance(); - } - /** - * Get the actual instance of `UpdateBusinessCustomer`. If the actual instance is not `UpdateBusinessCustomer`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `UpdateBusinessCustomer` - * @throws ClassCastException if the instance is not `UpdateBusinessCustomer` - */ - public UpdateBusinessCustomer getUpdateBusinessCustomer() throws ClassCastException { - return (UpdateBusinessCustomer)super.getActualInstance(); - } - /** - * Get the actual instance of `UpdateTrustCustomer`. If the actual instance is not `UpdateTrustCustomer`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `UpdateTrustCustomer` - * @throws ClassCastException if the instance is not `UpdateTrustCustomer` - */ - public UpdateTrustCustomer getUpdateTrustCustomer() throws ClassCastException { - return (UpdateTrustCustomer)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateCustomerData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with UpdateIndividualCustomer - try { - UpdateIndividualCustomer.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for UpdateIndividualCustomer failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with UpdateBusinessCustomer - try { - UpdateBusinessCustomer.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for UpdateBusinessCustomer failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with UpdateTrustCustomer - try { - UpdateTrustCustomer.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for UpdateTrustCustomer failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for UpdateCustomerData with oneOf schemas: UpdateBusinessCustomer, UpdateIndividualCustomer, UpdateTrustCustomer. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of UpdateCustomerData given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateCustomerData - * @throws IOException if the JSON string is invalid with respect to UpdateCustomerData - */ - public static UpdateCustomerData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateCustomerData.class); - } - - /** - * Convert an instance of UpdateCustomerData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateDepositAccount.java b/src/main/java/org/openapitools/client/model/UpdateDepositAccount.java deleted file mode 100644 index 270c4443..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateDepositAccount.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.UpdateDepositAccountAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateDepositAccount - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateDepositAccount { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "depositAccount"; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private UpdateDepositAccountAttributes attributes; - - public UpdateDepositAccount() { - } - - public UpdateDepositAccount type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public UpdateDepositAccount attributes(UpdateDepositAccountAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public UpdateDepositAccountAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(UpdateDepositAccountAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateDepositAccount updateDepositAccount = (UpdateDepositAccount) o; - return Objects.equals(this.type, updateDepositAccount.type) && - Objects.equals(this.attributes, updateDepositAccount.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateDepositAccount {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateDepositAccount - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateDepositAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateDepositAccount is not found in the empty JSON string", UpdateDepositAccount.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateDepositAccount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateDepositAccount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateDepositAccount.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `attributes` - UpdateDepositAccountAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateDepositAccount.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateDepositAccount' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateDepositAccount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateDepositAccount value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateDepositAccount read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateDepositAccount given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateDepositAccount - * @throws IOException if the JSON string is invalid with respect to UpdateDepositAccount - */ - public static UpdateDepositAccount fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateDepositAccount.class); - } - - /** - * Convert an instance of UpdateDepositAccount to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateDepositAccountAttributes.java b/src/main/java/org/openapitools/client/model/UpdateDepositAccountAttributes.java deleted file mode 100644 index a8a908a1..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateDepositAccountAttributes.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateDepositAccountAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateDepositAccountAttributes { - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_DEPOSIT_PRODUCT = "depositProduct"; - @SerializedName(SERIALIZED_NAME_DEPOSIT_PRODUCT) - private String depositProduct; - - public UpdateDepositAccountAttributes() { - } - - public UpdateDepositAccountAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public UpdateDepositAccountAttributes depositProduct(String depositProduct) { - - this.depositProduct = depositProduct; - return this; - } - - /** - * Get depositProduct - * @return depositProduct - **/ - @javax.annotation.Nullable - public String getDepositProduct() { - return depositProduct; - } - - - public void setDepositProduct(String depositProduct) { - this.depositProduct = depositProduct; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateDepositAccountAttributes updateDepositAccountAttributes = (UpdateDepositAccountAttributes) o; - return Objects.equals(this.tags, updateDepositAccountAttributes.tags) && - Objects.equals(this.depositProduct, updateDepositAccountAttributes.depositProduct); - } - - @Override - public int hashCode() { - return Objects.hash(tags, depositProduct); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateDepositAccountAttributes {\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" depositProduct: ").append(toIndentedString(depositProduct)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tags"); - openapiFields.add("depositProduct"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateDepositAccountAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateDepositAccountAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateDepositAccountAttributes is not found in the empty JSON string", UpdateDepositAccountAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateDepositAccountAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateDepositAccountAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("depositProduct") != null && !jsonObj.get("depositProduct").isJsonNull()) && !jsonObj.get("depositProduct").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `depositProduct` to be a primitive type in the JSON string but got `%s`", jsonObj.get("depositProduct").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateDepositAccountAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateDepositAccountAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateDepositAccountAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateDepositAccountAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateDepositAccountAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateDepositAccountAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateDepositAccountAttributes - * @throws IOException if the JSON string is invalid with respect to UpdateDepositAccountAttributes - */ - public static UpdateDepositAccountAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateDepositAccountAttributes.class); - } - - /** - * Convert an instance of UpdateDepositAccountAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateIndividualCustomer.java b/src/main/java/org/openapitools/client/model/UpdateIndividualCustomer.java deleted file mode 100644 index 18734b2c..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateIndividualCustomer.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.UpdateIndividualCustomerAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateIndividualCustomer - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateIndividualCustomer { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private UpdateIndividualCustomerAttributes attributes; - - public UpdateIndividualCustomer() { - } - - public UpdateIndividualCustomer type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public UpdateIndividualCustomer attributes(UpdateIndividualCustomerAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public UpdateIndividualCustomerAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(UpdateIndividualCustomerAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateIndividualCustomer updateIndividualCustomer = (UpdateIndividualCustomer) o; - return Objects.equals(this.type, updateIndividualCustomer.type) && - Objects.equals(this.attributes, updateIndividualCustomer.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateIndividualCustomer {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateIndividualCustomer - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateIndividualCustomer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateIndividualCustomer is not found in the empty JSON string", UpdateIndividualCustomer.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateIndividualCustomer.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateIndividualCustomer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - UpdateIndividualCustomerAttributes.validateJsonElement(jsonObj.get("attributes")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateIndividualCustomer.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateIndividualCustomer' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateIndividualCustomer.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateIndividualCustomer value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateIndividualCustomer read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateIndividualCustomer given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateIndividualCustomer - * @throws IOException if the JSON string is invalid with respect to UpdateIndividualCustomer - */ - public static UpdateIndividualCustomer fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateIndividualCustomer.class); - } - - /** - * Convert an instance of UpdateIndividualCustomer to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateIndividualCustomerAttributes.java b/src/main/java/org/openapitools/client/model/UpdateIndividualCustomerAttributes.java deleted file mode 100644 index bf5c5751..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateIndividualCustomerAttributes.java +++ /dev/null @@ -1,429 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Address; -import org.openapitools.client.model.AuthorizedUser; -import org.openapitools.client.model.Phone; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateIndividualCustomerAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateIndividualCustomerAttributes { - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private Phone phone; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_DBA = "dba"; - @SerializedName(SERIALIZED_NAME_DBA) - private String dba; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_AUTHORIZED_USERS = "authorizedUsers"; - @SerializedName(SERIALIZED_NAME_AUTHORIZED_USERS) - private List authorizedUsers; - - public static final String SERIALIZED_NAME_JWT_SUBJECT = "jwtSubject"; - @SerializedName(SERIALIZED_NAME_JWT_SUBJECT) - private String jwtSubject; - - public UpdateIndividualCustomerAttributes() { - } - - public UpdateIndividualCustomerAttributes email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public UpdateIndividualCustomerAttributes phone(Phone phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - public Phone getPhone() { - return phone; - } - - - public void setPhone(Phone phone) { - this.phone = phone; - } - - - public UpdateIndividualCustomerAttributes address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public UpdateIndividualCustomerAttributes dba(String dba) { - - this.dba = dba; - return this; - } - - /** - * Get dba - * @return dba - **/ - @javax.annotation.Nullable - public String getDba() { - return dba; - } - - - public void setDba(String dba) { - this.dba = dba; - } - - - public UpdateIndividualCustomerAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public UpdateIndividualCustomerAttributes authorizedUsers(List authorizedUsers) { - - this.authorizedUsers = authorizedUsers; - return this; - } - - public UpdateIndividualCustomerAttributes addAuthorizedUsersItem(AuthorizedUser authorizedUsersItem) { - if (this.authorizedUsers == null) { - this.authorizedUsers = new ArrayList<>(); - } - this.authorizedUsers.add(authorizedUsersItem); - return this; - } - - /** - * Get authorizedUsers - * @return authorizedUsers - **/ - @javax.annotation.Nullable - public List getAuthorizedUsers() { - return authorizedUsers; - } - - - public void setAuthorizedUsers(List authorizedUsers) { - this.authorizedUsers = authorizedUsers; - } - - - public UpdateIndividualCustomerAttributes jwtSubject(String jwtSubject) { - - this.jwtSubject = jwtSubject; - return this; - } - - /** - * Get jwtSubject - * @return jwtSubject - **/ - @javax.annotation.Nullable - public String getJwtSubject() { - return jwtSubject; - } - - - public void setJwtSubject(String jwtSubject) { - this.jwtSubject = jwtSubject; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateIndividualCustomerAttributes updateIndividualCustomerAttributes = (UpdateIndividualCustomerAttributes) o; - return Objects.equals(this.email, updateIndividualCustomerAttributes.email) && - Objects.equals(this.phone, updateIndividualCustomerAttributes.phone) && - Objects.equals(this.address, updateIndividualCustomerAttributes.address) && - Objects.equals(this.dba, updateIndividualCustomerAttributes.dba) && - Objects.equals(this.tags, updateIndividualCustomerAttributes.tags) && - Objects.equals(this.authorizedUsers, updateIndividualCustomerAttributes.authorizedUsers) && - Objects.equals(this.jwtSubject, updateIndividualCustomerAttributes.jwtSubject); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(email, phone, address, dba, tags, authorizedUsers, jwtSubject); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateIndividualCustomerAttributes {\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" dba: ").append(toIndentedString(dba)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" authorizedUsers: ").append(toIndentedString(authorizedUsers)).append("\n"); - sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("email"); - openapiFields.add("phone"); - openapiFields.add("address"); - openapiFields.add("dba"); - openapiFields.add("tags"); - openapiFields.add("authorizedUsers"); - openapiFields.add("jwtSubject"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateIndividualCustomerAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateIndividualCustomerAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateIndividualCustomerAttributes is not found in the empty JSON string", UpdateIndividualCustomerAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateIndividualCustomerAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateIndividualCustomerAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - // validate the optional field `phone` - if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { - Phone.validateJsonElement(jsonObj.get("phone")); - } - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("address")); - } - if ((jsonObj.get("dba") != null && !jsonObj.get("dba").isJsonNull()) && !jsonObj.get("dba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dba").toString())); - } - if (jsonObj.get("authorizedUsers") != null && !jsonObj.get("authorizedUsers").isJsonNull()) { - JsonArray jsonArrayauthorizedUsers = jsonObj.getAsJsonArray("authorizedUsers"); - if (jsonArrayauthorizedUsers != null) { - // ensure the json data is an array - if (!jsonObj.get("authorizedUsers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `authorizedUsers` to be an array in the JSON string but got `%s`", jsonObj.get("authorizedUsers").toString())); - } - - // validate the optional field `authorizedUsers` (array) - for (int i = 0; i < jsonArrayauthorizedUsers.size(); i++) { - AuthorizedUser.validateJsonElement(jsonArrayauthorizedUsers.get(i)); - }; - } - } - if ((jsonObj.get("jwtSubject") != null && !jsonObj.get("jwtSubject").isJsonNull()) && !jsonObj.get("jwtSubject").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `jwtSubject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jwtSubject").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateIndividualCustomerAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateIndividualCustomerAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateIndividualCustomerAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateIndividualCustomerAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateIndividualCustomerAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateIndividualCustomerAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateIndividualCustomerAttributes - * @throws IOException if the JSON string is invalid with respect to UpdateIndividualCustomerAttributes - */ - public static UpdateIndividualCustomerAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateIndividualCustomerAttributes.class); - } - - /** - * Convert an instance of UpdateIndividualCustomerAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdatePayment.java b/src/main/java/org/openapitools/client/model/UpdatePayment.java deleted file mode 100644 index 6103f22f..00000000 --- a/src/main/java/org/openapitools/client/model/UpdatePayment.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.UpdatePaymentData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdatePayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdatePayment { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private UpdatePaymentData data; - - public UpdatePayment() { - } - - public UpdatePayment data(UpdatePaymentData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public UpdatePaymentData getData() { - return data; - } - - - public void setData(UpdatePaymentData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatePayment updatePayment = (UpdatePayment) o; - return Objects.equals(this.data, updatePayment.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdatePayment {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdatePayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdatePayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdatePayment is not found in the empty JSON string", UpdatePayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdatePayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdatePayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdatePayment.openapiRequiredFields) { - 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(); - // validate the required field `data` - UpdatePaymentData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdatePayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdatePayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdatePayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdatePayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdatePayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdatePayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdatePayment - * @throws IOException if the JSON string is invalid with respect to UpdatePayment - */ - public static UpdatePayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdatePayment.class); - } - - /** - * Convert an instance of UpdatePayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdatePaymentData.java b/src/main/java/org/openapitools/client/model/UpdatePaymentData.java deleted file mode 100644 index 25a6f1e2..00000000 --- a/src/main/java/org/openapitools/client/model/UpdatePaymentData.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchAchPayment; -import org.openapitools.client.model.PatchBookPayment; -import org.openapitools.client.model.PatchTrustApplicationAttributes; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -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 com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import org.openapitools.client.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdatePaymentData extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(UpdatePaymentData.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdatePaymentData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdatePaymentData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterPatchAchPayment = gson.getDelegateAdapter(this, TypeToken.get(PatchAchPayment.class)); - final TypeAdapter adapterPatchBookPayment = gson.getDelegateAdapter(this, TypeToken.get(PatchBookPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdatePaymentData value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `PatchAchPayment` - if (value.getActualInstance() instanceof PatchAchPayment) { - JsonElement element = adapterPatchAchPayment.toJsonTree((PatchAchPayment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `PatchBookPayment` - if (value.getActualInstance() instanceof PatchBookPayment) { - JsonElement element = adapterPatchBookPayment.toJsonTree((PatchBookPayment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: PatchAchPayment, PatchBookPayment"); - } - - @Override - public UpdatePaymentData read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize PatchAchPayment - try { - // validate the JSON object to see if any exception is thrown - PatchAchPayment.validateJsonElement(jsonElement); - actualAdapter = adapterPatchAchPayment; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchAchPayment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchAchPayment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchAchPayment'", e); - } - // deserialize PatchBookPayment - try { - // validate the JSON object to see if any exception is thrown - PatchBookPayment.validateJsonElement(jsonElement); - actualAdapter = adapterPatchBookPayment; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchBookPayment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchBookPayment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchBookPayment'", e); - } - - if (match == 1) { - UpdatePaymentData ret = new UpdatePaymentData(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for UpdatePaymentData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public UpdatePaymentData() { - super("oneOf", Boolean.FALSE); - } - - public UpdatePaymentData(PatchAchPayment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public UpdatePaymentData(PatchBookPayment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("PatchAchPayment", PatchAchPayment.class); - schemas.put("PatchBookPayment", PatchBookPayment.class); - } - - @Override - public Map> getSchemas() { - return UpdatePaymentData.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * PatchAchPayment, PatchBookPayment - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof PatchAchPayment) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof PatchBookPayment) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be PatchAchPayment, PatchBookPayment"); - } - - /** - * Get the actual instance, which can be the following: - * PatchAchPayment, PatchBookPayment - * - * @return The actual instance (PatchAchPayment, PatchBookPayment) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `PatchAchPayment`. If the actual instance is not `PatchAchPayment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchAchPayment` - * @throws ClassCastException if the instance is not `PatchAchPayment` - */ - public PatchAchPayment getPatchAchPayment() throws ClassCastException { - return (PatchAchPayment)super.getActualInstance(); - } - /** - * Get the actual instance of `PatchBookPayment`. If the actual instance is not `PatchBookPayment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchBookPayment` - * @throws ClassCastException if the instance is not `PatchBookPayment` - */ - public PatchBookPayment getPatchBookPayment() throws ClassCastException { - return (PatchBookPayment)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdatePaymentData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with PatchAchPayment - try { - PatchAchPayment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchAchPayment failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with PatchBookPayment - try { - PatchBookPayment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchBookPayment failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for UpdatePaymentData with oneOf schemas: PatchAchPayment, PatchBookPayment. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of UpdatePaymentData given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdatePaymentData - * @throws IOException if the JSON string is invalid with respect to UpdatePaymentData - */ - public static UpdatePaymentData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdatePaymentData.class); - } - - /** - * Convert an instance of UpdatePaymentData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateReceivedPayment.java b/src/main/java/org/openapitools/client/model/UpdateReceivedPayment.java deleted file mode 100644 index c5b76f81..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateReceivedPayment.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.UpdateReceivedPaymentData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateReceivedPayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateReceivedPayment { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private UpdateReceivedPaymentData data; - - public UpdateReceivedPayment() { - } - - public UpdateReceivedPayment data(UpdateReceivedPaymentData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public UpdateReceivedPaymentData getData() { - return data; - } - - - public void setData(UpdateReceivedPaymentData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateReceivedPayment updateReceivedPayment = (UpdateReceivedPayment) o; - return Objects.equals(this.data, updateReceivedPayment.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateReceivedPayment {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateReceivedPayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateReceivedPayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateReceivedPayment is not found in the empty JSON string", UpdateReceivedPayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateReceivedPayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateReceivedPayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateReceivedPayment.openapiRequiredFields) { - 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(); - // validate the required field `data` - UpdateReceivedPaymentData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateReceivedPayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateReceivedPayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateReceivedPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateReceivedPayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateReceivedPayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateReceivedPayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateReceivedPayment - * @throws IOException if the JSON string is invalid with respect to UpdateReceivedPayment - */ - public static UpdateReceivedPayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateReceivedPayment.class); - } - - /** - * Convert an instance of UpdateReceivedPayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateReceivedPaymentData.java b/src/main/java/org/openapitools/client/model/UpdateReceivedPaymentData.java deleted file mode 100644 index 36ddf691..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateReceivedPaymentData.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchAchReceivedPayment; -import org.openapitools.client.model.PatchTrustApplicationAttributes; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -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 com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import org.openapitools.client.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateReceivedPaymentData extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(UpdateReceivedPaymentData.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateReceivedPaymentData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateReceivedPaymentData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterPatchAchReceivedPayment = gson.getDelegateAdapter(this, TypeToken.get(PatchAchReceivedPayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateReceivedPaymentData value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `PatchAchReceivedPayment` - if (value.getActualInstance() instanceof PatchAchReceivedPayment) { - JsonElement element = adapterPatchAchReceivedPayment.toJsonTree((PatchAchReceivedPayment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: PatchAchReceivedPayment"); - } - - @Override - public UpdateReceivedPaymentData read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize PatchAchReceivedPayment - try { - // validate the JSON object to see if any exception is thrown - PatchAchReceivedPayment.validateJsonElement(jsonElement); - actualAdapter = adapterPatchAchReceivedPayment; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchAchReceivedPayment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchAchReceivedPayment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchAchReceivedPayment'", e); - } - - if (match == 1) { - UpdateReceivedPaymentData ret = new UpdateReceivedPaymentData(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for UpdateReceivedPaymentData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public UpdateReceivedPaymentData() { - super("oneOf", Boolean.FALSE); - } - - public UpdateReceivedPaymentData(PatchAchReceivedPayment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("PatchAchReceivedPayment", PatchAchReceivedPayment.class); - } - - @Override - public Map> getSchemas() { - return UpdateReceivedPaymentData.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * PatchAchReceivedPayment - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof PatchAchReceivedPayment) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be PatchAchReceivedPayment"); - } - - /** - * Get the actual instance, which can be the following: - * PatchAchReceivedPayment - * - * @return The actual instance (PatchAchReceivedPayment) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `PatchAchReceivedPayment`. If the actual instance is not `PatchAchReceivedPayment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchAchReceivedPayment` - * @throws ClassCastException if the instance is not `PatchAchReceivedPayment` - */ - public PatchAchReceivedPayment getPatchAchReceivedPayment() throws ClassCastException { - return (PatchAchReceivedPayment)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateReceivedPaymentData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with PatchAchReceivedPayment - try { - PatchAchReceivedPayment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchAchReceivedPayment failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for UpdateReceivedPaymentData with oneOf schemas: PatchAchReceivedPayment. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of UpdateReceivedPaymentData given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateReceivedPaymentData - * @throws IOException if the JSON string is invalid with respect to UpdateReceivedPaymentData - */ - public static UpdateReceivedPaymentData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateReceivedPaymentData.class); - } - - /** - * Convert an instance of UpdateReceivedPaymentData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateTransaction.java b/src/main/java/org/openapitools/client/model/UpdateTransaction.java deleted file mode 100644 index 131693b0..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateTransaction.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.UpdateTransactionData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateTransaction { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private UpdateTransactionData data; - - public UpdateTransaction() { - } - - public UpdateTransaction data(UpdateTransactionData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - public UpdateTransactionData getData() { - return data; - } - - - public void setData(UpdateTransactionData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateTransaction updateTransaction = (UpdateTransaction) o; - return Objects.equals(this.data, updateTransaction.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateTransaction {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateTransaction is not found in the empty JSON string", UpdateTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdateTransaction.openapiRequiredFields) { - 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(); - // validate the required field `data` - UpdateTransactionData.validateJsonElement(jsonObj.get("data")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateTransaction - * @throws IOException if the JSON string is invalid with respect to UpdateTransaction - */ - public static UpdateTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateTransaction.class); - } - - /** - * Convert an instance of UpdateTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateTransactionData.java b/src/main/java/org/openapitools/client/model/UpdateTransactionData.java deleted file mode 100644 index 8dd5fbd5..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateTransactionData.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.PatchBookTransaction; -import org.openapitools.client.model.PatchBookTransactionAttributes; -import org.openapitools.client.model.PatchBookTransactionRelationships; -import org.openapitools.client.model.PatchChargebackTransaction; -import org.openapitools.client.model.PatchTransactionTags; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -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 com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import org.openapitools.client.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateTransactionData extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(UpdateTransactionData.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateTransactionData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateTransactionData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterPatchTransactionTags = gson.getDelegateAdapter(this, TypeToken.get(PatchTransactionTags.class)); - final TypeAdapter adapterPatchBookTransaction = gson.getDelegateAdapter(this, TypeToken.get(PatchBookTransaction.class)); - final TypeAdapter adapterPatchChargebackTransaction = gson.getDelegateAdapter(this, TypeToken.get(PatchChargebackTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateTransactionData value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `PatchTransactionTags` - if (value.getActualInstance() instanceof PatchTransactionTags) { - JsonElement element = adapterPatchTransactionTags.toJsonTree((PatchTransactionTags)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `PatchBookTransaction` - if (value.getActualInstance() instanceof PatchBookTransaction) { - JsonElement element = adapterPatchBookTransaction.toJsonTree((PatchBookTransaction)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `PatchChargebackTransaction` - if (value.getActualInstance() instanceof PatchChargebackTransaction) { - JsonElement element = adapterPatchChargebackTransaction.toJsonTree((PatchChargebackTransaction)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: PatchBookTransaction, PatchChargebackTransaction, PatchTransactionTags"); - } - - @Override - public UpdateTransactionData read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize PatchTransactionTags - try { - // validate the JSON object to see if any exception is thrown - PatchTransactionTags.validateJsonElement(jsonElement); - actualAdapter = adapterPatchTransactionTags; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchTransactionTags'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchTransactionTags failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchTransactionTags'", e); - } - // deserialize PatchBookTransaction - try { - // validate the JSON object to see if any exception is thrown - PatchBookTransaction.validateJsonElement(jsonElement); - actualAdapter = adapterPatchBookTransaction; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchBookTransaction'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchBookTransaction failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchBookTransaction'", e); - } - // deserialize PatchChargebackTransaction - try { - // validate the JSON object to see if any exception is thrown - PatchChargebackTransaction.validateJsonElement(jsonElement); - actualAdapter = adapterPatchChargebackTransaction; - match++; - log.log(Level.FINER, "Input data matches schema 'PatchChargebackTransaction'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for PatchChargebackTransaction failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'PatchChargebackTransaction'", e); - } - - if (match == 1) { - UpdateTransactionData ret = new UpdateTransactionData(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for UpdateTransactionData: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public UpdateTransactionData() { - super("oneOf", Boolean.FALSE); - } - - public UpdateTransactionData(PatchBookTransaction o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public UpdateTransactionData(PatchChargebackTransaction o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public UpdateTransactionData(PatchTransactionTags o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("PatchTransactionTags", PatchTransactionTags.class); - schemas.put("PatchBookTransaction", PatchBookTransaction.class); - schemas.put("PatchChargebackTransaction", PatchChargebackTransaction.class); - } - - @Override - public Map> getSchemas() { - return UpdateTransactionData.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * PatchBookTransaction, PatchChargebackTransaction, PatchTransactionTags - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof PatchTransactionTags) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof PatchBookTransaction) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof PatchChargebackTransaction) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be PatchBookTransaction, PatchChargebackTransaction, PatchTransactionTags"); - } - - /** - * Get the actual instance, which can be the following: - * PatchBookTransaction, PatchChargebackTransaction, PatchTransactionTags - * - * @return The actual instance (PatchBookTransaction, PatchChargebackTransaction, PatchTransactionTags) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `PatchTransactionTags`. If the actual instance is not `PatchTransactionTags`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchTransactionTags` - * @throws ClassCastException if the instance is not `PatchTransactionTags` - */ - public PatchTransactionTags getPatchTransactionTags() throws ClassCastException { - return (PatchTransactionTags)super.getActualInstance(); - } - /** - * Get the actual instance of `PatchBookTransaction`. If the actual instance is not `PatchBookTransaction`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchBookTransaction` - * @throws ClassCastException if the instance is not `PatchBookTransaction` - */ - public PatchBookTransaction getPatchBookTransaction() throws ClassCastException { - return (PatchBookTransaction)super.getActualInstance(); - } - /** - * Get the actual instance of `PatchChargebackTransaction`. If the actual instance is not `PatchChargebackTransaction`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `PatchChargebackTransaction` - * @throws ClassCastException if the instance is not `PatchChargebackTransaction` - */ - public PatchChargebackTransaction getPatchChargebackTransaction() throws ClassCastException { - return (PatchChargebackTransaction)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateTransactionData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with PatchTransactionTags - try { - PatchTransactionTags.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchTransactionTags failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with PatchBookTransaction - try { - PatchBookTransaction.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchBookTransaction failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with PatchChargebackTransaction - try { - PatchChargebackTransaction.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for PatchChargebackTransaction failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for UpdateTransactionData with oneOf schemas: PatchBookTransaction, PatchChargebackTransaction, PatchTransactionTags. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of UpdateTransactionData given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateTransactionData - * @throws IOException if the JSON string is invalid with respect to UpdateTransactionData - */ - public static UpdateTransactionData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateTransactionData.class); - } - - /** - * Convert an instance of UpdateTransactionData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateTrustCustomer.java b/src/main/java/org/openapitools/client/model/UpdateTrustCustomer.java deleted file mode 100644 index 68796469..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateTrustCustomer.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.UpdateTrustCustomerAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateTrustCustomer - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateTrustCustomer { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private UpdateTrustCustomerAttributes attributes; - - public UpdateTrustCustomer() { - } - - public UpdateTrustCustomer type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public UpdateTrustCustomer attributes(UpdateTrustCustomerAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public UpdateTrustCustomerAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(UpdateTrustCustomerAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateTrustCustomer updateTrustCustomer = (UpdateTrustCustomer) o; - return Objects.equals(this.type, updateTrustCustomer.type) && - Objects.equals(this.attributes, updateTrustCustomer.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateTrustCustomer {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateTrustCustomer - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateTrustCustomer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateTrustCustomer is not found in the empty JSON string", UpdateTrustCustomer.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateTrustCustomer.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateTrustCustomer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - UpdateTrustCustomerAttributes.validateJsonElement(jsonObj.get("attributes")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateTrustCustomer.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateTrustCustomer' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateTrustCustomer.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateTrustCustomer value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateTrustCustomer read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateTrustCustomer given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateTrustCustomer - * @throws IOException if the JSON string is invalid with respect to UpdateTrustCustomer - */ - public static UpdateTrustCustomer fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateTrustCustomer.class); - } - - /** - * Convert an instance of UpdateTrustCustomer to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateTrustCustomerAttributes.java b/src/main/java/org/openapitools/client/model/UpdateTrustCustomerAttributes.java deleted file mode 100644 index f3ed21b4..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateTrustCustomerAttributes.java +++ /dev/null @@ -1,303 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.AuthorizedUser; -import org.openapitools.client.model.TrustContact; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateTrustCustomerAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateTrustCustomerAttributes { - public static final String SERIALIZED_NAME_CONTACT = "contact"; - @SerializedName(SERIALIZED_NAME_CONTACT) - private TrustContact contact; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public static final String SERIALIZED_NAME_AUTHORIZED_USERS = "authorizedUsers"; - @SerializedName(SERIALIZED_NAME_AUTHORIZED_USERS) - private List authorizedUsers; - - public UpdateTrustCustomerAttributes() { - } - - public UpdateTrustCustomerAttributes contact(TrustContact contact) { - - this.contact = contact; - return this; - } - - /** - * Get contact - * @return contact - **/ - @javax.annotation.Nullable - public TrustContact getContact() { - return contact; - } - - - public void setContact(TrustContact contact) { - this.contact = contact; - } - - - public UpdateTrustCustomerAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - public UpdateTrustCustomerAttributes authorizedUsers(List authorizedUsers) { - - this.authorizedUsers = authorizedUsers; - return this; - } - - public UpdateTrustCustomerAttributes addAuthorizedUsersItem(AuthorizedUser authorizedUsersItem) { - if (this.authorizedUsers == null) { - this.authorizedUsers = new ArrayList<>(); - } - this.authorizedUsers.add(authorizedUsersItem); - return this; - } - - /** - * Get authorizedUsers - * @return authorizedUsers - **/ - @javax.annotation.Nullable - public List getAuthorizedUsers() { - return authorizedUsers; - } - - - public void setAuthorizedUsers(List authorizedUsers) { - this.authorizedUsers = authorizedUsers; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateTrustCustomerAttributes updateTrustCustomerAttributes = (UpdateTrustCustomerAttributes) o; - return Objects.equals(this.contact, updateTrustCustomerAttributes.contact) && - Objects.equals(this.tags, updateTrustCustomerAttributes.tags) && - Objects.equals(this.authorizedUsers, updateTrustCustomerAttributes.authorizedUsers); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(contact, tags, authorizedUsers); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateTrustCustomerAttributes {\n"); - sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" authorizedUsers: ").append(toIndentedString(authorizedUsers)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("contact"); - openapiFields.add("tags"); - openapiFields.add("authorizedUsers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateTrustCustomerAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateTrustCustomerAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateTrustCustomerAttributes is not found in the empty JSON string", UpdateTrustCustomerAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateTrustCustomerAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateTrustCustomerAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `contact` - if (jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) { - TrustContact.validateJsonElement(jsonObj.get("contact")); - } - if (jsonObj.get("authorizedUsers") != null && !jsonObj.get("authorizedUsers").isJsonNull()) { - JsonArray jsonArrayauthorizedUsers = jsonObj.getAsJsonArray("authorizedUsers"); - if (jsonArrayauthorizedUsers != null) { - // ensure the json data is an array - if (!jsonObj.get("authorizedUsers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `authorizedUsers` to be an array in the JSON string but got `%s`", jsonObj.get("authorizedUsers").toString())); - } - - // validate the optional field `authorizedUsers` (array) - for (int i = 0; i < jsonArrayauthorizedUsers.size(); i++) { - AuthorizedUser.validateJsonElement(jsonArrayauthorizedUsers.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateTrustCustomerAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateTrustCustomerAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateTrustCustomerAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateTrustCustomerAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateTrustCustomerAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateTrustCustomerAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateTrustCustomerAttributes - * @throws IOException if the JSON string is invalid with respect to UpdateTrustCustomerAttributes - */ - public static UpdateTrustCustomerAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateTrustCustomerAttributes.class); - } - - /** - * Convert an instance of UpdateTrustCustomerAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateUnitRequest.java b/src/main/java/org/openapitools/client/model/UpdateUnitRequest.java deleted file mode 100644 index a6501c02..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateUnitRequest.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.UpdateUnitRequestData; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateUnitRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateUnitRequest { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private UpdateUnitRequestData data; - - public UpdateUnitRequest() { - } - - public UpdateUnitRequest data(UpdateUnitRequestData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public UpdateUnitRequestData getData() { - return data; - } - - - public void setData(UpdateUnitRequestData data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateUnitRequest updateUnitRequest = (UpdateUnitRequest) o; - return Objects.equals(this.data, updateUnitRequest.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateUnitRequest {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateUnitRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateUnitRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateUnitRequest is not found in the empty JSON string", UpdateUnitRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateUnitRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateUnitRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - UpdateUnitRequestData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateUnitRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateUnitRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateUnitRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateUnitRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateUnitRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateUnitRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateUnitRequest - * @throws IOException if the JSON string is invalid with respect to UpdateUnitRequest - */ - public static UpdateUnitRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateUnitRequest.class); - } - - /** - * Convert an instance of UpdateUnitRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateUnitRequestData.java b/src/main/java/org/openapitools/client/model/UpdateUnitRequestData.java deleted file mode 100644 index 1b594307..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateUnitRequestData.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.UpdateUnitRequestDataAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateUnitRequestData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateUnitRequestData { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private UpdateUnitRequestDataAttributes attributes; - - public UpdateUnitRequestData() { - } - - public UpdateUnitRequestData type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public UpdateUnitRequestData attributes(UpdateUnitRequestDataAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - public UpdateUnitRequestDataAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(UpdateUnitRequestDataAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateUnitRequestData updateUnitRequestData = (UpdateUnitRequestData) o; - return Objects.equals(this.type, updateUnitRequestData.type) && - Objects.equals(this.attributes, updateUnitRequestData.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateUnitRequestData {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateUnitRequestData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateUnitRequestData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateUnitRequestData is not found in the empty JSON string", UpdateUnitRequestData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateUnitRequestData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateUnitRequestData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - UpdateUnitRequestDataAttributes.validateJsonElement(jsonObj.get("attributes")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateUnitRequestData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateUnitRequestData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateUnitRequestData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateUnitRequestData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateUnitRequestData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateUnitRequestData given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateUnitRequestData - * @throws IOException if the JSON string is invalid with respect to UpdateUnitRequestData - */ - public static UpdateUnitRequestData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateUnitRequestData.class); - } - - /** - * Convert an instance of UpdateUnitRequestData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/UpdateUnitRequestDataAttributes.java b/src/main/java/org/openapitools/client/model/UpdateUnitRequestDataAttributes.java deleted file mode 100644 index 8a38b14b..00000000 --- a/src/main/java/org/openapitools/client/model/UpdateUnitRequestDataAttributes.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * UpdateUnitRequestDataAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateUnitRequestDataAttributes { - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public UpdateUnitRequestDataAttributes() { - } - - public UpdateUnitRequestDataAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateUnitRequestDataAttributes updateUnitRequestDataAttributes = (UpdateUnitRequestDataAttributes) o; - return Objects.equals(this.tags, updateUnitRequestDataAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateUnitRequestDataAttributes {\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateUnitRequestDataAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateUnitRequestDataAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateUnitRequestDataAttributes is not found in the empty JSON string", UpdateUnitRequestDataAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!UpdateUnitRequestDataAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateUnitRequestDataAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateUnitRequestDataAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateUnitRequestDataAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateUnitRequestDataAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateUnitRequestDataAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdateUnitRequestDataAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateUnitRequestDataAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateUnitRequestDataAttributes - * @throws IOException if the JSON string is invalid with respect to UpdateUnitRequestDataAttributes - */ - public static UpdateUnitRequestDataAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateUnitRequestDataAttributes.class); - } - - /** - * Convert an instance of UpdateUnitRequestDataAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/VerifyDocument.java b/src/main/java/org/openapitools/client/model/VerifyDocument.java deleted file mode 100644 index 3943d5e9..00000000 --- a/src/main/java/org/openapitools/client/model/VerifyDocument.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * VerifyDocument - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VerifyDocument { - public static final String SERIALIZED_NAME_JOB_ID = "jobId"; - @SerializedName(SERIALIZED_NAME_JOB_ID) - private String jobId; - - public VerifyDocument() { - } - - public VerifyDocument jobId(String jobId) { - - this.jobId = jobId; - return this; - } - - /** - * Get jobId - * @return jobId - **/ - @javax.annotation.Nullable - public String getJobId() { - return jobId; - } - - - public void setJobId(String jobId) { - this.jobId = jobId; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VerifyDocument verifyDocument = (VerifyDocument) o; - return Objects.equals(this.jobId, verifyDocument.jobId); - } - - @Override - public int hashCode() { - return Objects.hash(jobId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VerifyDocument {\n"); - sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("jobId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VerifyDocument - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VerifyDocument.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VerifyDocument is not found in the empty JSON string", VerifyDocument.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!VerifyDocument.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `VerifyDocument` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("jobId") != null && !jsonObj.get("jobId").isJsonNull()) && !jsonObj.get("jobId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `jobId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jobId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VerifyDocument.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VerifyDocument' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VerifyDocument.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VerifyDocument value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public VerifyDocument read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VerifyDocument given an JSON string - * - * @param jsonString JSON string - * @return An instance of VerifyDocument - * @throws IOException if the JSON string is invalid with respect to VerifyDocument - */ - public static VerifyDocument fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VerifyDocument.class); - } - - /** - * Convert an instance of VerifyDocument to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/VirtualCardStatus.java b/src/main/java/org/openapitools/client/model/VirtualCardStatus.java deleted file mode 100644 index b97bf100..00000000 --- a/src/main/java/org/openapitools/client/model/VirtualCardStatus.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets virtualCardStatus - */ -@JsonAdapter(VirtualCardStatus.Adapter.class) -public enum VirtualCardStatus { - - ACTIVE("Active"), - - INACTIVE("Inactive"), - - STOLEN("Stolen"), - - LOST("Lost"), - - FROZEN("Frozen"), - - CLOSEDBYCUSTOMER("ClosedByCustomer"), - - UNKNOWN("Unknown"), - - SUSPECTEDFRAUD("SuspectedFraud"); - - private String value; - - VirtualCardStatus(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VirtualCardStatus fromValue(String value) { - for (VirtualCardStatus b : VirtualCardStatus.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VirtualCardStatus enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VirtualCardStatus read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VirtualCardStatus.fromValue(value); - } - } -} - diff --git a/src/main/java/org/openapitools/client/model/Webhook.java b/src/main/java/org/openapitools/client/model/Webhook.java deleted file mode 100644 index 9925f5f0..00000000 --- a/src/main/java/org/openapitools/client/model/Webhook.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.WebhookAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Webhook - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Webhook { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type = "webhook"; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private WebhookAttributes attributes; - - public Webhook() { - } - - public Webhook type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public Webhook id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public Webhook attributes(WebhookAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public WebhookAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(WebhookAttributes attributes) { - this.attributes = attributes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Webhook webhook = (Webhook) o; - return Objects.equals(this.type, webhook.type) && - Objects.equals(this.id, webhook.id) && - Objects.equals(this.attributes, webhook.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Webhook {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("attributes"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Webhook - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Webhook.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Webhook is not found in the empty JSON string", Webhook.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Webhook.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Webhook` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Webhook.openapiRequiredFields) { - 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("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!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())); - } - // validate the required field `attributes` - WebhookAttributes.validateJsonElement(jsonObj.get("attributes")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Webhook.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Webhook' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Webhook.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Webhook value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Webhook read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Webhook given an JSON string - * - * @param jsonString JSON string - * @return An instance of Webhook - * @throws IOException if the JSON string is invalid with respect to Webhook - */ - public static Webhook fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Webhook.class); - } - - /** - * Convert an instance of Webhook to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/WebhookAttributes.java b/src/main/java/org/openapitools/client/model/WebhookAttributes.java deleted file mode 100644 index f65a22b9..00000000 --- a/src/main/java/org/openapitools/client/model/WebhookAttributes.java +++ /dev/null @@ -1,517 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * WebhookAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class WebhookAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_LABEL = "label"; - @SerializedName(SERIALIZED_NAME_LABEL) - private String label; - - public static final String SERIALIZED_NAME_URL = "url"; - @SerializedName(SERIALIZED_NAME_URL) - private String url; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - /** - * Gets or Sets contentType - */ - @JsonAdapter(ContentTypeEnum.Adapter.class) - public enum ContentTypeEnum { - JSON("Json"), - - JSONAPI("JsonAPI"); - - private String value; - - ContentTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ContentTypeEnum fromValue(String value) { - for (ContentTypeEnum b : ContentTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ContentTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ContentTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ContentTypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_CONTENT_TYPE = "contentType"; - @SerializedName(SERIALIZED_NAME_CONTENT_TYPE) - private ContentTypeEnum contentType; - - /** - * Gets or Sets deliveryMode - */ - @JsonAdapter(DeliveryModeEnum.Adapter.class) - public enum DeliveryModeEnum { - ATMOSTONCE("AtMostOnce"), - - ATLEASTONCE("AtLeastOnce"); - - private String value; - - DeliveryModeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DeliveryModeEnum fromValue(String value) { - for (DeliveryModeEnum b : DeliveryModeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DeliveryModeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DeliveryModeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DeliveryModeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DELIVERY_MODE = "deliveryMode"; - @SerializedName(SERIALIZED_NAME_DELIVERY_MODE) - private DeliveryModeEnum deliveryMode; - - public static final String SERIALIZED_NAME_TOKEN = "token"; - @SerializedName(SERIALIZED_NAME_TOKEN) - private String token; - - public static final String SERIALIZED_NAME_SUBSCRIPTION_TYPE = "subscriptionType"; - @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_TYPE) - private String subscriptionType; - - public WebhookAttributes() { - } - - public WebhookAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public WebhookAttributes label(String label) { - - this.label = label; - return this; - } - - /** - * Get label - * @return label - **/ - @javax.annotation.Nullable - public String getLabel() { - return label; - } - - - public void setLabel(String label) { - this.label = label; - } - - - public WebhookAttributes url(String url) { - - this.url = url; - return this; - } - - /** - * Get url - * @return url - **/ - @javax.annotation.Nullable - public String getUrl() { - return url; - } - - - public void setUrl(String url) { - this.url = url; - } - - - public WebhookAttributes status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public WebhookAttributes contentType(ContentTypeEnum contentType) { - - this.contentType = contentType; - return this; - } - - /** - * Get contentType - * @return contentType - **/ - @javax.annotation.Nullable - public ContentTypeEnum getContentType() { - return contentType; - } - - - public void setContentType(ContentTypeEnum contentType) { - this.contentType = contentType; - } - - - public WebhookAttributes deliveryMode(DeliveryModeEnum deliveryMode) { - - this.deliveryMode = deliveryMode; - return this; - } - - /** - * Get deliveryMode - * @return deliveryMode - **/ - @javax.annotation.Nullable - public DeliveryModeEnum getDeliveryMode() { - return deliveryMode; - } - - - public void setDeliveryMode(DeliveryModeEnum deliveryMode) { - this.deliveryMode = deliveryMode; - } - - - public WebhookAttributes token(String token) { - - this.token = token; - return this; - } - - /** - * Get token - * @return token - **/ - @javax.annotation.Nullable - public String getToken() { - return token; - } - - - public void setToken(String token) { - this.token = token; - } - - - public WebhookAttributes subscriptionType(String subscriptionType) { - - this.subscriptionType = subscriptionType; - return this; - } - - /** - * Get subscriptionType - * @return subscriptionType - **/ - @javax.annotation.Nullable - public String getSubscriptionType() { - return subscriptionType; - } - - - public void setSubscriptionType(String subscriptionType) { - this.subscriptionType = subscriptionType; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WebhookAttributes webhookAttributes = (WebhookAttributes) o; - return Objects.equals(this.createdAt, webhookAttributes.createdAt) && - Objects.equals(this.label, webhookAttributes.label) && - Objects.equals(this.url, webhookAttributes.url) && - Objects.equals(this.status, webhookAttributes.status) && - Objects.equals(this.contentType, webhookAttributes.contentType) && - Objects.equals(this.deliveryMode, webhookAttributes.deliveryMode) && - Objects.equals(this.token, webhookAttributes.token) && - Objects.equals(this.subscriptionType, webhookAttributes.subscriptionType); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, label, url, status, contentType, deliveryMode, token, subscriptionType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WebhookAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" url: ").append(toIndentedString(url)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" contentType: ").append(toIndentedString(contentType)).append("\n"); - sb.append(" deliveryMode: ").append(toIndentedString(deliveryMode)).append("\n"); - sb.append(" token: ").append(toIndentedString(token)).append("\n"); - sb.append(" subscriptionType: ").append(toIndentedString(subscriptionType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("label"); - openapiFields.add("url"); - openapiFields.add("status"); - openapiFields.add("contentType"); - openapiFields.add("deliveryMode"); - openapiFields.add("token"); - openapiFields.add("subscriptionType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to WebhookAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!WebhookAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WebhookAttributes is not found in the empty JSON string", WebhookAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!WebhookAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `WebhookAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("label") != null && !jsonObj.get("label").isJsonNull()) && !jsonObj.get("label").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); - } - if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) && !jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); - } - 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())); - } - if ((jsonObj.get("contentType") != null && !jsonObj.get("contentType").isJsonNull()) && !jsonObj.get("contentType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contentType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentType").toString())); - } - if ((jsonObj.get("deliveryMode") != null && !jsonObj.get("deliveryMode").isJsonNull()) && !jsonObj.get("deliveryMode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `deliveryMode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deliveryMode").toString())); - } - if ((jsonObj.get("token") != null && !jsonObj.get("token").isJsonNull()) && !jsonObj.get("token").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); - } - if ((jsonObj.get("subscriptionType") != null && !jsonObj.get("subscriptionType").isJsonNull()) && !jsonObj.get("subscriptionType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `subscriptionType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subscriptionType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!WebhookAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'WebhookAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(WebhookAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, WebhookAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public WebhookAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of WebhookAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of WebhookAttributes - * @throws IOException if the JSON string is invalid with respect to WebhookAttributes - */ - public static WebhookAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, WebhookAttributes.class); - } - - /** - * Convert an instance of WebhookAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/WireCounterparty.java b/src/main/java/org/openapitools/client/model/WireCounterparty.java deleted file mode 100644 index 6e4b3b6f..00000000 --- a/src/main/java/org/openapitools/client/model/WireCounterparty.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Address; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * WireCounterparty - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class WireCounterparty { - public static final String SERIALIZED_NAME_ROUTING_NUMBER = "routingNumber"; - @SerializedName(SERIALIZED_NAME_ROUTING_NUMBER) - private String routingNumber; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public WireCounterparty() { - } - - public WireCounterparty routingNumber(String routingNumber) { - - this.routingNumber = routingNumber; - return this; - } - - /** - * Get routingNumber - * @return routingNumber - **/ - @javax.annotation.Nonnull - public String getRoutingNumber() { - return routingNumber; - } - - - public void setRoutingNumber(String routingNumber) { - this.routingNumber = routingNumber; - } - - - public WireCounterparty accountNumber(String accountNumber) { - - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - **/ - @javax.annotation.Nonnull - public String getAccountNumber() { - return accountNumber; - } - - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public WireCounterparty name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public WireCounterparty address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nonnull - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WireCounterparty wireCounterparty = (WireCounterparty) o; - return Objects.equals(this.routingNumber, wireCounterparty.routingNumber) && - Objects.equals(this.accountNumber, wireCounterparty.accountNumber) && - Objects.equals(this.name, wireCounterparty.name) && - Objects.equals(this.address, wireCounterparty.address); - } - - @Override - public int hashCode() { - return Objects.hash(routingNumber, accountNumber, name, address); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WireCounterparty {\n"); - sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("routingNumber"); - openapiFields.add("accountNumber"); - openapiFields.add("name"); - openapiFields.add("address"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("routingNumber"); - openapiRequiredFields.add("accountNumber"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("address"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to WireCounterparty - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!WireCounterparty.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WireCounterparty is not found in the empty JSON string", WireCounterparty.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!WireCounterparty.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `WireCounterparty` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : WireCounterparty.openapiRequiredFields) { - 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("routingNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `routingNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("routingNumber").toString())); - } - if (!jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // validate the required field `address` - Address.validateJsonElement(jsonObj.get("address")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!WireCounterparty.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'WireCounterparty' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(WireCounterparty.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, WireCounterparty value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public WireCounterparty read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of WireCounterparty given an JSON string - * - * @param jsonString JSON string - * @return An instance of WireCounterparty - * @throws IOException if the JSON string is invalid with respect to WireCounterparty - */ - public static WireCounterparty fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, WireCounterparty.class); - } - - /** - * Convert an instance of WireCounterparty to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/WirePayment.java b/src/main/java/org/openapitools/client/model/WirePayment.java deleted file mode 100644 index 09955ae1..00000000 --- a/src/main/java/org/openapitools/client/model/WirePayment.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Payment; -import org.openapitools.client.model.PaymentRelationships; -import org.openapitools.client.model.WirePaymentAllOfAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * WirePayment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class WirePayment extends Payment { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private WirePaymentAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private PaymentRelationships relationships; - - public WirePayment() { - this.type = this.getClass().getSimpleName(); - } - - public WirePayment attributes(WirePaymentAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public WirePaymentAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(WirePaymentAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public WirePayment relationships(PaymentRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public PaymentRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(PaymentRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WirePayment wirePayment = (WirePayment) o; - return Objects.equals(this.attributes, wirePayment.attributes) && - Objects.equals(this.relationships, wirePayment.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WirePayment {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("id"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to WirePayment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!WirePayment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WirePayment is not found in the empty JSON string", WirePayment.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!WirePayment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `WirePayment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : WirePayment.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!WirePayment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'WirePayment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(WirePayment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, WirePayment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public WirePayment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of WirePayment given an JSON string - * - * @param jsonString JSON string - * @return An instance of WirePayment - * @throws IOException if the JSON string is invalid with respect to WirePayment - */ - public static WirePayment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, WirePayment.class); - } - - /** - * Convert an instance of WirePayment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/WirePaymentAllOfAttributes.java b/src/main/java/org/openapitools/client/model/WirePaymentAllOfAttributes.java deleted file mode 100644 index cd2af42a..00000000 --- a/src/main/java/org/openapitools/client/model/WirePaymentAllOfAttributes.java +++ /dev/null @@ -1,566 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.WireCounterparty; -import org.openapitools.client.model.WirePaymentAllOfAttributesImadOmad; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * WirePaymentAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class WirePaymentAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_COUNTERPARTY = "counterparty"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY) - private WireCounterparty counterparty; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - PENDING("Pending"), - - REJECTED("Rejected"), - - CLEARING("Clearing"), - - SENT("Sent"), - - CANCELED("Canceled"), - - RETURNED("Returned"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_SETTLEMENT_DATE = "settlementDate"; - @SerializedName(SERIALIZED_NAME_SETTLEMENT_DATE) - private LocalDate settlementDate; - - public static final String SERIALIZED_NAME_REASON = "reason"; - @SerializedName(SERIALIZED_NAME_REASON) - private String reason; - - public static final String SERIALIZED_NAME_IMAD_OMAD = "imadOmad"; - @SerializedName(SERIALIZED_NAME_IMAD_OMAD) - private WirePaymentAllOfAttributesImadOmad imadOmad; - - public WirePaymentAllOfAttributes() { - } - - public WirePaymentAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public WirePaymentAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * minimum: 1 - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public WirePaymentAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public WirePaymentAllOfAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public WirePaymentAllOfAttributes counterparty(WireCounterparty counterparty) { - - this.counterparty = counterparty; - return this; - } - - /** - * Get counterparty - * @return counterparty - **/ - @javax.annotation.Nullable - public WireCounterparty getCounterparty() { - return counterparty; - } - - - public void setCounterparty(WireCounterparty counterparty) { - this.counterparty = counterparty; - } - - - public WirePaymentAllOfAttributes status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public WirePaymentAllOfAttributes settlementDate(LocalDate settlementDate) { - - this.settlementDate = settlementDate; - return this; - } - - /** - * Get settlementDate - * @return settlementDate - **/ - @javax.annotation.Nullable - public LocalDate getSettlementDate() { - return settlementDate; - } - - - public void setSettlementDate(LocalDate settlementDate) { - this.settlementDate = settlementDate; - } - - - public WirePaymentAllOfAttributes reason(String reason) { - - this.reason = reason; - return this; - } - - /** - * Get reason - * @return reason - **/ - @javax.annotation.Nullable - public String getReason() { - return reason; - } - - - public void setReason(String reason) { - this.reason = reason; - } - - - public WirePaymentAllOfAttributes imadOmad(WirePaymentAllOfAttributesImadOmad imadOmad) { - - this.imadOmad = imadOmad; - return this; - } - - /** - * Get imadOmad - * @return imadOmad - **/ - @javax.annotation.Nullable - public WirePaymentAllOfAttributesImadOmad getImadOmad() { - return imadOmad; - } - - - public void setImadOmad(WirePaymentAllOfAttributesImadOmad imadOmad) { - this.imadOmad = imadOmad; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WirePaymentAllOfAttributes wirePaymentAllOfAttributes = (WirePaymentAllOfAttributes) o; - return Objects.equals(this.createdAt, wirePaymentAllOfAttributes.createdAt) && - Objects.equals(this.amount, wirePaymentAllOfAttributes.amount) && - Objects.equals(this.direction, wirePaymentAllOfAttributes.direction) && - Objects.equals(this.description, wirePaymentAllOfAttributes.description) && - Objects.equals(this.counterparty, wirePaymentAllOfAttributes.counterparty) && - Objects.equals(this.status, wirePaymentAllOfAttributes.status) && - Objects.equals(this.settlementDate, wirePaymentAllOfAttributes.settlementDate) && - Objects.equals(this.reason, wirePaymentAllOfAttributes.reason) && - Objects.equals(this.imadOmad, wirePaymentAllOfAttributes.imadOmad); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, amount, direction, description, counterparty, status, settlementDate, reason, imadOmad); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WirePaymentAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" settlementDate: ").append(toIndentedString(settlementDate)).append("\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append(" imadOmad: ").append(toIndentedString(imadOmad)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("amount"); - openapiFields.add("direction"); - openapiFields.add("description"); - openapiFields.add("counterparty"); - openapiFields.add("status"); - openapiFields.add("settlementDate"); - openapiFields.add("reason"); - openapiFields.add("imadOmad"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("status"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to WirePaymentAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!WirePaymentAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WirePaymentAllOfAttributes is not found in the empty JSON string", WirePaymentAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!WirePaymentAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `WirePaymentAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : WirePaymentAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - // validate the optional field `counterparty` - if (jsonObj.get("counterparty") != null && !jsonObj.get("counterparty").isJsonNull()) { - WireCounterparty.validateJsonElement(jsonObj.get("counterparty")); - } - if (!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())); - } - if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); - } - // validate the optional field `imadOmad` - if (jsonObj.get("imadOmad") != null && !jsonObj.get("imadOmad").isJsonNull()) { - WirePaymentAllOfAttributesImadOmad.validateJsonElement(jsonObj.get("imadOmad")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!WirePaymentAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'WirePaymentAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(WirePaymentAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, WirePaymentAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public WirePaymentAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of WirePaymentAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of WirePaymentAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to WirePaymentAllOfAttributes - */ - public static WirePaymentAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, WirePaymentAllOfAttributes.class); - } - - /** - * Convert an instance of WirePaymentAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/WirePaymentAllOfAttributesImadOmad.java b/src/main/java/org/openapitools/client/model/WirePaymentAllOfAttributesImadOmad.java deleted file mode 100644 index 2eb5ad21..00000000 --- a/src/main/java/org/openapitools/client/model/WirePaymentAllOfAttributesImadOmad.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * WirePaymentAllOfAttributesImadOmad - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class WirePaymentAllOfAttributesImadOmad { - public static final String SERIALIZED_NAME_IMAD = "imad"; - @SerializedName(SERIALIZED_NAME_IMAD) - private String imad; - - public static final String SERIALIZED_NAME_OMAD = "omad"; - @SerializedName(SERIALIZED_NAME_OMAD) - private String omad; - - public WirePaymentAllOfAttributesImadOmad() { - } - - public WirePaymentAllOfAttributesImadOmad imad(String imad) { - - this.imad = imad; - return this; - } - - /** - * Get imad - * @return imad - **/ - @javax.annotation.Nullable - public String getImad() { - return imad; - } - - - public void setImad(String imad) { - this.imad = imad; - } - - - public WirePaymentAllOfAttributesImadOmad omad(String omad) { - - this.omad = omad; - return this; - } - - /** - * Get omad - * @return omad - **/ - @javax.annotation.Nullable - public String getOmad() { - return omad; - } - - - public void setOmad(String omad) { - this.omad = omad; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WirePaymentAllOfAttributesImadOmad wirePaymentAllOfAttributesImadOmad = (WirePaymentAllOfAttributesImadOmad) o; - return Objects.equals(this.imad, wirePaymentAllOfAttributesImadOmad.imad) && - Objects.equals(this.omad, wirePaymentAllOfAttributesImadOmad.omad); - } - - @Override - public int hashCode() { - return Objects.hash(imad, omad); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WirePaymentAllOfAttributesImadOmad {\n"); - sb.append(" imad: ").append(toIndentedString(imad)).append("\n"); - sb.append(" omad: ").append(toIndentedString(omad)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("imad"); - openapiFields.add("omad"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to WirePaymentAllOfAttributesImadOmad - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!WirePaymentAllOfAttributesImadOmad.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WirePaymentAllOfAttributesImadOmad is not found in the empty JSON string", WirePaymentAllOfAttributesImadOmad.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!WirePaymentAllOfAttributesImadOmad.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `WirePaymentAllOfAttributesImadOmad` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("imad") != null && !jsonObj.get("imad").isJsonNull()) && !jsonObj.get("imad").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imad` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imad").toString())); - } - if ((jsonObj.get("omad") != null && !jsonObj.get("omad").isJsonNull()) && !jsonObj.get("omad").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `omad` to be a primitive type in the JSON string but got `%s`", jsonObj.get("omad").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!WirePaymentAllOfAttributesImadOmad.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'WirePaymentAllOfAttributesImadOmad' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(WirePaymentAllOfAttributesImadOmad.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, WirePaymentAllOfAttributesImadOmad value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public WirePaymentAllOfAttributesImadOmad read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of WirePaymentAllOfAttributesImadOmad given an JSON string - * - * @param jsonString JSON string - * @return An instance of WirePaymentAllOfAttributesImadOmad - * @throws IOException if the JSON string is invalid with respect to WirePaymentAllOfAttributesImadOmad - */ - public static WirePaymentAllOfAttributesImadOmad fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, WirePaymentAllOfAttributesImadOmad.class); - } - - /** - * Convert an instance of WirePaymentAllOfAttributesImadOmad to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/WireTransaction.java b/src/main/java/org/openapitools/client/model/WireTransaction.java deleted file mode 100644 index 99226852..00000000 --- a/src/main/java/org/openapitools/client/model/WireTransaction.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.Transaction; -import org.openapitools.client.model.TransactionRelationships; -import org.openapitools.client.model.WireTransactionAllOfAttributes; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * WireTransaction - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class WireTransaction extends Transaction { - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private WireTransactionAllOfAttributes attributes; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private TransactionRelationships relationships; - - public WireTransaction() { - this.type = this.getClass().getSimpleName(); - } - - public WireTransaction attributes(WireTransactionAllOfAttributes attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nonnull - public WireTransactionAllOfAttributes getAttributes() { - return attributes; - } - - - public void setAttributes(WireTransactionAllOfAttributes attributes) { - this.attributes = attributes; - } - - - public WireTransaction relationships(TransactionRelationships relationships) { - - this.relationships = relationships; - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nonnull - public TransactionRelationships getRelationships() { - return relationships; - } - - - public void setRelationships(TransactionRelationships relationships) { - this.relationships = relationships; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WireTransaction wireTransaction = (WireTransaction) o; - return Objects.equals(this.attributes, wireTransaction.attributes) && - Objects.equals(this.relationships, wireTransaction.relationships) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WireTransaction {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("relationships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("relationships"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to WireTransaction - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!WireTransaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WireTransaction is not found in the empty JSON string", WireTransaction.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!WireTransaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `WireTransaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : WireTransaction.openapiRequiredFields) { - 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())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!WireTransaction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'WireTransaction' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(WireTransaction.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, WireTransaction value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public WireTransaction read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of WireTransaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of WireTransaction - * @throws IOException if the JSON string is invalid with respect to WireTransaction - */ - public static WireTransaction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, WireTransaction.class); - } - - /** - * Convert an instance of WireTransaction to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/org/openapitools/client/model/WireTransactionAllOfAttributes.java b/src/main/java/org/openapitools/client/model/WireTransactionAllOfAttributes.java deleted file mode 100644 index 46f48fa0..00000000 --- a/src/main/java/org/openapitools/client/model/WireTransactionAllOfAttributes.java +++ /dev/null @@ -1,662 +0,0 @@ -/* - * Unit OpenAPI specifications - * An OpenAPI specifications for unit-sdk clients - * - * The version of the OpenAPI document: 0.0.2 - * - * - * 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.model; - -import java.util.Objects; -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.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.client.model.Counterparty; -import org.openapitools.client.model.WirePaymentAllOfAttributesImadOmad; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * WireTransactionAllOfAttributes - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class WireTransactionAllOfAttributes { - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * Gets or Sets direction - */ - @JsonAdapter(DirectionEnum.Adapter.class) - public enum DirectionEnum { - CREDIT("Credit"), - - DEBIT("Debit"); - - private String value; - - DirectionEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DirectionEnum fromValue(String value) { - for (DirectionEnum b : DirectionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DirectionEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DirectionEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_DIRECTION = "direction"; - @SerializedName(SERIALIZED_NAME_DIRECTION) - private DirectionEnum direction; - - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Integer balance; - - public static final String SERIALIZED_NAME_SUMMARY = "summary"; - @SerializedName(SERIALIZED_NAME_SUMMARY) - private String summary; - - public static final String SERIALIZED_NAME_COUNTERPARTY = "counterparty"; - @SerializedName(SERIALIZED_NAME_COUNTERPARTY) - private Counterparty counterparty; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_SENDER_REFERENCE = "senderReference"; - @SerializedName(SERIALIZED_NAME_SENDER_REFERENCE) - private String senderReference; - - public static final String SERIALIZED_NAME_REFERENCE_FOR_BENEFICIARY = "referenceForBeneficiary"; - @SerializedName(SERIALIZED_NAME_REFERENCE_FOR_BENEFICIARY) - private String referenceForBeneficiary; - - public static final String SERIALIZED_NAME_ORIGINATOR_TO_BENEFICIARY_INFORMATION = "originatorToBeneficiaryInformation"; - @SerializedName(SERIALIZED_NAME_ORIGINATOR_TO_BENEFICIARY_INFORMATION) - private String originatorToBeneficiaryInformation; - - public static final String SERIALIZED_NAME_BENEFICIARY_INFORMATION = "beneficiaryInformation"; - @SerializedName(SERIALIZED_NAME_BENEFICIARY_INFORMATION) - private String beneficiaryInformation; - - public static final String SERIALIZED_NAME_BENEFICIARY_ADVICE_INFORMATION = "beneficiaryAdviceInformation"; - @SerializedName(SERIALIZED_NAME_BENEFICIARY_ADVICE_INFORMATION) - private String beneficiaryAdviceInformation; - - public static final String SERIALIZED_NAME_IMAD_OMAD = "imadOmad"; - @SerializedName(SERIALIZED_NAME_IMAD_OMAD) - private WirePaymentAllOfAttributesImadOmad imadOmad; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags; - - public WireTransactionAllOfAttributes() { - } - - public WireTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public WireTransactionAllOfAttributes direction(DirectionEnum direction) { - - this.direction = direction; - return this; - } - - /** - * Get direction - * @return direction - **/ - @javax.annotation.Nonnull - public DirectionEnum getDirection() { - return direction; - } - - - public void setDirection(DirectionEnum direction) { - this.direction = direction; - } - - - public WireTransactionAllOfAttributes amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - public WireTransactionAllOfAttributes balance(Integer balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nonnull - public Integer getBalance() { - return balance; - } - - - public void setBalance(Integer balance) { - this.balance = balance; - } - - - public WireTransactionAllOfAttributes summary(String summary) { - - this.summary = summary; - return this; - } - - /** - * Get summary - * @return summary - **/ - @javax.annotation.Nonnull - public String getSummary() { - return summary; - } - - - public void setSummary(String summary) { - this.summary = summary; - } - - - public WireTransactionAllOfAttributes counterparty(Counterparty counterparty) { - - this.counterparty = counterparty; - return this; - } - - /** - * Get counterparty - * @return counterparty - **/ - @javax.annotation.Nonnull - public Counterparty getCounterparty() { - return counterparty; - } - - - public void setCounterparty(Counterparty counterparty) { - this.counterparty = counterparty; - } - - - public WireTransactionAllOfAttributes description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public WireTransactionAllOfAttributes senderReference(String senderReference) { - - this.senderReference = senderReference; - return this; - } - - /** - * Get senderReference - * @return senderReference - **/ - @javax.annotation.Nullable - public String getSenderReference() { - return senderReference; - } - - - public void setSenderReference(String senderReference) { - this.senderReference = senderReference; - } - - - public WireTransactionAllOfAttributes referenceForBeneficiary(String referenceForBeneficiary) { - - this.referenceForBeneficiary = referenceForBeneficiary; - return this; - } - - /** - * Get referenceForBeneficiary - * @return referenceForBeneficiary - **/ - @javax.annotation.Nullable - public String getReferenceForBeneficiary() { - return referenceForBeneficiary; - } - - - public void setReferenceForBeneficiary(String referenceForBeneficiary) { - this.referenceForBeneficiary = referenceForBeneficiary; - } - - - public WireTransactionAllOfAttributes originatorToBeneficiaryInformation(String originatorToBeneficiaryInformation) { - - this.originatorToBeneficiaryInformation = originatorToBeneficiaryInformation; - return this; - } - - /** - * Get originatorToBeneficiaryInformation - * @return originatorToBeneficiaryInformation - **/ - @javax.annotation.Nullable - public String getOriginatorToBeneficiaryInformation() { - return originatorToBeneficiaryInformation; - } - - - public void setOriginatorToBeneficiaryInformation(String originatorToBeneficiaryInformation) { - this.originatorToBeneficiaryInformation = originatorToBeneficiaryInformation; - } - - - public WireTransactionAllOfAttributes beneficiaryInformation(String beneficiaryInformation) { - - this.beneficiaryInformation = beneficiaryInformation; - return this; - } - - /** - * Get beneficiaryInformation - * @return beneficiaryInformation - **/ - @javax.annotation.Nullable - public String getBeneficiaryInformation() { - return beneficiaryInformation; - } - - - public void setBeneficiaryInformation(String beneficiaryInformation) { - this.beneficiaryInformation = beneficiaryInformation; - } - - - public WireTransactionAllOfAttributes beneficiaryAdviceInformation(String beneficiaryAdviceInformation) { - - this.beneficiaryAdviceInformation = beneficiaryAdviceInformation; - return this; - } - - /** - * Get beneficiaryAdviceInformation - * @return beneficiaryAdviceInformation - **/ - @javax.annotation.Nullable - public String getBeneficiaryAdviceInformation() { - return beneficiaryAdviceInformation; - } - - - public void setBeneficiaryAdviceInformation(String beneficiaryAdviceInformation) { - this.beneficiaryAdviceInformation = beneficiaryAdviceInformation; - } - - - public WireTransactionAllOfAttributes imadOmad(WirePaymentAllOfAttributesImadOmad imadOmad) { - - this.imadOmad = imadOmad; - return this; - } - - /** - * Get imadOmad - * @return imadOmad - **/ - @javax.annotation.Nullable - public WirePaymentAllOfAttributesImadOmad getImadOmad() { - return imadOmad; - } - - - public void setImadOmad(WirePaymentAllOfAttributesImadOmad imadOmad) { - this.imadOmad = imadOmad; - } - - - public WireTransactionAllOfAttributes tags(Object tags) { - - this.tags = tags; - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public Object getTags() { - return tags; - } - - - public void setTags(Object tags) { - this.tags = tags; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WireTransactionAllOfAttributes wireTransactionAllOfAttributes = (WireTransactionAllOfAttributes) o; - return Objects.equals(this.createdAt, wireTransactionAllOfAttributes.createdAt) && - Objects.equals(this.direction, wireTransactionAllOfAttributes.direction) && - Objects.equals(this.amount, wireTransactionAllOfAttributes.amount) && - Objects.equals(this.balance, wireTransactionAllOfAttributes.balance) && - Objects.equals(this.summary, wireTransactionAllOfAttributes.summary) && - Objects.equals(this.counterparty, wireTransactionAllOfAttributes.counterparty) && - Objects.equals(this.description, wireTransactionAllOfAttributes.description) && - Objects.equals(this.senderReference, wireTransactionAllOfAttributes.senderReference) && - Objects.equals(this.referenceForBeneficiary, wireTransactionAllOfAttributes.referenceForBeneficiary) && - Objects.equals(this.originatorToBeneficiaryInformation, wireTransactionAllOfAttributes.originatorToBeneficiaryInformation) && - Objects.equals(this.beneficiaryInformation, wireTransactionAllOfAttributes.beneficiaryInformation) && - Objects.equals(this.beneficiaryAdviceInformation, wireTransactionAllOfAttributes.beneficiaryAdviceInformation) && - Objects.equals(this.imadOmad, wireTransactionAllOfAttributes.imadOmad) && - Objects.equals(this.tags, wireTransactionAllOfAttributes.tags); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, direction, amount, balance, summary, counterparty, description, senderReference, referenceForBeneficiary, originatorToBeneficiaryInformation, beneficiaryInformation, beneficiaryAdviceInformation, imadOmad, tags); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WireTransactionAllOfAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); - sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" senderReference: ").append(toIndentedString(senderReference)).append("\n"); - sb.append(" referenceForBeneficiary: ").append(toIndentedString(referenceForBeneficiary)).append("\n"); - sb.append(" originatorToBeneficiaryInformation: ").append(toIndentedString(originatorToBeneficiaryInformation)).append("\n"); - sb.append(" beneficiaryInformation: ").append(toIndentedString(beneficiaryInformation)).append("\n"); - sb.append(" beneficiaryAdviceInformation: ").append(toIndentedString(beneficiaryAdviceInformation)).append("\n"); - sb.append(" imadOmad: ").append(toIndentedString(imadOmad)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("direction"); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("summary"); - openapiFields.add("counterparty"); - openapiFields.add("description"); - openapiFields.add("senderReference"); - openapiFields.add("referenceForBeneficiary"); - openapiFields.add("originatorToBeneficiaryInformation"); - openapiFields.add("beneficiaryInformation"); - openapiFields.add("beneficiaryAdviceInformation"); - openapiFields.add("imadOmad"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("summary"); - openapiRequiredFields.add("counterparty"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to WireTransactionAllOfAttributes - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!WireTransactionAllOfAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WireTransactionAllOfAttributes is not found in the empty JSON string", WireTransactionAllOfAttributes.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!WireTransactionAllOfAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `WireTransactionAllOfAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : WireTransactionAllOfAttributes.openapiRequiredFields) { - 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("direction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); - } - if (!jsonObj.get("summary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `summary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("summary").toString())); - } - // validate the required field `counterparty` - Counterparty.validateJsonElement(jsonObj.get("counterparty")); - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("senderReference") != null && !jsonObj.get("senderReference").isJsonNull()) && !jsonObj.get("senderReference").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `senderReference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("senderReference").toString())); - } - if ((jsonObj.get("referenceForBeneficiary") != null && !jsonObj.get("referenceForBeneficiary").isJsonNull()) && !jsonObj.get("referenceForBeneficiary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceForBeneficiary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceForBeneficiary").toString())); - } - if ((jsonObj.get("originatorToBeneficiaryInformation") != null && !jsonObj.get("originatorToBeneficiaryInformation").isJsonNull()) && !jsonObj.get("originatorToBeneficiaryInformation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `originatorToBeneficiaryInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("originatorToBeneficiaryInformation").toString())); - } - if ((jsonObj.get("beneficiaryInformation") != null && !jsonObj.get("beneficiaryInformation").isJsonNull()) && !jsonObj.get("beneficiaryInformation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `beneficiaryInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("beneficiaryInformation").toString())); - } - if ((jsonObj.get("beneficiaryAdviceInformation") != null && !jsonObj.get("beneficiaryAdviceInformation").isJsonNull()) && !jsonObj.get("beneficiaryAdviceInformation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `beneficiaryAdviceInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("beneficiaryAdviceInformation").toString())); - } - // validate the optional field `imadOmad` - if (jsonObj.get("imadOmad") != null && !jsonObj.get("imadOmad").isJsonNull()) { - WirePaymentAllOfAttributesImadOmad.validateJsonElement(jsonObj.get("imadOmad")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!WireTransactionAllOfAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'WireTransactionAllOfAttributes' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(WireTransactionAllOfAttributes.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, WireTransactionAllOfAttributes value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public WireTransactionAllOfAttributes read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of WireTransactionAllOfAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of WireTransactionAllOfAttributes - * @throws IOException if the JSON string is invalid with respect to WireTransactionAllOfAttributes - */ - public static WireTransactionAllOfAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, WireTransactionAllOfAttributes.class); - } - - /** - * Convert an instance of WireTransactionAllOfAttributes to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/unit/java/sdk/ApiClient.java b/src/main/java/unit/java/sdk/ApiClient.java new file mode 100644 index 00000000..9571be4a --- /dev/null +++ b/src/main/java/unit/java/sdk/ApiClient.java @@ -0,0 +1,456 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import org.openapitools.jackson.nullable.JsonNullableModule; + +import java.io.InputStream; +import java.net.URI; +import java.net.URLEncoder; +import java.net.http.HttpClient; +import java.net.http.HttpConnectTimeoutException; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.StringJoiner; +import java.util.function.Consumer; +import java.util.stream.Collectors; + +import static java.nio.charset.StandardCharsets.UTF_8; + +/** + * Configuration and utility class for API clients. + * + *

This class can be constructed and modified, then used to instantiate the + * various API classes. The API classes use the settings in this class to + * configure themselves, but otherwise do not store a link to this class.

+ * + *

This class is mutable and not synchronized, so it is not thread-safe. + * The API classes generated from this are immutable and thread-safe.

+ * + *

The setter methods of this class return the current object to facilitate + * a fluent style of configuration.

+ */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiClient { + + private HttpClient.Builder builder; + private ObjectMapper mapper; + private String scheme; + private String host; + private int port; + private String basePath; + private Consumer interceptor; + private Consumer> responseInterceptor; + private Consumer> asyncResponseInterceptor; + private Duration readTimeout; + private Duration connectTimeout; + + private static String valueToString(Object value) { + if (value == null) { + return ""; + } + if (value instanceof OffsetDateTime) { + return ((OffsetDateTime) value).format(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } + return value.toString(); + } + + /** + * URL encode a string in the UTF-8 encoding. + * + * @param s String to encode. + * @return URL-encoded representation of the input string. + */ + public static String urlEncode(String s) { + return URLEncoder.encode(s, UTF_8).replaceAll("\\+", "%20"); + } + + /** + * Convert a URL query name/value parameter to a list of encoded {@link Pair} + * objects. + * + *

The value can be null, in which case an empty list is returned.

+ * + * @param name The query name parameter. + * @param value The query value, which may not be a collection but may be + * null. + * @return A singleton list of the {@link Pair} objects representing the input + * parameters, which is encoded for use in a URL. If the value is null, an + * empty list is returned. + */ + public static List parameterToPairs(String name, Object value) { + if (name == null || name.isEmpty() || value == null) { + return Collections.emptyList(); + } + return Collections.singletonList(new Pair(urlEncode(name), urlEncode(valueToString(value)))); + } + + /** + * Convert a URL query name/collection parameter to a list of encoded + * {@link Pair} objects. + * + * @param collectionFormat The swagger collectionFormat string (csv, tsv, etc). + * @param name The query name parameter. + * @param values A collection of values for the given query name, which may be + * null. + * @return A list of {@link Pair} objects representing the input parameters, + * which is encoded for use in a URL. If the values collection is null, an + * empty list is returned. + */ + public static List parameterToPairs( + String collectionFormat, String name, Collection values) { + if (name == null || name.isEmpty() || values == null || values.isEmpty()) { + return Collections.emptyList(); + } + + // get the collection format (default: csv) + String format = collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat; + + // create the params based on the collection format + if ("multi".equals(format)) { + return values.stream() + .map(value -> new Pair(urlEncode(name), urlEncode(valueToString(value)))) + .collect(Collectors.toList()); + } + + String delimiter; + switch(format) { + case "csv": + delimiter = urlEncode(","); + break; + case "ssv": + delimiter = urlEncode(" "); + break; + case "tsv": + delimiter = urlEncode("\t"); + break; + case "pipes": + delimiter = urlEncode("|"); + break; + default: + throw new IllegalArgumentException("Illegal collection format: " + collectionFormat); + } + + StringJoiner joiner = new StringJoiner(delimiter); + for (Object value : values) { + joiner.add(urlEncode(valueToString(value))); + } + + return Collections.singletonList(new Pair(urlEncode(name), joiner.toString())); + } + + /** + * Create an instance of ApiClient. + */ + public ApiClient() { + this.builder = createDefaultHttpClientBuilder(); + this.mapper = createDefaultObjectMapper(); + updateBaseUri(getDefaultBaseUri()); + interceptor = null; + readTimeout = null; + connectTimeout = null; + responseInterceptor = null; + asyncResponseInterceptor = null; + } + + /** + * Create an instance of ApiClient. + * + * @param builder Http client builder. + * @param mapper Object mapper. + * @param baseUri Base URI + */ + public ApiClient(HttpClient.Builder builder, ObjectMapper mapper, String baseUri) { + this.builder = builder; + this.mapper = mapper; + updateBaseUri(baseUri != null ? baseUri : getDefaultBaseUri()); + interceptor = null; + readTimeout = null; + connectTimeout = null; + responseInterceptor = null; + asyncResponseInterceptor = null; + } + + protected ObjectMapper createDefaultObjectMapper() { + ObjectMapper mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); + mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE); + mapper.registerModule(new JavaTimeModule()); + mapper.registerModule(new JsonNullableModule()); + return mapper; + } + + protected String getDefaultBaseUri() { + return "https://api.s.unit.sh"; + } + + protected HttpClient.Builder createDefaultHttpClientBuilder() { + return HttpClient.newBuilder(); + } + + public void updateBaseUri(String baseUri) { + URI uri = URI.create(baseUri); + scheme = uri.getScheme(); + host = uri.getHost(); + port = uri.getPort(); + basePath = uri.getRawPath(); + } + + /** + * Set a custom {@link HttpClient.Builder} object to use when creating the + * {@link HttpClient} that is used by the API client. + * + * @param builder Custom client builder. + * @return This object. + */ + public ApiClient setHttpClientBuilder(HttpClient.Builder builder) { + this.builder = builder; + return this; + } + + /** + * Get an {@link HttpClient} based on the current {@link HttpClient.Builder}. + * + *

The returned object is immutable and thread-safe.

+ * + * @return The HTTP client. + */ + public HttpClient getHttpClient() { + return builder.build(); + } + + /** + * Set a custom {@link ObjectMapper} to serialize and deserialize the request + * and response bodies. + * + * @param mapper Custom object mapper. + * @return This object. + */ + public ApiClient setObjectMapper(ObjectMapper mapper) { + this.mapper = mapper; + return this; + } + + /** + * Get a copy of the current {@link ObjectMapper}. + * + * @return A copy of the current object mapper. + */ + public ObjectMapper getObjectMapper() { + return mapper.copy(); + } + + /** + * Set a custom host name for the target service. + * + * @param host The host name of the target service. + * @return This object. + */ + public ApiClient setHost(String host) { + this.host = host; + return this; + } + + /** + * Set a custom port number for the target service. + * + * @param port The port of the target service. Set this to -1 to reset the + * value to the default for the scheme. + * @return This object. + */ + public ApiClient setPort(int port) { + this.port = port; + return this; + } + + /** + * Set a custom base path for the target service, for example '/v2'. + * + * @param basePath The base path against which the rest of the path is + * resolved. + * @return This object. + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + /** + * Get the base URI to resolve the endpoint paths against. + * + * @return The complete base URI that the rest of the API parameters are + * resolved against. + */ + public String getBaseUri() { + return scheme + "://" + host + (port == -1 ? "" : ":" + port) + basePath; + } + + /** + * Set a custom scheme for the target service, for example 'https'. + * + * @param scheme The scheme of the target service + * @return This object. + */ + public ApiClient setScheme(String scheme){ + this.scheme = scheme; + return this; + } + + /** + * Set a custom request interceptor. + * + *

A request interceptor is a mechanism for altering each request before it + * is sent. After the request has been fully configured but not yet built, the + * request builder is passed into this function for further modification, + * after which it is sent out.

+ * + *

This is useful for altering the requests in a custom manner, such as + * adding headers. It could also be used for logging and monitoring.

+ * + * @param interceptor A function invoked before creating each request. A value + * of null resets the interceptor to a no-op. + * @return This object. + */ + public ApiClient setRequestInterceptor(Consumer interceptor) { + this.interceptor = interceptor; + return this; + } + + /** + * Get the custom interceptor. + * + * @return The custom interceptor that was set, or null if there isn't any. + */ + public Consumer getRequestInterceptor() { + return interceptor; + } + + /** + * Set a custom response interceptor. + * + *

This is useful for logging, monitoring or extraction of header variables

+ * + * @param interceptor A function invoked before creating each request. A value + * of null resets the interceptor to a no-op. + * @return This object. + */ + public ApiClient setResponseInterceptor(Consumer> interceptor) { + this.responseInterceptor = interceptor; + return this; + } + + /** + * Get the custom response interceptor. + * + * @return The custom interceptor that was set, or null if there isn't any. + */ + public Consumer> getResponseInterceptor() { + return responseInterceptor; + } + + /** + * Set a custom async response interceptor. Use this interceptor when asyncNative is set to 'true'. + * + *

This is useful for logging, monitoring or extraction of header variables

+ * + * @param interceptor A function invoked before creating each request. A value + * of null resets the interceptor to a no-op. + * @return This object. + */ + public ApiClient setAsyncResponseInterceptor(Consumer> interceptor) { + this.asyncResponseInterceptor = interceptor; + return this; + } + + /** + * Get the custom async response interceptor. Use this interceptor when asyncNative is set to 'true'. + * + * @return The custom interceptor that was set, or null if there isn't any. + */ + public Consumer> getAsyncResponseInterceptor() { + return asyncResponseInterceptor; + } + + /** + * Set the read timeout for the http client. + * + *

This is the value used by default for each request, though it can be + * overridden on a per-request basis with a request interceptor.

+ * + * @param readTimeout The read timeout used by default by the http client. + * Setting this value to null resets the timeout to an + * effectively infinite value. + * @return This object. + */ + public ApiClient setReadTimeout(Duration readTimeout) { + this.readTimeout = readTimeout; + return this; + } + + /** + * Get the read timeout that was set. + * + * @return The read timeout, or null if no timeout was set. Null represents + * an infinite wait time. + */ + public Duration getReadTimeout() { + return readTimeout; + } + /** + * Sets the connect timeout (in milliseconds) for the http client. + * + *

In the case where a new connection needs to be established, if + * the connection cannot be established within the given {@code + * duration}, then {@link HttpClient#send(HttpRequest,BodyHandler) + * HttpClient::send} throws an {@link HttpConnectTimeoutException}, or + * {@link HttpClient#sendAsync(HttpRequest,BodyHandler) + * HttpClient::sendAsync} completes exceptionally with an + * {@code HttpConnectTimeoutException}. If a new connection does not + * need to be established, for example if a connection can be reused + * from a previous request, then this timeout duration has no effect. + * + * @param connectTimeout connection timeout in milliseconds + * + * @return This object. + */ + public ApiClient setConnectTimeout(Duration connectTimeout) { + this.connectTimeout = connectTimeout; + this.builder.connectTimeout(connectTimeout); + return this; + } + + /** + * Get connection timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public Duration getConnectTimeout() { + return connectTimeout; + } +} diff --git a/src/main/java/unit/java/sdk/ApiException.java b/src/main/java/unit/java/sdk/ApiException.java new file mode 100644 index 00000000..2ef0b045 --- /dev/null +++ b/src/main/java/unit/java/sdk/ApiException.java @@ -0,0 +1,90 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk; + +import java.net.http.HttpHeaders; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiException extends Exception { + private int code = 0; + private HttpHeaders responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, HttpHeaders responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, HttpHeaders responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, HttpHeaders responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, HttpHeaders responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, HttpHeaders responseHeaders, String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return Headers as an HttpHeaders object + */ + public HttpHeaders getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } +} diff --git a/src/main/java/unit/java/sdk/ApiResponse.java b/src/main/java/unit/java/sdk/ApiResponse.java new file mode 100644 index 00000000..f729488b --- /dev/null +++ b/src/main/java/unit/java/sdk/ApiResponse.java @@ -0,0 +1,59 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk; + +import java.util.List; +import java.util.Map; + +/** + * API response returned by API call. + * + * @param The type of data that is deserialized from response body + */ +public class ApiResponse { + final private int statusCode; + final private Map> headers; + final private T data; + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } + + public int getStatusCode() { + return statusCode; + } + + public Map> getHeaders() { + return headers; + } + + public T getData() { + return data; + } +} diff --git a/src/main/java/org/openapitools/client/Configuration.java b/src/main/java/unit/java/sdk/Configuration.java similarity index 80% rename from src/main/java/org/openapitools/client/Configuration.java rename to src/main/java/unit/java/sdk/Configuration.java index 82f519de..4ca54394 100644 --- a/src/main/java/org/openapitools/client/Configuration.java +++ b/src/main/java/unit/java/sdk/Configuration.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.0.2 + * The version of the OpenAPI document: 0.0.3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package org.openapitools.client; +package unit.java.sdk; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { - public static final String VERSION = "0.0.2"; + public static final String VERSION = "0.0.3"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/unit/java/sdk/JSON.java b/src/main/java/unit/java/sdk/JSON.java new file mode 100644 index 00000000..0d906938 --- /dev/null +++ b/src/main/java/unit/java/sdk/JSON.java @@ -0,0 +1,248 @@ +package unit.java.sdk; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import org.openapitools.jackson.nullable.JsonNullableModule; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import unit.java.sdk.model.*; + +import java.text.DateFormat; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class JSON { + private ObjectMapper mapper; + + public JSON() { + mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + mapper.configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true); + mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true); + mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.setDateFormat(new RFC3339DateFormat()); + mapper.registerModule(new JavaTimeModule()); + JsonNullableModule jnm = new JsonNullableModule(); + mapper.registerModule(jnm); + } + + /** + * Set the date format for JSON (de)serialization with Date properties. + * + * @param dateFormat Date format + */ + public void setDateFormat(DateFormat dateFormat) { + mapper.setDateFormat(dateFormat); + } + + /** + * Get the object mapper + * + * @return object mapper + */ + public ObjectMapper getMapper() { return mapper; } + + /** + * Returns the target model class that should be used to deserialize the input data. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param modelClass The class that contains the discriminator mappings. + * + * @return the target model class. + */ + public static Class getClassForElement(JsonNode node, Class modelClass) { + ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); + if (cdm != null) { + return cdm.getClassForElement(node, new HashSet>()); + } + return null; + } + + /** + * Helper class to register the discriminator mappings. + */ + private static class ClassDiscriminatorMapping { + // The model class name. + Class modelClass; + // The name of the discriminator property. + String discriminatorName; + // The discriminator mappings for a model class. + Map> discriminatorMappings; + + // Constructs a new class discriminator. + ClassDiscriminatorMapping(Class cls, String propertyName, Map> mappings) { + modelClass = cls; + discriminatorName = propertyName; + discriminatorMappings = new HashMap>(); + if (mappings != null) { + discriminatorMappings.putAll(mappings); + } + } + + // Return the name of the discriminator property for this model class. + String getDiscriminatorPropertyName() { + return discriminatorName; + } + + // Return the discriminator value or null if the discriminator is not + // present in the payload. + String getDiscriminatorValue(JsonNode node) { + // Determine the value of the discriminator property in the input data. + if (discriminatorName != null) { + // Get the value of the discriminator property, if present in the input payload. + node = node.get(discriminatorName); + if (node != null && node.isValueNode()) { + String discrValue = node.asText(); + if (discrValue != null) { + return discrValue; + } + } + } + return null; + } + + /** + * Returns the target model class that should be used to deserialize the input data. + * This function can be invoked for anyOf/oneOf composed models with discriminator mappings. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param visitedClasses The set of classes that have already been visited. + * + * @return the target model class. + */ + Class getClassForElement(JsonNode node, Set> visitedClasses) { + if (visitedClasses.contains(modelClass)) { + // Class has already been visited. + return null; + } + // Determine the value of the discriminator property in the input data. + String discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + return null; + } + Class cls = discriminatorMappings.get(discrValue); + // It may not be sufficient to return this cls directly because that target class + // may itself be a composed schema, possibly with its own discriminator. + visitedClasses.add(modelClass); + for (Class childClass : discriminatorMappings.values()) { + ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); + if (childCdm == null) { + continue; + } + if (!discriminatorName.equals(childCdm.discriminatorName)) { + discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + continue; + } + } + if (childCdm != null) { + // Recursively traverse the discriminator mappings. + Class childDiscr = childCdm.getClassForElement(node, visitedClasses); + if (childDiscr != null) { + return childDiscr; + } + } + } + return cls; + } + } + + /** + * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. + * + * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, + * so it's not possible to use the instanceof keyword. + * + * @param modelClass A OpenAPI model class. + * @param inst The instance object. + * @param visitedClasses The set of classes that have already been visited. + * + * @return true if inst is an instance of modelClass in the OpenAPI model hierarchy. + */ + public static boolean isInstanceOf(Class modelClass, Object inst, Set> visitedClasses) { + if (modelClass.isInstance(inst)) { + // This handles the 'allOf' use case with single parent inheritance. + return true; + } + if (visitedClasses.contains(modelClass)) { + // This is to prevent infinite recursion when the composed schemas have + // a circular dependency. + return false; + } + visitedClasses.add(modelClass); + + // Traverse the oneOf/anyOf composed schemas. + Map> descendants = modelDescendants.get(modelClass); + if (descendants != null) { + for (Class childType : descendants.values()) { + if (isInstanceOf(childType, inst, visitedClasses)) { + return true; + } + } + } + return false; + } + + /** + * A map of discriminators for all model classes. + */ + private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>(); + + /** + * A map of oneOf/anyOf descendants for each model class. + */ + private static Map, Map>> modelDescendants = new HashMap<>(); + + /** + * Register a model class discriminator. + * + * @param modelClass the model class + * @param discriminatorPropertyName the name of the discriminator property + * @param mappings a map with the discriminator mappings. + */ + public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map> mappings) { + ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); + modelDiscriminators.put(modelClass, m); + } + + /** + * Register the oneOf/anyOf descendants of the modelClass. + * + * @param modelClass the model class + * @param descendants a map of oneOf/anyOf descendants. + */ + public static void registerDescendants(Class modelClass, Map> descendants) { + modelDescendants.put(modelClass, descendants); + } + + private static JSON json; + + static { + json = new JSON(); + } + + /** + * Get the default JSON instance. + * + * @return the default JSON instance + */ + public static JSON getDefault() { + return json; + } + + /** + * Set the default JSON instance. + * + * @param json JSON instance to be used + */ + public static void setDefault(JSON json) { + JSON.json = json; + } +} diff --git a/src/main/java/org/openapitools/client/Pair.java b/src/main/java/unit/java/sdk/Pair.java similarity index 85% rename from src/main/java/org/openapitools/client/Pair.java rename to src/main/java/unit/java/sdk/Pair.java index 34deb99d..40ea4628 100644 --- a/src/main/java/org/openapitools/client/Pair.java +++ b/src/main/java/unit/java/sdk/Pair.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.0.2 + * The version of the OpenAPI document: 0.0.3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,9 +11,9 @@ */ -package org.openapitools.client; +package unit.java.sdk; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/unit/java/sdk/RFC3339DateFormat.java b/src/main/java/unit/java/sdk/RFC3339DateFormat.java new file mode 100644 index 00000000..76fb4f3f --- /dev/null +++ b/src/main/java/unit/java/sdk/RFC3339DateFormat.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk; + +import com.fasterxml.jackson.databind.util.StdDateFormat; + +import java.text.DateFormat; +import java.text.FieldPosition; +import java.text.ParsePosition; +import java.util.Date; +import java.text.DecimalFormat; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +public class RFC3339DateFormat extends DateFormat { + private static final long serialVersionUID = 1L; + private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); + + private final StdDateFormat fmt = new StdDateFormat() + .withTimeZone(TIMEZONE_Z) + .withColonInTimeZone(true); + + public RFC3339DateFormat() { + this.calendar = new GregorianCalendar(); + this.numberFormat = new DecimalFormat(); + } + + @Override + public Date parse(String source) { + return parse(source, new ParsePosition(0)); + } + + @Override + public Date parse(String source, ParsePosition pos) { + return fmt.parse(source, pos); + } + + @Override + public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { + return fmt.format(date, toAppendTo, fieldPosition); + } + + @Override + public Object clone() { + return super.clone(); + } +} \ No newline at end of file diff --git a/src/main/java/org/openapitools/client/ServerConfiguration.java b/src/main/java/unit/java/sdk/ServerConfiguration.java similarity index 98% rename from src/main/java/org/openapitools/client/ServerConfiguration.java rename to src/main/java/unit/java/sdk/ServerConfiguration.java index 59edc528..4e796ea2 100644 --- a/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/src/main/java/unit/java/sdk/ServerConfiguration.java @@ -1,4 +1,4 @@ -package org.openapitools.client; +package unit.java.sdk; import java.util.Map; diff --git a/src/main/java/org/openapitools/client/ServerVariable.java b/src/main/java/unit/java/sdk/ServerVariable.java similarity index 95% rename from src/main/java/org/openapitools/client/ServerVariable.java rename to src/main/java/unit/java/sdk/ServerVariable.java index c2f13e21..2e7d59c9 100644 --- a/src/main/java/org/openapitools/client/ServerVariable.java +++ b/src/main/java/unit/java/sdk/ServerVariable.java @@ -1,4 +1,4 @@ -package org.openapitools.client; +package unit.java.sdk; import java.util.HashSet; diff --git a/src/main/java/unit/java/sdk/api/ActivateControlAgreementForAccountApi.java b/src/main/java/unit/java/sdk/api/ActivateControlAgreementForAccountApi.java new file mode 100644 index 00000000..034fe305 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/ActivateControlAgreementForAccountApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitAccountResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ActivateControlAgreementForAccountApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public ActivateControlAgreementForAccountApi() { + this(new ApiClient()); + } + + public ActivateControlAgreementForAccountApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Activate Account Control Agreement by Id + * Activate Control Agreement for Account via API + * @param accountId ID of the account (required) + * @return UnitAccountResponse + * @throws ApiException if fails to make API call + */ + public UnitAccountResponse execute(String accountId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(accountId); + return localVarResponse.getData(); + } + + /** + * Activate Account Control Agreement by Id + * Activate Control Agreement for Account via API + * @param accountId ID of the account (required) + * @return ApiResponse<UnitAccountResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String accountId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(accountId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String accountId) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException(400, "Missing the required parameter 'accountId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/{accountId}/activate-daca" + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/AdvanceReceivedPaymentApi.java b/src/main/java/unit/java/sdk/api/AdvanceReceivedPaymentApi.java new file mode 100644 index 00000000..caabda9e --- /dev/null +++ b/src/main/java/unit/java/sdk/api/AdvanceReceivedPaymentApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitReceivedPaymentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AdvanceReceivedPaymentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public AdvanceReceivedPaymentApi() { + this(new ApiClient()); + } + + public AdvanceReceivedPaymentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Advance Received Payment by Id + * Advance a Received Payment via API + * @param paymentId ID of the payment to advance (required) + * @return UnitReceivedPaymentResponse + * @throws ApiException if fails to make API call + */ + public UnitReceivedPaymentResponse execute(String paymentId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(paymentId); + return localVarResponse.getData(); + } + + /** + * Advance Received Payment by Id + * Advance a Received Payment via API + * @param paymentId ID of the payment to advance (required) + * @return ApiResponse<UnitReceivedPaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String paymentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(paymentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String paymentId) throws ApiException { + // verify the required parameter 'paymentId' is set + if (paymentId == null) { + throw new ApiException(400, "Missing the required parameter 'paymentId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/received-payments/{paymentId}/advance" + .replace("{paymentId}", ApiClient.urlEncode(paymentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/ApproveAuthorizationRequestApi.java b/src/main/java/unit/java/sdk/api/ApproveAuthorizationRequestApi.java new file mode 100644 index 00000000..f4fba71f --- /dev/null +++ b/src/main/java/unit/java/sdk/api/ApproveAuthorizationRequestApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ApproveAuthorizationRequest; +import unit.java.sdk.model.UnitAuthorizationRequestResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApproveAuthorizationRequestApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public ApproveAuthorizationRequestApi() { + this(new ApiClient()); + } + + public ApproveAuthorizationRequestApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Approve Authorization Request by Id + * Approve a Authorization Request via API + * @param authorizationId ID of the authorization request to approve (required) + * @param approveAuthorizationRequest Approve Authorization Request (required) + * @return UnitAuthorizationRequestResponse + * @throws ApiException if fails to make API call + */ + public UnitAuthorizationRequestResponse execute(String authorizationId, ApproveAuthorizationRequest approveAuthorizationRequest) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(authorizationId, approveAuthorizationRequest); + return localVarResponse.getData(); + } + + /** + * Approve Authorization Request by Id + * Approve a Authorization Request via API + * @param authorizationId ID of the authorization request to approve (required) + * @param approveAuthorizationRequest Approve Authorization Request (required) + * @return ApiResponse<UnitAuthorizationRequestResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String authorizationId, ApproveAuthorizationRequest approveAuthorizationRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(authorizationId, approveAuthorizationRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String authorizationId, ApproveAuthorizationRequest approveAuthorizationRequest) throws ApiException { + // verify the required parameter 'authorizationId' is set + if (authorizationId == null) { + throw new ApiException(400, "Missing the required parameter 'authorizationId' when calling execute"); + } + // verify the required parameter 'approveAuthorizationRequest' is set + if (approveAuthorizationRequest == null) { + throw new ApiException(400, "Missing the required parameter 'approveAuthorizationRequest' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/authorization-requests/{authorizationId}/approve" + .replace("{authorizationId}", ApiClient.urlEncode(authorizationId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(approveAuthorizationRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/ApproveCheckPaymentApi.java b/src/main/java/unit/java/sdk/api/ApproveCheckPaymentApi.java new file mode 100644 index 00000000..f77d0957 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/ApproveCheckPaymentApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ApproveCheckPaymentRequest; +import unit.java.sdk.model.UnitCheckPaymentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApproveCheckPaymentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public ApproveCheckPaymentApi() { + this(new ApiClient()); + } + + public ApproveCheckPaymentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Approve Check Payment by Id + * Approve a Check Payment via API + * @param checkPaymentId ID of the check payment to approve (required) + * @param approveCheckPaymentRequest Approve Check Payment Request (required) + * @return UnitCheckPaymentResponse + * @throws ApiException if fails to make API call + */ + public UnitCheckPaymentResponse execute(String checkPaymentId, ApproveCheckPaymentRequest approveCheckPaymentRequest) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(checkPaymentId, approveCheckPaymentRequest); + return localVarResponse.getData(); + } + + /** + * Approve Check Payment by Id + * Approve a Check Payment via API + * @param checkPaymentId ID of the check payment to approve (required) + * @param approveCheckPaymentRequest Approve Check Payment Request (required) + * @return ApiResponse<UnitCheckPaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String checkPaymentId, ApproveCheckPaymentRequest approveCheckPaymentRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(checkPaymentId, approveCheckPaymentRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String checkPaymentId, ApproveCheckPaymentRequest approveCheckPaymentRequest) throws ApiException { + // verify the required parameter 'checkPaymentId' is set + if (checkPaymentId == null) { + throw new ApiException(400, "Missing the required parameter 'checkPaymentId' when calling execute"); + } + // verify the required parameter 'approveCheckPaymentRequest' is set + if (approveCheckPaymentRequest == null) { + throw new ApiException(400, "Missing the required parameter 'approveCheckPaymentRequest' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/check-payments/{checkPaymentId}/approve" + .replace("{checkPaymentId}", ApiClient.urlEncode(checkPaymentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(approveCheckPaymentRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/ArchiveCustomerApi.java b/src/main/java/unit/java/sdk/api/ArchiveCustomerApi.java new file mode 100644 index 00000000..9c7b48ca --- /dev/null +++ b/src/main/java/unit/java/sdk/api/ArchiveCustomerApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ArchiveCustomerRequest; +import unit.java.sdk.model.UnitCustomerResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ArchiveCustomerApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public ArchiveCustomerApi() { + this(new ApiClient()); + } + + public ArchiveCustomerApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Archive Customer by Id + * Archive a Customer via API + * @param customerId ID of the customer to archive (required) + * @param archiveCustomerRequest Archive Customer Request (required) + * @return UnitCustomerResponse + * @throws ApiException if fails to make API call + */ + public UnitCustomerResponse execute(String customerId, ArchiveCustomerRequest archiveCustomerRequest) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(customerId, archiveCustomerRequest); + return localVarResponse.getData(); + } + + /** + * Archive Customer by Id + * Archive a Customer via API + * @param customerId ID of the customer to archive (required) + * @param archiveCustomerRequest Archive Customer Request (required) + * @return ApiResponse<UnitCustomerResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String customerId, ArchiveCustomerRequest archiveCustomerRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(customerId, archiveCustomerRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String customerId, ArchiveCustomerRequest archiveCustomerRequest) throws ApiException { + // verify the required parameter 'customerId' is set + if (customerId == null) { + throw new ApiException(400, "Missing the required parameter 'customerId' when calling execute"); + } + // verify the required parameter 'archiveCustomerRequest' is set + if (archiveCustomerRequest == null) { + throw new ApiException(400, "Missing the required parameter 'archiveCustomerRequest' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/customers/{customerId}/archive" + .replace("{customerId}", ApiClient.urlEncode(customerId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(archiveCustomerRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CancelApplicationApi.java b/src/main/java/unit/java/sdk/api/CancelApplicationApi.java new file mode 100644 index 00000000..2882c108 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CancelApplicationApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.CancelApplicationRequest; +import unit.java.sdk.model.UnitCancelApplicationResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CancelApplicationApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CancelApplicationApi() { + this(new ApiClient()); + } + + public CancelApplicationApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Cancel Application by Id + * Cancel a Application via API + * @param applicationId ID of the application to get (required) + * @param cancelApplicationRequest Cancel Application Request (required) + * @return UnitCancelApplicationResponse + * @throws ApiException if fails to make API call + */ + public UnitCancelApplicationResponse execute(String applicationId, CancelApplicationRequest cancelApplicationRequest) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(applicationId, cancelApplicationRequest); + return localVarResponse.getData(); + } + + /** + * Cancel Application by Id + * Cancel a Application via API + * @param applicationId ID of the application to get (required) + * @param cancelApplicationRequest Cancel Application Request (required) + * @return ApiResponse<UnitCancelApplicationResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String applicationId, CancelApplicationRequest cancelApplicationRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(applicationId, cancelApplicationRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String applicationId, CancelApplicationRequest cancelApplicationRequest) throws ApiException { + // verify the required parameter 'applicationId' is set + if (applicationId == null) { + throw new ApiException(400, "Missing the required parameter 'applicationId' when calling execute"); + } + // verify the required parameter 'cancelApplicationRequest' is set + if (cancelApplicationRequest == null) { + throw new ApiException(400, "Missing the required parameter 'cancelApplicationRequest' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/applications/{applicationId}/cancel" + .replace("{applicationId}", ApiClient.urlEncode(applicationId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(cancelApplicationRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CancelCheckPaymentApi.java b/src/main/java/unit/java/sdk/api/CancelCheckPaymentApi.java new file mode 100644 index 00000000..ea2ddc35 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CancelCheckPaymentApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCheckPaymentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CancelCheckPaymentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CancelCheckPaymentApi() { + this(new ApiClient()); + } + + public CancelCheckPaymentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Cancel Check Payment by Id + * Cancel a Check Payment via API + * @param checkPaymentId ID of the check payment to cancel (required) + * @return UnitCheckPaymentResponse + * @throws ApiException if fails to make API call + */ + public UnitCheckPaymentResponse execute(String checkPaymentId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(checkPaymentId); + return localVarResponse.getData(); + } + + /** + * Cancel Check Payment by Id + * Cancel a Check Payment via API + * @param checkPaymentId ID of the check payment to cancel (required) + * @return ApiResponse<UnitCheckPaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String checkPaymentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(checkPaymentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String checkPaymentId) throws ApiException { + // verify the required parameter 'checkPaymentId' is set + if (checkPaymentId == null) { + throw new ApiException(400, "Missing the required parameter 'checkPaymentId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/check-payments/{checkPaymentId}/cancel" + .replace("{checkPaymentId}", ApiClient.urlEncode(checkPaymentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CancelPaymentApi.java b/src/main/java/unit/java/sdk/api/CancelPaymentApi.java new file mode 100644 index 00000000..a71295ad --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CancelPaymentApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitPaymentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CancelPaymentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CancelPaymentApi() { + this(new ApiClient()); + } + + public CancelPaymentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Cancel a Payment by Id + * Cancel a Payment via API + * @param paymentId ID of the payment to cancel (required) + * @return UnitPaymentResponse + * @throws ApiException if fails to make API call + */ + public UnitPaymentResponse execute(String paymentId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(paymentId); + return localVarResponse.getData(); + } + + /** + * Cancel a Payment by Id + * Cancel a Payment via API + * @param paymentId ID of the payment to cancel (required) + * @return ApiResponse<UnitPaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String paymentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(paymentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String paymentId) throws ApiException { + // verify the required parameter 'paymentId' is set + if (paymentId == null) { + throw new ApiException(400, "Missing the required parameter 'paymentId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/payments/{paymentId}/cancel" + .replace("{paymentId}", ApiClient.urlEncode(paymentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CloseACardApi.java b/src/main/java/unit/java/sdk/api/CloseACardApi.java new file mode 100644 index 00000000..73b2350c --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CloseACardApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCardResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloseACardApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CloseACardApi() { + this(new ApiClient()); + } + + public CloseACardApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Close a Card + * Close a Card via API + * @param cardId ID of the card to close (required) + * @return UnitCardResponse + * @throws ApiException if fails to make API call + */ + public UnitCardResponse execute(String cardId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(cardId); + return localVarResponse.getData(); + } + + /** + * Close a Card + * Close a Card via API + * @param cardId ID of the card to close (required) + * @return ApiResponse<UnitCardResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String cardId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(cardId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String cardId) throws ApiException { + // verify the required parameter 'cardId' is set + if (cardId == null) { + throw new ApiException(400, "Missing the required parameter 'cardId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/cards/{cardId}/close" + .replace("{cardId}", ApiClient.urlEncode(cardId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CloseAnAccountApi.java b/src/main/java/unit/java/sdk/api/CloseAnAccountApi.java new file mode 100644 index 00000000..faf09313 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CloseAnAccountApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.CloseAccountRequest; +import unit.java.sdk.model.UnitAccountResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloseAnAccountApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CloseAnAccountApi() { + this(new ApiClient()); + } + + public CloseAnAccountApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Close an Account by Id + * Close an Account via API + * @param accountId ID of the account to close (required) + * @param closeAccountRequest Close Account Request (required) + * @return UnitAccountResponse + * @throws ApiException if fails to make API call + */ + public UnitAccountResponse execute(String accountId, CloseAccountRequest closeAccountRequest) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(accountId, closeAccountRequest); + return localVarResponse.getData(); + } + + /** + * Close an Account by Id + * Close an Account via API + * @param accountId ID of the account to close (required) + * @param closeAccountRequest Close Account Request (required) + * @return ApiResponse<UnitAccountResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String accountId, CloseAccountRequest closeAccountRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(accountId, closeAccountRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String accountId, CloseAccountRequest closeAccountRequest) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException(400, "Missing the required parameter 'accountId' when calling execute"); + } + // verify the required parameter 'closeAccountRequest' is set + if (closeAccountRequest == null) { + throw new ApiException(400, "Missing the required parameter 'closeAccountRequest' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/{accountId}/close" + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(closeAccountRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/ConfirmCheckDepositApi.java b/src/main/java/unit/java/sdk/api/ConfirmCheckDepositApi.java new file mode 100644 index 00000000..de3051d6 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/ConfirmCheckDepositApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCheckDepositResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConfirmCheckDepositApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public ConfirmCheckDepositApi() { + this(new ApiClient()); + } + + public ConfirmCheckDepositApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Confirm by Id + * Confirm a Check Deposit from API + * @param checkDepositId ID of the check deposit to confirm (required) + * @return UnitCheckDepositResponse + * @throws ApiException if fails to make API call + */ + public UnitCheckDepositResponse execute(String checkDepositId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(checkDepositId); + return localVarResponse.getData(); + } + + /** + * Confirm by Id + * Confirm a Check Deposit from API + * @param checkDepositId ID of the check deposit to confirm (required) + * @return ApiResponse<UnitCheckDepositResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String checkDepositId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(checkDepositId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String checkDepositId) throws ApiException { + // verify the required parameter 'checkDepositId' is set + if (checkDepositId == null) { + throw new ApiException(400, "Missing the required parameter 'checkDepositId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/check-deposits/{checkDepositId}/confirm" + .replace("{checkDepositId}", ApiClient.urlEncode(checkDepositId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CreateACardApi.java b/src/main/java/unit/java/sdk/api/CreateACardApi.java new file mode 100644 index 00000000..9414fac4 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CreateACardApi.java @@ -0,0 +1,162 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.CreateCard; +import unit.java.sdk.model.UnitCardResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateACardApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CreateACardApi() { + this(new ApiClient()); + } + + public CreateACardApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create a Card + * Create a Card via API + * @param createCard Create Card Request (required) + * @return UnitCardResponse + * @throws ApiException if fails to make API call + */ + public UnitCardResponse execute(CreateCard createCard) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(createCard); + return localVarResponse.getData(); + } + + /** + * Create a Card + * Create a Card via API + * @param createCard Create Card Request (required) + * @return ApiResponse<UnitCardResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(CreateCard createCard) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(createCard); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(CreateCard createCard) throws ApiException { + // verify the required parameter 'createCard' is set + if (createCard == null) { + throw new ApiException(400, "Missing the required parameter 'createCard' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/cards"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createCard); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CreateADocumentForAnApplicationApi.java b/src/main/java/unit/java/sdk/api/CreateADocumentForAnApplicationApi.java new file mode 100644 index 00000000..d3642d0d --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CreateADocumentForAnApplicationApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitDocumentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateADocumentForAnApplicationApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CreateADocumentForAnApplicationApi() { + this(new ApiClient()); + } + + public CreateADocumentForAnApplicationApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create a document + * Create a document via API + * @param applicationId ID of the application to create a file for (required) + * @return UnitDocumentResponse + * @throws ApiException if fails to make API call + */ + public UnitDocumentResponse execute(String applicationId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(applicationId); + return localVarResponse.getData(); + } + + /** + * Create a document + * Create a document via API + * @param applicationId ID of the application to create a file for (required) + * @return ApiResponse<UnitDocumentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String applicationId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(applicationId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String applicationId) throws ApiException { + // verify the required parameter 'applicationId' is set + if (applicationId == null) { + throw new ApiException(400, "Missing the required parameter 'applicationId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/applications/{applicationId}/documents" + .replace("{applicationId}", ApiClient.urlEncode(applicationId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CreateAPaymentApi.java b/src/main/java/unit/java/sdk/api/CreateAPaymentApi.java new file mode 100644 index 00000000..4b289c7b --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CreateAPaymentApi.java @@ -0,0 +1,162 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.CreatePayment; +import unit.java.sdk.model.UnitPaymentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAPaymentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CreateAPaymentApi() { + this(new ApiClient()); + } + + public CreateAPaymentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create a Payment + * Create a Payment via API + * @param createPayment Create Payment Request (required) + * @return UnitPaymentResponse + * @throws ApiException if fails to make API call + */ + public UnitPaymentResponse execute(CreatePayment createPayment) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(createPayment); + return localVarResponse.getData(); + } + + /** + * Create a Payment + * Create a Payment via API + * @param createPayment Create Payment Request (required) + * @return ApiResponse<UnitPaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(CreatePayment createPayment) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(createPayment); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(CreatePayment createPayment) throws ApiException { + // verify the required parameter 'createPayment' is set + if (createPayment == null) { + throw new ApiException(400, "Missing the required parameter 'createPayment' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/payments"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createPayment); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CreateARepaymentApi.java b/src/main/java/unit/java/sdk/api/CreateARepaymentApi.java new file mode 100644 index 00000000..0ed98825 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CreateARepaymentApi.java @@ -0,0 +1,162 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.CreateRepayment; +import unit.java.sdk.model.UnitRepaymentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateARepaymentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CreateARepaymentApi() { + this(new ApiClient()); + } + + public CreateARepaymentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create a Repayment + * Create a Repayment via API + * @param createRepayment Create a Repayment Request (required) + * @return UnitRepaymentResponse + * @throws ApiException if fails to make API call + */ + public UnitRepaymentResponse execute(CreateRepayment createRepayment) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(createRepayment); + return localVarResponse.getData(); + } + + /** + * Create a Repayment + * Create a Repayment via API + * @param createRepayment Create a Repayment Request (required) + * @return ApiResponse<UnitRepaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(CreateRepayment createRepayment) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(createRepayment); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(CreateRepayment createRepayment) throws ApiException { + // verify the required parameter 'createRepayment' is set + if (createRepayment == null) { + throw new ApiException(400, "Missing the required parameter 'createRepayment' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/repayments"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createRepayment); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CreateAccountApi.java b/src/main/java/unit/java/sdk/api/CreateAccountApi.java new file mode 100644 index 00000000..40a57a10 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CreateAccountApi.java @@ -0,0 +1,162 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.CreateAccount; +import unit.java.sdk.model.UnitAccountResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAccountApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CreateAccountApi() { + this(new ApiClient()); + } + + public CreateAccountApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create Account + * Create Account via API + * @param createAccount Create Account Request (required) + * @return UnitAccountResponse + * @throws ApiException if fails to make API call + */ + public UnitAccountResponse execute(CreateAccount createAccount) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(createAccount); + return localVarResponse.getData(); + } + + /** + * Create Account + * Create Account via API + * @param createAccount Create Account Request (required) + * @return ApiResponse<UnitAccountResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(CreateAccount createAccount) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(createAccount); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(CreateAccount createAccount) throws ApiException { + // verify the required parameter 'createAccount' is set + if (createAccount == null) { + throw new ApiException(400, "Missing the required parameter 'createAccount' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createAccount); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CreateApplicationApi.java b/src/main/java/unit/java/sdk/api/CreateApplicationApi.java new file mode 100644 index 00000000..7e78d8fa --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CreateApplicationApi.java @@ -0,0 +1,162 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.CreateApplication; +import unit.java.sdk.model.UnitCreateApplicationResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateApplicationApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CreateApplicationApi() { + this(new ApiClient()); + } + + public CreateApplicationApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create Application + * Create an Application via API + * @param createApplication Create Application Request (required) + * @return UnitCreateApplicationResponse + * @throws ApiException if fails to make API call + */ + public UnitCreateApplicationResponse execute(CreateApplication createApplication) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(createApplication); + return localVarResponse.getData(); + } + + /** + * Create Application + * Create an Application via API + * @param createApplication Create Application Request (required) + * @return ApiResponse<UnitCreateApplicationResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(CreateApplication createApplication) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(createApplication); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(CreateApplication createApplication) throws ApiException { + // verify the required parameter 'createApplication' is set + if (createApplication == null) { + throw new ApiException(400, "Missing the required parameter 'createApplication' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/applications"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createApplication); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CreateApplicationFormApi.java b/src/main/java/unit/java/sdk/api/CreateApplicationFormApi.java new file mode 100644 index 00000000..796c2e77 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CreateApplicationFormApi.java @@ -0,0 +1,162 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.CreateApplicationForm; +import unit.java.sdk.model.UnitApplicationFormResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateApplicationFormApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CreateApplicationFormApi() { + this(new ApiClient()); + } + + public CreateApplicationFormApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create Application Form + * Create an Application Form via API + * @param createApplicationForm Create Application Form Request (required) + * @return UnitApplicationFormResponse + * @throws ApiException if fails to make API call + */ + public UnitApplicationFormResponse execute(CreateApplicationForm createApplicationForm) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(createApplicationForm); + return localVarResponse.getData(); + } + + /** + * Create Application Form + * Create an Application Form via API + * @param createApplicationForm Create Application Form Request (required) + * @return ApiResponse<UnitApplicationFormResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(CreateApplicationForm createApplicationForm) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(createApplicationForm); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(CreateApplicationForm createApplicationForm) throws ApiException { + // verify the required parameter 'createApplicationForm' is set + if (createApplicationForm == null) { + throw new ApiException(400, "Missing the required parameter 'createApplicationForm' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/application-forms"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createApplicationForm); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CreateCheckDepositApi.java b/src/main/java/unit/java/sdk/api/CreateCheckDepositApi.java new file mode 100644 index 00000000..fb239b9e --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CreateCheckDepositApi.java @@ -0,0 +1,162 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.CreateCheckDeposit; +import unit.java.sdk.model.UnitCheckDepositResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCheckDepositApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CreateCheckDepositApi() { + this(new ApiClient()); + } + + public CreateCheckDepositApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create Check Deposit + * Create a Check Deposit via API + * @param createCheckDeposit Create Check Deposit Request (required) + * @return UnitCheckDepositResponse + * @throws ApiException if fails to make API call + */ + public UnitCheckDepositResponse execute(CreateCheckDeposit createCheckDeposit) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(createCheckDeposit); + return localVarResponse.getData(); + } + + /** + * Create Check Deposit + * Create a Check Deposit via API + * @param createCheckDeposit Create Check Deposit Request (required) + * @return ApiResponse<UnitCheckDepositResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(CreateCheckDeposit createCheckDeposit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(createCheckDeposit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(CreateCheckDeposit createCheckDeposit) throws ApiException { + // verify the required parameter 'createCheckDeposit' is set + if (createCheckDeposit == null) { + throw new ApiException(400, "Missing the required parameter 'createCheckDeposit' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/check-deposits"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createCheckDeposit); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CreateCheckPaymentApi.java b/src/main/java/unit/java/sdk/api/CreateCheckPaymentApi.java new file mode 100644 index 00000000..6d3d3473 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CreateCheckPaymentApi.java @@ -0,0 +1,162 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.CreateCheckPayment; +import unit.java.sdk.model.UnitCheckPaymentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCheckPaymentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CreateCheckPaymentApi() { + this(new ApiClient()); + } + + public CreateCheckPaymentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create Check Payment + * Create Check Payment via API + * @param createCheckPayment Create Check Payment Request (required) + * @return UnitCheckPaymentResponse + * @throws ApiException if fails to make API call + */ + public UnitCheckPaymentResponse execute(CreateCheckPayment createCheckPayment) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(createCheckPayment); + return localVarResponse.getData(); + } + + /** + * Create Check Payment + * Create Check Payment via API + * @param createCheckPayment Create Check Payment Request (required) + * @return ApiResponse<UnitCheckPaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(CreateCheckPayment createCheckPayment) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(createCheckPayment); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(CreateCheckPayment createCheckPayment) throws ApiException { + // verify the required parameter 'createCheckPayment' is set + if (createCheckPayment == null) { + throw new ApiException(400, "Missing the required parameter 'createCheckPayment' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/check-payments"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createCheckPayment); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CreateCounterpartyApi.java b/src/main/java/unit/java/sdk/api/CreateCounterpartyApi.java new file mode 100644 index 00000000..461833f7 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CreateCounterpartyApi.java @@ -0,0 +1,162 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.CreateCounterparty; +import unit.java.sdk.model.UnitCounterpartyResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCounterpartyApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CreateCounterpartyApi() { + this(new ApiClient()); + } + + public CreateCounterpartyApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create Counterparty + * Create a counterparty via API + * @param createCounterparty Create Counterparty Request (required) + * @return UnitCounterpartyResponse + * @throws ApiException if fails to make API call + */ + public UnitCounterpartyResponse execute(CreateCounterparty createCounterparty) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(createCounterparty); + return localVarResponse.getData(); + } + + /** + * Create Counterparty + * Create a counterparty via API + * @param createCounterparty Create Counterparty Request (required) + * @return ApiResponse<UnitCounterpartyResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(CreateCounterparty createCounterparty) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(createCounterparty); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(CreateCounterparty createCounterparty) throws ApiException { + // verify the required parameter 'createCounterparty' is set + if (createCounterparty == null) { + throw new ApiException(400, "Missing the required parameter 'createCounterparty' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/counterparties"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createCounterparty); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CreateCustomerTokenApi.java b/src/main/java/unit/java/sdk/api/CreateCustomerTokenApi.java new file mode 100644 index 00000000..6faeb596 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CreateCustomerTokenApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.CreateCustomerToken; +import unit.java.sdk.model.UnitCustomerTokenResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCustomerTokenApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CreateCustomerTokenApi() { + this(new ApiClient()); + } + + public CreateCustomerTokenApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create Customer Token + * Create a Customer Token via API + * @param customerId ID of the customer to create token for (required) + * @param createCustomerToken Create Customer Token Request (required) + * @return UnitCustomerTokenResponse + * @throws ApiException if fails to make API call + */ + public UnitCustomerTokenResponse execute(String customerId, CreateCustomerToken createCustomerToken) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(customerId, createCustomerToken); + return localVarResponse.getData(); + } + + /** + * Create Customer Token + * Create a Customer Token via API + * @param customerId ID of the customer to create token for (required) + * @param createCustomerToken Create Customer Token Request (required) + * @return ApiResponse<UnitCustomerTokenResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String customerId, CreateCustomerToken createCustomerToken) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(customerId, createCustomerToken); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String customerId, CreateCustomerToken createCustomerToken) throws ApiException { + // verify the required parameter 'customerId' is set + if (customerId == null) { + throw new ApiException(400, "Missing the required parameter 'customerId' when calling execute"); + } + // verify the required parameter 'createCustomerToken' is set + if (createCustomerToken == null) { + throw new ApiException(400, "Missing the required parameter 'createCustomerToken' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/customers/{customerId}/token" + .replace("{customerId}", ApiClient.urlEncode(customerId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createCustomerToken); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CreateCustomerTokenVerificationApi.java b/src/main/java/unit/java/sdk/api/CreateCustomerTokenVerificationApi.java new file mode 100644 index 00000000..bee4a303 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CreateCustomerTokenVerificationApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.CreateCustomerTokenVerification; +import unit.java.sdk.model.UnitCustomerTokenVerificationResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCustomerTokenVerificationApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CreateCustomerTokenVerificationApi() { + this(new ApiClient()); + } + + public CreateCustomerTokenVerificationApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create Customer Token Verification + * Create a Customer Token Verification via API + * @param customerId ID of the customer to create token for (required) + * @param createCustomerTokenVerification Create Customer Token Verification Request (required) + * @return UnitCustomerTokenVerificationResponse + * @throws ApiException if fails to make API call + */ + public UnitCustomerTokenVerificationResponse execute(String customerId, CreateCustomerTokenVerification createCustomerTokenVerification) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(customerId, createCustomerTokenVerification); + return localVarResponse.getData(); + } + + /** + * Create Customer Token Verification + * Create a Customer Token Verification via API + * @param customerId ID of the customer to create token for (required) + * @param createCustomerTokenVerification Create Customer Token Verification Request (required) + * @return ApiResponse<UnitCustomerTokenVerificationResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String customerId, CreateCustomerTokenVerification createCustomerTokenVerification) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(customerId, createCustomerTokenVerification); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String customerId, CreateCustomerTokenVerification createCustomerTokenVerification) throws ApiException { + // verify the required parameter 'customerId' is set + if (customerId == null) { + throw new ApiException(400, "Missing the required parameter 'customerId' when calling execute"); + } + // verify the required parameter 'createCustomerTokenVerification' is set + if (createCustomerTokenVerification == null) { + throw new ApiException(400, "Missing the required parameter 'createCustomerTokenVerification' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/customers/{customerId}/token/verification" + .replace("{customerId}", ApiClient.urlEncode(customerId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createCustomerTokenVerification); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CreateFeeApi.java b/src/main/java/unit/java/sdk/api/CreateFeeApi.java new file mode 100644 index 00000000..5f7e9443 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CreateFeeApi.java @@ -0,0 +1,161 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitFeeResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateFeeApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CreateFeeApi() { + this(new ApiClient()); + } + + public CreateFeeApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create Fee + * Create a Fee via API + * @param body Create Fee Request (required) + * @return UnitFeeResponse + * @throws ApiException if fails to make API call + */ + public UnitFeeResponse execute(Object body) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(body); + return localVarResponse.getData(); + } + + /** + * Create Fee + * Create a Fee via API + * @param body Create Fee Request (required) + * @return ApiResponse<UnitFeeResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(Object body) throws ApiException { + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/fees"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CreateOrgApiTokenApi.java b/src/main/java/unit/java/sdk/api/CreateOrgApiTokenApi.java new file mode 100644 index 00000000..6cebd610 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CreateOrgApiTokenApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.CreateApiToken; +import unit.java.sdk.model.UnitApiTokenResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateOrgApiTokenApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CreateOrgApiTokenApi() { + this(new ApiClient()); + } + + public CreateOrgApiTokenApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create Org API Token + * Create an Org API Token via API + * @param userId ID of the user to create token for (required) + * @param createApiToken Create Org API Token Request (required) + * @return UnitApiTokenResponse + * @throws ApiException if fails to make API call + */ + public UnitApiTokenResponse execute(String userId, CreateApiToken createApiToken) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(userId, createApiToken); + return localVarResponse.getData(); + } + + /** + * Create Org API Token + * Create an Org API Token via API + * @param userId ID of the user to create token for (required) + * @param createApiToken Create Org API Token Request (required) + * @return ApiResponse<UnitApiTokenResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String userId, CreateApiToken createApiToken) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(userId, createApiToken); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String userId, CreateApiToken createApiToken) throws ApiException { + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException(400, "Missing the required parameter 'userId' when calling execute"); + } + // verify the required parameter 'createApiToken' is set + if (createApiToken == null) { + throw new ApiException(400, "Missing the required parameter 'createApiToken' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/users/{userId}/api-tokens" + .replace("{userId}", ApiClient.urlEncode(userId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createApiToken); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CreateRecurringPaymentApi.java b/src/main/java/unit/java/sdk/api/CreateRecurringPaymentApi.java new file mode 100644 index 00000000..57b54959 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CreateRecurringPaymentApi.java @@ -0,0 +1,162 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.CreateRecurringPayment; +import unit.java.sdk.model.UnitRecurringPaymentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRecurringPaymentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CreateRecurringPaymentApi() { + this(new ApiClient()); + } + + public CreateRecurringPaymentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create Recurring Payment + * Create a Recurring Payment via API + * @param createRecurringPayment Create Recurring Payment Request (required) + * @return UnitRecurringPaymentResponse + * @throws ApiException if fails to make API call + */ + public UnitRecurringPaymentResponse execute(CreateRecurringPayment createRecurringPayment) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(createRecurringPayment); + return localVarResponse.getData(); + } + + /** + * Create Recurring Payment + * Create a Recurring Payment via API + * @param createRecurringPayment Create Recurring Payment Request (required) + * @return ApiResponse<UnitRecurringPaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(CreateRecurringPayment createRecurringPayment) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(createRecurringPayment); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(CreateRecurringPayment createRecurringPayment) throws ApiException { + // verify the required parameter 'createRecurringPayment' is set + if (createRecurringPayment == null) { + throw new ApiException(400, "Missing the required parameter 'createRecurringPayment' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/recurring-payments"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createRecurringPayment); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CreateRewardApi.java b/src/main/java/unit/java/sdk/api/CreateRewardApi.java new file mode 100644 index 00000000..210ca418 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CreateRewardApi.java @@ -0,0 +1,162 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.CreateReward; +import unit.java.sdk.model.UnitRewardResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRewardApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CreateRewardApi() { + this(new ApiClient()); + } + + public CreateRewardApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create Reward + * Create a Reward via API + * @param createReward Create Reward Request (required) + * @return UnitRewardResponse + * @throws ApiException if fails to make API call + */ + public UnitRewardResponse execute(CreateReward createReward) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(createReward); + return localVarResponse.getData(); + } + + /** + * Create Reward + * Create a Reward via API + * @param createReward Create Reward Request (required) + * @return ApiResponse<UnitRewardResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(CreateReward createReward) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(createReward); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(CreateReward createReward) throws ApiException { + // verify the required parameter 'createReward' is set + if (createReward == null) { + throw new ApiException(400, "Missing the required parameter 'createReward' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/rewards"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createReward); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/CreateWebhookApi.java b/src/main/java/unit/java/sdk/api/CreateWebhookApi.java new file mode 100644 index 00000000..6daf077e --- /dev/null +++ b/src/main/java/unit/java/sdk/api/CreateWebhookApi.java @@ -0,0 +1,162 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.CreateWebhook; +import unit.java.sdk.model.UnitWebhookResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateWebhookApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CreateWebhookApi() { + this(new ApiClient()); + } + + public CreateWebhookApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create Webhook + * Create a Webhook via API + * @param createWebhook Create Webhook Request (required) + * @return UnitWebhookResponse + * @throws ApiException if fails to make API call + */ + public UnitWebhookResponse execute(CreateWebhook createWebhook) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(createWebhook); + return localVarResponse.getData(); + } + + /** + * Create Webhook + * Create a Webhook via API + * @param createWebhook Create Webhook Request (required) + * @return ApiResponse<UnitWebhookResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(CreateWebhook createWebhook) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(createWebhook); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(CreateWebhook createWebhook) throws ApiException { + // verify the required parameter 'createWebhook' is set + if (createWebhook == null) { + throw new ApiException(400, "Missing the required parameter 'createWebhook' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/webhooks"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createWebhook); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/DeactivateControlAgreementForAccountApi.java b/src/main/java/unit/java/sdk/api/DeactivateControlAgreementForAccountApi.java new file mode 100644 index 00000000..21f51d62 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/DeactivateControlAgreementForAccountApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitAccountResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeactivateControlAgreementForAccountApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public DeactivateControlAgreementForAccountApi() { + this(new ApiClient()); + } + + public DeactivateControlAgreementForAccountApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Deactivate Account Control Agreement by Id + * Deactivate Control Agreement for Account via API + * @param accountId ID of the account (required) + * @return UnitAccountResponse + * @throws ApiException if fails to make API call + */ + public UnitAccountResponse execute(String accountId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(accountId); + return localVarResponse.getData(); + } + + /** + * Deactivate Account Control Agreement by Id + * Deactivate Control Agreement for Account via API + * @param accountId ID of the account (required) + * @return ApiResponse<UnitAccountResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String accountId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(accountId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String accountId) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException(400, "Missing the required parameter 'accountId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/{accountId}/deactivate-daca" + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/DeclineAuthorizationRequestApi.java b/src/main/java/unit/java/sdk/api/DeclineAuthorizationRequestApi.java new file mode 100644 index 00000000..c75af496 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/DeclineAuthorizationRequestApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.DeclineAuthorizationRequest; +import unit.java.sdk.model.UnitAuthorizationRequestResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeclineAuthorizationRequestApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public DeclineAuthorizationRequestApi() { + this(new ApiClient()); + } + + public DeclineAuthorizationRequestApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Decline Authorization Request + * Decline Authorization Request via API + * @param authorizationId ID of the authorization request to decline (required) + * @param declineAuthorizationRequest Decline Authorization Request (required) + * @return UnitAuthorizationRequestResponse + * @throws ApiException if fails to make API call + */ + public UnitAuthorizationRequestResponse execute(String authorizationId, DeclineAuthorizationRequest declineAuthorizationRequest) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(authorizationId, declineAuthorizationRequest); + return localVarResponse.getData(); + } + + /** + * Decline Authorization Request + * Decline Authorization Request via API + * @param authorizationId ID of the authorization request to decline (required) + * @param declineAuthorizationRequest Decline Authorization Request (required) + * @return ApiResponse<UnitAuthorizationRequestResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String authorizationId, DeclineAuthorizationRequest declineAuthorizationRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(authorizationId, declineAuthorizationRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String authorizationId, DeclineAuthorizationRequest declineAuthorizationRequest) throws ApiException { + // verify the required parameter 'authorizationId' is set + if (authorizationId == null) { + throw new ApiException(400, "Missing the required parameter 'authorizationId' when calling execute"); + } + // verify the required parameter 'declineAuthorizationRequest' is set + if (declineAuthorizationRequest == null) { + throw new ApiException(400, "Missing the required parameter 'declineAuthorizationRequest' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/authorization-requests/{authorizationId}/decline" + .replace("{authorizationId}", ApiClient.urlEncode(authorizationId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(declineAuthorizationRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/DefaultApi.java b/src/main/java/unit/java/sdk/api/DefaultApi.java new file mode 100644 index 00000000..41dc91cc --- /dev/null +++ b/src/main/java/unit/java/sdk/api/DefaultApi.java @@ -0,0 +1,476 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.CreateStopPayment; +import unit.java.sdk.model.ExecuteFilterParameter20; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.StopPaymentListResponse; +import unit.java.sdk.model.StopPaymentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DefaultApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public DefaultApi() { + this(new ApiClient()); + } + + public DefaultApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get a list of stop payments + * + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @return StopPaymentListResponse + * @throws ApiException if fails to make API call + */ + public StopPaymentListResponse execute(ListPageParametersObject page, ExecuteFilterParameter20 filter, String sort) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter, sort); + return localVarResponse.getData(); + } + + /** + * Get a list of stop payments + * + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @return ApiResponse<StopPaymentListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter20 filter, String sort) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter, sort); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter20 filter, String sort) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/stop-payments"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("filter", filter)); + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Create Stop Payment + * + * @param createStopPayment (required) + * @return StopPaymentResponse + * @throws ApiException if fails to make API call + */ + public StopPaymentResponse execute_0(CreateStopPayment createStopPayment) throws ApiException { + ApiResponse localVarResponse = execute_0WithHttpInfo(createStopPayment); + return localVarResponse.getData(); + } + + /** + * Create Stop Payment + * + * @param createStopPayment (required) + * @return ApiResponse<StopPaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse execute_0WithHttpInfo(CreateStopPayment createStopPayment) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = execute_0RequestBuilder(createStopPayment); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute_0", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder execute_0RequestBuilder(CreateStopPayment createStopPayment) throws ApiException { + // verify the required parameter 'createStopPayment' is set + if (createStopPayment == null) { + throw new ApiException(400, "Missing the required parameter 'createStopPayment' when calling execute_0"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/stop-payments"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createStopPayment); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Get details of a specific stop payment + * + * @param stopPaymentId ID of the stop payment (required) + * @return StopPaymentResponse + * @throws ApiException if fails to make API call + */ + public StopPaymentResponse execute_1(String stopPaymentId) throws ApiException { + ApiResponse localVarResponse = execute_1WithHttpInfo(stopPaymentId); + return localVarResponse.getData(); + } + + /** + * Get details of a specific stop payment + * + * @param stopPaymentId ID of the stop payment (required) + * @return ApiResponse<StopPaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse execute_1WithHttpInfo(String stopPaymentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = execute_1RequestBuilder(stopPaymentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute_1", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder execute_1RequestBuilder(String stopPaymentId) throws ApiException { + // verify the required parameter 'stopPaymentId' is set + if (stopPaymentId == null) { + throw new ApiException(400, "Missing the required parameter 'stopPaymentId' when calling execute_1"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/stop-payments/{stop_payment_id}" + .replace("{stop_payment_id}", ApiClient.urlEncode(stopPaymentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Cancel a stop payment + * + * @param stopPaymentId ID of the stop payment (required) + * @throws ApiException if fails to make API call + */ + public void execute_2(String stopPaymentId) throws ApiException { + execute_2WithHttpInfo(stopPaymentId); + } + + /** + * Cancel a stop payment + * + * @param stopPaymentId ID of the stop payment (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse execute_2WithHttpInfo(String stopPaymentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = execute_2RequestBuilder(stopPaymentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute_2", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder execute_2RequestBuilder(String stopPaymentId) throws ApiException { + // verify the required parameter 'stopPaymentId' is set + if (stopPaymentId == null) { + throw new ApiException(400, "Missing the required parameter 'stopPaymentId' when calling execute_2"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/stop-payments/{stop_payment_id}" + .replace("{stop_payment_id}", ApiClient.urlEncode(stopPaymentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Disable a stop payment + * + * @param stopPaymentId ID of the stop payment (required) + * @return StopPaymentResponse + * @throws ApiException if fails to make API call + */ + public StopPaymentResponse execute_3(String stopPaymentId) throws ApiException { + ApiResponse localVarResponse = execute_3WithHttpInfo(stopPaymentId); + return localVarResponse.getData(); + } + + /** + * Disable a stop payment + * + * @param stopPaymentId ID of the stop payment (required) + * @return ApiResponse<StopPaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse execute_3WithHttpInfo(String stopPaymentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = execute_3RequestBuilder(stopPaymentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute_3", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder execute_3RequestBuilder(String stopPaymentId) throws ApiException { + // verify the required parameter 'stopPaymentId' is set + if (stopPaymentId == null) { + throw new ApiException(400, "Missing the required parameter 'stopPaymentId' when calling execute_3"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/stop-payments/{stop_payment_id}/disable" + .replace("{stop_payment_id}", ApiClient.urlEncode(stopPaymentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/DeleteCounterpartyApi.java b/src/main/java/unit/java/sdk/api/DeleteCounterpartyApi.java new file mode 100644 index 00000000..a981b071 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/DeleteCounterpartyApi.java @@ -0,0 +1,158 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeleteCounterpartyApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public DeleteCounterpartyApi() { + this(new ApiClient()); + } + + public DeleteCounterpartyApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Delete Counterparty by Id + * Delete Counterparty via API + * @param counterpartyId ID of the counterparty to delete (required) + * @throws ApiException if fails to make API call + */ + public void execute(String counterpartyId) throws ApiException { + executeWithHttpInfo(counterpartyId); + } + + /** + * Delete Counterparty by Id + * Delete Counterparty via API + * @param counterpartyId ID of the counterparty to delete (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String counterpartyId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(counterpartyId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String counterpartyId) throws ApiException { + // verify the required parameter 'counterpartyId' is set + if (counterpartyId == null) { + throw new ApiException(400, "Missing the required parameter 'counterpartyId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/counterparties/{counterpartyId}" + .replace("{counterpartyId}", ApiClient.urlEncode(counterpartyId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/DisableRecurringPaymentApi.java b/src/main/java/unit/java/sdk/api/DisableRecurringPaymentApi.java new file mode 100644 index 00000000..c9743bbd --- /dev/null +++ b/src/main/java/unit/java/sdk/api/DisableRecurringPaymentApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitRecurringPaymentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisableRecurringPaymentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public DisableRecurringPaymentApi() { + this(new ApiClient()); + } + + public DisableRecurringPaymentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Disable Recurring Payment + * Disable Recurring Payment via API + * @param paymentId ID of the payment to disable (required) + * @return UnitRecurringPaymentResponse + * @throws ApiException if fails to make API call + */ + public UnitRecurringPaymentResponse execute(String paymentId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(paymentId); + return localVarResponse.getData(); + } + + /** + * Disable Recurring Payment + * Disable Recurring Payment via API + * @param paymentId ID of the payment to disable (required) + * @return ApiResponse<UnitRecurringPaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String paymentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(paymentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String paymentId) throws ApiException { + // verify the required parameter 'paymentId' is set + if (paymentId == null) { + throw new ApiException(400, "Missing the required parameter 'paymentId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/recurring-payments/{paymentId}/disable" + .replace("{paymentId}", ApiClient.urlEncode(paymentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/DisableWebhookApi.java b/src/main/java/unit/java/sdk/api/DisableWebhookApi.java new file mode 100644 index 00000000..76bbe4ba --- /dev/null +++ b/src/main/java/unit/java/sdk/api/DisableWebhookApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitWebhookResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisableWebhookApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public DisableWebhookApi() { + this(new ApiClient()); + } + + public DisableWebhookApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Disable a Webhook + * Disable a Webhook via API + * @param webhookId ID of the webhook to disable (required) + * @return UnitWebhookResponse + * @throws ApiException if fails to make API call + */ + public UnitWebhookResponse execute(String webhookId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(webhookId); + return localVarResponse.getData(); + } + + /** + * Disable a Webhook + * Disable a Webhook via API + * @param webhookId ID of the webhook to disable (required) + * @return ApiResponse<UnitWebhookResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String webhookId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(webhookId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String webhookId) throws ApiException { + // verify the required parameter 'webhookId' is set + if (webhookId == null) { + throw new ApiException(400, "Missing the required parameter 'webhookId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/webhooks/{webhookId}/disable" + .replace("{webhookId}", ApiClient.urlEncode(webhookId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/DownloadADocumentApi.java b/src/main/java/unit/java/sdk/api/DownloadADocumentApi.java new file mode 100644 index 00000000..1992820a --- /dev/null +++ b/src/main/java/unit/java/sdk/api/DownloadADocumentApi.java @@ -0,0 +1,163 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import java.io.File; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DownloadADocumentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public DownloadADocumentApi() { + this(new ApiClient()); + } + + public DownloadADocumentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Download a Document + * Download a Document via API + * @param applicationId ID of the application (required) + * @param documentId ID of the document to download (required) + * @return File + * @throws ApiException if fails to make API call + */ + public File execute(String applicationId, String documentId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(applicationId, documentId); + return localVarResponse.getData(); + } + + /** + * Download a Document + * Download a Document via API + * @param applicationId ID of the application (required) + * @param documentId ID of the document to download (required) + * @return ApiResponse<File> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String applicationId, String documentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(applicationId, documentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String applicationId, String documentId) throws ApiException { + // verify the required parameter 'applicationId' is set + if (applicationId == null) { + throw new ApiException(400, "Missing the required parameter 'applicationId' when calling execute"); + } + // verify the required parameter 'documentId' is set + if (documentId == null) { + throw new ApiException(400, "Missing the required parameter 'documentId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/applications/{applicationId}/documents/{documentId}/download" + .replace("{applicationId}", ApiClient.urlEncode(applicationId.toString())) + .replace("{documentId}", ApiClient.urlEncode(documentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/octet-stream"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/DownloadADocumentBackSideApi.java b/src/main/java/unit/java/sdk/api/DownloadADocumentBackSideApi.java new file mode 100644 index 00000000..050eb9d8 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/DownloadADocumentBackSideApi.java @@ -0,0 +1,163 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import java.io.File; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DownloadADocumentBackSideApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public DownloadADocumentBackSideApi() { + this(new ApiClient()); + } + + public DownloadADocumentBackSideApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Download a Document - Back Side + * Download a Document - Back Side via API + * @param applicationId ID of the application (required) + * @param documentId ID of the document to download (required) + * @return File + * @throws ApiException if fails to make API call + */ + public File execute(String applicationId, String documentId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(applicationId, documentId); + return localVarResponse.getData(); + } + + /** + * Download a Document - Back Side + * Download a Document - Back Side via API + * @param applicationId ID of the application (required) + * @param documentId ID of the document to download (required) + * @return ApiResponse<File> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String applicationId, String documentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(applicationId, documentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String applicationId, String documentId) throws ApiException { + // verify the required parameter 'applicationId' is set + if (applicationId == null) { + throw new ApiException(400, "Missing the required parameter 'applicationId' when calling execute"); + } + // verify the required parameter 'documentId' is set + if (documentId == null) { + throw new ApiException(400, "Missing the required parameter 'documentId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/applications/{applicationId}/documents/{documentId}/download/back" + .replace("{applicationId}", ApiClient.urlEncode(applicationId.toString())) + .replace("{documentId}", ApiClient.urlEncode(documentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/octet-stream"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/EnableRecurringPaymentApi.java b/src/main/java/unit/java/sdk/api/EnableRecurringPaymentApi.java new file mode 100644 index 00000000..09d30240 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/EnableRecurringPaymentApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitRecurringPaymentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EnableRecurringPaymentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public EnableRecurringPaymentApi() { + this(new ApiClient()); + } + + public EnableRecurringPaymentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Enable Recurring Payment + * Enable Recurring Payment via API + * @param paymentId ID of the payment to enable (required) + * @return UnitRecurringPaymentResponse + * @throws ApiException if fails to make API call + */ + public UnitRecurringPaymentResponse execute(String paymentId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(paymentId); + return localVarResponse.getData(); + } + + /** + * Enable Recurring Payment + * Enable Recurring Payment via API + * @param paymentId ID of the payment to enable (required) + * @return ApiResponse<UnitRecurringPaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String paymentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(paymentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String paymentId) throws ApiException { + // verify the required parameter 'paymentId' is set + if (paymentId == null) { + throw new ApiException(400, "Missing the required parameter 'paymentId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/recurring-payments/{paymentId}/enable" + .replace("{paymentId}", ApiClient.urlEncode(paymentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/EnableWebhookApi.java b/src/main/java/unit/java/sdk/api/EnableWebhookApi.java new file mode 100644 index 00000000..8df3c6a6 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/EnableWebhookApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitWebhookResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EnableWebhookApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public EnableWebhookApi() { + this(new ApiClient()); + } + + public EnableWebhookApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Enable Webhook + * Enable a Webhook via API + * @param webhookId ID of the webhook to enable (required) + * @return UnitWebhookResponse + * @throws ApiException if fails to make API call + */ + public UnitWebhookResponse execute(String webhookId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(webhookId); + return localVarResponse.getData(); + } + + /** + * Enable Webhook + * Enable a Webhook via API + * @param webhookId ID of the webhook to enable (required) + * @return ApiResponse<UnitWebhookResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String webhookId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(webhookId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String webhookId) throws ApiException { + // verify the required parameter 'webhookId' is set + if (webhookId == null) { + throw new ApiException(400, "Missing the required parameter 'webhookId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/webhooks/{webhookId}/enable" + .replace("{webhookId}", ApiClient.urlEncode(webhookId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/EnterControlAgreementForAccountApi.java b/src/main/java/unit/java/sdk/api/EnterControlAgreementForAccountApi.java new file mode 100644 index 00000000..2456f39b --- /dev/null +++ b/src/main/java/unit/java/sdk/api/EnterControlAgreementForAccountApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitAccountResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EnterControlAgreementForAccountApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public EnterControlAgreementForAccountApi() { + this(new ApiClient()); + } + + public EnterControlAgreementForAccountApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Enter Account Control Agreement by Id + * Enter Control Agreement for Account via API + * @param accountId ID of the account (required) + * @return UnitAccountResponse + * @throws ApiException if fails to make API call + */ + public UnitAccountResponse execute(String accountId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(accountId); + return localVarResponse.getData(); + } + + /** + * Enter Account Control Agreement by Id + * Enter Control Agreement for Account via API + * @param accountId ID of the account (required) + * @return ApiResponse<UnitAccountResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String accountId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(accountId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String accountId) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException(400, "Missing the required parameter 'accountId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/{accountId}/enter-daca" + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/FireEventApi.java b/src/main/java/unit/java/sdk/api/FireEventApi.java new file mode 100644 index 00000000..c4eae8f0 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/FireEventApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitEventResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FireEventApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public FireEventApi() { + this(new ApiClient()); + } + + public FireEventApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Fire Event by Id + * Fire an Event via API + * @param eventId ID of the event to fire (required) + * @return UnitEventResponse + * @throws ApiException if fails to make API call + */ + public UnitEventResponse execute(String eventId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(eventId); + return localVarResponse.getData(); + } + + /** + * Fire Event by Id + * Fire an Event via API + * @param eventId ID of the event to fire (required) + * @return ApiResponse<UnitEventResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String eventId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(eventId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String eventId) throws ApiException { + // verify the required parameter 'eventId' is set + if (eventId == null) { + throw new ApiException(400, "Missing the required parameter 'eventId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/events/{eventId}" + .replace("{eventId}", ApiClient.urlEncode(eventId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/FreezeACardApi.java b/src/main/java/unit/java/sdk/api/FreezeACardApi.java new file mode 100644 index 00000000..75ee3104 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/FreezeACardApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCardResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FreezeACardApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public FreezeACardApi() { + this(new ApiClient()); + } + + public FreezeACardApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Freeze a Card + * Freeze a Card via API + * @param cardId ID of the card to freeze (required) + * @return UnitCardResponse + * @throws ApiException if fails to make API call + */ + public UnitCardResponse execute(String cardId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(cardId); + return localVarResponse.getData(); + } + + /** + * Freeze a Card + * Freeze a Card via API + * @param cardId ID of the card to freeze (required) + * @return ApiResponse<UnitCardResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String cardId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(cardId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String cardId) throws ApiException { + // verify the required parameter 'cardId' is set + if (cardId == null) { + throw new ApiException(400, "Missing the required parameter 'cardId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/cards/{cardId}/freeze" + .replace("{cardId}", ApiClient.urlEncode(cardId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/FreezeAnAccountApi.java b/src/main/java/unit/java/sdk/api/FreezeAnAccountApi.java new file mode 100644 index 00000000..b5ea73f5 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/FreezeAnAccountApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.FreezeAccountRequest; +import unit.java.sdk.model.UnitAccountResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FreezeAnAccountApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public FreezeAnAccountApi() { + this(new ApiClient()); + } + + public FreezeAnAccountApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Freeze Account by Id + * Freeze Account via API + * @param accountId ID of the account to freeze (required) + * @param freezeAccountRequest Freeze Account Request (required) + * @return UnitAccountResponse + * @throws ApiException if fails to make API call + */ + public UnitAccountResponse execute(String accountId, FreezeAccountRequest freezeAccountRequest) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(accountId, freezeAccountRequest); + return localVarResponse.getData(); + } + + /** + * Freeze Account by Id + * Freeze Account via API + * @param accountId ID of the account to freeze (required) + * @param freezeAccountRequest Freeze Account Request (required) + * @return ApiResponse<UnitAccountResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String accountId, FreezeAccountRequest freezeAccountRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(accountId, freezeAccountRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String accountId, FreezeAccountRequest freezeAccountRequest) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException(400, "Missing the required parameter 'accountId' when calling execute"); + } + // verify the required parameter 'freezeAccountRequest' is set + if (freezeAccountRequest == null) { + throw new ApiException(400, "Missing the required parameter 'freezeAccountRequest' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/{accountId}/freeze" + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(freezeAccountRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetABackImageApi.java b/src/main/java/unit/java/sdk/api/GetABackImageApi.java new file mode 100644 index 00000000..887026ca --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetABackImageApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import java.io.File; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetABackImageApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetABackImageApi() { + this(new ApiClient()); + } + + public GetABackImageApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get back image + * Get back image via API + * @param checkPaymentId ID of the check payment (required) + * @return File + * @throws ApiException if fails to make API call + */ + public File execute(String checkPaymentId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(checkPaymentId); + return localVarResponse.getData(); + } + + /** + * Get back image + * Get back image via API + * @param checkPaymentId ID of the check payment (required) + * @return ApiResponse<File> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String checkPaymentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(checkPaymentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String checkPaymentId) throws ApiException { + // verify the required parameter 'checkPaymentId' is set + if (checkPaymentId == null) { + throw new ApiException(400, "Missing the required parameter 'checkPaymentId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/check-payments/{checkPaymentId}/back" + .replace("{checkPaymentId}", ApiClient.urlEncode(checkPaymentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "image/png"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetAFrontImageApi.java b/src/main/java/unit/java/sdk/api/GetAFrontImageApi.java new file mode 100644 index 00000000..1bdf0135 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetAFrontImageApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import java.io.File; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetAFrontImageApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetAFrontImageApi() { + this(new ApiClient()); + } + + public GetAFrontImageApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get front image + * Get front image via API + * @param checkPaymentId ID of the check payment (required) + * @return File + * @throws ApiException if fails to make API call + */ + public File execute(String checkPaymentId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(checkPaymentId); + return localVarResponse.getData(); + } + + /** + * Get front image + * Get front image via API + * @param checkPaymentId ID of the check payment (required) + * @return ApiResponse<File> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String checkPaymentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(checkPaymentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String checkPaymentId) throws ApiException { + // verify the required parameter 'checkPaymentId' is set + if (checkPaymentId == null) { + throw new ApiException(400, "Missing the required parameter 'checkPaymentId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/check-payments/{checkPaymentId}/front" + .replace("{checkPaymentId}", ApiClient.urlEncode(checkPaymentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "image/png"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetAccountApi.java b/src/main/java/unit/java/sdk/api/GetAccountApi.java new file mode 100644 index 00000000..7037cd4c --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetAccountApi.java @@ -0,0 +1,173 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitAccountResponseWithIncluded; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetAccountApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetAccountApi() { + this(new ApiClient()); + } + + public GetAccountApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Account by Id + * Get an Account from API + * @param accountId ID of the account to get (required) + * @param include (optional) + * @return UnitAccountResponseWithIncluded + * @throws ApiException if fails to make API call + */ + public UnitAccountResponseWithIncluded execute(String accountId, String include) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(accountId, include); + return localVarResponse.getData(); + } + + /** + * Get Account by Id + * Get an Account from API + * @param accountId ID of the account to get (required) + * @param include (optional) + * @return ApiResponse<UnitAccountResponseWithIncluded> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String accountId, String include) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(accountId, include); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String accountId, String include) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException(400, "Missing the required parameter 'accountId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/{accountId}" + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "include"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("include", include)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetAccountLimitsApi.java b/src/main/java/unit/java/sdk/api/GetAccountLimitsApi.java new file mode 100644 index 00000000..d33b1168 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetAccountLimitsApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitGetAccountLimitsResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetAccountLimitsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetAccountLimitsApi() { + this(new ApiClient()); + } + + public GetAccountLimitsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Account Limits by Id + * Get Account Limits from API + * @param accountId ID of the account to get (required) + * @return UnitGetAccountLimitsResponse + * @throws ApiException if fails to make API call + */ + public UnitGetAccountLimitsResponse execute(String accountId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(accountId); + return localVarResponse.getData(); + } + + /** + * Get Account Limits by Id + * Get Account Limits from API + * @param accountId ID of the account to get (required) + * @return ApiResponse<UnitGetAccountLimitsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String accountId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(accountId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String accountId) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException(400, "Missing the required parameter 'accountId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/{accountId}/limits" + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetApplicationApi.java b/src/main/java/unit/java/sdk/api/GetApplicationApi.java new file mode 100644 index 00000000..606ccd82 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetApplicationApi.java @@ -0,0 +1,173 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitApplicationResponseWithIncluded; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetApplicationApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetApplicationApi() { + this(new ApiClient()); + } + + public GetApplicationApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Application by Id + * Get an Application from API + * @param applicationId ID of the application to get (required) + * @param included (optional) + * @return UnitApplicationResponseWithIncluded + * @throws ApiException if fails to make API call + */ + public UnitApplicationResponseWithIncluded execute(String applicationId, String included) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(applicationId, included); + return localVarResponse.getData(); + } + + /** + * Get Application by Id + * Get an Application from API + * @param applicationId ID of the application to get (required) + * @param included (optional) + * @return ApiResponse<UnitApplicationResponseWithIncluded> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String applicationId, String included) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(applicationId, included); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String applicationId, String included) throws ApiException { + // verify the required parameter 'applicationId' is set + if (applicationId == null) { + throw new ApiException(400, "Missing the required parameter 'applicationId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/applications/{applicationId}" + .replace("{applicationId}", ApiClient.urlEncode(applicationId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "included"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("included", included)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetApplicationFormApi.java b/src/main/java/unit/java/sdk/api/GetApplicationFormApi.java new file mode 100644 index 00000000..68558c15 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetApplicationFormApi.java @@ -0,0 +1,173 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitApplicationFormResponseWithIncluded; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetApplicationFormApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetApplicationFormApi() { + this(new ApiClient()); + } + + public GetApplicationFormApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get ApplicationForm by Id + * Get an Application Form from API + * @param applicationFormId ID of the application form to get (required) + * @param included (optional) + * @return UnitApplicationFormResponseWithIncluded + * @throws ApiException if fails to make API call + */ + public UnitApplicationFormResponseWithIncluded execute(String applicationFormId, String included) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(applicationFormId, included); + return localVarResponse.getData(); + } + + /** + * Get ApplicationForm by Id + * Get an Application Form from API + * @param applicationFormId ID of the application form to get (required) + * @param included (optional) + * @return ApiResponse<UnitApplicationFormResponseWithIncluded> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String applicationFormId, String included) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(applicationFormId, included); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String applicationFormId, String included) throws ApiException { + // verify the required parameter 'applicationFormId' is set + if (applicationFormId == null) { + throw new ApiException(400, "Missing the required parameter 'applicationFormId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/application-forms/{applicationFormId}" + .replace("{applicationFormId}", ApiClient.urlEncode(applicationFormId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "included"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("included", included)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetAtmLocationsListApi.java b/src/main/java/unit/java/sdk/api/GetAtmLocationsListApi.java new file mode 100644 index 00000000..ae784659 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetAtmLocationsListApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.AtmLocation; +import unit.java.sdk.model.ExecuteFilterParameter15; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetAtmLocationsListApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetAtmLocationsListApi() { + this(new ApiClient()); + } + + public GetAtmLocationsListApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get List ATM Locations + * Get List ATM Locations from API + * @param filter (optional) + * @return List<AtmLocation> + * @throws ApiException if fails to make API call + */ + public List execute(ExecuteFilterParameter15 filter) throws ApiException { + ApiResponse> localVarResponse = executeWithHttpInfo(filter); + return localVarResponse.getData(); + } + + /** + * Get List ATM Locations + * Get List ATM Locations from API + * @param filter (optional) + * @return ApiResponse<List<AtmLocation>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> executeWithHttpInfo(ExecuteFilterParameter15 filter) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(filter); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ExecuteFilterParameter15 filter) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/atm-locations"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetAuthorizationApi.java b/src/main/java/unit/java/sdk/api/GetAuthorizationApi.java new file mode 100644 index 00000000..1bf994ae --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetAuthorizationApi.java @@ -0,0 +1,173 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitAuthorizationResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetAuthorizationApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetAuthorizationApi() { + this(new ApiClient()); + } + + public GetAuthorizationApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Authorization by Id + * Get a Authorization from API + * @param authorizationId ID of the authorization to get (required) + * @param includeNoneAuthorized (optional) + * @return UnitAuthorizationResponse + * @throws ApiException if fails to make API call + */ + public UnitAuthorizationResponse execute(String authorizationId, Boolean includeNoneAuthorized) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(authorizationId, includeNoneAuthorized); + return localVarResponse.getData(); + } + + /** + * Get Authorization by Id + * Get a Authorization from API + * @param authorizationId ID of the authorization to get (required) + * @param includeNoneAuthorized (optional) + * @return ApiResponse<UnitAuthorizationResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String authorizationId, Boolean includeNoneAuthorized) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(authorizationId, includeNoneAuthorized); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String authorizationId, Boolean includeNoneAuthorized) throws ApiException { + // verify the required parameter 'authorizationId' is set + if (authorizationId == null) { + throw new ApiException(400, "Missing the required parameter 'authorizationId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/authorizations/{authorizationId}" + .replace("{authorizationId}", ApiClient.urlEncode(authorizationId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "includeNoneAuthorized"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("includeNoneAuthorized", includeNoneAuthorized)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetAuthorizationRequestApi.java b/src/main/java/unit/java/sdk/api/GetAuthorizationRequestApi.java new file mode 100644 index 00000000..a9a084bd --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetAuthorizationRequestApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitAuthorizationRequestsResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetAuthorizationRequestApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetAuthorizationRequestApi() { + this(new ApiClient()); + } + + public GetAuthorizationRequestApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Authorization Request by Id + * Get a Authorization Request from API + * @param authorizationId ID of the authorization request to get (required) + * @return UnitAuthorizationRequestsResponse + * @throws ApiException if fails to make API call + */ + public UnitAuthorizationRequestsResponse execute(String authorizationId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(authorizationId); + return localVarResponse.getData(); + } + + /** + * Get Authorization Request by Id + * Get a Authorization Request from API + * @param authorizationId ID of the authorization request to get (required) + * @return ApiResponse<UnitAuthorizationRequestsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String authorizationId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(authorizationId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String authorizationId) throws ApiException { + // verify the required parameter 'authorizationId' is set + if (authorizationId == null) { + throw new ApiException(400, "Missing the required parameter 'authorizationId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/authorization-requests/{authorizationId}" + .replace("{authorizationId}", ApiClient.urlEncode(authorizationId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetBankVerificationPdfApi.java b/src/main/java/unit/java/sdk/api/GetBankVerificationPdfApi.java new file mode 100644 index 00000000..c8fdcd21 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetBankVerificationPdfApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import java.io.File; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetBankVerificationPdfApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetBankVerificationPdfApi() { + this(new ApiClient()); + } + + public GetBankVerificationPdfApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Bank verification PDF + * Get Get Bank verification PDF from API + * @param accountId ID of the account to get (required) + * @return File + * @throws ApiException if fails to make API call + */ + public File execute(String accountId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(accountId); + return localVarResponse.getData(); + } + + /** + * Get Bank verification PDF + * Get Get Bank verification PDF from API + * @param accountId ID of the account to get (required) + * @return ApiResponse<File> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String accountId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(accountId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String accountId) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException(400, "Missing the required parameter 'accountId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/statements/{accountId}/bank/pdf" + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/pdf"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetCardApi.java b/src/main/java/unit/java/sdk/api/GetCardApi.java new file mode 100644 index 00000000..9e4823e1 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetCardApi.java @@ -0,0 +1,173 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCardResponse1; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetCardApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetCardApi() { + this(new ApiClient()); + } + + public GetCardApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Card by Id + * Get a Card from API + * @param cardId ID of the card to get (required) + * @param included (optional) + * @return UnitCardResponse1 + * @throws ApiException if fails to make API call + */ + public UnitCardResponse1 execute(String cardId, String included) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(cardId, included); + return localVarResponse.getData(); + } + + /** + * Get Card by Id + * Get a Card from API + * @param cardId ID of the card to get (required) + * @param included (optional) + * @return ApiResponse<UnitCardResponse1> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String cardId, String included) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(cardId, included); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String cardId, String included) throws ApiException { + // verify the required parameter 'cardId' is set + if (cardId == null) { + throw new ApiException(400, "Missing the required parameter 'cardId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/cards/{cardId}" + .replace("{cardId}", ApiClient.urlEncode(cardId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "included"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("included", included)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetCardLimitsApi.java b/src/main/java/unit/java/sdk/api/GetCardLimitsApi.java new file mode 100644 index 00000000..7a45c519 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetCardLimitsApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCardResponse3; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetCardLimitsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetCardLimitsApi() { + this(new ApiClient()); + } + + public GetCardLimitsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Card Limit by Id + * Get a Card Limits from API + * @param cardId ID of the card to get (required) + * @return UnitCardResponse3 + * @throws ApiException if fails to make API call + */ + public UnitCardResponse3 execute(String cardId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(cardId); + return localVarResponse.getData(); + } + + /** + * Get Card Limit by Id + * Get a Card Limits from API + * @param cardId ID of the card to get (required) + * @return ApiResponse<UnitCardResponse3> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String cardId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(cardId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String cardId) throws ApiException { + // verify the required parameter 'cardId' is set + if (cardId == null) { + throw new ApiException(400, "Missing the required parameter 'cardId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/cards/{cardId}/limits" + .replace("{cardId}", ApiClient.urlEncode(cardId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetCardPinStatusApi.java b/src/main/java/unit/java/sdk/api/GetCardPinStatusApi.java new file mode 100644 index 00000000..5dd7bcdc --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetCardPinStatusApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCardResponse2; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetCardPinStatusApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetCardPinStatusApi() { + this(new ApiClient()); + } + + public GetCardPinStatusApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Card PIN Status + * Get Card PIN Status via API + * @param cardId ID of the card to get PIN status (required) + * @return UnitCardResponse2 + * @throws ApiException if fails to make API call + */ + public UnitCardResponse2 execute(String cardId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(cardId); + return localVarResponse.getData(); + } + + /** + * Get Card PIN Status + * Get Card PIN Status via API + * @param cardId ID of the card to get PIN status (required) + * @return ApiResponse<UnitCardResponse2> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String cardId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(cardId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String cardId) throws ApiException { + // verify the required parameter 'cardId' is set + if (cardId == null) { + throw new ApiException(400, "Missing the required parameter 'cardId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/cards/{cardId}/secure-data/pin/status" + .replace("{cardId}", ApiClient.urlEncode(cardId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetCheckDepositApi.java b/src/main/java/unit/java/sdk/api/GetCheckDepositApi.java new file mode 100644 index 00000000..11910390 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetCheckDepositApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCheckDepositResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetCheckDepositApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetCheckDepositApi() { + this(new ApiClient()); + } + + public GetCheckDepositApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Check Deposit by Id + * Get a Check Deposit from API + * @param checkDepositId ID of the check deposit to get (required) + * @return UnitCheckDepositResponse + * @throws ApiException if fails to make API call + */ + public UnitCheckDepositResponse execute(String checkDepositId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(checkDepositId); + return localVarResponse.getData(); + } + + /** + * Get Check Deposit by Id + * Get a Check Deposit from API + * @param checkDepositId ID of the check deposit to get (required) + * @return ApiResponse<UnitCheckDepositResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String checkDepositId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(checkDepositId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String checkDepositId) throws ApiException { + // verify the required parameter 'checkDepositId' is set + if (checkDepositId == null) { + throw new ApiException(400, "Missing the required parameter 'checkDepositId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/check-deposits/{checkDepositId}" + .replace("{checkDepositId}", ApiClient.urlEncode(checkDepositId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetCheckDepositBackImageApi.java b/src/main/java/unit/java/sdk/api/GetCheckDepositBackImageApi.java new file mode 100644 index 00000000..0ea7e2e9 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetCheckDepositBackImageApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCheckDepositResponse1; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetCheckDepositBackImageApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetCheckDepositBackImageApi() { + this(new ApiClient()); + } + + public GetCheckDepositBackImageApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Back Check Deposit Image by Id + * Get Back Check Deposit Image from API + * @param checkDepositId ID of the check deposit to get (required) + * @return UnitCheckDepositResponse1 + * @throws ApiException if fails to make API call + */ + public UnitCheckDepositResponse1 execute(String checkDepositId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(checkDepositId); + return localVarResponse.getData(); + } + + /** + * Get Back Check Deposit Image by Id + * Get Back Check Deposit Image from API + * @param checkDepositId ID of the check deposit to get (required) + * @return ApiResponse<UnitCheckDepositResponse1> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String checkDepositId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(checkDepositId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String checkDepositId) throws ApiException { + // verify the required parameter 'checkDepositId' is set + if (checkDepositId == null) { + throw new ApiException(400, "Missing the required parameter 'checkDepositId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/check-deposits/{checkDepositId}/back" + .replace("{checkDepositId}", ApiClient.urlEncode(checkDepositId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetCheckDepositFrontImageApi.java b/src/main/java/unit/java/sdk/api/GetCheckDepositFrontImageApi.java new file mode 100644 index 00000000..fcf2f5cc --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetCheckDepositFrontImageApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCheckDepositResponse1; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetCheckDepositFrontImageApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetCheckDepositFrontImageApi() { + this(new ApiClient()); + } + + public GetCheckDepositFrontImageApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Front Check Deposit Image by Id + * Get Front Check Deposit Image from API + * @param checkDepositId ID of the check deposit to get (required) + * @return UnitCheckDepositResponse1 + * @throws ApiException if fails to make API call + */ + public UnitCheckDepositResponse1 execute(String checkDepositId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(checkDepositId); + return localVarResponse.getData(); + } + + /** + * Get Front Check Deposit Image by Id + * Get Front Check Deposit Image from API + * @param checkDepositId ID of the check deposit to get (required) + * @return ApiResponse<UnitCheckDepositResponse1> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String checkDepositId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(checkDepositId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String checkDepositId) throws ApiException { + // verify the required parameter 'checkDepositId' is set + if (checkDepositId == null) { + throw new ApiException(400, "Missing the required parameter 'checkDepositId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/check-deposits/{checkDepositId}/front" + .replace("{checkDepositId}", ApiClient.urlEncode(checkDepositId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetCheckPaymentApi.java b/src/main/java/unit/java/sdk/api/GetCheckPaymentApi.java new file mode 100644 index 00000000..bcfcbde5 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetCheckPaymentApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCheckPaymentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetCheckPaymentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetCheckPaymentApi() { + this(new ApiClient()); + } + + public GetCheckPaymentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Check Payment by Id + * Get a Check Payment from API + * @param checkPaymentId ID of the check payment to get (required) + * @return UnitCheckPaymentResponse + * @throws ApiException if fails to make API call + */ + public UnitCheckPaymentResponse execute(String checkPaymentId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(checkPaymentId); + return localVarResponse.getData(); + } + + /** + * Get Check Payment by Id + * Get a Check Payment from API + * @param checkPaymentId ID of the check payment to get (required) + * @return ApiResponse<UnitCheckPaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String checkPaymentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(checkPaymentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String checkPaymentId) throws ApiException { + // verify the required parameter 'checkPaymentId' is set + if (checkPaymentId == null) { + throw new ApiException(400, "Missing the required parameter 'checkPaymentId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/check-payments/{checkPaymentId}" + .replace("{checkPaymentId}", ApiClient.urlEncode(checkPaymentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetCounterpartyApi.java b/src/main/java/unit/java/sdk/api/GetCounterpartyApi.java new file mode 100644 index 00000000..ba5d2b37 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetCounterpartyApi.java @@ -0,0 +1,173 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCounterpartyResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetCounterpartyApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetCounterpartyApi() { + this(new ApiClient()); + } + + public GetCounterpartyApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Counterparty by Id + * Get a Counterparty from API + * @param counterpartyId ID of the counterparty to get (required) + * @param included (optional) + * @return UnitCounterpartyResponse + * @throws ApiException if fails to make API call + */ + public UnitCounterpartyResponse execute(String counterpartyId, String included) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(counterpartyId, included); + return localVarResponse.getData(); + } + + /** + * Get Counterparty by Id + * Get a Counterparty from API + * @param counterpartyId ID of the counterparty to get (required) + * @param included (optional) + * @return ApiResponse<UnitCounterpartyResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String counterpartyId, String included) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(counterpartyId, included); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String counterpartyId, String included) throws ApiException { + // verify the required parameter 'counterpartyId' is set + if (counterpartyId == null) { + throw new ApiException(400, "Missing the required parameter 'counterpartyId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/counterparties/{counterpartyId}" + .replace("{counterpartyId}", ApiClient.urlEncode(counterpartyId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "included"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("included", included)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetCounterpartyBalanceApi.java b/src/main/java/unit/java/sdk/api/GetCounterpartyBalanceApi.java new file mode 100644 index 00000000..b4b6f66e --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetCounterpartyBalanceApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCounterpartyResponse1; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetCounterpartyBalanceApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetCounterpartyBalanceApi() { + this(new ApiClient()); + } + + public GetCounterpartyBalanceApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Counterparty Balance + * Get Recurring Payment from API + * @param counterpartyId ID of the counterparty to get (required) + * @return UnitCounterpartyResponse1 + * @throws ApiException if fails to make API call + */ + public UnitCounterpartyResponse1 execute(String counterpartyId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(counterpartyId); + return localVarResponse.getData(); + } + + /** + * Get Counterparty Balance + * Get Recurring Payment from API + * @param counterpartyId ID of the counterparty to get (required) + * @return ApiResponse<UnitCounterpartyResponse1> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String counterpartyId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(counterpartyId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String counterpartyId) throws ApiException { + // verify the required parameter 'counterpartyId' is set + if (counterpartyId == null) { + throw new ApiException(400, "Missing the required parameter 'counterpartyId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/counterparties/{counterpartyId}/balance" + .replace("{counterpartyId}", ApiClient.urlEncode(counterpartyId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetCustomerApi.java b/src/main/java/unit/java/sdk/api/GetCustomerApi.java new file mode 100644 index 00000000..a5a00429 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetCustomerApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCustomerResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetCustomerApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetCustomerApi() { + this(new ApiClient()); + } + + public GetCustomerApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Customer by Id + * Get a Customer from API + * @param customerId ID of the customer to get (required) + * @return UnitCustomerResponse + * @throws ApiException if fails to make API call + */ + public UnitCustomerResponse execute(String customerId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(customerId); + return localVarResponse.getData(); + } + + /** + * Get Customer by Id + * Get a Customer from API + * @param customerId ID of the customer to get (required) + * @return ApiResponse<UnitCustomerResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String customerId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(customerId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String customerId) throws ApiException { + // verify the required parameter 'customerId' is set + if (customerId == null) { + throw new ApiException(400, "Missing the required parameter 'customerId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/customers/{customerId}" + .replace("{customerId}", ApiClient.urlEncode(customerId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetDisputeApi.java b/src/main/java/unit/java/sdk/api/GetDisputeApi.java new file mode 100644 index 00000000..8d832920 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetDisputeApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitDisputeResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetDisputeApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetDisputeApi() { + this(new ApiClient()); + } + + public GetDisputeApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Dispute by Id + * Get a Dispute from API + * @param disputeId ID of the dispute to get (required) + * @return UnitDisputeResponse + * @throws ApiException if fails to make API call + */ + public UnitDisputeResponse execute(String disputeId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(disputeId); + return localVarResponse.getData(); + } + + /** + * Get Dispute by Id + * Get a Dispute from API + * @param disputeId ID of the dispute to get (required) + * @return ApiResponse<UnitDisputeResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String disputeId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(disputeId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String disputeId) throws ApiException { + // verify the required parameter 'disputeId' is set + if (disputeId == null) { + throw new ApiException(400, "Missing the required parameter 'disputeId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/disputes/{disputeId}" + .replace("{disputeId}", ApiClient.urlEncode(disputeId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetEventApi.java b/src/main/java/unit/java/sdk/api/GetEventApi.java new file mode 100644 index 00000000..25a8b113 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetEventApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitEventResponse1; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetEventApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetEventApi() { + this(new ApiClient()); + } + + public GetEventApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Event by Id + * Get an Event from API + * @param eventId ID of the event to get (required) + * @return UnitEventResponse1 + * @throws ApiException if fails to make API call + */ + public UnitEventResponse1 execute(String eventId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(eventId); + return localVarResponse.getData(); + } + + /** + * Get Event by Id + * Get an Event from API + * @param eventId ID of the event to get (required) + * @return ApiResponse<UnitEventResponse1> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String eventId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(eventId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String eventId) throws ApiException { + // verify the required parameter 'eventId' is set + if (eventId == null) { + throw new ApiException(400, "Missing the required parameter 'eventId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/events/{eventId}" + .replace("{eventId}", ApiClient.urlEncode(eventId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetInstitutionApi.java b/src/main/java/unit/java/sdk/api/GetInstitutionApi.java new file mode 100644 index 00000000..7fb38ec7 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetInstitutionApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitInstitutionResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetInstitutionApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetInstitutionApi() { + this(new ApiClient()); + } + + public GetInstitutionApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Institution by Routing Number + * Get an Institution from API + * @param routingNumber routingNumber of the institution to get (required) + * @return UnitInstitutionResponse + * @throws ApiException if fails to make API call + */ + public UnitInstitutionResponse execute(String routingNumber) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(routingNumber); + return localVarResponse.getData(); + } + + /** + * Get Institution by Routing Number + * Get an Institution from API + * @param routingNumber routingNumber of the institution to get (required) + * @return ApiResponse<UnitInstitutionResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String routingNumber) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(routingNumber); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String routingNumber) throws ApiException { + // verify the required parameter 'routingNumber' is set + if (routingNumber == null) { + throw new ApiException(400, "Missing the required parameter 'routingNumber' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/institutions/{routingNumber}" + .replace("{routingNumber}", ApiClient.urlEncode(routingNumber.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListAccountEndOfDayBalancesHistoryApi.java b/src/main/java/unit/java/sdk/api/GetListAccountEndOfDayBalancesHistoryApi.java new file mode 100644 index 00000000..d653d7f4 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListAccountEndOfDayBalancesHistoryApi.java @@ -0,0 +1,149 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitGetAccountEndOfDayListResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListAccountEndOfDayBalancesHistoryApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListAccountEndOfDayBalancesHistoryApi() { + this(new ApiClient()); + } + + public GetListAccountEndOfDayBalancesHistoryApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get AccountEndOfDay List + * Get AccountEndOfDay List from API + * @return UnitGetAccountEndOfDayListResponse + * @throws ApiException if fails to make API call + */ + public UnitGetAccountEndOfDayListResponse execute() throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * Get AccountEndOfDay List + * Get AccountEndOfDay List from API + * @return ApiResponse<UnitGetAccountEndOfDayListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/account-end-of-day"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListAccountsApi.java b/src/main/java/unit/java/sdk/api/GetListAccountsApi.java new file mode 100644 index 00000000..bc46e8ca --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListAccountsApi.java @@ -0,0 +1,180 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ExecuteFilterParameter2; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitAccountsListResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListAccountsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListAccountsApi() { + this(new ApiClient()); + } + + public GetListAccountsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get List Accounts + * Get List Accounts from API + * @param page (optional) + * @param filter (optional) + * @param include (optional) + * @return UnitAccountsListResponse + * @throws ApiException if fails to make API call + */ + public UnitAccountsListResponse execute(ListPageParametersObject page, ExecuteFilterParameter2 filter, String include) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter, include); + return localVarResponse.getData(); + } + + /** + * Get List Accounts + * Get List Accounts from API + * @param page (optional) + * @param filter (optional) + * @param include (optional) + * @return ApiResponse<UnitAccountsListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter2 filter, String include) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter, include); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter2 filter, String include) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + localVarQueryParameterBaseName = "include"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("include", include)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListApplicationFormsApi.java b/src/main/java/unit/java/sdk/api/GetListApplicationFormsApi.java new file mode 100644 index 00000000..eabd8caa --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListApplicationFormsApi.java @@ -0,0 +1,178 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ExecuteFilterParameter1; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitApplicationFormsListResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListApplicationFormsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListApplicationFormsApi() { + this(new ApiClient()); + } + + public GetListApplicationFormsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get List Application Forms + * Get List Application Forms from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @return UnitApplicationFormsListResponse + * @throws ApiException if fails to make API call + */ + public UnitApplicationFormsListResponse execute(ListPageParametersObject page, ExecuteFilterParameter1 filter, String sort) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter, sort); + return localVarResponse.getData(); + } + + /** + * Get List Application Forms + * Get List Application Forms from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @return ApiResponse<UnitApplicationFormsListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter1 filter, String sort) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter, sort); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter1 filter, String sort) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/application-forms"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListApplicationsApi.java b/src/main/java/unit/java/sdk/api/GetListApplicationsApi.java new file mode 100644 index 00000000..d0c142bd --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListApplicationsApi.java @@ -0,0 +1,180 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ExecuteFilterParameter; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitListApplicationsResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListApplicationsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListApplicationsApi() { + this(new ApiClient()); + } + + public GetListApplicationsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get List Application + * Get List Applications from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @return UnitListApplicationsResponse + * @throws ApiException if fails to make API call + */ + public UnitListApplicationsResponse execute(ListPageParametersObject page, ExecuteFilterParameter filter, String sort) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter, sort); + return localVarResponse.getData(); + } + + /** + * Get List Application + * Get List Applications from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @return ApiResponse<UnitListApplicationsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter filter, String sort) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter, sort); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter filter, String sort) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/applications"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json, application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListAuthorizationRequestsApi.java b/src/main/java/unit/java/sdk/api/GetListAuthorizationRequestsApi.java new file mode 100644 index 00000000..9123d035 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListAuthorizationRequestsApi.java @@ -0,0 +1,176 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ExecuteFilterParameter9; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitListAuthorizationRequestsResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListAuthorizationRequestsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListAuthorizationRequestsApi() { + this(new ApiClient()); + } + + public GetListAuthorizationRequestsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get List Authorization Requests + * Get List Authorization Requests from API + * @param page (optional) + * @param filter (optional) + * @return UnitListAuthorizationRequestsResponse + * @throws ApiException if fails to make API call + */ + public UnitListAuthorizationRequestsResponse execute(ListPageParametersObject page, ExecuteFilterParameter9 filter) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter); + return localVarResponse.getData(); + } + + /** + * Get List Authorization Requests + * Get List Authorization Requests from API + * @param page (optional) + * @param filter (optional) + * @return ApiResponse<UnitListAuthorizationRequestsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter9 filter) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter9 filter) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/authorization-requests"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListAuthorizationsApi.java b/src/main/java/unit/java/sdk/api/GetListAuthorizationsApi.java new file mode 100644 index 00000000..9f20764a --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListAuthorizationsApi.java @@ -0,0 +1,180 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ExecuteFilterParameter8; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitListAuthorizationsResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListAuthorizationsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListAuthorizationsApi() { + this(new ApiClient()); + } + + public GetListAuthorizationsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get List authorizations + * Get List Authorizations from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @return UnitListAuthorizationsResponse + * @throws ApiException if fails to make API call + */ + public UnitListAuthorizationsResponse execute(ListPageParametersObject page, ExecuteFilterParameter8 filter, String sort) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter, sort); + return localVarResponse.getData(); + } + + /** + * Get List authorizations + * Get List Authorizations from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @return ApiResponse<UnitListAuthorizationsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter8 filter, String sort) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter, sort); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter8 filter, String sort) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/authorizations"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListCheckDepositsApi.java b/src/main/java/unit/java/sdk/api/GetListCheckDepositsApi.java new file mode 100644 index 00000000..6516212b --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListCheckDepositsApi.java @@ -0,0 +1,184 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ExecuteFilterParameter13; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitListCheckDepositsResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListCheckDepositsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListCheckDepositsApi() { + this(new ApiClient()); + } + + public GetListCheckDepositsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get List Check Deposits + * Get List Check Deposits from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @param include (optional) + * @return UnitListCheckDepositsResponse + * @throws ApiException if fails to make API call + */ + public UnitListCheckDepositsResponse execute(ListPageParametersObject page, ExecuteFilterParameter13 filter, String sort, String include) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter, sort, include); + return localVarResponse.getData(); + } + + /** + * Get List Check Deposits + * Get List Check Deposits from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @param include (optional) + * @return ApiResponse<UnitListCheckDepositsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter13 filter, String sort, String include) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter, sort, include); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter13 filter, String sort, String include) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/check-deposits"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + localVarQueryParameterBaseName = "include"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("include", include)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListCheckPaymentsApi.java b/src/main/java/unit/java/sdk/api/GetListCheckPaymentsApi.java new file mode 100644 index 00000000..c9f207a2 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListCheckPaymentsApi.java @@ -0,0 +1,182 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ExecuteFilterParameter19; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitListCheckPaymentsResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListCheckPaymentsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListCheckPaymentsApi() { + this(new ApiClient()); + } + + public GetListCheckPaymentsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get List Check Payments + * Get List Check Payments from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @param include (optional) + * @return UnitListCheckPaymentsResponse + * @throws ApiException if fails to make API call + */ + public UnitListCheckPaymentsResponse execute(ListPageParametersObject page, ExecuteFilterParameter19 filter, String sort, String include) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter, sort, include); + return localVarResponse.getData(); + } + + /** + * Get List Check Payments + * Get List Check Payments from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @param include (optional) + * @return ApiResponse<UnitListCheckPaymentsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter19 filter, String sort, String include) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter, sort, include); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter19 filter, String sort, String include) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/check-payments"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("filter", filter)); + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + localVarQueryParameterBaseName = "include"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("include", include)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListCounterpartiesApi.java b/src/main/java/unit/java/sdk/api/GetListCounterpartiesApi.java new file mode 100644 index 00000000..e48658d5 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListCounterpartiesApi.java @@ -0,0 +1,180 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ExecuteFilterParameter5; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitCounterpartiesListResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListCounterpartiesApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListCounterpartiesApi() { + this(new ApiClient()); + } + + public GetListCounterpartiesApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Counterparties List + * Get Counterparties List from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @return UnitCounterpartiesListResponse + * @throws ApiException if fails to make API call + */ + public UnitCounterpartiesListResponse execute(ListPageParametersObject page, ExecuteFilterParameter5 filter, String sort) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter, sort); + return localVarResponse.getData(); + } + + /** + * Get Counterparties List + * Get Counterparties List from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @return ApiResponse<UnitCounterpartiesListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter5 filter, String sort) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter, sort); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter5 filter, String sort) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/counterparties"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListCustomersApi.java b/src/main/java/unit/java/sdk/api/GetListCustomersApi.java new file mode 100644 index 00000000..1e35a12b --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListCustomersApi.java @@ -0,0 +1,180 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ExecuteFilterParameter3; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitCustomersListResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListCustomersApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListCustomersApi() { + this(new ApiClient()); + } + + public GetListCustomersApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Customers List + * Get Customers List from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @return UnitCustomersListResponse + * @throws ApiException if fails to make API call + */ + public UnitCustomersListResponse execute(ListPageParametersObject page, ExecuteFilterParameter3 filter, String sort) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter, sort); + return localVarResponse.getData(); + } + + /** + * Get Customers List + * Get Customers List from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @return ApiResponse<UnitCustomersListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter3 filter, String sort) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter, sort); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter3 filter, String sort) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/customers"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListDisputesApi.java b/src/main/java/unit/java/sdk/api/GetListDisputesApi.java new file mode 100644 index 00000000..53ea1845 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListDisputesApi.java @@ -0,0 +1,176 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.Dispute; +import unit.java.sdk.model.ExecuteFilterParameter17; +import unit.java.sdk.model.ListPageParametersObject; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListDisputesApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListDisputesApi() { + this(new ApiClient()); + } + + public GetListDisputesApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get List Disputes + * Get List Disputes from API + * @param page (optional) + * @param filter (optional) + * @return List<Dispute> + * @throws ApiException if fails to make API call + */ + public List execute(ListPageParametersObject page, ExecuteFilterParameter17 filter) throws ApiException { + ApiResponse> localVarResponse = executeWithHttpInfo(page, filter); + return localVarResponse.getData(); + } + + /** + * Get List Disputes + * Get List Disputes from API + * @param page (optional) + * @param filter (optional) + * @return ApiResponse<List<Dispute>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter17 filter) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter17 filter) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/disputes"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListEventsApi.java b/src/main/java/unit/java/sdk/api/GetListEventsApi.java new file mode 100644 index 00000000..4627cb8e --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListEventsApi.java @@ -0,0 +1,176 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ExecuteFilterParameter12; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitEventListResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListEventsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListEventsApi() { + this(new ApiClient()); + } + + public GetListEventsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Events List + * Get Events List from API + * @param page (optional) + * @param filter (optional) + * @return UnitEventListResponse + * @throws ApiException if fails to make API call + */ + public UnitEventListResponse execute(ListPageParametersObject page, ExecuteFilterParameter12 filter) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter); + return localVarResponse.getData(); + } + + /** + * Get Events List + * Get Events List from API + * @param page (optional) + * @param filter (optional) + * @return ApiResponse<UnitEventListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter12 filter) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter12 filter) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/events"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListOfCardsApi.java b/src/main/java/unit/java/sdk/api/GetListOfCardsApi.java new file mode 100644 index 00000000..dd946bcd --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListOfCardsApi.java @@ -0,0 +1,184 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ExecuteFilterParameter7; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitCardResponseCardsList; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListOfCardsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListOfCardsApi() { + this(new ApiClient()); + } + + public GetListOfCardsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get List of Cards + * Get List of Cards from API + * @param page (optional) + * @param filter (optional) + * @param include (optional) + * @param sort (optional) + * @return UnitCardResponseCardsList + * @throws ApiException if fails to make API call + */ + public UnitCardResponseCardsList execute(ListPageParametersObject page, ExecuteFilterParameter7 filter, String include, String sort) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter, include, sort); + return localVarResponse.getData(); + } + + /** + * Get List of Cards + * Get List of Cards from API + * @param page (optional) + * @param filter (optional) + * @param include (optional) + * @param sort (optional) + * @return ApiResponse<UnitCardResponseCardsList> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter7 filter, String include, String sort) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter, include, sort); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter7 filter, String include, String sort) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/cards"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + localVarQueryParameterBaseName = "include"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("include", include)); + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListOfDocumentsApi.java b/src/main/java/unit/java/sdk/api/GetListOfDocumentsApi.java new file mode 100644 index 00000000..d8f5802b --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListOfDocumentsApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitListDocumentsResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListOfDocumentsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListOfDocumentsApi() { + this(new ApiClient()); + } + + public GetListOfDocumentsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get List of Documents + * Get List of Documents via API + * @param applicationId ID of the application to get documents for (required) + * @return UnitListDocumentsResponse + * @throws ApiException if fails to make API call + */ + public UnitListDocumentsResponse execute(String applicationId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(applicationId); + return localVarResponse.getData(); + } + + /** + * Get List of Documents + * Get List of Documents via API + * @param applicationId ID of the application to get documents for (required) + * @return ApiResponse<UnitListDocumentsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String applicationId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(applicationId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String applicationId) throws ApiException { + // verify the required parameter 'applicationId' is set + if (applicationId == null) { + throw new ApiException(400, "Missing the required parameter 'applicationId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/applications/{applicationId}/documents" + .replace("{applicationId}", ApiClient.urlEncode(applicationId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListOrgApiTokensApi.java b/src/main/java/unit/java/sdk/api/GetListOrgApiTokensApi.java new file mode 100644 index 00000000..9ed2eb92 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListOrgApiTokensApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitOrgApiTokensListResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListOrgApiTokensApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListOrgApiTokensApi() { + this(new ApiClient()); + } + + public GetListOrgApiTokensApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get List Org API Tokens + * Get List Org API Tokens from API + * @param userId ID of the user to revoke token (required) + * @return UnitOrgApiTokensListResponse + * @throws ApiException if fails to make API call + */ + public UnitOrgApiTokensListResponse execute(String userId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(userId); + return localVarResponse.getData(); + } + + /** + * Get List Org API Tokens + * Get List Org API Tokens from API + * @param userId ID of the user to revoke token (required) + * @return ApiResponse<UnitOrgApiTokensListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String userId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(userId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String userId) throws ApiException { + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException(400, "Missing the required parameter 'userId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/users/{userId}/api-tokens" + .replace("{userId}", ApiClient.urlEncode(userId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListPaymentsApi.java b/src/main/java/unit/java/sdk/api/GetListPaymentsApi.java new file mode 100644 index 00000000..f8ba387b --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListPaymentsApi.java @@ -0,0 +1,184 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ExecuteFilterParameter4; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitPaymentsListResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListPaymentsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListPaymentsApi() { + this(new ApiClient()); + } + + public GetListPaymentsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get List Payments + * Get List Payments from API + * @param page (optional) + * @param filter (optional) + * @param include (optional) + * @param sort (optional) + * @return UnitPaymentsListResponse + * @throws ApiException if fails to make API call + */ + public UnitPaymentsListResponse execute(ListPageParametersObject page, ExecuteFilterParameter4 filter, String include, String sort) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter, include, sort); + return localVarResponse.getData(); + } + + /** + * Get List Payments + * Get List Payments from API + * @param page (optional) + * @param filter (optional) + * @param include (optional) + * @param sort (optional) + * @return ApiResponse<UnitPaymentsListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter4 filter, String include, String sort) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter, include, sort); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter4 filter, String include, String sort) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/payments"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + localVarQueryParameterBaseName = "include"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("include", include)); + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListRecurringPaymentsApi.java b/src/main/java/unit/java/sdk/api/GetListRecurringPaymentsApi.java new file mode 100644 index 00000000..391b7e0b --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListRecurringPaymentsApi.java @@ -0,0 +1,180 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ExecuteFilterParameter6; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitRecurringPaymentListResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListRecurringPaymentsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListRecurringPaymentsApi() { + this(new ApiClient()); + } + + public GetListRecurringPaymentsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Recurring Payments List + * Get Recurring Payments List from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @return UnitRecurringPaymentListResponse + * @throws ApiException if fails to make API call + */ + public UnitRecurringPaymentListResponse execute(ListPageParametersObject page, ExecuteFilterParameter6 filter, String sort) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter, sort); + return localVarResponse.getData(); + } + + /** + * Get Recurring Payments List + * Get Recurring Payments List from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @return ApiResponse<UnitRecurringPaymentListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter6 filter, String sort) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter, sort); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter6 filter, String sort) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/recurring-payments"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListRepaymentsApi.java b/src/main/java/unit/java/sdk/api/GetListRepaymentsApi.java new file mode 100644 index 00000000..91cc14b1 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListRepaymentsApi.java @@ -0,0 +1,176 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ExecuteFilterParameter18; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitRepaymentsListResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListRepaymentsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListRepaymentsApi() { + this(new ApiClient()); + } + + public GetListRepaymentsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get List Repayments + * Get List Repayments from API + * @param page (optional) + * @param filter (optional) + * @return UnitRepaymentsListResponse + * @throws ApiException if fails to make API call + */ + public UnitRepaymentsListResponse execute(ListPageParametersObject page, ExecuteFilterParameter18 filter) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter); + return localVarResponse.getData(); + } + + /** + * Get List Repayments + * Get List Repayments from API + * @param page (optional) + * @param filter (optional) + * @return ApiResponse<UnitRepaymentsListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter18 filter) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter18 filter) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/repayments"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListRewardsApi.java b/src/main/java/unit/java/sdk/api/GetListRewardsApi.java new file mode 100644 index 00000000..48743fd3 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListRewardsApi.java @@ -0,0 +1,184 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ExecuteFilterParameter11; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitRewardsListResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListRewardsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListRewardsApi() { + this(new ApiClient()); + } + + public GetListRewardsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Rewards List + * Get Rewards List from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @param include (optional) + * @return UnitRewardsListResponse + * @throws ApiException if fails to make API call + */ + public UnitRewardsListResponse execute(ListPageParametersObject page, ExecuteFilterParameter11 filter, String sort, String include) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter, sort, include); + return localVarResponse.getData(); + } + + /** + * Get Rewards List + * Get Rewards List from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @param include (optional) + * @return ApiResponse<UnitRewardsListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter11 filter, String sort, String include) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter, sort, include); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter11 filter, String sort, String include) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/rewards"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + localVarQueryParameterBaseName = "include"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("include", include)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListStatementsApi.java b/src/main/java/unit/java/sdk/api/GetListStatementsApi.java new file mode 100644 index 00000000..82991617 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListStatementsApi.java @@ -0,0 +1,180 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ExecuteFilterParameter10; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitStatementsResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListStatementsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListStatementsApi() { + this(new ApiClient()); + } + + public GetListStatementsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get List Statements + * Get List Statements from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @return UnitStatementsResponse + * @throws ApiException if fails to make API call + */ + public UnitStatementsResponse execute(ListPageParametersObject page, ExecuteFilterParameter10 filter, String sort) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter, sort); + return localVarResponse.getData(); + } + + /** + * Get List Statements + * Get List Statements from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @return ApiResponse<UnitStatementsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter10 filter, String sort) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter, sort); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter10 filter, String sort) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/statements"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListTransactionsApi.java b/src/main/java/unit/java/sdk/api/GetListTransactionsApi.java new file mode 100644 index 00000000..68c2ff8e --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListTransactionsApi.java @@ -0,0 +1,184 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ExecuteFilterParameter16; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitTransactionsListResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListTransactionsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListTransactionsApi() { + this(new ApiClient()); + } + + public GetListTransactionsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get List Transactions + * Get List Transactions from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @param include (optional) + * @return UnitTransactionsListResponse + * @throws ApiException if fails to make API call + */ + public UnitTransactionsListResponse execute(ListPageParametersObject page, ExecuteFilterParameter16 filter, String sort, String include) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter, sort, include); + return localVarResponse.getData(); + } + + /** + * Get List Transactions + * Get List Transactions from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @param include (optional) + * @return ApiResponse<UnitTransactionsListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter16 filter, String sort, String include) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter, sort, include); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter16 filter, String sort, String include) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/transactions"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + localVarQueryParameterBaseName = "include"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("include", include)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetListWebhooksApi.java b/src/main/java/unit/java/sdk/api/GetListWebhooksApi.java new file mode 100644 index 00000000..eea52df4 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetListWebhooksApi.java @@ -0,0 +1,180 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ExecuteFilterParameter14; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitWebhooksListResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetListWebhooksApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetListWebhooksApi() { + this(new ApiClient()); + } + + public GetListWebhooksApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get List Webhooks + * Get List Webhooks from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @return UnitWebhooksListResponse + * @throws ApiException if fails to make API call + */ + public UnitWebhooksListResponse execute(ListPageParametersObject page, ExecuteFilterParameter14 filter, String sort) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(page, filter, sort); + return localVarResponse.getData(); + } + + /** + * Get List Webhooks + * Get List Webhooks from API + * @param page (optional) + * @param filter (optional) + * @param sort (optional) + * @return ApiResponse<UnitWebhooksListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(ListPageParametersObject page, ExecuteFilterParameter14 filter, String sort) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(page, filter, sort); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(ListPageParametersObject page, ExecuteFilterParameter14 filter, String sort) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/webhooks"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + if (page != null) { + localVarQueryStringJoiner.add(page.toUrlQueryString("page")); + } + localVarQueryParameterBaseName = "filter"; + if (filter != null) { + localVarQueryStringJoiner.add(filter.toUrlQueryString("filter")); + } + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetPaymentApi.java b/src/main/java/unit/java/sdk/api/GetPaymentApi.java new file mode 100644 index 00000000..b8d5bde2 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetPaymentApi.java @@ -0,0 +1,173 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitPaymentResponseWithIncluded; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetPaymentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetPaymentApi() { + this(new ApiClient()); + } + + public GetPaymentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Payment by Id + * Get a Payment from API + * @param paymentId ID of the payment to get (required) + * @param included (optional) + * @return UnitPaymentResponseWithIncluded + * @throws ApiException if fails to make API call + */ + public UnitPaymentResponseWithIncluded execute(String paymentId, String included) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(paymentId, included); + return localVarResponse.getData(); + } + + /** + * Get Payment by Id + * Get a Payment from API + * @param paymentId ID of the payment to get (required) + * @param included (optional) + * @return ApiResponse<UnitPaymentResponseWithIncluded> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String paymentId, String included) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(paymentId, included); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String paymentId, String included) throws ApiException { + // verify the required parameter 'paymentId' is set + if (paymentId == null) { + throw new ApiException(400, "Missing the required parameter 'paymentId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/payments/{paymentId}" + .replace("{paymentId}", ApiClient.urlEncode(paymentId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "included"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("included", included)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetReceivedPaymentApi.java b/src/main/java/unit/java/sdk/api/GetReceivedPaymentApi.java new file mode 100644 index 00000000..f923851b --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetReceivedPaymentApi.java @@ -0,0 +1,173 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitReceivedPaymentResponseWithIncluded; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetReceivedPaymentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetReceivedPaymentApi() { + this(new ApiClient()); + } + + public GetReceivedPaymentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Received Payment by Id + * Get a Received Payment from API + * @param paymentId ID of the payment to get (required) + * @param included (optional) + * @return UnitReceivedPaymentResponseWithIncluded + * @throws ApiException if fails to make API call + */ + public UnitReceivedPaymentResponseWithIncluded execute(String paymentId, String included) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(paymentId, included); + return localVarResponse.getData(); + } + + /** + * Get Received Payment by Id + * Get a Received Payment from API + * @param paymentId ID of the payment to get (required) + * @param included (optional) + * @return ApiResponse<UnitReceivedPaymentResponseWithIncluded> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String paymentId, String included) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(paymentId, included); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String paymentId, String included) throws ApiException { + // verify the required parameter 'paymentId' is set + if (paymentId == null) { + throw new ApiException(400, "Missing the required parameter 'paymentId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/received-payments/{paymentId}" + .replace("{paymentId}", ApiClient.urlEncode(paymentId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "included"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("included", included)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetReceivedPaymentsListApi.java b/src/main/java/unit/java/sdk/api/GetReceivedPaymentsListApi.java new file mode 100644 index 00000000..bda5cef3 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetReceivedPaymentsListApi.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitReceivedPaymentListResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetReceivedPaymentsListApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetReceivedPaymentsListApi() { + this(new ApiClient()); + } + + public GetReceivedPaymentsListApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Received Payments List + * Get Received Payments from API + * @param included (optional) + * @return UnitReceivedPaymentListResponse + * @throws ApiException if fails to make API call + */ + public UnitReceivedPaymentListResponse execute(String included) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(included); + return localVarResponse.getData(); + } + + /** + * Get Received Payments List + * Get Received Payments from API + * @param included (optional) + * @return ApiResponse<UnitReceivedPaymentListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String included) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(included); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String included) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/received-payments"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "included"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("included", included)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetRecurringPaymentApi.java b/src/main/java/unit/java/sdk/api/GetRecurringPaymentApi.java new file mode 100644 index 00000000..1f0cfb79 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetRecurringPaymentApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitRecurringPaymentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetRecurringPaymentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetRecurringPaymentApi() { + this(new ApiClient()); + } + + public GetRecurringPaymentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Recurring Payment + * Get Recurring Payment from API + * @param paymentId ID of the payment to get (required) + * @return UnitRecurringPaymentResponse + * @throws ApiException if fails to make API call + */ + public UnitRecurringPaymentResponse execute(String paymentId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(paymentId); + return localVarResponse.getData(); + } + + /** + * Get Recurring Payment + * Get Recurring Payment from API + * @param paymentId ID of the payment to get (required) + * @return ApiResponse<UnitRecurringPaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String paymentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(paymentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String paymentId) throws ApiException { + // verify the required parameter 'paymentId' is set + if (paymentId == null) { + throw new ApiException(400, "Missing the required parameter 'paymentId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/recurring-payments/{paymentId}" + .replace("{paymentId}", ApiClient.urlEncode(paymentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetRepaymentApi.java b/src/main/java/unit/java/sdk/api/GetRepaymentApi.java new file mode 100644 index 00000000..003e58a3 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetRepaymentApi.java @@ -0,0 +1,173 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitRepaymentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetRepaymentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetRepaymentApi() { + this(new ApiClient()); + } + + public GetRepaymentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Repayment by Id + * Get an Repayment from API + * @param repaymentId ID of the repayment to get (required) + * @param include (optional) + * @return UnitRepaymentResponse + * @throws ApiException if fails to make API call + */ + public UnitRepaymentResponse execute(String repaymentId, String include) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(repaymentId, include); + return localVarResponse.getData(); + } + + /** + * Get Repayment by Id + * Get an Repayment from API + * @param repaymentId ID of the repayment to get (required) + * @param include (optional) + * @return ApiResponse<UnitRepaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String repaymentId, String include) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(repaymentId, include); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String repaymentId, String include) throws ApiException { + // verify the required parameter 'repaymentId' is set + if (repaymentId == null) { + throw new ApiException(400, "Missing the required parameter 'repaymentId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/repayments/{repaymentId}" + .replace("{repaymentId}", ApiClient.urlEncode(repaymentId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "include"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("include", include)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetRewardApi.java b/src/main/java/unit/java/sdk/api/GetRewardApi.java new file mode 100644 index 00000000..bf6e1fad --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetRewardApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitRewardResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetRewardApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetRewardApi() { + this(new ApiClient()); + } + + public GetRewardApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Reward by Id + * Get a Reward from API + * @param rewardId ID of the reward to get (required) + * @return UnitRewardResponse + * @throws ApiException if fails to make API call + */ + public UnitRewardResponse execute(String rewardId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(rewardId); + return localVarResponse.getData(); + } + + /** + * Get Reward by Id + * Get a Reward from API + * @param rewardId ID of the reward to get (required) + * @return ApiResponse<UnitRewardResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String rewardId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(rewardId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String rewardId) throws ApiException { + // verify the required parameter 'rewardId' is set + if (rewardId == null) { + throw new ApiException(400, "Missing the required parameter 'rewardId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/rewards/{rewardId}" + .replace("{rewardId}", ApiClient.urlEncode(rewardId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetStatementHtmlApi.java b/src/main/java/unit/java/sdk/api/GetStatementHtmlApi.java new file mode 100644 index 00000000..da27217b --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetStatementHtmlApi.java @@ -0,0 +1,155 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetStatementHtmlApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetStatementHtmlApi() { + this(new ApiClient()); + } + + public GetStatementHtmlApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get HTML Statement by Id + * Get a HTML Statement from API + * @param statementId ID of the statement to get (required) + * @return String + * @throws ApiException if fails to make API call + */ + public String execute(String statementId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(statementId); + return localVarResponse.getData(); + } + + /** + * Get HTML Statement by Id + * Get a HTML Statement from API + * @param statementId ID of the statement to get (required) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String statementId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(statementId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String statementId) throws ApiException { + // verify the required parameter 'statementId' is set + if (statementId == null) { + throw new ApiException(400, "Missing the required parameter 'statementId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/statements/{statementId}/html" + .replace("{statementId}", ApiClient.urlEncode(statementId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "text/html"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetStatementPdfApi.java b/src/main/java/unit/java/sdk/api/GetStatementPdfApi.java new file mode 100644 index 00000000..2ea86e48 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetStatementPdfApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import java.io.File; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetStatementPdfApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetStatementPdfApi() { + this(new ApiClient()); + } + + public GetStatementPdfApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get PDF Statement by Id + * Get a PDF Statement from API + * @param statementId ID of the statement to get (required) + * @return File + * @throws ApiException if fails to make API call + */ + public File execute(String statementId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(statementId); + return localVarResponse.getData(); + } + + /** + * Get PDF Statement by Id + * Get a PDF Statement from API + * @param statementId ID of the statement to get (required) + * @return ApiResponse<File> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String statementId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(statementId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String statementId) throws ApiException { + // verify the required parameter 'statementId' is set + if (statementId == null) { + throw new ApiException(400, "Missing the required parameter 'statementId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/statements/{statementId}/pdf" + .replace("{statementId}", ApiClient.urlEncode(statementId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/pdf"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetTransactionApi.java b/src/main/java/unit/java/sdk/api/GetTransactionApi.java new file mode 100644 index 00000000..848e6fd2 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetTransactionApi.java @@ -0,0 +1,163 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitTransactionResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetTransactionApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetTransactionApi() { + this(new ApiClient()); + } + + public GetTransactionApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Transaction by Id + * Get a Transaction from API + * @param accountId ID of the account to get transaction from (required) + * @param transactionId ID of the transaction (required) + * @return UnitTransactionResponse + * @throws ApiException if fails to make API call + */ + public UnitTransactionResponse execute(String accountId, String transactionId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(accountId, transactionId); + return localVarResponse.getData(); + } + + /** + * Get Transaction by Id + * Get a Transaction from API + * @param accountId ID of the account to get transaction from (required) + * @param transactionId ID of the transaction (required) + * @return ApiResponse<UnitTransactionResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String accountId, String transactionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(accountId, transactionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String accountId, String transactionId) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException(400, "Missing the required parameter 'accountId' when calling execute"); + } + // verify the required parameter 'transactionId' is set + if (transactionId == null) { + throw new ApiException(400, "Missing the required parameter 'transactionId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/{accountId}/transactions/{transactionId}" + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())) + .replace("{transactionId}", ApiClient.urlEncode(transactionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/GetWebhookApi.java b/src/main/java/unit/java/sdk/api/GetWebhookApi.java new file mode 100644 index 00000000..481ddfce --- /dev/null +++ b/src/main/java/unit/java/sdk/api/GetWebhookApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitWebhookResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetWebhookApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public GetWebhookApi() { + this(new ApiClient()); + } + + public GetWebhookApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Webhook Id + * Get a Webhook from API + * @param webhookId ID of the webhook to get (required) + * @return UnitWebhookResponse + * @throws ApiException if fails to make API call + */ + public UnitWebhookResponse execute(String webhookId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(webhookId); + return localVarResponse.getData(); + } + + /** + * Get Webhook Id + * Get a Webhook from API + * @param webhookId ID of the webhook to get (required) + * @return ApiResponse<UnitWebhookResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String webhookId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(webhookId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String webhookId) throws ApiException { + // verify the required parameter 'webhookId' is set + if (webhookId == null) { + throw new ApiException(400, "Missing the required parameter 'webhookId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/webhooks/{webhookId}" + .replace("{webhookId}", ApiClient.urlEncode(webhookId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/ReopenAnAccountApi.java b/src/main/java/unit/java/sdk/api/ReopenAnAccountApi.java new file mode 100644 index 00000000..30da5186 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/ReopenAnAccountApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitAccountResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReopenAnAccountApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public ReopenAnAccountApi() { + this(new ApiClient()); + } + + public ReopenAnAccountApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Reopen an Account by Id + * Reopen an Account via API + * @param accountId ID of the account to close (required) + * @return UnitAccountResponse + * @throws ApiException if fails to make API call + */ + public UnitAccountResponse execute(String accountId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(accountId); + return localVarResponse.getData(); + } + + /** + * Reopen an Account by Id + * Reopen an Account via API + * @param accountId ID of the account to close (required) + * @return ApiResponse<UnitAccountResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String accountId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(accountId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String accountId) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException(400, "Missing the required parameter 'accountId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/{accountId}/reopen" + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/ReportCardAsLostApi.java b/src/main/java/unit/java/sdk/api/ReportCardAsLostApi.java new file mode 100644 index 00000000..91c9a574 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/ReportCardAsLostApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCardResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReportCardAsLostApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public ReportCardAsLostApi() { + this(new ApiClient()); + } + + public ReportCardAsLostApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Report lost as stolen + * Report lost as stolen via API + * @param cardId ID of the card (required) + * @return UnitCardResponse + * @throws ApiException if fails to make API call + */ + public UnitCardResponse execute(String cardId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(cardId); + return localVarResponse.getData(); + } + + /** + * Report lost as stolen + * Report lost as stolen via API + * @param cardId ID of the card (required) + * @return ApiResponse<UnitCardResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String cardId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(cardId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String cardId) throws ApiException { + // verify the required parameter 'cardId' is set + if (cardId == null) { + throw new ApiException(400, "Missing the required parameter 'cardId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/cards/{cardId}/report-lost" + .replace("{cardId}", ApiClient.urlEncode(cardId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/ReportCardAsStolenApi.java b/src/main/java/unit/java/sdk/api/ReportCardAsStolenApi.java new file mode 100644 index 00000000..c30c56d5 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/ReportCardAsStolenApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCardResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReportCardAsStolenApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public ReportCardAsStolenApi() { + this(new ApiClient()); + } + + public ReportCardAsStolenApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Report card as stolen + * Report card as stolen via API + * @param cardId ID of the card (required) + * @return UnitCardResponse + * @throws ApiException if fails to make API call + */ + public UnitCardResponse execute(String cardId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(cardId); + return localVarResponse.getData(); + } + + /** + * Report card as stolen + * Report card as stolen via API + * @param cardId ID of the card (required) + * @return ApiResponse<UnitCardResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String cardId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(cardId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String cardId) throws ApiException { + // verify the required parameter 'cardId' is set + if (cardId == null) { + throw new ApiException(400, "Missing the required parameter 'cardId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/cards/{cardId}/report-stolen" + .replace("{cardId}", ApiClient.urlEncode(cardId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/ReturnCheckPaymentApi.java b/src/main/java/unit/java/sdk/api/ReturnCheckPaymentApi.java new file mode 100644 index 00000000..a0d4ac42 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/ReturnCheckPaymentApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.ReturnCheckPaymentRequest; +import unit.java.sdk.model.UnitCheckPaymentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReturnCheckPaymentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public ReturnCheckPaymentApi() { + this(new ApiClient()); + } + + public ReturnCheckPaymentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Return Check Payment by Id + * Return a Check Payment via API + * @param checkPaymentId ID of the check payment to return (required) + * @param returnCheckPaymentRequest Return Check Payment Request (required) + * @return UnitCheckPaymentResponse + * @throws ApiException if fails to make API call + */ + public UnitCheckPaymentResponse execute(String checkPaymentId, ReturnCheckPaymentRequest returnCheckPaymentRequest) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(checkPaymentId, returnCheckPaymentRequest); + return localVarResponse.getData(); + } + + /** + * Return Check Payment by Id + * Return a Check Payment via API + * @param checkPaymentId ID of the check payment to return (required) + * @param returnCheckPaymentRequest Return Check Payment Request (required) + * @return ApiResponse<UnitCheckPaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String checkPaymentId, ReturnCheckPaymentRequest returnCheckPaymentRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(checkPaymentId, returnCheckPaymentRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String checkPaymentId, ReturnCheckPaymentRequest returnCheckPaymentRequest) throws ApiException { + // verify the required parameter 'checkPaymentId' is set + if (checkPaymentId == null) { + throw new ApiException(400, "Missing the required parameter 'checkPaymentId' when calling execute"); + } + // verify the required parameter 'returnCheckPaymentRequest' is set + if (returnCheckPaymentRequest == null) { + throw new ApiException(400, "Missing the required parameter 'returnCheckPaymentRequest' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/check-payments/{checkPaymentId}/return" + .replace("{checkPaymentId}", ApiClient.urlEncode(checkPaymentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(returnCheckPaymentRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/RevokeOrgApiTokenApi.java b/src/main/java/unit/java/sdk/api/RevokeOrgApiTokenApi.java new file mode 100644 index 00000000..a2e251a5 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/RevokeOrgApiTokenApi.java @@ -0,0 +1,163 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitApiTokenResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RevokeOrgApiTokenApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public RevokeOrgApiTokenApi() { + this(new ApiClient()); + } + + public RevokeOrgApiTokenApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get Reward by Id + * Get a Reward from API + * @param userId ID of the user to revoke token (required) + * @param tokenId ID of the token to revoke (required) + * @return UnitApiTokenResponse + * @throws ApiException if fails to make API call + */ + public UnitApiTokenResponse execute(String userId, String tokenId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(userId, tokenId); + return localVarResponse.getData(); + } + + /** + * Get Reward by Id + * Get a Reward from API + * @param userId ID of the user to revoke token (required) + * @param tokenId ID of the token to revoke (required) + * @return ApiResponse<UnitApiTokenResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String userId, String tokenId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(userId, tokenId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String userId, String tokenId) throws ApiException { + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException(400, "Missing the required parameter 'userId' when calling execute"); + } + // verify the required parameter 'tokenId' is set + if (tokenId == null) { + throw new ApiException(400, "Missing the required parameter 'tokenId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/users/{userId}/api-tokens/{tokenId}" + .replace("{userId}", ApiClient.urlEncode(userId.toString())) + .replace("{tokenId}", ApiClient.urlEncode(tokenId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/UnfreezeACardApi.java b/src/main/java/unit/java/sdk/api/UnfreezeACardApi.java new file mode 100644 index 00000000..2f0d8ec0 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/UnfreezeACardApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCardResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnfreezeACardApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UnfreezeACardApi() { + this(new ApiClient()); + } + + public UnfreezeACardApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Unfreeze a Card + * Unfreeze a Card via API + * @param cardId ID of the card to unfreeze (required) + * @return UnitCardResponse + * @throws ApiException if fails to make API call + */ + public UnitCardResponse execute(String cardId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(cardId); + return localVarResponse.getData(); + } + + /** + * Unfreeze a Card + * Unfreeze a Card via API + * @param cardId ID of the card to unfreeze (required) + * @return ApiResponse<UnitCardResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String cardId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(cardId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String cardId) throws ApiException { + // verify the required parameter 'cardId' is set + if (cardId == null) { + throw new ApiException(400, "Missing the required parameter 'cardId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/cards/{cardId}/unfreeze" + .replace("{cardId}", ApiClient.urlEncode(cardId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/UnfreezeAccountApi.java b/src/main/java/unit/java/sdk/api/UnfreezeAccountApi.java new file mode 100644 index 00000000..76fe2411 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/UnfreezeAccountApi.java @@ -0,0 +1,156 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitAccountResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnfreezeAccountApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UnfreezeAccountApi() { + this(new ApiClient()); + } + + public UnfreezeAccountApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Unfreeze Account by Id + * Unfreeze an Account via API + * @param accountId ID of the account to get (required) + * @return UnitAccountResponse + * @throws ApiException if fails to make API call + */ + public UnitAccountResponse execute(String accountId) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(accountId); + return localVarResponse.getData(); + } + + /** + * Unfreeze Account by Id + * Unfreeze an Account via API + * @param accountId ID of the account to get (required) + * @return ApiResponse<UnitAccountResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String accountId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(accountId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String accountId) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException(400, "Missing the required parameter 'accountId' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/{accountId}/unfreeze" + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/UpdateAccountApi.java b/src/main/java/unit/java/sdk/api/UpdateAccountApi.java new file mode 100644 index 00000000..df463837 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/UpdateAccountApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.PatchAccount; +import unit.java.sdk.model.UnitAccountResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateAccountApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UpdateAccountApi() { + this(new ApiClient()); + } + + public UpdateAccountApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Update Account + * Update an Account via API + * @param accountId ID of the account to update (required) + * @param patchAccount Update Account Request (required) + * @return UnitAccountResponse + * @throws ApiException if fails to make API call + */ + public UnitAccountResponse execute(String accountId, PatchAccount patchAccount) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(accountId, patchAccount); + return localVarResponse.getData(); + } + + /** + * Update Account + * Update an Account via API + * @param accountId ID of the account to update (required) + * @param patchAccount Update Account Request (required) + * @return ApiResponse<UnitAccountResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String accountId, PatchAccount patchAccount) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(accountId, patchAccount); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String accountId, PatchAccount patchAccount) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException(400, "Missing the required parameter 'accountId' when calling execute"); + } + // verify the required parameter 'patchAccount' is set + if (patchAccount == null) { + throw new ApiException(400, "Missing the required parameter 'patchAccount' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/{accountId}" + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(patchAccount); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/UpdateApplicationApi.java b/src/main/java/unit/java/sdk/api/UpdateApplicationApi.java new file mode 100644 index 00000000..0e9f0894 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/UpdateApplicationApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitApplicationResponseWithIncluded; +import unit.java.sdk.model.UpdateApplication; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateApplicationApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UpdateApplicationApi() { + this(new ApiClient()); + } + + public UpdateApplicationApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Update Application + * Update an Application via API + * @param applicationId ID of the application to update (required) + * @param updateApplication Update Application Request (required) + * @return UnitApplicationResponseWithIncluded + * @throws ApiException if fails to make API call + */ + public UnitApplicationResponseWithIncluded execute(String applicationId, UpdateApplication updateApplication) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(applicationId, updateApplication); + return localVarResponse.getData(); + } + + /** + * Update Application + * Update an Application via API + * @param applicationId ID of the application to update (required) + * @param updateApplication Update Application Request (required) + * @return ApiResponse<UnitApplicationResponseWithIncluded> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String applicationId, UpdateApplication updateApplication) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(applicationId, updateApplication); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String applicationId, UpdateApplication updateApplication) throws ApiException { + // verify the required parameter 'applicationId' is set + if (applicationId == null) { + throw new ApiException(400, "Missing the required parameter 'applicationId' when calling execute"); + } + // verify the required parameter 'updateApplication' is set + if (updateApplication == null) { + throw new ApiException(400, "Missing the required parameter 'updateApplication' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/applications/{applicationId}" + .replace("{applicationId}", ApiClient.urlEncode(applicationId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(updateApplication); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/UpdateCardApi.java b/src/main/java/unit/java/sdk/api/UpdateCardApi.java new file mode 100644 index 00000000..4742f3b9 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/UpdateCardApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCardResponse; +import unit.java.sdk.model.UpdateCard; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateCardApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UpdateCardApi() { + this(new ApiClient()); + } + + public UpdateCardApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Update Card + * Update a Card via API + * @param cardId ID of the card to update (required) + * @param updateCard Update Card Request (required) + * @return UnitCardResponse + * @throws ApiException if fails to make API call + */ + public UnitCardResponse execute(String cardId, UpdateCard updateCard) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(cardId, updateCard); + return localVarResponse.getData(); + } + + /** + * Update Card + * Update a Card via API + * @param cardId ID of the card to update (required) + * @param updateCard Update Card Request (required) + * @return ApiResponse<UnitCardResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String cardId, UpdateCard updateCard) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(cardId, updateCard); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String cardId, UpdateCard updateCard) throws ApiException { + // verify the required parameter 'cardId' is set + if (cardId == null) { + throw new ApiException(400, "Missing the required parameter 'cardId' when calling execute"); + } + // verify the required parameter 'updateCard' is set + if (updateCard == null) { + throw new ApiException(400, "Missing the required parameter 'updateCard' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/cards/{cardId}" + .replace("{cardId}", ApiClient.urlEncode(cardId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(updateCard); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/UpdateCheckDepositApi.java b/src/main/java/unit/java/sdk/api/UpdateCheckDepositApi.java new file mode 100644 index 00000000..39924fc4 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/UpdateCheckDepositApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCheckDepositResponse; +import unit.java.sdk.model.UpdateCheckDeposit; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateCheckDepositApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UpdateCheckDepositApi() { + this(new ApiClient()); + } + + public UpdateCheckDepositApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Update Check Deposit + * Update a Check Deposit via API + * @param checkDepositId ID of the check deposit to update (required) + * @param updateCheckDeposit Update Check Deposit Request (required) + * @return UnitCheckDepositResponse + * @throws ApiException if fails to make API call + */ + public UnitCheckDepositResponse execute(String checkDepositId, UpdateCheckDeposit updateCheckDeposit) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(checkDepositId, updateCheckDeposit); + return localVarResponse.getData(); + } + + /** + * Update Check Deposit + * Update a Check Deposit via API + * @param checkDepositId ID of the check deposit to update (required) + * @param updateCheckDeposit Update Check Deposit Request (required) + * @return ApiResponse<UnitCheckDepositResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String checkDepositId, UpdateCheckDeposit updateCheckDeposit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(checkDepositId, updateCheckDeposit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String checkDepositId, UpdateCheckDeposit updateCheckDeposit) throws ApiException { + // verify the required parameter 'checkDepositId' is set + if (checkDepositId == null) { + throw new ApiException(400, "Missing the required parameter 'checkDepositId' when calling execute"); + } + // verify the required parameter 'updateCheckDeposit' is set + if (updateCheckDeposit == null) { + throw new ApiException(400, "Missing the required parameter 'updateCheckDeposit' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/check-deposits/{checkDepositId}" + .replace("{checkDepositId}", ApiClient.urlEncode(checkDepositId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(updateCheckDeposit); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/UpdateCounterpartyApi.java b/src/main/java/unit/java/sdk/api/UpdateCounterpartyApi.java new file mode 100644 index 00000000..d1d13ee1 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/UpdateCounterpartyApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCounterpartyResponse; +import unit.java.sdk.model.UpdateCounterparty; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateCounterpartyApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UpdateCounterpartyApi() { + this(new ApiClient()); + } + + public UpdateCounterpartyApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Update Counterparty + * Update a Counterparty via API + * @param counterpartyId ID of the counterparty to update (required) + * @param updateCounterparty Update Counterparty Request (required) + * @return UnitCounterpartyResponse + * @throws ApiException if fails to make API call + */ + public UnitCounterpartyResponse execute(String counterpartyId, UpdateCounterparty updateCounterparty) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(counterpartyId, updateCounterparty); + return localVarResponse.getData(); + } + + /** + * Update Counterparty + * Update a Counterparty via API + * @param counterpartyId ID of the counterparty to update (required) + * @param updateCounterparty Update Counterparty Request (required) + * @return ApiResponse<UnitCounterpartyResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String counterpartyId, UpdateCounterparty updateCounterparty) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(counterpartyId, updateCounterparty); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String counterpartyId, UpdateCounterparty updateCounterparty) throws ApiException { + // verify the required parameter 'counterpartyId' is set + if (counterpartyId == null) { + throw new ApiException(400, "Missing the required parameter 'counterpartyId' when calling execute"); + } + // verify the required parameter 'updateCounterparty' is set + if (updateCounterparty == null) { + throw new ApiException(400, "Missing the required parameter 'updateCounterparty' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/counterparties/{counterpartyId}" + .replace("{counterpartyId}", ApiClient.urlEncode(counterpartyId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(updateCounterparty); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/UpdateCustomerApi.java b/src/main/java/unit/java/sdk/api/UpdateCustomerApi.java new file mode 100644 index 00000000..6094d416 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/UpdateCustomerApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitCustomerResponse; +import unit.java.sdk.model.UpdateCustomer; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateCustomerApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UpdateCustomerApi() { + this(new ApiClient()); + } + + public UpdateCustomerApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Update Customer + * Update an Customer via API + * @param customerId ID of the customer to update (required) + * @param updateCustomer Update Customer Request (required) + * @return UnitCustomerResponse + * @throws ApiException if fails to make API call + */ + public UnitCustomerResponse execute(String customerId, UpdateCustomer updateCustomer) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(customerId, updateCustomer); + return localVarResponse.getData(); + } + + /** + * Update Customer + * Update an Customer via API + * @param customerId ID of the customer to update (required) + * @param updateCustomer Update Customer Request (required) + * @return ApiResponse<UnitCustomerResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String customerId, UpdateCustomer updateCustomer) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(customerId, updateCustomer); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String customerId, UpdateCustomer updateCustomer) throws ApiException { + // verify the required parameter 'customerId' is set + if (customerId == null) { + throw new ApiException(400, "Missing the required parameter 'customerId' when calling execute"); + } + // verify the required parameter 'updateCustomer' is set + if (updateCustomer == null) { + throw new ApiException(400, "Missing the required parameter 'updateCustomer' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/customers/{customerId}" + .replace("{customerId}", ApiClient.urlEncode(customerId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(updateCustomer); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/UpdatePaymentApi.java b/src/main/java/unit/java/sdk/api/UpdatePaymentApi.java new file mode 100644 index 00000000..71f6e379 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/UpdatePaymentApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitPaymentResponse; +import unit.java.sdk.model.UpdatePayment; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdatePaymentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UpdatePaymentApi() { + this(new ApiClient()); + } + + public UpdatePaymentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Update Payment + * Update an Payment via API + * @param paymentId ID of the payment to update (required) + * @param updatePayment Update Payment Request (required) + * @return UnitPaymentResponse + * @throws ApiException if fails to make API call + */ + public UnitPaymentResponse execute(String paymentId, UpdatePayment updatePayment) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(paymentId, updatePayment); + return localVarResponse.getData(); + } + + /** + * Update Payment + * Update an Payment via API + * @param paymentId ID of the payment to update (required) + * @param updatePayment Update Payment Request (required) + * @return ApiResponse<UnitPaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String paymentId, UpdatePayment updatePayment) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(paymentId, updatePayment); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String paymentId, UpdatePayment updatePayment) throws ApiException { + // verify the required parameter 'paymentId' is set + if (paymentId == null) { + throw new ApiException(400, "Missing the required parameter 'paymentId' when calling execute"); + } + // verify the required parameter 'updatePayment' is set + if (updatePayment == null) { + throw new ApiException(400, "Missing the required parameter 'updatePayment' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/payments/{paymentId}" + .replace("{paymentId}", ApiClient.urlEncode(paymentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(updatePayment); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/UpdateReceivedPaymentApi.java b/src/main/java/unit/java/sdk/api/UpdateReceivedPaymentApi.java new file mode 100644 index 00000000..ac5975fc --- /dev/null +++ b/src/main/java/unit/java/sdk/api/UpdateReceivedPaymentApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitReceivedPaymentResponse; +import unit.java.sdk.model.UpdateReceivedPayment; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateReceivedPaymentApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UpdateReceivedPaymentApi() { + this(new ApiClient()); + } + + public UpdateReceivedPaymentApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Update Received Payment + * Update a Received Payment via API + * @param paymentId ID of the payment to update (required) + * @param updateReceivedPayment Update Received Payment Request (required) + * @return UnitReceivedPaymentResponse + * @throws ApiException if fails to make API call + */ + public UnitReceivedPaymentResponse execute(String paymentId, UpdateReceivedPayment updateReceivedPayment) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(paymentId, updateReceivedPayment); + return localVarResponse.getData(); + } + + /** + * Update Received Payment + * Update a Received Payment via API + * @param paymentId ID of the payment to update (required) + * @param updateReceivedPayment Update Received Payment Request (required) + * @return ApiResponse<UnitReceivedPaymentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String paymentId, UpdateReceivedPayment updateReceivedPayment) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(paymentId, updateReceivedPayment); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String paymentId, UpdateReceivedPayment updateReceivedPayment) throws ApiException { + // verify the required parameter 'paymentId' is set + if (paymentId == null) { + throw new ApiException(400, "Missing the required parameter 'paymentId' when calling execute"); + } + // verify the required parameter 'updateReceivedPayment' is set + if (updateReceivedPayment == null) { + throw new ApiException(400, "Missing the required parameter 'updateReceivedPayment' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/received-payments/{paymentId}" + .replace("{paymentId}", ApiClient.urlEncode(paymentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(updateReceivedPayment); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/UpdateTransactionApi.java b/src/main/java/unit/java/sdk/api/UpdateTransactionApi.java new file mode 100644 index 00000000..a586435a --- /dev/null +++ b/src/main/java/unit/java/sdk/api/UpdateTransactionApi.java @@ -0,0 +1,176 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitTransactionResponse1; +import unit.java.sdk.model.UpdateTransaction; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateTransactionApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UpdateTransactionApi() { + this(new ApiClient()); + } + + public UpdateTransactionApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Update Transaction + * Update a Transaction via API + * @param accountId ID of the account to update transaction from (required) + * @param transactionId ID of the transaction to update (required) + * @param updateTransaction Update Transaction Request (required) + * @return UnitTransactionResponse1 + * @throws ApiException if fails to make API call + */ + public UnitTransactionResponse1 execute(String accountId, String transactionId, UpdateTransaction updateTransaction) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(accountId, transactionId, updateTransaction); + return localVarResponse.getData(); + } + + /** + * Update Transaction + * Update a Transaction via API + * @param accountId ID of the account to update transaction from (required) + * @param transactionId ID of the transaction to update (required) + * @param updateTransaction Update Transaction Request (required) + * @return ApiResponse<UnitTransactionResponse1> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String accountId, String transactionId, UpdateTransaction updateTransaction) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(accountId, transactionId, updateTransaction); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String accountId, String transactionId, UpdateTransaction updateTransaction) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException(400, "Missing the required parameter 'accountId' when calling execute"); + } + // verify the required parameter 'transactionId' is set + if (transactionId == null) { + throw new ApiException(400, "Missing the required parameter 'transactionId' when calling execute"); + } + // verify the required parameter 'updateTransaction' is set + if (updateTransaction == null) { + throw new ApiException(400, "Missing the required parameter 'updateTransaction' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/{accountId}/transactions/{transactionId}" + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())) + .replace("{transactionId}", ApiClient.urlEncode(transactionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(updateTransaction); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/UpdateWebhookApi.java b/src/main/java/unit/java/sdk/api/UpdateWebhookApi.java new file mode 100644 index 00000000..4fb7cd77 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/UpdateWebhookApi.java @@ -0,0 +1,169 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitWebhookResponse; +import unit.java.sdk.model.UpdateUnitRequest; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateWebhookApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UpdateWebhookApi() { + this(new ApiClient()); + } + + public UpdateWebhookApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Update Webhook + * Update a Webhook via API + * @param webhookId ID of the Webhook to update (required) + * @param updateUnitRequest Update Webhook Request (required) + * @return UnitWebhookResponse + * @throws ApiException if fails to make API call + */ + public UnitWebhookResponse execute(String webhookId, UpdateUnitRequest updateUnitRequest) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(webhookId, updateUnitRequest); + return localVarResponse.getData(); + } + + /** + * Update Webhook + * Update a Webhook via API + * @param webhookId ID of the Webhook to update (required) + * @param updateUnitRequest Update Webhook Request (required) + * @return ApiResponse<UnitWebhookResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String webhookId, UpdateUnitRequest updateUnitRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(webhookId, updateUnitRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String webhookId, UpdateUnitRequest updateUnitRequest) throws ApiException { + // verify the required parameter 'webhookId' is set + if (webhookId == null) { + throw new ApiException(400, "Missing the required parameter 'webhookId' when calling execute"); + } + // verify the required parameter 'updateUnitRequest' is set + if (updateUnitRequest == null) { + throw new ApiException(400, "Missing the required parameter 'updateUnitRequest' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/webhooks/{webhookId}" + .replace("{webhookId}", ApiClient.urlEncode(webhookId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/vnd.api+json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(updateUnitRequest); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/UploadAJpegDocumentForAnApplicationApi.java b/src/main/java/unit/java/sdk/api/UploadAJpegDocumentForAnApplicationApi.java new file mode 100644 index 00000000..4d250e3e --- /dev/null +++ b/src/main/java/unit/java/sdk/api/UploadAJpegDocumentForAnApplicationApi.java @@ -0,0 +1,175 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitDocumentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UploadAJpegDocumentForAnApplicationApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UploadAJpegDocumentForAnApplicationApi() { + this(new ApiClient()); + } + + public UploadAJpegDocumentForAnApplicationApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Upload a JPEG document + * Upload a JPEG file via API + * @param applicationId ID of the application to upload a file to (required) + * @param documentId ID of the document to upload a file for (required) + * @param body Upload JPEG File (required) + * @return UnitDocumentResponse + * @throws ApiException if fails to make API call + */ + public UnitDocumentResponse execute(String applicationId, String documentId, Object body) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(applicationId, documentId, body); + return localVarResponse.getData(); + } + + /** + * Upload a JPEG document + * Upload a JPEG file via API + * @param applicationId ID of the application to upload a file to (required) + * @param documentId ID of the document to upload a file for (required) + * @param body Upload JPEG File (required) + * @return ApiResponse<UnitDocumentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String applicationId, String documentId, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(applicationId, documentId, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String applicationId, String documentId, Object body) throws ApiException { + // verify the required parameter 'applicationId' is set + if (applicationId == null) { + throw new ApiException(400, "Missing the required parameter 'applicationId' when calling execute"); + } + // verify the required parameter 'documentId' is set + if (documentId == null) { + throw new ApiException(400, "Missing the required parameter 'documentId' when calling execute"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/applications/{applicationId}/documents/{documentId}/?" + .replace("{applicationId}", ApiClient.urlEncode(applicationId.toString())) + .replace("{documentId}", ApiClient.urlEncode(documentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "image/jpeg"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/UploadAJpegDocumentForAnApplicationBackSideApi.java b/src/main/java/unit/java/sdk/api/UploadAJpegDocumentForAnApplicationBackSideApi.java new file mode 100644 index 00000000..54f0ae68 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/UploadAJpegDocumentForAnApplicationBackSideApi.java @@ -0,0 +1,175 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitDocumentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UploadAJpegDocumentForAnApplicationBackSideApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UploadAJpegDocumentForAnApplicationBackSideApi() { + this(new ApiClient()); + } + + public UploadAJpegDocumentForAnApplicationBackSideApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Upload a JPEG document - Back Side + * Upload a JPEG file via API - Back Side + * @param applicationId ID of the application to upload a file to (required) + * @param documentId ID of the document to upload a file for (required) + * @param body Upload JPEG File - Back Side (required) + * @return UnitDocumentResponse + * @throws ApiException if fails to make API call + */ + public UnitDocumentResponse execute(String applicationId, String documentId, Object body) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(applicationId, documentId, body); + return localVarResponse.getData(); + } + + /** + * Upload a JPEG document - Back Side + * Upload a JPEG file via API - Back Side + * @param applicationId ID of the application to upload a file to (required) + * @param documentId ID of the document to upload a file for (required) + * @param body Upload JPEG File - Back Side (required) + * @return ApiResponse<UnitDocumentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String applicationId, String documentId, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(applicationId, documentId, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String applicationId, String documentId, Object body) throws ApiException { + // verify the required parameter 'applicationId' is set + if (applicationId == null) { + throw new ApiException(400, "Missing the required parameter 'applicationId' when calling execute"); + } + // verify the required parameter 'documentId' is set + if (documentId == null) { + throw new ApiException(400, "Missing the required parameter 'documentId' when calling execute"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/applications/{applicationId}/documents/{documentId}/back/?" + .replace("{applicationId}", ApiClient.urlEncode(applicationId.toString())) + .replace("{documentId}", ApiClient.urlEncode(documentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "image/jpeg"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/UploadAPdfDocumentForAnApplicationApi.java b/src/main/java/unit/java/sdk/api/UploadAPdfDocumentForAnApplicationApi.java new file mode 100644 index 00000000..e87b3319 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/UploadAPdfDocumentForAnApplicationApi.java @@ -0,0 +1,175 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitDocumentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UploadAPdfDocumentForAnApplicationApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UploadAPdfDocumentForAnApplicationApi() { + this(new ApiClient()); + } + + public UploadAPdfDocumentForAnApplicationApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Upload a PDF document + * Upload a PDF file via API + * @param applicationId ID of the application to upload a file to (required) + * @param documentId ID of the document to upload a file for (required) + * @param body Upload PDF File (required) + * @return UnitDocumentResponse + * @throws ApiException if fails to make API call + */ + public UnitDocumentResponse execute(String applicationId, String documentId, Object body) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(applicationId, documentId, body); + return localVarResponse.getData(); + } + + /** + * Upload a PDF document + * Upload a PDF file via API + * @param applicationId ID of the application to upload a file to (required) + * @param documentId ID of the document to upload a file for (required) + * @param body Upload PDF File (required) + * @return ApiResponse<UnitDocumentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String applicationId, String documentId, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(applicationId, documentId, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String applicationId, String documentId, Object body) throws ApiException { + // verify the required parameter 'applicationId' is set + if (applicationId == null) { + throw new ApiException(400, "Missing the required parameter 'applicationId' when calling execute"); + } + // verify the required parameter 'documentId' is set + if (documentId == null) { + throw new ApiException(400, "Missing the required parameter 'documentId' when calling execute"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/applications/{applicationId}/documents/{documentId}" + .replace("{applicationId}", ApiClient.urlEncode(applicationId.toString())) + .replace("{documentId}", ApiClient.urlEncode(documentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/pdf"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/UploadAPdfDocumentForAnApplicationBackSideApi.java b/src/main/java/unit/java/sdk/api/UploadAPdfDocumentForAnApplicationBackSideApi.java new file mode 100644 index 00000000..02e1578a --- /dev/null +++ b/src/main/java/unit/java/sdk/api/UploadAPdfDocumentForAnApplicationBackSideApi.java @@ -0,0 +1,175 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitDocumentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UploadAPdfDocumentForAnApplicationBackSideApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UploadAPdfDocumentForAnApplicationBackSideApi() { + this(new ApiClient()); + } + + public UploadAPdfDocumentForAnApplicationBackSideApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Upload a PDF document - Back Side + * Upload a PDF file via API - Back Side + * @param applicationId ID of the application to upload a file to (required) + * @param documentId ID of the document to upload a file for (required) + * @param body Upload PDF File - Back Side (required) + * @return UnitDocumentResponse + * @throws ApiException if fails to make API call + */ + public UnitDocumentResponse execute(String applicationId, String documentId, Object body) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(applicationId, documentId, body); + return localVarResponse.getData(); + } + + /** + * Upload a PDF document - Back Side + * Upload a PDF file via API - Back Side + * @param applicationId ID of the application to upload a file to (required) + * @param documentId ID of the document to upload a file for (required) + * @param body Upload PDF File - Back Side (required) + * @return ApiResponse<UnitDocumentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String applicationId, String documentId, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(applicationId, documentId, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String applicationId, String documentId, Object body) throws ApiException { + // verify the required parameter 'applicationId' is set + if (applicationId == null) { + throw new ApiException(400, "Missing the required parameter 'applicationId' when calling execute"); + } + // verify the required parameter 'documentId' is set + if (documentId == null) { + throw new ApiException(400, "Missing the required parameter 'documentId' when calling execute"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/applications/{applicationId}/documents/{documentId}/back" + .replace("{applicationId}", ApiClient.urlEncode(applicationId.toString())) + .replace("{documentId}", ApiClient.urlEncode(documentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/pdf"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/UploadAPngDocumentForAnApplicationApi.java b/src/main/java/unit/java/sdk/api/UploadAPngDocumentForAnApplicationApi.java new file mode 100644 index 00000000..48eae961 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/UploadAPngDocumentForAnApplicationApi.java @@ -0,0 +1,175 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitDocumentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UploadAPngDocumentForAnApplicationApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UploadAPngDocumentForAnApplicationApi() { + this(new ApiClient()); + } + + public UploadAPngDocumentForAnApplicationApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Upload a PNG document + * Upload a PNG file via API + * @param applicationId ID of the application to upload a file to (required) + * @param documentId ID of the document to upload a file for (required) + * @param body Upload PNG File (required) + * @return UnitDocumentResponse + * @throws ApiException if fails to make API call + */ + public UnitDocumentResponse execute(String applicationId, String documentId, Object body) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(applicationId, documentId, body); + return localVarResponse.getData(); + } + + /** + * Upload a PNG document + * Upload a PNG file via API + * @param applicationId ID of the application to upload a file to (required) + * @param documentId ID of the document to upload a file for (required) + * @param body Upload PNG File (required) + * @return ApiResponse<UnitDocumentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String applicationId, String documentId, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(applicationId, documentId, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String applicationId, String documentId, Object body) throws ApiException { + // verify the required parameter 'applicationId' is set + if (applicationId == null) { + throw new ApiException(400, "Missing the required parameter 'applicationId' when calling execute"); + } + // verify the required parameter 'documentId' is set + if (documentId == null) { + throw new ApiException(400, "Missing the required parameter 'documentId' when calling execute"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/applications/{applicationId}/documents/{documentId}/" + .replace("{applicationId}", ApiClient.urlEncode(applicationId.toString())) + .replace("{documentId}", ApiClient.urlEncode(documentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "image/png"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/UploadAPngDocumentForAnApplicationBackSideApi.java b/src/main/java/unit/java/sdk/api/UploadAPngDocumentForAnApplicationBackSideApi.java new file mode 100644 index 00000000..193ac5a2 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/UploadAPngDocumentForAnApplicationBackSideApi.java @@ -0,0 +1,175 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitDocumentResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UploadAPngDocumentForAnApplicationBackSideApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UploadAPngDocumentForAnApplicationBackSideApi() { + this(new ApiClient()); + } + + public UploadAPngDocumentForAnApplicationBackSideApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Upload a PNG document - Back Side + * Upload a PNG file via API - Back Side + * @param applicationId ID of the application to upload a file to (required) + * @param documentId ID of the document to upload a file for (required) + * @param body Upload PNG File - Back Side (required) + * @return UnitDocumentResponse + * @throws ApiException if fails to make API call + */ + public UnitDocumentResponse execute(String applicationId, String documentId, Object body) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(applicationId, documentId, body); + return localVarResponse.getData(); + } + + /** + * Upload a PNG document - Back Side + * Upload a PNG file via API - Back Side + * @param applicationId ID of the application to upload a file to (required) + * @param documentId ID of the document to upload a file for (required) + * @param body Upload PNG File - Back Side (required) + * @return ApiResponse<UnitDocumentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String applicationId, String documentId, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(applicationId, documentId, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String applicationId, String documentId, Object body) throws ApiException { + // verify the required parameter 'applicationId' is set + if (applicationId == null) { + throw new ApiException(400, "Missing the required parameter 'applicationId' when calling execute"); + } + // verify the required parameter 'documentId' is set + if (documentId == null) { + throw new ApiException(400, "Missing the required parameter 'documentId' when calling execute"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/applications/{applicationId}/documents/{documentId}/back/" + .replace("{applicationId}", ApiClient.urlEncode(applicationId.toString())) + .replace("{documentId}", ApiClient.urlEncode(documentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "image/png"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/unit/java/sdk/api/VerifyADocumentForAnApplicationApi.java b/src/main/java/unit/java/sdk/api/VerifyADocumentForAnApplicationApi.java new file mode 100644 index 00000000..84c2e721 --- /dev/null +++ b/src/main/java/unit/java/sdk/api/VerifyADocumentForAnApplicationApi.java @@ -0,0 +1,176 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package unit.java.sdk.api; + +import unit.java.sdk.ApiClient; +import unit.java.sdk.ApiException; +import unit.java.sdk.ApiResponse; +import unit.java.sdk.Pair; + +import unit.java.sdk.model.UnitDocumentResponse; +import unit.java.sdk.model.VerifyDocument; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class VerifyADocumentForAnApplicationApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public VerifyADocumentForAnApplicationApi() { + this(new ApiClient()); + } + + public VerifyADocumentForAnApplicationApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Verify a document + * Verify a document via API + * @param applicationId ID of the application to verify a file for (required) + * @param documentId ID of the document to verify (required) + * @param verifyDocument Verify Document (required) + * @return UnitDocumentResponse + * @throws ApiException if fails to make API call + */ + public UnitDocumentResponse execute(String applicationId, String documentId, VerifyDocument verifyDocument) throws ApiException { + ApiResponse localVarResponse = executeWithHttpInfo(applicationId, documentId, verifyDocument); + return localVarResponse.getData(); + } + + /** + * Verify a document + * Verify a document via API + * @param applicationId ID of the application to verify a file for (required) + * @param documentId ID of the document to verify (required) + * @param verifyDocument Verify Document (required) + * @return ApiResponse<UnitDocumentResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeWithHttpInfo(String applicationId, String documentId, VerifyDocument verifyDocument) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRequestBuilder(applicationId, documentId, verifyDocument); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("execute", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRequestBuilder(String applicationId, String documentId, VerifyDocument verifyDocument) throws ApiException { + // verify the required parameter 'applicationId' is set + if (applicationId == null) { + throw new ApiException(400, "Missing the required parameter 'applicationId' when calling execute"); + } + // verify the required parameter 'documentId' is set + if (documentId == null) { + throw new ApiException(400, "Missing the required parameter 'documentId' when calling execute"); + } + // verify the required parameter 'verifyDocument' is set + if (verifyDocument == null) { + throw new ApiException(400, "Missing the required parameter 'verifyDocument' when calling execute"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/applications/{applicationId}/documents/{documentId}/verify" + .replace("{applicationId}", ApiClient.urlEncode(applicationId.toString())) + .replace("{documentId}", ApiClient.urlEncode(documentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/vnd.api+json; charset=utf-8"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(verifyDocument); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/src/main/java/unit/java/sdk/model/AbstractOpenApiSchema.java similarity index 93% rename from src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java rename to src/main/java/unit/java/sdk/model/AbstractOpenApiSchema.java index 131471be..e77b53ea 100644 --- a/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ b/src/main/java/unit/java/sdk/model/AbstractOpenApiSchema.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.0.2 + * The version of the OpenAPI document: 0.0.3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,19 +11,18 @@ */ -package org.openapitools.client.model; +package unit.java.sdk.model; -import org.openapitools.client.ApiException; import java.util.Objects; import java.lang.reflect.Type; import java.util.Map; -//import com.fasterxml.jackson.annotation.JsonValue; +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") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object @@ -52,7 +51,7 @@ public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { * * @return an instance of the actual schema/object */ - //@JsonValue + @JsonValue public Object getActualInstance() {return instance;} /** diff --git a/src/main/java/unit/java/sdk/model/Account.java b/src/main/java/unit/java/sdk/model/Account.java new file mode 100644 index 00000000..cbf13d5a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Account.java @@ -0,0 +1,208 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * Account + */ +@JsonPropertyOrder({ + Account.JSON_PROPERTY_ID, + Account.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = CreditAccount.class, name = "creditAccount"), + @JsonSubTypes.Type(value = DepositAccount.class, name = "depositAccount"), +}) + +public class Account { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public Account() { + } + + public Account id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public Account type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + /** + * Return true if this account object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Account account = (Account) o; + return Objects.equals(this.id, account.id) && + Objects.equals(this.type, account.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Account {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("creditAccount", CreditAccount.class); + mappings.put("depositAccount", DepositAccount.class); + mappings.put("account", Account.class); + JSON.registerDiscriminator(Account.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/AccountEndOfDay.java b/src/main/java/unit/java/sdk/model/AccountEndOfDay.java new file mode 100644 index 00000000..92e82b81 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AccountEndOfDay.java @@ -0,0 +1,293 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountEndOfDayAttributes; +import unit.java.sdk.model.Relationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AccountEndOfDay + */ +@JsonPropertyOrder({ + AccountEndOfDay.JSON_PROPERTY_TYPE, + AccountEndOfDay.JSON_PROPERTY_ID, + AccountEndOfDay.JSON_PROPERTY_ATTRIBUTES, + AccountEndOfDay.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AccountEndOfDay { + /** + * Gets or Sets type + */ + public enum TypeEnum { + ACCOUNTENDOFDAY("accountEndOfDay"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AccountEndOfDayAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private Relationships relationships; + + public AccountEndOfDay() { + } + + public AccountEndOfDay type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public AccountEndOfDay id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + public AccountEndOfDay attributes(AccountEndOfDayAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AccountEndOfDayAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(AccountEndOfDayAttributes attributes) { + this.attributes = attributes; + } + + + public AccountEndOfDay relationships(Relationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(Relationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this account_end_of_day object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountEndOfDay accountEndOfDay = (AccountEndOfDay) o; + return Objects.equals(this.type, accountEndOfDay.type) && + Objects.equals(this.id, accountEndOfDay.id) && + Objects.equals(this.attributes, accountEndOfDay.attributes) && + Objects.equals(this.relationships, accountEndOfDay.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountEndOfDay {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AccountEndOfDayAttributes.java b/src/main/java/unit/java/sdk/model/AccountEndOfDayAttributes.java new file mode 100644 index 00000000..2915b7c6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AccountEndOfDayAttributes.java @@ -0,0 +1,295 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AccountEndOfDayAttributes + */ +@JsonPropertyOrder({ + AccountEndOfDayAttributes.JSON_PROPERTY_DATE, + AccountEndOfDayAttributes.JSON_PROPERTY_BALANCE, + AccountEndOfDayAttributes.JSON_PROPERTY_HOLD, + AccountEndOfDayAttributes.JSON_PROPERTY_AVAILABLE, + AccountEndOfDayAttributes.JSON_PROPERTY_OVERDRAFT_LIMIT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AccountEndOfDayAttributes { + public static final String JSON_PROPERTY_DATE = "date"; + private LocalDate date; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_HOLD = "hold"; + private Integer hold; + + public static final String JSON_PROPERTY_AVAILABLE = "available"; + private Integer available; + + public static final String JSON_PROPERTY_OVERDRAFT_LIMIT = "overdraftLimit"; + private Integer overdraftLimit; + + public AccountEndOfDayAttributes() { + } + + public AccountEndOfDayAttributes date(LocalDate date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LocalDate getDate() { + return date; + } + + + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDate(LocalDate date) { + this.date = date; + } + + + public AccountEndOfDayAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public AccountEndOfDayAttributes hold(Integer hold) { + this.hold = hold; + return this; + } + + /** + * Get hold + * @return hold + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getHold() { + return hold; + } + + + @JsonProperty(JSON_PROPERTY_HOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHold(Integer hold) { + this.hold = hold; + } + + + public AccountEndOfDayAttributes available(Integer available) { + this.available = available; + return this; + } + + /** + * Get available + * @return available + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAvailable() { + return available; + } + + + @JsonProperty(JSON_PROPERTY_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAvailable(Integer available) { + this.available = available; + } + + + public AccountEndOfDayAttributes overdraftLimit(Integer overdraftLimit) { + this.overdraftLimit = overdraftLimit; + return this; + } + + /** + * Get overdraftLimit + * @return overdraftLimit + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OVERDRAFT_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getOverdraftLimit() { + return overdraftLimit; + } + + + @JsonProperty(JSON_PROPERTY_OVERDRAFT_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOverdraftLimit(Integer overdraftLimit) { + this.overdraftLimit = overdraftLimit; + } + + + /** + * Return true if this account_end_of_day_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountEndOfDayAttributes accountEndOfDayAttributes = (AccountEndOfDayAttributes) o; + return Objects.equals(this.date, accountEndOfDayAttributes.date) && + Objects.equals(this.balance, accountEndOfDayAttributes.balance) && + Objects.equals(this.hold, accountEndOfDayAttributes.hold) && + Objects.equals(this.available, accountEndOfDayAttributes.available) && + Objects.equals(this.overdraftLimit, accountEndOfDayAttributes.overdraftLimit); + } + + @Override + public int hashCode() { + return Objects.hash(date, balance, hold, available, overdraftLimit); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountEndOfDayAttributes {\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" hold: ").append(toIndentedString(hold)).append("\n"); + sb.append(" available: ").append(toIndentedString(available)).append("\n"); + sb.append(" overdraftLimit: ").append(toIndentedString(overdraftLimit)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `date` to the URL query string + if (getDate() != null) { + joiner.add(String.format("%sdate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `hold` to the URL query string + if (getHold() != null) { + joiner.add(String.format("%shold%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getHold()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `available` to the URL query string + if (getAvailable() != null) { + joiner.add(String.format("%savailable%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAvailable()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `overdraftLimit` to the URL query string + if (getOverdraftLimit() != null) { + joiner.add(String.format("%soverdraftLimit%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOverdraftLimit()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AccountLowBalanceClosureTransaction.java b/src/main/java/unit/java/sdk/model/AccountLowBalanceClosureTransaction.java new file mode 100644 index 00000000..8b35e63f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AccountLowBalanceClosureTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountLowBalanceClosureTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * AccountLowBalanceClosureTransaction + */ +@JsonPropertyOrder({ + AccountLowBalanceClosureTransaction.JSON_PROPERTY_ATTRIBUTES, + AccountLowBalanceClosureTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class AccountLowBalanceClosureTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AccountLowBalanceClosureTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public AccountLowBalanceClosureTransaction() { + } + + public AccountLowBalanceClosureTransaction attributes(AccountLowBalanceClosureTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AccountLowBalanceClosureTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(AccountLowBalanceClosureTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public AccountLowBalanceClosureTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public AccountLowBalanceClosureTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public AccountLowBalanceClosureTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this AccountLowBalanceClosureTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountLowBalanceClosureTransaction accountLowBalanceClosureTransaction = (AccountLowBalanceClosureTransaction) o; + return Objects.equals(this.attributes, accountLowBalanceClosureTransaction.attributes) && + Objects.equals(this.relationships, accountLowBalanceClosureTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountLowBalanceClosureTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AccountLowBalanceClosureTransaction", AccountLowBalanceClosureTransaction.class); + JSON.registerDiscriminator(AccountLowBalanceClosureTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/AccountLowBalanceClosureTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/AccountLowBalanceClosureTransactionAllOfAttributes.java new file mode 100644 index 00000000..774f7fc9 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AccountLowBalanceClosureTransactionAllOfAttributes.java @@ -0,0 +1,366 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AccountLowBalanceClosureTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + AccountLowBalanceClosureTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + AccountLowBalanceClosureTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + AccountLowBalanceClosureTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + AccountLowBalanceClosureTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + AccountLowBalanceClosureTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + AccountLowBalanceClosureTransactionAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AccountLowBalanceClosureTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public AccountLowBalanceClosureTransactionAllOfAttributes() { + } + + public AccountLowBalanceClosureTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public AccountLowBalanceClosureTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public AccountLowBalanceClosureTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public AccountLowBalanceClosureTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public AccountLowBalanceClosureTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public AccountLowBalanceClosureTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this AccountLowBalanceClosureTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountLowBalanceClosureTransactionAllOfAttributes accountLowBalanceClosureTransactionAllOfAttributes = (AccountLowBalanceClosureTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, accountLowBalanceClosureTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, accountLowBalanceClosureTransactionAllOfAttributes.direction) && + Objects.equals(this.amount, accountLowBalanceClosureTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, accountLowBalanceClosureTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, accountLowBalanceClosureTransactionAllOfAttributes.summary) && + Objects.equals(this.tags, accountLowBalanceClosureTransactionAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, amount, balance, summary, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountLowBalanceClosureTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AccountRelationship.java b/src/main/java/unit/java/sdk/model/AccountRelationship.java new file mode 100644 index 00000000..86d39caa --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AccountRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountRelationshipData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AccountRelationship + */ +@JsonPropertyOrder({ + AccountRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AccountRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private AccountRelationshipData data; + + public AccountRelationship() { + } + + public AccountRelationship data(AccountRelationshipData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AccountRelationshipData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(AccountRelationshipData data) { + this.data = data; + } + + + /** + * Return true if this accountRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountRelationship accountRelationship = (AccountRelationship) o; + return Objects.equals(this.data, accountRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AccountRelationship1.java b/src/main/java/unit/java/sdk/model/AccountRelationship1.java new file mode 100644 index 00000000..9c5b90ac --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AccountRelationship1.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountRelationshipData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AccountRelationship1 + */ +@JsonPropertyOrder({ + AccountRelationship1.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AccountRelationship1 { + public static final String JSON_PROPERTY_DATA = "data"; + private AccountRelationshipData data; + + public AccountRelationship1() { + } + + public AccountRelationship1 data(AccountRelationshipData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AccountRelationshipData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(AccountRelationshipData data) { + this.data = data; + } + + + /** + * Return true if this accountRelationship_1 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountRelationship1 accountRelationship1 = (AccountRelationship1) o; + return Objects.equals(this.data, accountRelationship1.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountRelationship1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AccountRelationship2.java b/src/main/java/unit/java/sdk/model/AccountRelationship2.java new file mode 100644 index 00000000..bf2c68f3 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AccountRelationship2.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountRelationship2Data; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AccountRelationship2 + */ +@JsonPropertyOrder({ + AccountRelationship2.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AccountRelationship2 { + public static final String JSON_PROPERTY_DATA = "data"; + private AccountRelationship2Data data; + + public AccountRelationship2() { + } + + public AccountRelationship2 data(AccountRelationship2Data data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AccountRelationship2Data getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(AccountRelationship2Data data) { + this.data = data; + } + + + /** + * Return true if this accountRelationship_2 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountRelationship2 accountRelationship2 = (AccountRelationship2) o; + return Objects.equals(this.data, accountRelationship2.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountRelationship2 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AccountRelationship2Data.java b/src/main/java/unit/java/sdk/model/AccountRelationship2Data.java new file mode 100644 index 00000000..6238528f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AccountRelationship2Data.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AccountRelationship2Data + */ +@JsonPropertyOrder({ + AccountRelationship2Data.JSON_PROPERTY_TYPE, + AccountRelationship2Data.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AccountRelationship2Data { + /** + * Gets or Sets type + */ + public enum TypeEnum { + DEPOSITACCOUNT("depositAccount"), + + GLACCOUNT("glAccount"), + + ACCOUNT("account"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public AccountRelationship2Data() { + } + + public AccountRelationship2Data type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public AccountRelationship2Data id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this accountRelationship_2_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountRelationship2Data accountRelationship2Data = (AccountRelationship2Data) o; + return Objects.equals(this.type, accountRelationship2Data.type) && + Objects.equals(this.id, accountRelationship2Data.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountRelationship2Data {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AccountRelationshipData.java b/src/main/java/unit/java/sdk/model/AccountRelationshipData.java new file mode 100644 index 00000000..ccd595e2 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AccountRelationshipData.java @@ -0,0 +1,225 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AccountRelationshipData + */ +@JsonPropertyOrder({ + AccountRelationshipData.JSON_PROPERTY_TYPE, + AccountRelationshipData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AccountRelationshipData { + /** + * Gets or Sets type + */ + public enum TypeEnum { + ACCOUNT("account"), + + DEPOSITACCOUNT("depositAccount"), + + CREDITACCOUNT("creditAccount"), + + BATCHACCOUNT("batchAccount"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public AccountRelationshipData() { + } + + public AccountRelationshipData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public AccountRelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this accountRelationship_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountRelationshipData accountRelationshipData = (AccountRelationshipData) o; + return Objects.equals(this.type, accountRelationshipData.type) && + Objects.equals(this.id, accountRelationshipData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountRelationshipData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AchPayment.java b/src/main/java/unit/java/sdk/model/AchPayment.java new file mode 100644 index 00000000..d6d39a34 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AchPayment.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AchPaymentAllOfAttributes; +import unit.java.sdk.model.Payment; +import unit.java.sdk.model.PaymentRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * AchPayment + */ +@JsonPropertyOrder({ + AchPayment.JSON_PROPERTY_ATTRIBUTES, + AchPayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class AchPayment extends Payment { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AchPaymentAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private PaymentRelationships relationships; + + public AchPayment() { + } + + public AchPayment attributes(AchPaymentAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AchPaymentAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(AchPaymentAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public AchPayment relationships(PaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(PaymentRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public AchPayment type(String type) { + this.setType(type); + return this; + } + + @Override + public AchPayment id(String id) { + this.setId(id); + return this; + } + + /** + * Return true if this AchPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AchPayment achPayment = (AchPayment) o; + return Objects.equals(this.attributes, achPayment.attributes) && + Objects.equals(this.relationships, achPayment.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AchPayment {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(String.format("%srelationships%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRelationships()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AchPayment", AchPayment.class); + JSON.registerDiscriminator(AchPayment.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/AchPaymentAllOfAttributes.java b/src/main/java/unit/java/sdk/model/AchPaymentAllOfAttributes.java new file mode 100644 index 00000000..244aad76 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AchPaymentAllOfAttributes.java @@ -0,0 +1,772 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AchPaymentAllOfAttributes + */ +@JsonPropertyOrder({ + AchPaymentAllOfAttributes.JSON_PROPERTY_CREATED_AT, + AchPaymentAllOfAttributes.JSON_PROPERTY_AMOUNT, + AchPaymentAllOfAttributes.JSON_PROPERTY_DIRECTION, + AchPaymentAllOfAttributes.JSON_PROPERTY_DESCRIPTION, + AchPaymentAllOfAttributes.JSON_PROPERTY_ADDENDA, + AchPaymentAllOfAttributes.JSON_PROPERTY_COUNTERPARTY, + AchPaymentAllOfAttributes.JSON_PROPERTY_TAGS, + AchPaymentAllOfAttributes.JSON_PROPERTY_STATUS, + AchPaymentAllOfAttributes.JSON_PROPERTY_SETTLEMENT_DATE, + AchPaymentAllOfAttributes.JSON_PROPERTY_REASON, + AchPaymentAllOfAttributes.JSON_PROPERTY_EXPECTED_COMPLETION_DATE, + AchPaymentAllOfAttributes.JSON_PROPERTY_SEC_CODE, + AchPaymentAllOfAttributes.JSON_PROPERTY_TRACE_NUMBER, + AchPaymentAllOfAttributes.JSON_PROPERTY_SAME_DAY, + AchPaymentAllOfAttributes.JSON_PROPERTY_COUNTERPARTY_VERIFICATION_METHOD, + AchPaymentAllOfAttributes.JSON_PROPERTY_CLEARING_DAYS_OVERRIDE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AchPaymentAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ADDENDA = "addenda"; + private String addenda; + + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; + private Counterparty counterparty; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + PENDING("Pending"), + + REJECTED("Rejected"), + + CLEARING("Clearing"), + + SENT("Sent"), + + CANCELED("Canceled"), + + RETURNED("Returned"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_SETTLEMENT_DATE = "settlementDate"; + private LocalDate settlementDate; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public static final String JSON_PROPERTY_EXPECTED_COMPLETION_DATE = "expectedCompletionDate"; + private LocalDate expectedCompletionDate; + + public static final String JSON_PROPERTY_SEC_CODE = "secCode"; + private String secCode; + + public static final String JSON_PROPERTY_TRACE_NUMBER = "traceNumber"; + private String traceNumber; + + public static final String JSON_PROPERTY_SAME_DAY = "sameDay"; + private Boolean sameDay; + + public static final String JSON_PROPERTY_COUNTERPARTY_VERIFICATION_METHOD = "counterpartyVerificationMethod"; + private String counterpartyVerificationMethod; + + public static final String JSON_PROPERTY_CLEARING_DAYS_OVERRIDE = "clearingDaysOverride"; + private Integer clearingDaysOverride; + + public AchPaymentAllOfAttributes() { + } + + public AchPaymentAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public AchPaymentAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public AchPaymentAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public AchPaymentAllOfAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public AchPaymentAllOfAttributes addenda(String addenda) { + this.addenda = addenda; + return this; + } + + /** + * Get addenda + * @return addenda + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAddenda() { + return addenda; + } + + + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddenda(String addenda) { + this.addenda = addenda; + } + + + public AchPaymentAllOfAttributes counterparty(Counterparty counterparty) { + this.counterparty = counterparty; + return this; + } + + /** + * Get counterparty + * @return counterparty + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Counterparty getCounterparty() { + return counterparty; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterparty(Counterparty counterparty) { + this.counterparty = counterparty; + } + + + public AchPaymentAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public AchPaymentAllOfAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public AchPaymentAllOfAttributes settlementDate(LocalDate settlementDate) { + this.settlementDate = settlementDate; + return this; + } + + /** + * Get settlementDate + * @return settlementDate + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTLEMENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getSettlementDate() { + return settlementDate; + } + + + @JsonProperty(JSON_PROPERTY_SETTLEMENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSettlementDate(LocalDate settlementDate) { + this.settlementDate = settlementDate; + } + + + public AchPaymentAllOfAttributes reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(String reason) { + this.reason = reason; + } + + + public AchPaymentAllOfAttributes expectedCompletionDate(LocalDate expectedCompletionDate) { + this.expectedCompletionDate = expectedCompletionDate; + return this; + } + + /** + * Get expectedCompletionDate + * @return expectedCompletionDate + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPECTED_COMPLETION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getExpectedCompletionDate() { + return expectedCompletionDate; + } + + + @JsonProperty(JSON_PROPERTY_EXPECTED_COMPLETION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpectedCompletionDate(LocalDate expectedCompletionDate) { + this.expectedCompletionDate = expectedCompletionDate; + } + + + public AchPaymentAllOfAttributes secCode(String secCode) { + this.secCode = secCode; + return this; + } + + /** + * Get secCode + * @return secCode + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEC_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSecCode() { + return secCode; + } + + + @JsonProperty(JSON_PROPERTY_SEC_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSecCode(String secCode) { + this.secCode = secCode; + } + + + public AchPaymentAllOfAttributes traceNumber(String traceNumber) { + this.traceNumber = traceNumber; + return this; + } + + /** + * Get traceNumber + * @return traceNumber + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTraceNumber() { + return traceNumber; + } + + + @JsonProperty(JSON_PROPERTY_TRACE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTraceNumber(String traceNumber) { + this.traceNumber = traceNumber; + } + + + public AchPaymentAllOfAttributes sameDay(Boolean sameDay) { + this.sameDay = sameDay; + return this; + } + + /** + * Get sameDay + * @return sameDay + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAME_DAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSameDay() { + return sameDay; + } + + + @JsonProperty(JSON_PROPERTY_SAME_DAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSameDay(Boolean sameDay) { + this.sameDay = sameDay; + } + + + public AchPaymentAllOfAttributes counterpartyVerificationMethod(String counterpartyVerificationMethod) { + this.counterpartyVerificationMethod = counterpartyVerificationMethod; + return this; + } + + /** + * Get counterpartyVerificationMethod + * @return counterpartyVerificationMethod + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_VERIFICATION_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCounterpartyVerificationMethod() { + return counterpartyVerificationMethod; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_VERIFICATION_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterpartyVerificationMethod(String counterpartyVerificationMethod) { + this.counterpartyVerificationMethod = counterpartyVerificationMethod; + } + + + public AchPaymentAllOfAttributes clearingDaysOverride(Integer clearingDaysOverride) { + this.clearingDaysOverride = clearingDaysOverride; + return this; + } + + /** + * Get clearingDaysOverride + * @return clearingDaysOverride + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLEARING_DAYS_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getClearingDaysOverride() { + return clearingDaysOverride; + } + + + @JsonProperty(JSON_PROPERTY_CLEARING_DAYS_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setClearingDaysOverride(Integer clearingDaysOverride) { + this.clearingDaysOverride = clearingDaysOverride; + } + + + /** + * Return true if this AchPayment_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AchPaymentAllOfAttributes achPaymentAllOfAttributes = (AchPaymentAllOfAttributes) o; + return Objects.equals(this.createdAt, achPaymentAllOfAttributes.createdAt) && + Objects.equals(this.amount, achPaymentAllOfAttributes.amount) && + Objects.equals(this.direction, achPaymentAllOfAttributes.direction) && + Objects.equals(this.description, achPaymentAllOfAttributes.description) && + Objects.equals(this.addenda, achPaymentAllOfAttributes.addenda) && + Objects.equals(this.counterparty, achPaymentAllOfAttributes.counterparty) && + Objects.equals(this.tags, achPaymentAllOfAttributes.tags) && + Objects.equals(this.status, achPaymentAllOfAttributes.status) && + Objects.equals(this.settlementDate, achPaymentAllOfAttributes.settlementDate) && + Objects.equals(this.reason, achPaymentAllOfAttributes.reason) && + Objects.equals(this.expectedCompletionDate, achPaymentAllOfAttributes.expectedCompletionDate) && + Objects.equals(this.secCode, achPaymentAllOfAttributes.secCode) && + Objects.equals(this.traceNumber, achPaymentAllOfAttributes.traceNumber) && + Objects.equals(this.sameDay, achPaymentAllOfAttributes.sameDay) && + Objects.equals(this.counterpartyVerificationMethod, achPaymentAllOfAttributes.counterpartyVerificationMethod) && + Objects.equals(this.clearingDaysOverride, achPaymentAllOfAttributes.clearingDaysOverride); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, amount, direction, description, addenda, counterparty, tags, status, settlementDate, reason, expectedCompletionDate, secCode, traceNumber, sameDay, counterpartyVerificationMethod, clearingDaysOverride); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AchPaymentAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); + sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" settlementDate: ").append(toIndentedString(settlementDate)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" expectedCompletionDate: ").append(toIndentedString(expectedCompletionDate)).append("\n"); + sb.append(" secCode: ").append(toIndentedString(secCode)).append("\n"); + sb.append(" traceNumber: ").append(toIndentedString(traceNumber)).append("\n"); + sb.append(" sameDay: ").append(toIndentedString(sameDay)).append("\n"); + sb.append(" counterpartyVerificationMethod: ").append(toIndentedString(counterpartyVerificationMethod)).append("\n"); + sb.append(" clearingDaysOverride: ").append(toIndentedString(clearingDaysOverride)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `addenda` to the URL query string + if (getAddenda() != null) { + joiner.add(String.format("%saddenda%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAddenda()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterparty` to the URL query string + if (getCounterparty() != null) { + joiner.add(getCounterparty().toUrlQueryString(prefix + "counterparty" + suffix)); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `settlementDate` to the URL query string + if (getSettlementDate() != null) { + joiner.add(String.format("%ssettlementDate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSettlementDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `expectedCompletionDate` to the URL query string + if (getExpectedCompletionDate() != null) { + joiner.add(String.format("%sexpectedCompletionDate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getExpectedCompletionDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `secCode` to the URL query string + if (getSecCode() != null) { + joiner.add(String.format("%ssecCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSecCode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `traceNumber` to the URL query string + if (getTraceNumber() != null) { + joiner.add(String.format("%straceNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTraceNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sameDay` to the URL query string + if (getSameDay() != null) { + joiner.add(String.format("%ssameDay%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSameDay()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterpartyVerificationMethod` to the URL query string + if (getCounterpartyVerificationMethod() != null) { + joiner.add(String.format("%scounterpartyVerificationMethod%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCounterpartyVerificationMethod()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `clearingDaysOverride` to the URL query string + if (getClearingDaysOverride() != null) { + joiner.add(String.format("%sclearingDaysOverride%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getClearingDaysOverride()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AchRepayment.java b/src/main/java/unit/java/sdk/model/AchRepayment.java new file mode 100644 index 00000000..51030782 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AchRepayment.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AchRepaymentAllOfAttributes; +import unit.java.sdk.model.AchRepaymentAllOfRelationships; +import unit.java.sdk.model.Repayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * AchRepayment + */ +@JsonPropertyOrder({ + AchRepayment.JSON_PROPERTY_ATTRIBUTES, + AchRepayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class AchRepayment extends Repayment { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AchRepaymentAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private AchRepaymentAllOfRelationships relationships; + + public AchRepayment() { + } + + public AchRepayment attributes(AchRepaymentAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AchRepaymentAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(AchRepaymentAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public AchRepayment relationships(AchRepaymentAllOfRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AchRepaymentAllOfRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(AchRepaymentAllOfRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public AchRepayment id(String id) { + this.setId(id); + return this; + } + + @Override + public AchRepayment type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this AchRepayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AchRepayment achRepayment = (AchRepayment) o; + return Objects.equals(this.attributes, achRepayment.attributes) && + Objects.equals(this.relationships, achRepayment.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AchRepayment {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AchRepayment", AchRepayment.class); + JSON.registerDiscriminator(AchRepayment.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/AchRepaymentAllOfAttributes.java b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfAttributes.java new file mode 100644 index 00000000..2f0726ff --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfAttributes.java @@ -0,0 +1,375 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AchRepaymentAllOfAttributes + */ +@JsonPropertyOrder({ + AchRepaymentAllOfAttributes.JSON_PROPERTY_CREATED_AT, + AchRepaymentAllOfAttributes.JSON_PROPERTY_UPDATED_AT, + AchRepaymentAllOfAttributes.JSON_PROPERTY_AMOUNT, + AchRepaymentAllOfAttributes.JSON_PROPERTY_TAGS, + AchRepaymentAllOfAttributes.JSON_PROPERTY_SAME_DAY, + AchRepaymentAllOfAttributes.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AchRepaymentAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_SAME_DAY = "sameDay"; + private Boolean sameDay; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + PENDING("Pending"), + + PENDINGREVIEW("PendingReview"), + + SENT("Sent"), + + RETURNED("Returned"), + + REJECTED("Rejected"), + + CLEARING("Clearing"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public AchRepaymentAllOfAttributes() { + } + + public AchRepaymentAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public AchRepaymentAllOfAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public AchRepaymentAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public AchRepaymentAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public AchRepaymentAllOfAttributes sameDay(Boolean sameDay) { + this.sameDay = sameDay; + return this; + } + + /** + * Get sameDay + * @return sameDay + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAME_DAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSameDay() { + return sameDay; + } + + + @JsonProperty(JSON_PROPERTY_SAME_DAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSameDay(Boolean sameDay) { + this.sameDay = sameDay; + } + + + public AchRepaymentAllOfAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + /** + * Return true if this AchRepayment_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AchRepaymentAllOfAttributes achRepaymentAllOfAttributes = (AchRepaymentAllOfAttributes) o; + return Objects.equals(this.createdAt, achRepaymentAllOfAttributes.createdAt) && + Objects.equals(this.updatedAt, achRepaymentAllOfAttributes.updatedAt) && + Objects.equals(this.amount, achRepaymentAllOfAttributes.amount) && + Objects.equals(this.tags, achRepaymentAllOfAttributes.tags) && + Objects.equals(this.sameDay, achRepaymentAllOfAttributes.sameDay) && + Objects.equals(this.status, achRepaymentAllOfAttributes.status); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, updatedAt, amount, tags, sameDay, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AchRepaymentAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" sameDay: ").append(toIndentedString(sameDay)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sameDay` to the URL query string + if (getSameDay() != null) { + joiner.add(String.format("%ssameDay%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSameDay()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationships.java b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationships.java new file mode 100644 index 00000000..3b4837fb --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationships.java @@ -0,0 +1,299 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsAccount; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsCounterparty; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsCreditAccount; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsCustomer; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsPayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AchRepaymentAllOfRelationships + */ +@JsonPropertyOrder({ + AchRepaymentAllOfRelationships.JSON_PROPERTY_ACCOUNT, + AchRepaymentAllOfRelationships.JSON_PROPERTY_CREDIT_ACCOUNT, + AchRepaymentAllOfRelationships.JSON_PROPERTY_COUNTERPARTY, + AchRepaymentAllOfRelationships.JSON_PROPERTY_CUSTOMER, + AchRepaymentAllOfRelationships.JSON_PROPERTY_PAYMENT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AchRepaymentAllOfRelationships { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private AchRepaymentAllOfRelationshipsAccount account; + + public static final String JSON_PROPERTY_CREDIT_ACCOUNT = "creditAccount"; + private AchRepaymentAllOfRelationshipsCreditAccount creditAccount; + + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; + private AchRepaymentAllOfRelationshipsCounterparty counterparty; + + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private AchRepaymentAllOfRelationshipsCustomer customer; + + public static final String JSON_PROPERTY_PAYMENT = "payment"; + private AchRepaymentAllOfRelationshipsPayment payment; + + public AchRepaymentAllOfRelationships() { + } + + public AchRepaymentAllOfRelationships account(AchRepaymentAllOfRelationshipsAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AchRepaymentAllOfRelationshipsAccount getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccount(AchRepaymentAllOfRelationshipsAccount account) { + this.account = account; + } + + + public AchRepaymentAllOfRelationships creditAccount(AchRepaymentAllOfRelationshipsCreditAccount creditAccount) { + this.creditAccount = creditAccount; + return this; + } + + /** + * Get creditAccount + * @return creditAccount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREDIT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AchRepaymentAllOfRelationshipsCreditAccount getCreditAccount() { + return creditAccount; + } + + + @JsonProperty(JSON_PROPERTY_CREDIT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreditAccount(AchRepaymentAllOfRelationshipsCreditAccount creditAccount) { + this.creditAccount = creditAccount; + } + + + public AchRepaymentAllOfRelationships counterparty(AchRepaymentAllOfRelationshipsCounterparty counterparty) { + this.counterparty = counterparty; + return this; + } + + /** + * Get counterparty + * @return counterparty + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AchRepaymentAllOfRelationshipsCounterparty getCounterparty() { + return counterparty; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterparty(AchRepaymentAllOfRelationshipsCounterparty counterparty) { + this.counterparty = counterparty; + } + + + public AchRepaymentAllOfRelationships customer(AchRepaymentAllOfRelationshipsCustomer customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AchRepaymentAllOfRelationshipsCustomer getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomer(AchRepaymentAllOfRelationshipsCustomer customer) { + this.customer = customer; + } + + + public AchRepaymentAllOfRelationships payment(AchRepaymentAllOfRelationshipsPayment payment) { + this.payment = payment; + return this; + } + + /** + * Get payment + * @return payment + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AchRepaymentAllOfRelationshipsPayment getPayment() { + return payment; + } + + + @JsonProperty(JSON_PROPERTY_PAYMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayment(AchRepaymentAllOfRelationshipsPayment payment) { + this.payment = payment; + } + + + /** + * Return true if this AchRepayment_allOf_relationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AchRepaymentAllOfRelationships achRepaymentAllOfRelationships = (AchRepaymentAllOfRelationships) o; + return Objects.equals(this.account, achRepaymentAllOfRelationships.account) && + Objects.equals(this.creditAccount, achRepaymentAllOfRelationships.creditAccount) && + Objects.equals(this.counterparty, achRepaymentAllOfRelationships.counterparty) && + Objects.equals(this.customer, achRepaymentAllOfRelationships.customer) && + Objects.equals(this.payment, achRepaymentAllOfRelationships.payment); + } + + @Override + public int hashCode() { + return Objects.hash(account, creditAccount, counterparty, customer, payment); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AchRepaymentAllOfRelationships {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" creditAccount: ").append(toIndentedString(creditAccount)).append("\n"); + sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" payment: ").append(toIndentedString(payment)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `creditAccount` to the URL query string + if (getCreditAccount() != null) { + joiner.add(getCreditAccount().toUrlQueryString(prefix + "creditAccount" + suffix)); + } + + // add `counterparty` to the URL query string + if (getCounterparty() != null) { + joiner.add(getCounterparty().toUrlQueryString(prefix + "counterparty" + suffix)); + } + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + // add `payment` to the URL query string + if (getPayment() != null) { + joiner.add(getPayment().toUrlQueryString(prefix + "payment" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsAccount.java b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsAccount.java new file mode 100644 index 00000000..d3fd212a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsAccount.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsAccountData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AchRepaymentAllOfRelationshipsAccount + */ +@JsonPropertyOrder({ + AchRepaymentAllOfRelationshipsAccount.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AchRepaymentAllOfRelationshipsAccount { + public static final String JSON_PROPERTY_DATA = "data"; + private AchRepaymentAllOfRelationshipsAccountData data; + + public AchRepaymentAllOfRelationshipsAccount() { + } + + public AchRepaymentAllOfRelationshipsAccount data(AchRepaymentAllOfRelationshipsAccountData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AchRepaymentAllOfRelationshipsAccountData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(AchRepaymentAllOfRelationshipsAccountData data) { + this.data = data; + } + + + /** + * Return true if this AchRepayment_allOf_relationships_account object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AchRepaymentAllOfRelationshipsAccount achRepaymentAllOfRelationshipsAccount = (AchRepaymentAllOfRelationshipsAccount) o; + return Objects.equals(this.data, achRepaymentAllOfRelationshipsAccount.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AchRepaymentAllOfRelationshipsAccount {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsAccountData.java b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsAccountData.java new file mode 100644 index 00000000..15429568 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsAccountData.java @@ -0,0 +1,221 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AchRepaymentAllOfRelationshipsAccountData + */ +@JsonPropertyOrder({ + AchRepaymentAllOfRelationshipsAccountData.JSON_PROPERTY_TYPE, + AchRepaymentAllOfRelationshipsAccountData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AchRepaymentAllOfRelationshipsAccountData { + /** + * Gets or Sets type + */ + public enum TypeEnum { + DEPOSITACCOUNT("depositAccount"), + + ACCOUNT("account"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public AchRepaymentAllOfRelationshipsAccountData() { + } + + public AchRepaymentAllOfRelationshipsAccountData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public AchRepaymentAllOfRelationshipsAccountData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this AchRepayment_allOf_relationships_account_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AchRepaymentAllOfRelationshipsAccountData achRepaymentAllOfRelationshipsAccountData = (AchRepaymentAllOfRelationshipsAccountData) o; + return Objects.equals(this.type, achRepaymentAllOfRelationshipsAccountData.type) && + Objects.equals(this.id, achRepaymentAllOfRelationshipsAccountData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AchRepaymentAllOfRelationshipsAccountData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCounterparty.java b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCounterparty.java new file mode 100644 index 00000000..4202ec7a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCounterparty.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsCounterpartyData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AchRepaymentAllOfRelationshipsCounterparty + */ +@JsonPropertyOrder({ + AchRepaymentAllOfRelationshipsCounterparty.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AchRepaymentAllOfRelationshipsCounterparty { + public static final String JSON_PROPERTY_DATA = "data"; + private AchRepaymentAllOfRelationshipsCounterpartyData data; + + public AchRepaymentAllOfRelationshipsCounterparty() { + } + + public AchRepaymentAllOfRelationshipsCounterparty data(AchRepaymentAllOfRelationshipsCounterpartyData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AchRepaymentAllOfRelationshipsCounterpartyData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(AchRepaymentAllOfRelationshipsCounterpartyData data) { + this.data = data; + } + + + /** + * Return true if this AchRepayment_allOf_relationships_counterparty object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AchRepaymentAllOfRelationshipsCounterparty achRepaymentAllOfRelationshipsCounterparty = (AchRepaymentAllOfRelationshipsCounterparty) o; + return Objects.equals(this.data, achRepaymentAllOfRelationshipsCounterparty.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AchRepaymentAllOfRelationshipsCounterparty {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCounterpartyData.java b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCounterpartyData.java new file mode 100644 index 00000000..f22a4641 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCounterpartyData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AchRepaymentAllOfRelationshipsCounterpartyData + */ +@JsonPropertyOrder({ + AchRepaymentAllOfRelationshipsCounterpartyData.JSON_PROPERTY_TYPE, + AchRepaymentAllOfRelationshipsCounterpartyData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AchRepaymentAllOfRelationshipsCounterpartyData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "counterparty"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public AchRepaymentAllOfRelationshipsCounterpartyData() { + } + + public AchRepaymentAllOfRelationshipsCounterpartyData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public AchRepaymentAllOfRelationshipsCounterpartyData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this AchRepayment_allOf_relationships_counterparty_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AchRepaymentAllOfRelationshipsCounterpartyData achRepaymentAllOfRelationshipsCounterpartyData = (AchRepaymentAllOfRelationshipsCounterpartyData) o; + return Objects.equals(this.type, achRepaymentAllOfRelationshipsCounterpartyData.type) && + Objects.equals(this.id, achRepaymentAllOfRelationshipsCounterpartyData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AchRepaymentAllOfRelationshipsCounterpartyData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCreditAccount.java b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCreditAccount.java new file mode 100644 index 00000000..5697d351 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCreditAccount.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsCreditAccountData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AchRepaymentAllOfRelationshipsCreditAccount + */ +@JsonPropertyOrder({ + AchRepaymentAllOfRelationshipsCreditAccount.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AchRepaymentAllOfRelationshipsCreditAccount { + public static final String JSON_PROPERTY_DATA = "data"; + private AchRepaymentAllOfRelationshipsCreditAccountData data; + + public AchRepaymentAllOfRelationshipsCreditAccount() { + } + + public AchRepaymentAllOfRelationshipsCreditAccount data(AchRepaymentAllOfRelationshipsCreditAccountData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AchRepaymentAllOfRelationshipsCreditAccountData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(AchRepaymentAllOfRelationshipsCreditAccountData data) { + this.data = data; + } + + + /** + * Return true if this AchRepayment_allOf_relationships_creditAccount object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AchRepaymentAllOfRelationshipsCreditAccount achRepaymentAllOfRelationshipsCreditAccount = (AchRepaymentAllOfRelationshipsCreditAccount) o; + return Objects.equals(this.data, achRepaymentAllOfRelationshipsCreditAccount.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AchRepaymentAllOfRelationshipsCreditAccount {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCreditAccountData.java b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCreditAccountData.java new file mode 100644 index 00000000..29887912 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCreditAccountData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AchRepaymentAllOfRelationshipsCreditAccountData + */ +@JsonPropertyOrder({ + AchRepaymentAllOfRelationshipsCreditAccountData.JSON_PROPERTY_TYPE, + AchRepaymentAllOfRelationshipsCreditAccountData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AchRepaymentAllOfRelationshipsCreditAccountData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "creditAccount"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public AchRepaymentAllOfRelationshipsCreditAccountData() { + } + + public AchRepaymentAllOfRelationshipsCreditAccountData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public AchRepaymentAllOfRelationshipsCreditAccountData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this AchRepayment_allOf_relationships_creditAccount_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AchRepaymentAllOfRelationshipsCreditAccountData achRepaymentAllOfRelationshipsCreditAccountData = (AchRepaymentAllOfRelationshipsCreditAccountData) o; + return Objects.equals(this.type, achRepaymentAllOfRelationshipsCreditAccountData.type) && + Objects.equals(this.id, achRepaymentAllOfRelationshipsCreditAccountData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AchRepaymentAllOfRelationshipsCreditAccountData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCustomer.java b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCustomer.java new file mode 100644 index 00000000..5a4ebf01 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCustomer.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsCustomerData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AchRepaymentAllOfRelationshipsCustomer + */ +@JsonPropertyOrder({ + AchRepaymentAllOfRelationshipsCustomer.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AchRepaymentAllOfRelationshipsCustomer { + public static final String JSON_PROPERTY_DATA = "data"; + private AchRepaymentAllOfRelationshipsCustomerData data; + + public AchRepaymentAllOfRelationshipsCustomer() { + } + + public AchRepaymentAllOfRelationshipsCustomer data(AchRepaymentAllOfRelationshipsCustomerData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AchRepaymentAllOfRelationshipsCustomerData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(AchRepaymentAllOfRelationshipsCustomerData data) { + this.data = data; + } + + + /** + * Return true if this AchRepayment_allOf_relationships_customer object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AchRepaymentAllOfRelationshipsCustomer achRepaymentAllOfRelationshipsCustomer = (AchRepaymentAllOfRelationshipsCustomer) o; + return Objects.equals(this.data, achRepaymentAllOfRelationshipsCustomer.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AchRepaymentAllOfRelationshipsCustomer {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCustomerData.java b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCustomerData.java new file mode 100644 index 00000000..d8f6cda6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCustomerData.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AchRepaymentAllOfRelationshipsCustomerData + */ +@JsonPropertyOrder({ + AchRepaymentAllOfRelationshipsCustomerData.JSON_PROPERTY_TYPE, + AchRepaymentAllOfRelationshipsCustomerData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AchRepaymentAllOfRelationshipsCustomerData { + /** + * Gets or Sets type + */ + public enum TypeEnum { + BUSINESSCUSTOMER("businessCustomer"), + + INDIVIDUALCUSTOMER("individualCustomer"), + + CUSTOMER("customer"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public AchRepaymentAllOfRelationshipsCustomerData() { + } + + public AchRepaymentAllOfRelationshipsCustomerData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public AchRepaymentAllOfRelationshipsCustomerData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this AchRepayment_allOf_relationships_customer_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AchRepaymentAllOfRelationshipsCustomerData achRepaymentAllOfRelationshipsCustomerData = (AchRepaymentAllOfRelationshipsCustomerData) o; + return Objects.equals(this.type, achRepaymentAllOfRelationshipsCustomerData.type) && + Objects.equals(this.id, achRepaymentAllOfRelationshipsCustomerData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AchRepaymentAllOfRelationshipsCustomerData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsPayment.java b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsPayment.java new file mode 100644 index 00000000..aa2c9073 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsPayment.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsPaymentData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AchRepaymentAllOfRelationshipsPayment + */ +@JsonPropertyOrder({ + AchRepaymentAllOfRelationshipsPayment.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AchRepaymentAllOfRelationshipsPayment { + public static final String JSON_PROPERTY_DATA = "data"; + private AchRepaymentAllOfRelationshipsPaymentData data; + + public AchRepaymentAllOfRelationshipsPayment() { + } + + public AchRepaymentAllOfRelationshipsPayment data(AchRepaymentAllOfRelationshipsPaymentData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AchRepaymentAllOfRelationshipsPaymentData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(AchRepaymentAllOfRelationshipsPaymentData data) { + this.data = data; + } + + + /** + * Return true if this AchRepayment_allOf_relationships_payment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AchRepaymentAllOfRelationshipsPayment achRepaymentAllOfRelationshipsPayment = (AchRepaymentAllOfRelationshipsPayment) o; + return Objects.equals(this.data, achRepaymentAllOfRelationshipsPayment.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AchRepaymentAllOfRelationshipsPayment {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsPaymentData.java b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsPaymentData.java new file mode 100644 index 00000000..725e1c06 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsPaymentData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AchRepaymentAllOfRelationshipsPaymentData + */ +@JsonPropertyOrder({ + AchRepaymentAllOfRelationshipsPaymentData.JSON_PROPERTY_TYPE, + AchRepaymentAllOfRelationshipsPaymentData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AchRepaymentAllOfRelationshipsPaymentData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "payment"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public AchRepaymentAllOfRelationshipsPaymentData() { + } + + public AchRepaymentAllOfRelationshipsPaymentData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public AchRepaymentAllOfRelationshipsPaymentData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this AchRepayment_allOf_relationships_payment_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AchRepaymentAllOfRelationshipsPaymentData achRepaymentAllOfRelationshipsPaymentData = (AchRepaymentAllOfRelationshipsPaymentData) o; + return Objects.equals(this.type, achRepaymentAllOfRelationshipsPaymentData.type) && + Objects.equals(this.id, achRepaymentAllOfRelationshipsPaymentData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AchRepaymentAllOfRelationshipsPaymentData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Address.java b/src/main/java/unit/java/sdk/model/Address.java new file mode 100644 index 00000000..9e9ddd89 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Address.java @@ -0,0 +1,353 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Address + */ +@JsonPropertyOrder({ + Address.JSON_PROPERTY_STREET, + Address.JSON_PROPERTY_STREET2, + Address.JSON_PROPERTY_CITY, + Address.JSON_PROPERTY_STATE, + Address.JSON_PROPERTY_POSTAL_CODE, + Address.JSON_PROPERTY_COUNTRY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Address { + public static final String JSON_PROPERTY_STREET = "street"; + private String street; + + public static final String JSON_PROPERTY_STREET2 = "street2"; + private JsonNullable street2 = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CITY = "city"; + private String city; + + public static final String JSON_PROPERTY_STATE = "state"; + private String state; + + public static final String JSON_PROPERTY_POSTAL_CODE = "postalCode"; + private String postalCode; + + public static final String JSON_PROPERTY_COUNTRY = "country"; + private String country = "US"; + + public Address() { + } + + public Address street(String street) { + this.street = street; + return this; + } + + /** + * Get street + * @return street + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STREET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getStreet() { + return street; + } + + + @JsonProperty(JSON_PROPERTY_STREET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStreet(String street) { + this.street = street; + } + + + public Address street2(String street2) { + this.street2 = JsonNullable.of(street2); + return this; + } + + /** + * Get street2 + * @return street2 + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getStreet2() { + return street2.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STREET2) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStreet2_JsonNullable() { + return street2; + } + + @JsonProperty(JSON_PROPERTY_STREET2) + public void setStreet2_JsonNullable(JsonNullable street2) { + this.street2 = street2; + } + + public void setStreet2(String street2) { + this.street2 = JsonNullable.of(street2); + } + + + public Address city(String city) { + this.city = city; + return this; + } + + /** + * Get city + * @return city + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCity() { + return city; + } + + + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCity(String city) { + this.city = city; + } + + + public Address state(String state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getState() { + return state; + } + + + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setState(String state) { + this.state = state; + } + + + public Address postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * Get postalCode + * @return postalCode + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getPostalCode() { + return postalCode; + } + + + @JsonProperty(JSON_PROPERTY_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public Address country(String country) { + this.country = country; + return this; + } + + /** + * Get country + * @return country + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCountry() { + return country; + } + + + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCountry(String country) { + this.country = country; + } + + + /** + * Return true if this address object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Address address = (Address) o; + return Objects.equals(this.street, address.street) && + equalsNullable(this.street2, address.street2) && + Objects.equals(this.city, address.city) && + Objects.equals(this.state, address.state) && + Objects.equals(this.postalCode, address.postalCode) && + Objects.equals(this.country, address.country); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(street, hashCodeNullable(street2), city, state, postalCode, country); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Address {\n"); + sb.append(" street: ").append(toIndentedString(street)).append("\n"); + sb.append(" street2: ").append(toIndentedString(street2)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `street` to the URL query string + if (getStreet() != null) { + joiner.add(String.format("%sstreet%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStreet()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `street2` to the URL query string + if (getStreet2() != null) { + joiner.add(String.format("%sstreet2%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStreet2()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `city` to the URL query string + if (getCity() != null) { + joiner.add(String.format("%scity%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCity()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `state` to the URL query string + if (getState() != null) { + joiner.add(String.format("%sstate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getState()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `postalCode` to the URL query string + if (getPostalCode() != null) { + joiner.add(String.format("%spostalCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPostalCode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `country` to the URL query string + if (getCountry() != null) { + joiner.add(String.format("%scountry%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCountry()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AdjustmentTransaction.java b/src/main/java/unit/java/sdk/model/AdjustmentTransaction.java new file mode 100644 index 00000000..e9922323 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AdjustmentTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AdjustmentTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * AdjustmentTransaction + */ +@JsonPropertyOrder({ + AdjustmentTransaction.JSON_PROPERTY_ATTRIBUTES, + AdjustmentTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class AdjustmentTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AdjustmentTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public AdjustmentTransaction() { + } + + public AdjustmentTransaction attributes(AdjustmentTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AdjustmentTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(AdjustmentTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public AdjustmentTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public AdjustmentTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public AdjustmentTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this AdjustmentTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdjustmentTransaction adjustmentTransaction = (AdjustmentTransaction) o; + return Objects.equals(this.attributes, adjustmentTransaction.attributes) && + Objects.equals(this.relationships, adjustmentTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdjustmentTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AdjustmentTransaction", AdjustmentTransaction.class); + JSON.registerDiscriminator(AdjustmentTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/AdjustmentTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/AdjustmentTransactionAllOfAttributes.java new file mode 100644 index 00000000..53729c75 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AdjustmentTransactionAllOfAttributes.java @@ -0,0 +1,402 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AdjustmentTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + AdjustmentTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + AdjustmentTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + AdjustmentTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + AdjustmentTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + AdjustmentTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + AdjustmentTransactionAllOfAttributes.JSON_PROPERTY_DESCRIPTION, + AdjustmentTransactionAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AdjustmentTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public AdjustmentTransactionAllOfAttributes() { + } + + public AdjustmentTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public AdjustmentTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public AdjustmentTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public AdjustmentTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public AdjustmentTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public AdjustmentTransactionAllOfAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + + public AdjustmentTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this AdjustmentTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdjustmentTransactionAllOfAttributes adjustmentTransactionAllOfAttributes = (AdjustmentTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, adjustmentTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, adjustmentTransactionAllOfAttributes.direction) && + Objects.equals(this.amount, adjustmentTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, adjustmentTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, adjustmentTransactionAllOfAttributes.summary) && + Objects.equals(this.description, adjustmentTransactionAllOfAttributes.description) && + Objects.equals(this.tags, adjustmentTransactionAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, amount, balance, summary, description, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdjustmentTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AnnualIncome.java b/src/main/java/unit/java/sdk/model/AnnualIncome.java new file mode 100644 index 00000000..da3e016c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AnnualIncome.java @@ -0,0 +1,86 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets annualIncome + */ +public enum AnnualIncome { + + UPTO10K("UpTo10k"), + + BETWEEN10KAND25K("Between10kAnd25k"), + + BETWEEN25KAND50K("Between25kAnd50k"), + + BETWEEN50KAND100K("Between50kAnd100k"), + + BETWEEN100KAND250K("Between100kAnd250k"), + + OVER250K("Over250k"); + + private String value; + + AnnualIncome(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AnnualIncome fromValue(String value) { + for (AnnualIncome b : AnnualIncome.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } + +} + diff --git a/src/main/java/unit/java/sdk/model/ApiToken.java b/src/main/java/unit/java/sdk/model/ApiToken.java new file mode 100644 index 00000000..71aa31d1 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApiToken.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ApiTokenAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApiToken + */ +@JsonPropertyOrder({ + ApiToken.JSON_PROPERTY_TYPE, + ApiToken.JSON_PROPERTY_ID, + ApiToken.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiToken { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "apiToken"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ApiTokenAttributes attributes; + + public ApiToken() { + } + + public ApiToken type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public ApiToken id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public ApiToken attributes(ApiTokenAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApiTokenAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(ApiTokenAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this api_token object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiToken apiToken = (ApiToken) o; + return Objects.equals(this.type, apiToken.type) && + Objects.equals(this.id, apiToken.id) && + Objects.equals(this.attributes, apiToken.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiToken {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApiTokenAttributes.java b/src/main/java/unit/java/sdk/model/ApiTokenAttributes.java new file mode 100644 index 00000000..2b38b403 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApiTokenAttributes.java @@ -0,0 +1,295 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApiTokenAttributes + */ +@JsonPropertyOrder({ + ApiTokenAttributes.JSON_PROPERTY_CREATED_AT, + ApiTokenAttributes.JSON_PROPERTY_DESCRIPTION, + ApiTokenAttributes.JSON_PROPERTY_EXPIRATION, + ApiTokenAttributes.JSON_PROPERTY_TOKEN, + ApiTokenAttributes.JSON_PROPERTY_SOURCE_IP +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiTokenAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_EXPIRATION = "expiration"; + private OffsetDateTime expiration; + + public static final String JSON_PROPERTY_TOKEN = "token"; + private String token; + + public static final String JSON_PROPERTY_SOURCE_IP = "sourceIp"; + private String sourceIp; + + public ApiTokenAttributes() { + } + + public ApiTokenAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public ApiTokenAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + + public ApiTokenAttributes expiration(OffsetDateTime expiration) { + this.expiration = expiration; + return this; + } + + /** + * Get expiration + * @return expiration + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPIRATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getExpiration() { + return expiration; + } + + + @JsonProperty(JSON_PROPERTY_EXPIRATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpiration(OffsetDateTime expiration) { + this.expiration = expiration; + } + + + public ApiTokenAttributes token(String token) { + this.token = token; + return this; + } + + /** + * Get token + * @return token + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getToken() { + return token; + } + + + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setToken(String token) { + this.token = token; + } + + + public ApiTokenAttributes sourceIp(String sourceIp) { + this.sourceIp = sourceIp; + return this; + } + + /** + * Get sourceIp + * @return sourceIp + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSourceIp() { + return sourceIp; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceIp(String sourceIp) { + this.sourceIp = sourceIp; + } + + + /** + * Return true if this api_token_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiTokenAttributes apiTokenAttributes = (ApiTokenAttributes) o; + return Objects.equals(this.createdAt, apiTokenAttributes.createdAt) && + Objects.equals(this.description, apiTokenAttributes.description) && + Objects.equals(this.expiration, apiTokenAttributes.expiration) && + Objects.equals(this.token, apiTokenAttributes.token) && + Objects.equals(this.sourceIp, apiTokenAttributes.sourceIp); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, description, expiration, token, sourceIp); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiTokenAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" expiration: ").append(toIndentedString(expiration)).append("\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" sourceIp: ").append(toIndentedString(sourceIp)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `expiration` to the URL query string + if (getExpiration() != null) { + joiner.add(String.format("%sexpiration%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getExpiration()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `token` to the URL query string + if (getToken() != null) { + joiner.add(String.format("%stoken%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getToken()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sourceIp` to the URL query string + if (getSourceIp() != null) { + joiner.add(String.format("%ssourceIp%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSourceIp()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Application.java b/src/main/java/unit/java/sdk/model/Application.java new file mode 100644 index 00000000..12da716c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Application.java @@ -0,0 +1,210 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * Application + */ +@JsonPropertyOrder({ + Application.JSON_PROPERTY_ID, + Application.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BusinessApplication.class, name = "businessApplication"), + @JsonSubTypes.Type(value = IndividualApplication.class, name = "individualApplication"), + @JsonSubTypes.Type(value = TrustApplication.class, name = "trustApplication"), +}) + +public class Application { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public Application() { + } + + public Application id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public Application type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + /** + * Return true if this application object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Application application = (Application) o; + return Objects.equals(this.id, application.id) && + Objects.equals(this.type, application.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Application {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("businessApplication", BusinessApplication.class); + mappings.put("individualApplication", IndividualApplication.class); + mappings.put("trustApplication", TrustApplication.class); + mappings.put("application", Application.class); + JSON.registerDiscriminator(Application.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/ApplicationForm.java b/src/main/java/unit/java/sdk/model/ApplicationForm.java new file mode 100644 index 00000000..7f4c1228 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApplicationForm.java @@ -0,0 +1,260 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ApplicationFormAttributes; +import unit.java.sdk.model.ApplicationFormRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApplicationForm + */ +@JsonPropertyOrder({ + ApplicationForm.JSON_PROPERTY_TYPE, + ApplicationForm.JSON_PROPERTY_ID, + ApplicationForm.JSON_PROPERTY_ATTRIBUTES, + ApplicationForm.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationForm { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "applicationForm"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ApplicationFormAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private ApplicationFormRelationships relationships; + + public ApplicationForm() { + } + + public ApplicationForm type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public ApplicationForm id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + public ApplicationForm attributes(ApplicationFormAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ApplicationFormAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(ApplicationFormAttributes attributes) { + this.attributes = attributes; + } + + + public ApplicationForm relationships(ApplicationFormRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApplicationFormRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(ApplicationFormRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this application_form object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplicationForm applicationForm = (ApplicationForm) o; + return Objects.equals(this.type, applicationForm.type) && + Objects.equals(this.id, applicationForm.id) && + Objects.equals(this.attributes, applicationForm.attributes) && + Objects.equals(this.relationships, applicationForm.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationForm {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApplicationFormAdditionalDisclosuresInner.java b/src/main/java/unit/java/sdk/model/ApplicationFormAdditionalDisclosuresInner.java new file mode 100644 index 00000000..d6d08942 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApplicationFormAdditionalDisclosuresInner.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApplicationFormAdditionalDisclosuresInner + */ +@JsonPropertyOrder({ + ApplicationFormAdditionalDisclosuresInner.JSON_PROPERTY_TITLE, + ApplicationFormAdditionalDisclosuresInner.JSON_PROPERTY_URL +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationFormAdditionalDisclosuresInner { + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public static final String JSON_PROPERTY_URL = "url"; + private String url; + + public ApplicationFormAdditionalDisclosuresInner() { + } + + public ApplicationFormAdditionalDisclosuresInner title(String title) { + this.title = title; + return this; + } + + /** + * Get title + * @return title + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTitle() { + return title; + } + + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTitle(String title) { + this.title = title; + } + + + public ApplicationFormAdditionalDisclosuresInner url(String url) { + this.url = url; + return this; + } + + /** + * Get url + * @return url + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUrl() { + return url; + } + + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUrl(String url) { + this.url = url; + } + + + /** + * Return true if this applicationFormAdditionalDisclosures_inner object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplicationFormAdditionalDisclosuresInner applicationFormAdditionalDisclosuresInner = (ApplicationFormAdditionalDisclosuresInner) o; + return Objects.equals(this.title, applicationFormAdditionalDisclosuresInner.title) && + Objects.equals(this.url, applicationFormAdditionalDisclosuresInner.url); + } + + @Override + public int hashCode() { + return Objects.hash(title, url); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationFormAdditionalDisclosuresInner {\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `title` to the URL query string + if (getTitle() != null) { + joiner.add(String.format("%stitle%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTitle()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `url` to the URL query string + if (getUrl() != null) { + joiner.add(String.format("%surl%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUrl()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApplicationFormAttributes.java b/src/main/java/unit/java/sdk/model/ApplicationFormAttributes.java new file mode 100644 index 00000000..d4634984 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApplicationFormAttributes.java @@ -0,0 +1,478 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.ApplicationFormPrefill; +import unit.java.sdk.model.ApplicationFormSettingsOverride; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApplicationFormAttributes + */ +@JsonPropertyOrder({ + ApplicationFormAttributes.JSON_PROPERTY_EMAIL, + ApplicationFormAttributes.JSON_PROPERTY_URL, + ApplicationFormAttributes.JSON_PROPERTY_STAGE, + ApplicationFormAttributes.JSON_PROPERTY_APPLICANT_DETAILS, + ApplicationFormAttributes.JSON_PROPERTY_SETTINGS_OVERRIDE, + ApplicationFormAttributes.JSON_PROPERTY_TAGS, + ApplicationFormAttributes.JSON_PROPERTY_ALLOWED_APPLICATION_TYPES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationFormAttributes { + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_URL = "url"; + private String url; + + /** + * Gets or Sets stage + */ + public enum StageEnum { + CHOOSEBUSINESSORINDIVIDUAL("ChooseBusinessOrIndividual"), + + ENTERINDIVIDUALINFORMATION("EnterIndividualInformation"), + + INDIVIDUALPHONEVERIFICATION("IndividualPhoneVerification"), + + INDIVIDUALAPPLICATIONCREATED("IndividualApplicationCreated"), + + ENTERBUSINESSINFORMATION("EnterBusinessInformation"), + + ENTERBUSINESSADDITIONALINFORMATION("EnterBusinessAdditionalInformation"), + + ENTEROFFICERINFORMATION("EnterOfficerInformation"), + + BUSINESSPHONEVERIFICATION("BusinessPhoneVerification"), + + ENTERBENEFICIALOWNERSINFORMATION("EnterBeneficialOwnersInformation"), + + BUSINESSAPPLICATIONCREATED("BusinessApplicationCreated"), + + ENTERSOLEPROPRIETORSHIPINFORMATION("EnterSoleProprietorshipInformation"), + + ENTERSOLEPROPRIETORSHIPBUSINESSINFORMATION("EnterSoleProprietorshipBusinessInformation"), + + SOLEPROPRIETORSHIPPHONEVERIFICATION("SoleProprietorshipPhoneVerification"), + + SOLEPROPRIETORSHIPAPPLICATIONCREATED("SoleProprietorshipApplicationCreated"); + + private String value; + + StageEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StageEnum fromValue(String value) { + for (StageEnum b : StageEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STAGE = "stage"; + private StageEnum stage; + + public static final String JSON_PROPERTY_APPLICANT_DETAILS = "applicantDetails"; + private ApplicationFormPrefill applicantDetails; + + public static final String JSON_PROPERTY_SETTINGS_OVERRIDE = "settingsOverride"; + private ApplicationFormSettingsOverride settingsOverride; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + /** + * Gets or Sets allowedApplicationTypes + */ + public enum AllowedApplicationTypesEnum { + INDIVIDUAL("Individual"), + + BUSINESS("Business"), + + SOLEPROPRIETORSHIP("SoleProprietorship"); + + private String value; + + AllowedApplicationTypesEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AllowedApplicationTypesEnum fromValue(String value) { + for (AllowedApplicationTypesEnum b : AllowedApplicationTypesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ALLOWED_APPLICATION_TYPES = "allowedApplicationTypes"; + private List allowedApplicationTypes; + + public ApplicationFormAttributes() { + } + + public ApplicationFormAttributes email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public ApplicationFormAttributes url(String url) { + this.url = url; + return this; + } + + /** + * Get url + * @return url + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getUrl() { + return url; + } + + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(String url) { + this.url = url; + } + + + public ApplicationFormAttributes stage(StageEnum stage) { + this.stage = stage; + return this; + } + + /** + * Get stage + * @return stage + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StageEnum getStage() { + return stage; + } + + + @JsonProperty(JSON_PROPERTY_STAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStage(StageEnum stage) { + this.stage = stage; + } + + + public ApplicationFormAttributes applicantDetails(ApplicationFormPrefill applicantDetails) { + this.applicantDetails = applicantDetails; + return this; + } + + /** + * Get applicantDetails + * @return applicantDetails + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLICANT_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApplicationFormPrefill getApplicantDetails() { + return applicantDetails; + } + + + @JsonProperty(JSON_PROPERTY_APPLICANT_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setApplicantDetails(ApplicationFormPrefill applicantDetails) { + this.applicantDetails = applicantDetails; + } + + + public ApplicationFormAttributes settingsOverride(ApplicationFormSettingsOverride settingsOverride) { + this.settingsOverride = settingsOverride; + return this; + } + + /** + * Get settingsOverride + * @return settingsOverride + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApplicationFormSettingsOverride getSettingsOverride() { + return settingsOverride; + } + + + @JsonProperty(JSON_PROPERTY_SETTINGS_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSettingsOverride(ApplicationFormSettingsOverride settingsOverride) { + this.settingsOverride = settingsOverride; + } + + + public ApplicationFormAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public ApplicationFormAttributes allowedApplicationTypes(List allowedApplicationTypes) { + this.allowedApplicationTypes = allowedApplicationTypes; + return this; + } + + public ApplicationFormAttributes addAllowedApplicationTypesItem(AllowedApplicationTypesEnum allowedApplicationTypesItem) { + if (this.allowedApplicationTypes == null) { + this.allowedApplicationTypes = new ArrayList<>(); + } + this.allowedApplicationTypes.add(allowedApplicationTypesItem); + return this; + } + + /** + * Get allowedApplicationTypes + * @return allowedApplicationTypes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOWED_APPLICATION_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getAllowedApplicationTypes() { + return allowedApplicationTypes; + } + + + @JsonProperty(JSON_PROPERTY_ALLOWED_APPLICATION_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowedApplicationTypes(List allowedApplicationTypes) { + this.allowedApplicationTypes = allowedApplicationTypes; + } + + + /** + * Return true if this application_form_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplicationFormAttributes applicationFormAttributes = (ApplicationFormAttributes) o; + return Objects.equals(this.email, applicationFormAttributes.email) && + Objects.equals(this.url, applicationFormAttributes.url) && + Objects.equals(this.stage, applicationFormAttributes.stage) && + Objects.equals(this.applicantDetails, applicationFormAttributes.applicantDetails) && + Objects.equals(this.settingsOverride, applicationFormAttributes.settingsOverride) && + Objects.equals(this.tags, applicationFormAttributes.tags) && + Objects.equals(this.allowedApplicationTypes, applicationFormAttributes.allowedApplicationTypes); + } + + @Override + public int hashCode() { + return Objects.hash(email, url, stage, applicantDetails, settingsOverride, tags, allowedApplicationTypes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationFormAttributes {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" stage: ").append(toIndentedString(stage)).append("\n"); + sb.append(" applicantDetails: ").append(toIndentedString(applicantDetails)).append("\n"); + sb.append(" settingsOverride: ").append(toIndentedString(settingsOverride)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" allowedApplicationTypes: ").append(toIndentedString(allowedApplicationTypes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `url` to the URL query string + if (getUrl() != null) { + joiner.add(String.format("%surl%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUrl()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `stage` to the URL query string + if (getStage() != null) { + joiner.add(String.format("%sstage%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStage()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `applicantDetails` to the URL query string + if (getApplicantDetails() != null) { + joiner.add(getApplicantDetails().toUrlQueryString(prefix + "applicantDetails" + suffix)); + } + + // add `settingsOverride` to the URL query string + if (getSettingsOverride() != null) { + joiner.add(getSettingsOverride().toUrlQueryString(prefix + "settingsOverride" + suffix)); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `allowedApplicationTypes` to the URL query string + if (getAllowedApplicationTypes() != null) { + for (int i = 0; i < getAllowedApplicationTypes().size(); i++) { + joiner.add(String.format("%sallowedApplicationTypes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getAllowedApplicationTypes().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApplicationFormPrefill.java b/src/main/java/unit/java/sdk/model/ApplicationFormPrefill.java new file mode 100644 index 00000000..0a370e05 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApplicationFormPrefill.java @@ -0,0 +1,918 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.Contact; +import unit.java.sdk.model.CreateBeneficialOwner; +import unit.java.sdk.model.CreateOfficer; +import unit.java.sdk.model.EntityType; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Industry; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApplicationFormPrefill + */ +@JsonPropertyOrder({ + ApplicationFormPrefill.JSON_PROPERTY_APPLICATION_TYPE, + ApplicationFormPrefill.JSON_PROPERTY_FULL_NAME, + ApplicationFormPrefill.JSON_PROPERTY_SSN, + ApplicationFormPrefill.JSON_PROPERTY_PASSPORT, + ApplicationFormPrefill.JSON_PROPERTY_NATIONALITY, + ApplicationFormPrefill.JSON_PROPERTY_DATE_OF_BIRTH, + ApplicationFormPrefill.JSON_PROPERTY_EMAIL, + ApplicationFormPrefill.JSON_PROPERTY_NAME, + ApplicationFormPrefill.JSON_PROPERTY_STATE_OF_INCORPORATION, + ApplicationFormPrefill.JSON_PROPERTY_ENTITY_TYPE, + ApplicationFormPrefill.JSON_PROPERTY_CONTACT, + ApplicationFormPrefill.JSON_PROPERTY_OFFICER, + ApplicationFormPrefill.JSON_PROPERTY_BENEFICIAL_OWNERS, + ApplicationFormPrefill.JSON_PROPERTY_WEBSITE, + ApplicationFormPrefill.JSON_PROPERTY_PHONE, + ApplicationFormPrefill.JSON_PROPERTY_ADDRESS, + ApplicationFormPrefill.JSON_PROPERTY_DBA, + ApplicationFormPrefill.JSON_PROPERTY_EIN, + ApplicationFormPrefill.JSON_PROPERTY_JWT_SUBJECT, + ApplicationFormPrefill.JSON_PROPERTY_INDUSTRY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationFormPrefill { + /** + * Gets or Sets applicationType + */ + public enum ApplicationTypeEnum { + INDIVIDUAL("Individual"), + + BUSINESS("Business"), + + SOLEPROPRIETORSHIP("SoleProprietorship"); + + private String value; + + ApplicationTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ApplicationTypeEnum fromValue(String value) { + for (ApplicationTypeEnum b : ApplicationTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_APPLICATION_TYPE = "applicationType"; + private ApplicationTypeEnum applicationType; + + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_SSN = "ssn"; + private String ssn; + + public static final String JSON_PROPERTY_PASSPORT = "passport"; + private String passport; + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_STATE_OF_INCORPORATION = "stateOfIncorporation"; + private String stateOfIncorporation; + + public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; + private EntityType entityType; + + public static final String JSON_PROPERTY_CONTACT = "contact"; + private Contact contact; + + public static final String JSON_PROPERTY_OFFICER = "officer"; + private CreateOfficer officer; + + public static final String JSON_PROPERTY_BENEFICIAL_OWNERS = "beneficialOwners"; + private List beneficialOwners; + + public static final String JSON_PROPERTY_WEBSITE = "website"; + private String website; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_DBA = "dba"; + private String dba; + + public static final String JSON_PROPERTY_EIN = "ein"; + private String ein; + + public static final String JSON_PROPERTY_JWT_SUBJECT = "jwtSubject"; + private JsonNullable jwtSubject = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INDUSTRY = "industry"; + private Industry industry; + + public ApplicationFormPrefill() { + } + + public ApplicationFormPrefill applicationType(ApplicationTypeEnum applicationType) { + this.applicationType = applicationType; + return this; + } + + /** + * Get applicationType + * @return applicationType + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLICATION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApplicationTypeEnum getApplicationType() { + return applicationType; + } + + + @JsonProperty(JSON_PROPERTY_APPLICATION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setApplicationType(ApplicationTypeEnum applicationType) { + this.applicationType = applicationType; + } + + + public ApplicationFormPrefill fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public ApplicationFormPrefill ssn(String ssn) { + this.ssn = ssn; + return this; + } + + /** + * Get ssn + * @return ssn + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSsn() { + return ssn; + } + + + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSsn(String ssn) { + this.ssn = ssn; + } + + + public ApplicationFormPrefill passport(String passport) { + this.passport = passport; + return this; + } + + /** + * Get passport + * @return passport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassport() { + return passport; + } + + + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassport(String passport) { + this.passport = passport; + } + + + public ApplicationFormPrefill nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * Get nationality + * @return nationality + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + public ApplicationFormPrefill dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + public ApplicationFormPrefill email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public ApplicationFormPrefill name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + public ApplicationFormPrefill stateOfIncorporation(String stateOfIncorporation) { + this.stateOfIncorporation = stateOfIncorporation; + return this; + } + + /** + * Get stateOfIncorporation + * @return stateOfIncorporation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStateOfIncorporation() { + return stateOfIncorporation; + } + + + @JsonProperty(JSON_PROPERTY_STATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStateOfIncorporation(String stateOfIncorporation) { + this.stateOfIncorporation = stateOfIncorporation; + } + + + public ApplicationFormPrefill entityType(EntityType entityType) { + this.entityType = entityType; + return this; + } + + /** + * Get entityType + * @return entityType + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EntityType getEntityType() { + return entityType; + } + + + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityType(EntityType entityType) { + this.entityType = entityType; + } + + + public ApplicationFormPrefill contact(Contact contact) { + this.contact = contact; + return this; + } + + /** + * Get contact + * @return contact + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Contact getContact() { + return contact; + } + + + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContact(Contact contact) { + this.contact = contact; + } + + + public ApplicationFormPrefill officer(CreateOfficer officer) { + this.officer = officer; + return this; + } + + /** + * Get officer + * @return officer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OFFICER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateOfficer getOfficer() { + return officer; + } + + + @JsonProperty(JSON_PROPERTY_OFFICER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOfficer(CreateOfficer officer) { + this.officer = officer; + } + + + public ApplicationFormPrefill beneficialOwners(List beneficialOwners) { + this.beneficialOwners = beneficialOwners; + return this; + } + + public ApplicationFormPrefill addBeneficialOwnersItem(CreateBeneficialOwner beneficialOwnersItem) { + if (this.beneficialOwners == null) { + this.beneficialOwners = new ArrayList<>(); + } + this.beneficialOwners.add(beneficialOwnersItem); + return this; + } + + /** + * Get beneficialOwners + * @return beneficialOwners + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BENEFICIAL_OWNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getBeneficialOwners() { + return beneficialOwners; + } + + + @JsonProperty(JSON_PROPERTY_BENEFICIAL_OWNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBeneficialOwners(List beneficialOwners) { + this.beneficialOwners = beneficialOwners; + } + + + public ApplicationFormPrefill website(String website) { + this.website = website; + return this; + } + + /** + * Get website + * @return website + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEBSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebsite() { + return website; + } + + + @JsonProperty(JSON_PROPERTY_WEBSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWebsite(String website) { + this.website = website; + } + + + public ApplicationFormPrefill phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public ApplicationFormPrefill address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(Address address) { + this.address = address; + } + + + public ApplicationFormPrefill dba(String dba) { + this.dba = dba; + return this; + } + + /** + * Get dba + * @return dba + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDba() { + return dba; + } + + + @JsonProperty(JSON_PROPERTY_DBA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDba(String dba) { + this.dba = dba; + } + + + public ApplicationFormPrefill ein(String ein) { + this.ein = ein; + return this; + } + + /** + * Get ein + * @return ein + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEin() { + return ein; + } + + + @JsonProperty(JSON_PROPERTY_EIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEin(String ein) { + this.ein = ein; + } + + + public ApplicationFormPrefill jwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + return this; + } + + /** + * Get jwtSubject + * @return jwtSubject + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getJwtSubject() { + return jwtSubject.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getJwtSubject_JsonNullable() { + return jwtSubject; + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + public void setJwtSubject_JsonNullable(JsonNullable jwtSubject) { + this.jwtSubject = jwtSubject; + } + + public void setJwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + } + + + public ApplicationFormPrefill industry(Industry industry) { + this.industry = industry; + return this; + } + + /** + * Get industry + * @return industry + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDUSTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Industry getIndustry() { + return industry; + } + + + @JsonProperty(JSON_PROPERTY_INDUSTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIndustry(Industry industry) { + this.industry = industry; + } + + + /** + * Return true if this ApplicationFormPrefill object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplicationFormPrefill applicationFormPrefill = (ApplicationFormPrefill) o; + return Objects.equals(this.applicationType, applicationFormPrefill.applicationType) && + Objects.equals(this.fullName, applicationFormPrefill.fullName) && + Objects.equals(this.ssn, applicationFormPrefill.ssn) && + Objects.equals(this.passport, applicationFormPrefill.passport) && + Objects.equals(this.nationality, applicationFormPrefill.nationality) && + Objects.equals(this.dateOfBirth, applicationFormPrefill.dateOfBirth) && + Objects.equals(this.email, applicationFormPrefill.email) && + Objects.equals(this.name, applicationFormPrefill.name) && + Objects.equals(this.stateOfIncorporation, applicationFormPrefill.stateOfIncorporation) && + Objects.equals(this.entityType, applicationFormPrefill.entityType) && + Objects.equals(this.contact, applicationFormPrefill.contact) && + Objects.equals(this.officer, applicationFormPrefill.officer) && + Objects.equals(this.beneficialOwners, applicationFormPrefill.beneficialOwners) && + Objects.equals(this.website, applicationFormPrefill.website) && + Objects.equals(this.phone, applicationFormPrefill.phone) && + Objects.equals(this.address, applicationFormPrefill.address) && + Objects.equals(this.dba, applicationFormPrefill.dba) && + Objects.equals(this.ein, applicationFormPrefill.ein) && + equalsNullable(this.jwtSubject, applicationFormPrefill.jwtSubject) && + Objects.equals(this.industry, applicationFormPrefill.industry); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(applicationType, fullName, ssn, passport, nationality, dateOfBirth, email, name, stateOfIncorporation, entityType, contact, officer, beneficialOwners, website, phone, address, dba, ein, hashCodeNullable(jwtSubject), industry); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationFormPrefill {\n"); + sb.append(" applicationType: ").append(toIndentedString(applicationType)).append("\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); + sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" stateOfIncorporation: ").append(toIndentedString(stateOfIncorporation)).append("\n"); + sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" officer: ").append(toIndentedString(officer)).append("\n"); + sb.append(" beneficialOwners: ").append(toIndentedString(beneficialOwners)).append("\n"); + sb.append(" website: ").append(toIndentedString(website)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" dba: ").append(toIndentedString(dba)).append("\n"); + sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); + sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); + sb.append(" industry: ").append(toIndentedString(industry)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `applicationType` to the URL query string + if (getApplicationType() != null) { + joiner.add(String.format("%sapplicationType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getApplicationType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `ssn` to the URL query string + if (getSsn() != null) { + joiner.add(String.format("%sssn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSsn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `passport` to the URL query string + if (getPassport() != null) { + joiner.add(String.format("%spassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nationality` to the URL query string + if (getNationality() != null) { + joiner.add(String.format("%snationality%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNationality()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `stateOfIncorporation` to the URL query string + if (getStateOfIncorporation() != null) { + joiner.add(String.format("%sstateOfIncorporation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStateOfIncorporation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format("%sentityType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEntityType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `contact` to the URL query string + if (getContact() != null) { + joiner.add(getContact().toUrlQueryString(prefix + "contact" + suffix)); + } + + // add `officer` to the URL query string + if (getOfficer() != null) { + joiner.add(getOfficer().toUrlQueryString(prefix + "officer" + suffix)); + } + + // add `beneficialOwners` to the URL query string + if (getBeneficialOwners() != null) { + for (int i = 0; i < getBeneficialOwners().size(); i++) { + if (getBeneficialOwners().get(i) != null) { + joiner.add(getBeneficialOwners().get(i).toUrlQueryString(String.format("%sbeneficialOwners%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `website` to the URL query string + if (getWebsite() != null) { + joiner.add(String.format("%swebsite%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getWebsite()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `dba` to the URL query string + if (getDba() != null) { + joiner.add(String.format("%sdba%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDba()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ein` to the URL query string + if (getEin() != null) { + joiner.add(String.format("%sein%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEin()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `jwtSubject` to the URL query string + if (getJwtSubject() != null) { + joiner.add(String.format("%sjwtSubject%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getJwtSubject()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `industry` to the URL query string + if (getIndustry() != null) { + joiner.add(String.format("%sindustry%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIndustry()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApplicationFormRelationships.java b/src/main/java/unit/java/sdk/model/ApplicationFormRelationships.java new file mode 100644 index 00000000..c57bd14e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApplicationFormRelationships.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ApplicationFormRelationshipsApplication; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApplicationFormRelationships + */ +@JsonPropertyOrder({ + ApplicationFormRelationships.JSON_PROPERTY_APPLICATION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationFormRelationships { + public static final String JSON_PROPERTY_APPLICATION = "application"; + private ApplicationFormRelationshipsApplication application; + + public ApplicationFormRelationships() { + } + + public ApplicationFormRelationships application(ApplicationFormRelationshipsApplication application) { + this.application = application; + return this; + } + + /** + * Get application + * @return application + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApplicationFormRelationshipsApplication getApplication() { + return application; + } + + + @JsonProperty(JSON_PROPERTY_APPLICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setApplication(ApplicationFormRelationshipsApplication application) { + this.application = application; + } + + + /** + * Return true if this applicationFormRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplicationFormRelationships applicationFormRelationships = (ApplicationFormRelationships) o; + return Objects.equals(this.application, applicationFormRelationships.application); + } + + @Override + public int hashCode() { + return Objects.hash(application); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationFormRelationships {\n"); + sb.append(" application: ").append(toIndentedString(application)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `application` to the URL query string + if (getApplication() != null) { + joiner.add(getApplication().toUrlQueryString(prefix + "application" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApplicationFormRelationshipsApplication.java b/src/main/java/unit/java/sdk/model/ApplicationFormRelationshipsApplication.java new file mode 100644 index 00000000..9001f881 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApplicationFormRelationshipsApplication.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ApplicationFormRelationshipsApplicationData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApplicationFormRelationshipsApplication + */ +@JsonPropertyOrder({ + ApplicationFormRelationshipsApplication.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationFormRelationshipsApplication { + public static final String JSON_PROPERTY_DATA = "data"; + private ApplicationFormRelationshipsApplicationData data; + + public ApplicationFormRelationshipsApplication() { + } + + public ApplicationFormRelationshipsApplication data(ApplicationFormRelationshipsApplicationData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApplicationFormRelationshipsApplicationData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(ApplicationFormRelationshipsApplicationData data) { + this.data = data; + } + + + /** + * Return true if this applicationFormRelationships_application object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplicationFormRelationshipsApplication applicationFormRelationshipsApplication = (ApplicationFormRelationshipsApplication) o; + return Objects.equals(this.data, applicationFormRelationshipsApplication.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationFormRelationshipsApplication {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApplicationFormRelationshipsApplicationData.java b/src/main/java/unit/java/sdk/model/ApplicationFormRelationshipsApplicationData.java new file mode 100644 index 00000000..e2d6ac1c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApplicationFormRelationshipsApplicationData.java @@ -0,0 +1,219 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApplicationFormRelationshipsApplicationData + */ +@JsonPropertyOrder({ + ApplicationFormRelationshipsApplicationData.JSON_PROPERTY_ID, + ApplicationFormRelationshipsApplicationData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationFormRelationshipsApplicationData { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + APPLICATION("application"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public ApplicationFormRelationshipsApplicationData() { + } + + public ApplicationFormRelationshipsApplicationData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public ApplicationFormRelationshipsApplicationData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + /** + * Return true if this applicationFormRelationships_application_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplicationFormRelationshipsApplicationData applicationFormRelationshipsApplicationData = (ApplicationFormRelationshipsApplicationData) o; + return Objects.equals(this.id, applicationFormRelationshipsApplicationData.id) && + Objects.equals(this.type, applicationFormRelationshipsApplicationData.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationFormRelationshipsApplicationData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApplicationFormSettingsOverride.java b/src/main/java/unit/java/sdk/model/ApplicationFormSettingsOverride.java new file mode 100644 index 00000000..bafd7470 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApplicationFormSettingsOverride.java @@ -0,0 +1,454 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.ApplicationFormAdditionalDisclosuresInner; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApplicationFormSettingsOverride + */ +@JsonPropertyOrder({ + ApplicationFormSettingsOverride.JSON_PROPERTY_REDIRECT_URL, + ApplicationFormSettingsOverride.JSON_PROPERTY_PRIVACY_POLICY_URL, + ApplicationFormSettingsOverride.JSON_PROPERTY_ELECTRONIC_DISCLOSURES_URL, + ApplicationFormSettingsOverride.JSON_PROPERTY_DEPOSIT_TERMS_URL, + ApplicationFormSettingsOverride.JSON_PROPERTY_CLIENT_TERMS_URL, + ApplicationFormSettingsOverride.JSON_PROPERTY_CARDHOLDER_TERMS_URL, + ApplicationFormSettingsOverride.JSON_PROPERTY_CASH_ADVANCED_TERMS_URL, + ApplicationFormSettingsOverride.JSON_PROPERTY_DEBIT_CARD_DISCLOSURE_URL, + ApplicationFormSettingsOverride.JSON_PROPERTY_ADDITIONAL_DISCLOSURES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationFormSettingsOverride { + public static final String JSON_PROPERTY_REDIRECT_URL = "redirectUrl"; + private String redirectUrl; + + public static final String JSON_PROPERTY_PRIVACY_POLICY_URL = "privacyPolicyUrl"; + private String privacyPolicyUrl; + + public static final String JSON_PROPERTY_ELECTRONIC_DISCLOSURES_URL = "electronicDisclosuresUrl"; + private String electronicDisclosuresUrl; + + public static final String JSON_PROPERTY_DEPOSIT_TERMS_URL = "depositTermsUrl"; + private String depositTermsUrl; + + public static final String JSON_PROPERTY_CLIENT_TERMS_URL = "clientTermsUrl"; + private String clientTermsUrl; + + public static final String JSON_PROPERTY_CARDHOLDER_TERMS_URL = "cardholderTermsUrl"; + private String cardholderTermsUrl; + + public static final String JSON_PROPERTY_CASH_ADVANCED_TERMS_URL = "cashAdvancedTermsUrl"; + private String cashAdvancedTermsUrl; + + public static final String JSON_PROPERTY_DEBIT_CARD_DISCLOSURE_URL = "debitCardDisclosureUrl"; + private String debitCardDisclosureUrl; + + public static final String JSON_PROPERTY_ADDITIONAL_DISCLOSURES = "additionalDisclosures"; + private List additionalDisclosures; + + public ApplicationFormSettingsOverride() { + } + + public ApplicationFormSettingsOverride redirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + return this; + } + + /** + * Get redirectUrl + * @return redirectUrl + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRedirectUrl() { + return redirectUrl; + } + + + @JsonProperty(JSON_PROPERTY_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + + public ApplicationFormSettingsOverride privacyPolicyUrl(String privacyPolicyUrl) { + this.privacyPolicyUrl = privacyPolicyUrl; + return this; + } + + /** + * Get privacyPolicyUrl + * @return privacyPolicyUrl + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIVACY_POLICY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPrivacyPolicyUrl() { + return privacyPolicyUrl; + } + + + @JsonProperty(JSON_PROPERTY_PRIVACY_POLICY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrivacyPolicyUrl(String privacyPolicyUrl) { + this.privacyPolicyUrl = privacyPolicyUrl; + } + + + public ApplicationFormSettingsOverride electronicDisclosuresUrl(String electronicDisclosuresUrl) { + this.electronicDisclosuresUrl = electronicDisclosuresUrl; + return this; + } + + /** + * Get electronicDisclosuresUrl + * @return electronicDisclosuresUrl + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ELECTRONIC_DISCLOSURES_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getElectronicDisclosuresUrl() { + return electronicDisclosuresUrl; + } + + + @JsonProperty(JSON_PROPERTY_ELECTRONIC_DISCLOSURES_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setElectronicDisclosuresUrl(String electronicDisclosuresUrl) { + this.electronicDisclosuresUrl = electronicDisclosuresUrl; + } + + + public ApplicationFormSettingsOverride depositTermsUrl(String depositTermsUrl) { + this.depositTermsUrl = depositTermsUrl; + return this; + } + + /** + * Get depositTermsUrl + * @return depositTermsUrl + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEPOSIT_TERMS_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDepositTermsUrl() { + return depositTermsUrl; + } + + + @JsonProperty(JSON_PROPERTY_DEPOSIT_TERMS_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDepositTermsUrl(String depositTermsUrl) { + this.depositTermsUrl = depositTermsUrl; + } + + + public ApplicationFormSettingsOverride clientTermsUrl(String clientTermsUrl) { + this.clientTermsUrl = clientTermsUrl; + return this; + } + + /** + * Get clientTermsUrl + * @return clientTermsUrl + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLIENT_TERMS_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getClientTermsUrl() { + return clientTermsUrl; + } + + + @JsonProperty(JSON_PROPERTY_CLIENT_TERMS_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setClientTermsUrl(String clientTermsUrl) { + this.clientTermsUrl = clientTermsUrl; + } + + + public ApplicationFormSettingsOverride cardholderTermsUrl(String cardholderTermsUrl) { + this.cardholderTermsUrl = cardholderTermsUrl; + return this; + } + + /** + * Get cardholderTermsUrl + * @return cardholderTermsUrl + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARDHOLDER_TERMS_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCardholderTermsUrl() { + return cardholderTermsUrl; + } + + + @JsonProperty(JSON_PROPERTY_CARDHOLDER_TERMS_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardholderTermsUrl(String cardholderTermsUrl) { + this.cardholderTermsUrl = cardholderTermsUrl; + } + + + public ApplicationFormSettingsOverride cashAdvancedTermsUrl(String cashAdvancedTermsUrl) { + this.cashAdvancedTermsUrl = cashAdvancedTermsUrl; + return this; + } + + /** + * Get cashAdvancedTermsUrl + * @return cashAdvancedTermsUrl + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CASH_ADVANCED_TERMS_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCashAdvancedTermsUrl() { + return cashAdvancedTermsUrl; + } + + + @JsonProperty(JSON_PROPERTY_CASH_ADVANCED_TERMS_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCashAdvancedTermsUrl(String cashAdvancedTermsUrl) { + this.cashAdvancedTermsUrl = cashAdvancedTermsUrl; + } + + + public ApplicationFormSettingsOverride debitCardDisclosureUrl(String debitCardDisclosureUrl) { + this.debitCardDisclosureUrl = debitCardDisclosureUrl; + return this; + } + + /** + * Get debitCardDisclosureUrl + * @return debitCardDisclosureUrl + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEBIT_CARD_DISCLOSURE_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDebitCardDisclosureUrl() { + return debitCardDisclosureUrl; + } + + + @JsonProperty(JSON_PROPERTY_DEBIT_CARD_DISCLOSURE_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDebitCardDisclosureUrl(String debitCardDisclosureUrl) { + this.debitCardDisclosureUrl = debitCardDisclosureUrl; + } + + + public ApplicationFormSettingsOverride additionalDisclosures(List additionalDisclosures) { + this.additionalDisclosures = additionalDisclosures; + return this; + } + + public ApplicationFormSettingsOverride addAdditionalDisclosuresItem(ApplicationFormAdditionalDisclosuresInner additionalDisclosuresItem) { + if (this.additionalDisclosures == null) { + this.additionalDisclosures = new ArrayList<>(); + } + this.additionalDisclosures.add(additionalDisclosuresItem); + return this; + } + + /** + * Get additionalDisclosures + * @return additionalDisclosures + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDITIONAL_DISCLOSURES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getAdditionalDisclosures() { + return additionalDisclosures; + } + + + @JsonProperty(JSON_PROPERTY_ADDITIONAL_DISCLOSURES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdditionalDisclosures(List additionalDisclosures) { + this.additionalDisclosures = additionalDisclosures; + } + + + /** + * Return true if this ApplicationFormSettingsOverride object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplicationFormSettingsOverride applicationFormSettingsOverride = (ApplicationFormSettingsOverride) o; + return Objects.equals(this.redirectUrl, applicationFormSettingsOverride.redirectUrl) && + Objects.equals(this.privacyPolicyUrl, applicationFormSettingsOverride.privacyPolicyUrl) && + Objects.equals(this.electronicDisclosuresUrl, applicationFormSettingsOverride.electronicDisclosuresUrl) && + Objects.equals(this.depositTermsUrl, applicationFormSettingsOverride.depositTermsUrl) && + Objects.equals(this.clientTermsUrl, applicationFormSettingsOverride.clientTermsUrl) && + Objects.equals(this.cardholderTermsUrl, applicationFormSettingsOverride.cardholderTermsUrl) && + Objects.equals(this.cashAdvancedTermsUrl, applicationFormSettingsOverride.cashAdvancedTermsUrl) && + Objects.equals(this.debitCardDisclosureUrl, applicationFormSettingsOverride.debitCardDisclosureUrl) && + Objects.equals(this.additionalDisclosures, applicationFormSettingsOverride.additionalDisclosures); + } + + @Override + public int hashCode() { + return Objects.hash(redirectUrl, privacyPolicyUrl, electronicDisclosuresUrl, depositTermsUrl, clientTermsUrl, cardholderTermsUrl, cashAdvancedTermsUrl, debitCardDisclosureUrl, additionalDisclosures); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationFormSettingsOverride {\n"); + sb.append(" redirectUrl: ").append(toIndentedString(redirectUrl)).append("\n"); + sb.append(" privacyPolicyUrl: ").append(toIndentedString(privacyPolicyUrl)).append("\n"); + sb.append(" electronicDisclosuresUrl: ").append(toIndentedString(electronicDisclosuresUrl)).append("\n"); + sb.append(" depositTermsUrl: ").append(toIndentedString(depositTermsUrl)).append("\n"); + sb.append(" clientTermsUrl: ").append(toIndentedString(clientTermsUrl)).append("\n"); + sb.append(" cardholderTermsUrl: ").append(toIndentedString(cardholderTermsUrl)).append("\n"); + sb.append(" cashAdvancedTermsUrl: ").append(toIndentedString(cashAdvancedTermsUrl)).append("\n"); + sb.append(" debitCardDisclosureUrl: ").append(toIndentedString(debitCardDisclosureUrl)).append("\n"); + sb.append(" additionalDisclosures: ").append(toIndentedString(additionalDisclosures)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `redirectUrl` to the URL query string + if (getRedirectUrl() != null) { + joiner.add(String.format("%sredirectUrl%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRedirectUrl()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `privacyPolicyUrl` to the URL query string + if (getPrivacyPolicyUrl() != null) { + joiner.add(String.format("%sprivacyPolicyUrl%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPrivacyPolicyUrl()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `electronicDisclosuresUrl` to the URL query string + if (getElectronicDisclosuresUrl() != null) { + joiner.add(String.format("%selectronicDisclosuresUrl%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getElectronicDisclosuresUrl()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `depositTermsUrl` to the URL query string + if (getDepositTermsUrl() != null) { + joiner.add(String.format("%sdepositTermsUrl%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDepositTermsUrl()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `clientTermsUrl` to the URL query string + if (getClientTermsUrl() != null) { + joiner.add(String.format("%sclientTermsUrl%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getClientTermsUrl()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardholderTermsUrl` to the URL query string + if (getCardholderTermsUrl() != null) { + joiner.add(String.format("%scardholderTermsUrl%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardholderTermsUrl()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cashAdvancedTermsUrl` to the URL query string + if (getCashAdvancedTermsUrl() != null) { + joiner.add(String.format("%scashAdvancedTermsUrl%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCashAdvancedTermsUrl()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `debitCardDisclosureUrl` to the URL query string + if (getDebitCardDisclosureUrl() != null) { + joiner.add(String.format("%sdebitCardDisclosureUrl%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDebitCardDisclosureUrl()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `additionalDisclosures` to the URL query string + if (getAdditionalDisclosures() != null) { + for (int i = 0; i < getAdditionalDisclosures().size(); i++) { + if (getAdditionalDisclosures().get(i) != null) { + joiner.add(getAdditionalDisclosures().get(i).toUrlQueryString(String.format("%sadditionalDisclosures%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApplicationRelationships.java b/src/main/java/unit/java/sdk/model/ApplicationRelationships.java new file mode 100644 index 00000000..c6f979ca --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApplicationRelationships.java @@ -0,0 +1,372 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ApplicationRelationshipsBeneficialOwners; +import unit.java.sdk.model.ApplicationRelationshipsBeneficiaries; +import unit.java.sdk.model.ApplicationRelationshipsTrustees; +import unit.java.sdk.model.DocumentsRelationship; +import unit.java.sdk.model.OrgRelationship; +import unit.java.sdk.model.Relationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApplicationRelationships + */ +@JsonPropertyOrder({ + ApplicationRelationships.JSON_PROPERTY_ORG, + ApplicationRelationships.JSON_PROPERTY_CUSTOMER, + ApplicationRelationships.JSON_PROPERTY_DOCUMENTS, + ApplicationRelationships.JSON_PROPERTY_APPLICATION_FORM, + ApplicationRelationships.JSON_PROPERTY_TRUSTEES, + ApplicationRelationships.JSON_PROPERTY_BENEFICIARIES, + ApplicationRelationships.JSON_PROPERTY_BENEFICIAL_OWNERS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationRelationships { + public static final String JSON_PROPERTY_ORG = "org"; + private OrgRelationship org; + + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private Relationship customer; + + public static final String JSON_PROPERTY_DOCUMENTS = "documents"; + private DocumentsRelationship documents; + + public static final String JSON_PROPERTY_APPLICATION_FORM = "applicationForm"; + private Relationship applicationForm; + + public static final String JSON_PROPERTY_TRUSTEES = "trustees"; + private ApplicationRelationshipsTrustees trustees; + + public static final String JSON_PROPERTY_BENEFICIARIES = "beneficiaries"; + private ApplicationRelationshipsBeneficiaries beneficiaries; + + public static final String JSON_PROPERTY_BENEFICIAL_OWNERS = "beneficialOwners"; + private ApplicationRelationshipsBeneficialOwners beneficialOwners; + + public ApplicationRelationships() { + } + + public ApplicationRelationships org(OrgRelationship org) { + this.org = org; + return this; + } + + /** + * Get org + * @return org + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OrgRelationship getOrg() { + return org; + } + + + @JsonProperty(JSON_PROPERTY_ORG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOrg(OrgRelationship org) { + this.org = org; + } + + + public ApplicationRelationships customer(Relationship customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Relationship getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomer(Relationship customer) { + this.customer = customer; + } + + + public ApplicationRelationships documents(DocumentsRelationship documents) { + this.documents = documents; + return this; + } + + /** + * Get documents + * @return documents + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOCUMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DocumentsRelationship getDocuments() { + return documents; + } + + + @JsonProperty(JSON_PROPERTY_DOCUMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDocuments(DocumentsRelationship documents) { + this.documents = documents; + } + + + public ApplicationRelationships applicationForm(Relationship applicationForm) { + this.applicationForm = applicationForm; + return this; + } + + /** + * Get applicationForm + * @return applicationForm + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLICATION_FORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Relationship getApplicationForm() { + return applicationForm; + } + + + @JsonProperty(JSON_PROPERTY_APPLICATION_FORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setApplicationForm(Relationship applicationForm) { + this.applicationForm = applicationForm; + } + + + public ApplicationRelationships trustees(ApplicationRelationshipsTrustees trustees) { + this.trustees = trustees; + return this; + } + + /** + * Get trustees + * @return trustees + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRUSTEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApplicationRelationshipsTrustees getTrustees() { + return trustees; + } + + + @JsonProperty(JSON_PROPERTY_TRUSTEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTrustees(ApplicationRelationshipsTrustees trustees) { + this.trustees = trustees; + } + + + public ApplicationRelationships beneficiaries(ApplicationRelationshipsBeneficiaries beneficiaries) { + this.beneficiaries = beneficiaries; + return this; + } + + /** + * Get beneficiaries + * @return beneficiaries + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BENEFICIARIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApplicationRelationshipsBeneficiaries getBeneficiaries() { + return beneficiaries; + } + + + @JsonProperty(JSON_PROPERTY_BENEFICIARIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBeneficiaries(ApplicationRelationshipsBeneficiaries beneficiaries) { + this.beneficiaries = beneficiaries; + } + + + public ApplicationRelationships beneficialOwners(ApplicationRelationshipsBeneficialOwners beneficialOwners) { + this.beneficialOwners = beneficialOwners; + return this; + } + + /** + * Get beneficialOwners + * @return beneficialOwners + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BENEFICIAL_OWNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApplicationRelationshipsBeneficialOwners getBeneficialOwners() { + return beneficialOwners; + } + + + @JsonProperty(JSON_PROPERTY_BENEFICIAL_OWNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBeneficialOwners(ApplicationRelationshipsBeneficialOwners beneficialOwners) { + this.beneficialOwners = beneficialOwners; + } + + + /** + * Return true if this applicationRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplicationRelationships applicationRelationships = (ApplicationRelationships) o; + return Objects.equals(this.org, applicationRelationships.org) && + Objects.equals(this.customer, applicationRelationships.customer) && + Objects.equals(this.documents, applicationRelationships.documents) && + Objects.equals(this.applicationForm, applicationRelationships.applicationForm) && + Objects.equals(this.trustees, applicationRelationships.trustees) && + Objects.equals(this.beneficiaries, applicationRelationships.beneficiaries) && + Objects.equals(this.beneficialOwners, applicationRelationships.beneficialOwners); + } + + @Override + public int hashCode() { + return Objects.hash(org, customer, documents, applicationForm, trustees, beneficiaries, beneficialOwners); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationRelationships {\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" documents: ").append(toIndentedString(documents)).append("\n"); + sb.append(" applicationForm: ").append(toIndentedString(applicationForm)).append("\n"); + sb.append(" trustees: ").append(toIndentedString(trustees)).append("\n"); + sb.append(" beneficiaries: ").append(toIndentedString(beneficiaries)).append("\n"); + sb.append(" beneficialOwners: ").append(toIndentedString(beneficialOwners)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `org` to the URL query string + if (getOrg() != null) { + joiner.add(getOrg().toUrlQueryString(prefix + "org" + suffix)); + } + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + // add `documents` to the URL query string + if (getDocuments() != null) { + joiner.add(String.format("%sdocuments%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDocuments()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `applicationForm` to the URL query string + if (getApplicationForm() != null) { + joiner.add(getApplicationForm().toUrlQueryString(prefix + "applicationForm" + suffix)); + } + + // add `trustees` to the URL query string + if (getTrustees() != null) { + joiner.add(getTrustees().toUrlQueryString(prefix + "trustees" + suffix)); + } + + // add `beneficiaries` to the URL query string + if (getBeneficiaries() != null) { + joiner.add(getBeneficiaries().toUrlQueryString(prefix + "beneficiaries" + suffix)); + } + + // add `beneficialOwners` to the URL query string + if (getBeneficialOwners() != null) { + joiner.add(getBeneficialOwners().toUrlQueryString(prefix + "beneficialOwners" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApplicationRelationshipsBeneficialOwners.java b/src/main/java/unit/java/sdk/model/ApplicationRelationshipsBeneficialOwners.java new file mode 100644 index 00000000..bbc45403 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApplicationRelationshipsBeneficialOwners.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.ApplicationRelationshipsBeneficialOwnersDataInner; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApplicationRelationshipsBeneficialOwners + */ +@JsonPropertyOrder({ + ApplicationRelationshipsBeneficialOwners.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationRelationshipsBeneficialOwners { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public ApplicationRelationshipsBeneficialOwners() { + } + + public ApplicationRelationshipsBeneficialOwners data(List data) { + this.data = data; + return this; + } + + public ApplicationRelationshipsBeneficialOwners addDataItem(ApplicationRelationshipsBeneficialOwnersDataInner dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this applicationRelationships_beneficialOwners object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplicationRelationshipsBeneficialOwners applicationRelationshipsBeneficialOwners = (ApplicationRelationshipsBeneficialOwners) o; + return Objects.equals(this.data, applicationRelationshipsBeneficialOwners.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationRelationshipsBeneficialOwners {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApplicationRelationshipsBeneficialOwnersDataInner.java b/src/main/java/unit/java/sdk/model/ApplicationRelationshipsBeneficialOwnersDataInner.java new file mode 100644 index 00000000..5c8f69ad --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApplicationRelationshipsBeneficialOwnersDataInner.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApplicationRelationshipsBeneficialOwnersDataInner + */ +@JsonPropertyOrder({ + ApplicationRelationshipsBeneficialOwnersDataInner.JSON_PROPERTY_TYPE, + ApplicationRelationshipsBeneficialOwnersDataInner.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationRelationshipsBeneficialOwnersDataInner { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "beneficialOwner"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public ApplicationRelationshipsBeneficialOwnersDataInner() { + } + + public ApplicationRelationshipsBeneficialOwnersDataInner type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public ApplicationRelationshipsBeneficialOwnersDataInner id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this applicationRelationships_beneficialOwners_data_inner object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplicationRelationshipsBeneficialOwnersDataInner applicationRelationshipsBeneficialOwnersDataInner = (ApplicationRelationshipsBeneficialOwnersDataInner) o; + return Objects.equals(this.type, applicationRelationshipsBeneficialOwnersDataInner.type) && + Objects.equals(this.id, applicationRelationshipsBeneficialOwnersDataInner.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationRelationshipsBeneficialOwnersDataInner {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApplicationRelationshipsBeneficiaries.java b/src/main/java/unit/java/sdk/model/ApplicationRelationshipsBeneficiaries.java new file mode 100644 index 00000000..e1a05889 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApplicationRelationshipsBeneficiaries.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.ApplicationRelationshipsBeneficiariesDataInner; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApplicationRelationshipsBeneficiaries + */ +@JsonPropertyOrder({ + ApplicationRelationshipsBeneficiaries.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationRelationshipsBeneficiaries { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public ApplicationRelationshipsBeneficiaries() { + } + + public ApplicationRelationshipsBeneficiaries data(List data) { + this.data = data; + return this; + } + + public ApplicationRelationshipsBeneficiaries addDataItem(ApplicationRelationshipsBeneficiariesDataInner dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this applicationRelationships_beneficiaries object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplicationRelationshipsBeneficiaries applicationRelationshipsBeneficiaries = (ApplicationRelationshipsBeneficiaries) o; + return Objects.equals(this.data, applicationRelationshipsBeneficiaries.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationRelationshipsBeneficiaries {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApplicationRelationshipsBeneficiariesDataInner.java b/src/main/java/unit/java/sdk/model/ApplicationRelationshipsBeneficiariesDataInner.java new file mode 100644 index 00000000..930edf63 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApplicationRelationshipsBeneficiariesDataInner.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApplicationRelationshipsBeneficiariesDataInner + */ +@JsonPropertyOrder({ + ApplicationRelationshipsBeneficiariesDataInner.JSON_PROPERTY_TYPE, + ApplicationRelationshipsBeneficiariesDataInner.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationRelationshipsBeneficiariesDataInner { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "beneficiary"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public ApplicationRelationshipsBeneficiariesDataInner() { + } + + public ApplicationRelationshipsBeneficiariesDataInner type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public ApplicationRelationshipsBeneficiariesDataInner id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this applicationRelationships_beneficiaries_data_inner object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplicationRelationshipsBeneficiariesDataInner applicationRelationshipsBeneficiariesDataInner = (ApplicationRelationshipsBeneficiariesDataInner) o; + return Objects.equals(this.type, applicationRelationshipsBeneficiariesDataInner.type) && + Objects.equals(this.id, applicationRelationshipsBeneficiariesDataInner.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationRelationshipsBeneficiariesDataInner {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApplicationRelationshipsTrustees.java b/src/main/java/unit/java/sdk/model/ApplicationRelationshipsTrustees.java new file mode 100644 index 00000000..0fb648da --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApplicationRelationshipsTrustees.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.ApplicationRelationshipsTrusteesDataInner; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApplicationRelationshipsTrustees + */ +@JsonPropertyOrder({ + ApplicationRelationshipsTrustees.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationRelationshipsTrustees { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public ApplicationRelationshipsTrustees() { + } + + public ApplicationRelationshipsTrustees data(List data) { + this.data = data; + return this; + } + + public ApplicationRelationshipsTrustees addDataItem(ApplicationRelationshipsTrusteesDataInner dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this applicationRelationships_trustees object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplicationRelationshipsTrustees applicationRelationshipsTrustees = (ApplicationRelationshipsTrustees) o; + return Objects.equals(this.data, applicationRelationshipsTrustees.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationRelationshipsTrustees {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApplicationRelationshipsTrusteesDataInner.java b/src/main/java/unit/java/sdk/model/ApplicationRelationshipsTrusteesDataInner.java new file mode 100644 index 00000000..d3f8869a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApplicationRelationshipsTrusteesDataInner.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApplicationRelationshipsTrusteesDataInner + */ +@JsonPropertyOrder({ + ApplicationRelationshipsTrusteesDataInner.JSON_PROPERTY_TYPE, + ApplicationRelationshipsTrusteesDataInner.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationRelationshipsTrusteesDataInner { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "trustee"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public ApplicationRelationshipsTrusteesDataInner() { + } + + public ApplicationRelationshipsTrusteesDataInner type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public ApplicationRelationshipsTrusteesDataInner id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this applicationRelationships_trustees_data_inner object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplicationRelationshipsTrusteesDataInner applicationRelationshipsTrusteesDataInner = (ApplicationRelationshipsTrusteesDataInner) o; + return Objects.equals(this.type, applicationRelationshipsTrusteesDataInner.type) && + Objects.equals(this.id, applicationRelationshipsTrusteesDataInner.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationRelationshipsTrusteesDataInner {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApplicationStatus.java b/src/main/java/unit/java/sdk/model/ApplicationStatus.java new file mode 100644 index 00000000..4a39a08b --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApplicationStatus.java @@ -0,0 +1,86 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets applicationStatus + */ +public enum ApplicationStatus { + + AWAITINGDOCUMENTS("AwaitingDocuments"), + + PENDINGREVIEW("PendingReview"), + + APPROVED("Approved"), + + DENIED("Denied"), + + PENDING("Pending"), + + CANCELED("Canceled"); + + private String value; + + ApplicationStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ApplicationStatus fromValue(String value) { + for (ApplicationStatus b : ApplicationStatus.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } + +} + diff --git a/src/main/java/unit/java/sdk/model/ApproveAuthorizationRequest.java b/src/main/java/unit/java/sdk/model/ApproveAuthorizationRequest.java new file mode 100644 index 00000000..eaf6a2c5 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApproveAuthorizationRequest.java @@ -0,0 +1,150 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApproveAuthorizationRequest + */ +@JsonPropertyOrder({ + ApproveAuthorizationRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApproveAuthorizationRequest { + public static final String JSON_PROPERTY_DATA = "data"; + private ApproveAuthorizationRequest data; + + public ApproveAuthorizationRequest() { + } + + public ApproveAuthorizationRequest data(ApproveAuthorizationRequest data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApproveAuthorizationRequest getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(ApproveAuthorizationRequest data) { + this.data = data; + } + + + /** + * Return true if this ApproveAuthorizationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApproveAuthorizationRequest approveAuthorizationRequest = (ApproveAuthorizationRequest) o; + return Objects.equals(this.data, approveAuthorizationRequest.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApproveAuthorizationRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApproveAuthorizationRequestAttributes.java b/src/main/java/unit/java/sdk/model/ApproveAuthorizationRequestAttributes.java new file mode 100644 index 00000000..187f616e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApproveAuthorizationRequestAttributes.java @@ -0,0 +1,222 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApproveAuthorizationRequestAttributes + */ +@JsonPropertyOrder({ + ApproveAuthorizationRequestAttributes.JSON_PROPERTY_AMOUNT, + ApproveAuthorizationRequestAttributes.JSON_PROPERTY_FUNDING_ACCOUNT, + ApproveAuthorizationRequestAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApproveAuthorizationRequestAttributes { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_FUNDING_ACCOUNT = "fundingAccount"; + private String fundingAccount; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public ApproveAuthorizationRequestAttributes() { + } + + public ApproveAuthorizationRequestAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public ApproveAuthorizationRequestAttributes fundingAccount(String fundingAccount) { + this.fundingAccount = fundingAccount; + return this; + } + + /** + * Get fundingAccount + * @return fundingAccount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FUNDING_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFundingAccount() { + return fundingAccount; + } + + + @JsonProperty(JSON_PROPERTY_FUNDING_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFundingAccount(String fundingAccount) { + this.fundingAccount = fundingAccount; + } + + + public ApproveAuthorizationRequestAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this approveAuthorizationRequest_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApproveAuthorizationRequestAttributes approveAuthorizationRequestAttributes = (ApproveAuthorizationRequestAttributes) o; + return Objects.equals(this.amount, approveAuthorizationRequestAttributes.amount) && + Objects.equals(this.fundingAccount, approveAuthorizationRequestAttributes.fundingAccount) && + Objects.equals(this.tags, approveAuthorizationRequestAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(amount, fundingAccount, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApproveAuthorizationRequestAttributes {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" fundingAccount: ").append(toIndentedString(fundingAccount)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `fundingAccount` to the URL query string + if (getFundingAccount() != null) { + joiner.add(String.format("%sfundingAccount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFundingAccount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApproveCheckPaymentRequest.java b/src/main/java/unit/java/sdk/model/ApproveCheckPaymentRequest.java new file mode 100644 index 00000000..74ede79c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApproveCheckPaymentRequest.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ApproveCheckPaymentRequestData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApproveCheckPaymentRequest + */ +@JsonPropertyOrder({ + ApproveCheckPaymentRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApproveCheckPaymentRequest { + public static final String JSON_PROPERTY_DATA = "data"; + private ApproveCheckPaymentRequestData data; + + public ApproveCheckPaymentRequest() { + } + + public ApproveCheckPaymentRequest data(ApproveCheckPaymentRequestData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApproveCheckPaymentRequestData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(ApproveCheckPaymentRequestData data) { + this.data = data; + } + + + /** + * Return true if this ApproveCheckPaymentRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApproveCheckPaymentRequest approveCheckPaymentRequest = (ApproveCheckPaymentRequest) o; + return Objects.equals(this.data, approveCheckPaymentRequest.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApproveCheckPaymentRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ApproveCheckPaymentRequestData.java b/src/main/java/unit/java/sdk/model/ApproveCheckPaymentRequestData.java new file mode 100644 index 00000000..dcfeef16 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ApproveCheckPaymentRequestData.java @@ -0,0 +1,150 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ApproveCheckPaymentRequestData + */ +@JsonPropertyOrder({ + ApproveCheckPaymentRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApproveCheckPaymentRequestData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "additionalVerification"; + + public ApproveCheckPaymentRequestData() { + } + + public ApproveCheckPaymentRequestData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + /** + * Return true if this ApproveCheckPaymentRequest_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApproveCheckPaymentRequestData approveCheckPaymentRequestData = (ApproveCheckPaymentRequestData) o; + return Objects.equals(this.type, approveCheckPaymentRequestData.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApproveCheckPaymentRequestData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ArchiveCustomerRequest.java b/src/main/java/unit/java/sdk/model/ArchiveCustomerRequest.java new file mode 100644 index 00000000..606eb4c3 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ArchiveCustomerRequest.java @@ -0,0 +1,220 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ArchiveCustomerRequestAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ArchiveCustomerRequest + */ +@JsonPropertyOrder({ + ArchiveCustomerRequest.JSON_PROPERTY_TYPE, + ArchiveCustomerRequest.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ArchiveCustomerRequest { + /** + * Gets or Sets type + */ + public enum TypeEnum { + ARCHIVECUSTOMER("archiveCustomer"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ArchiveCustomerRequestAttributes attributes; + + public ArchiveCustomerRequest() { + } + + public ArchiveCustomerRequest type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public ArchiveCustomerRequest attributes(ArchiveCustomerRequestAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ArchiveCustomerRequestAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(ArchiveCustomerRequestAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this ArchiveCustomerRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArchiveCustomerRequest archiveCustomerRequest = (ArchiveCustomerRequest) o; + return Objects.equals(this.type, archiveCustomerRequest.type) && + Objects.equals(this.attributes, archiveCustomerRequest.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArchiveCustomerRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ArchiveCustomerRequestAttributes.java b/src/main/java/unit/java/sdk/model/ArchiveCustomerRequestAttributes.java new file mode 100644 index 00000000..e4827fd5 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ArchiveCustomerRequestAttributes.java @@ -0,0 +1,197 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ArchiveCustomerRequestAttributes + */ +@JsonPropertyOrder({ + ArchiveCustomerRequestAttributes.JSON_PROPERTY_REASON +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ArchiveCustomerRequestAttributes { + /** + * Gets or Sets reason + */ + public enum ReasonEnum { + INACTIVE("Inactive"), + + FRAUDACHACTIVITY("FraudACHActivity"), + + FRAUDCARDACTIVITY("FraudCardActivity"), + + FRAUDCHECKACTIVITY("FraudCheckActivity"), + + FRAUDAPPLICATIONHISTORY("FraudApplicationHistory"), + + FRAUDACCOUNTACTIVITY("FraudAccountActivity"), + + FRAUDCLIENTIDENTIFIED("FraudClientIdentified"), + + FRAUDLINKEDTOFRAUDULENTCUSTOMER("FraudLinkedToFraudulentCustomer"); + + private String value; + + ReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ReasonEnum fromValue(String value) { + for (ReasonEnum b : ReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_REASON = "reason"; + private ReasonEnum reason; + + public ArchiveCustomerRequestAttributes() { + } + + public ArchiveCustomerRequestAttributes reason(ReasonEnum reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReasonEnum getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(ReasonEnum reason) { + this.reason = reason; + } + + + /** + * Return true if this ArchiveCustomerRequest_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArchiveCustomerRequestAttributes archiveCustomerRequestAttributes = (ArchiveCustomerRequestAttributes) o; + return Objects.equals(this.reason, archiveCustomerRequestAttributes.reason); + } + + @Override + public int hashCode() { + return Objects.hash(reason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArchiveCustomerRequestAttributes {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Astra.java b/src/main/java/unit/java/sdk/model/Astra.java new file mode 100644 index 00000000..56f1c391 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Astra.java @@ -0,0 +1,403 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Astra + */ +@JsonPropertyOrder({ + Astra.JSON_PROPERTY_AUTH_TOKEN, + Astra.JSON_PROPERTY_DEBIT_FEE_PERCENT, + Astra.JSON_PROPERTY_INSTITUTION_ID, + Astra.JSON_PROPERTY_DESTINATION_CARD_ID, + Astra.JSON_PROPERTY_ROUTING_NUMBER, + Astra.JSON_PROPERTY_ACCOUNT_NUMBER, + Astra.JSON_PROPERTY_ACCOUNT_NAME, + Astra.JSON_PROPERTY_REFERENCE_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Astra { + public static final String JSON_PROPERTY_AUTH_TOKEN = "authToken"; + private String authToken; + + public static final String JSON_PROPERTY_DEBIT_FEE_PERCENT = "debitFeePercent"; + private BigDecimal debitFeePercent; + + public static final String JSON_PROPERTY_INSTITUTION_ID = "institutionId"; + private String institutionId; + + public static final String JSON_PROPERTY_DESTINATION_CARD_ID = "destinationCardId"; + private String destinationCardId; + + public static final String JSON_PROPERTY_ROUTING_NUMBER = "routingNumber"; + private String routingNumber; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + private String accountNumber; + + public static final String JSON_PROPERTY_ACCOUNT_NAME = "accountName"; + private String accountName; + + public static final String JSON_PROPERTY_REFERENCE_ID = "referenceId"; + private String referenceId; + + public Astra() { + } + + public Astra authToken(String authToken) { + this.authToken = authToken; + return this; + } + + /** + * Get authToken + * @return authToken + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTH_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAuthToken() { + return authToken; + } + + + @JsonProperty(JSON_PROPERTY_AUTH_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAuthToken(String authToken) { + this.authToken = authToken; + } + + + public Astra debitFeePercent(BigDecimal debitFeePercent) { + this.debitFeePercent = debitFeePercent; + return this; + } + + /** + * Get debitFeePercent + * @return debitFeePercent + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DEBIT_FEE_PERCENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getDebitFeePercent() { + return debitFeePercent; + } + + + @JsonProperty(JSON_PROPERTY_DEBIT_FEE_PERCENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDebitFeePercent(BigDecimal debitFeePercent) { + this.debitFeePercent = debitFeePercent; + } + + + public Astra institutionId(String institutionId) { + this.institutionId = institutionId; + return this; + } + + /** + * Get institutionId + * @return institutionId + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INSTITUTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getInstitutionId() { + return institutionId; + } + + + @JsonProperty(JSON_PROPERTY_INSTITUTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInstitutionId(String institutionId) { + this.institutionId = institutionId; + } + + + public Astra destinationCardId(String destinationCardId) { + this.destinationCardId = destinationCardId; + return this; + } + + /** + * Get destinationCardId + * @return destinationCardId + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESTINATION_CARD_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDestinationCardId() { + return destinationCardId; + } + + + @JsonProperty(JSON_PROPERTY_DESTINATION_CARD_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDestinationCardId(String destinationCardId) { + this.destinationCardId = destinationCardId; + } + + + public Astra routingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; + } + + /** + * Get routingNumber + * @return routingNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getRoutingNumber() { + return routingNumber; + } + + + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + } + + + public Astra accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getAccountNumber() { + return accountNumber; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Astra accountName(String accountName) { + this.accountName = accountName; + return this; + } + + /** + * Get accountName + * @return accountName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountName() { + return accountName; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountName(String accountName) { + this.accountName = accountName; + } + + + public Astra referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Get referenceId + * @return referenceId + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REFERENCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getReferenceId() { + return referenceId; + } + + + @JsonProperty(JSON_PROPERTY_REFERENCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + /** + * Return true if this astra object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Astra astra = (Astra) o; + return Objects.equals(this.authToken, astra.authToken) && + Objects.equals(this.debitFeePercent, astra.debitFeePercent) && + Objects.equals(this.institutionId, astra.institutionId) && + Objects.equals(this.destinationCardId, astra.destinationCardId) && + Objects.equals(this.routingNumber, astra.routingNumber) && + Objects.equals(this.accountNumber, astra.accountNumber) && + Objects.equals(this.accountName, astra.accountName) && + Objects.equals(this.referenceId, astra.referenceId); + } + + @Override + public int hashCode() { + return Objects.hash(authToken, debitFeePercent, institutionId, destinationCardId, routingNumber, accountNumber, accountName, referenceId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Astra {\n"); + sb.append(" authToken: ").append(toIndentedString(authToken)).append("\n"); + sb.append(" debitFeePercent: ").append(toIndentedString(debitFeePercent)).append("\n"); + sb.append(" institutionId: ").append(toIndentedString(institutionId)).append("\n"); + sb.append(" destinationCardId: ").append(toIndentedString(destinationCardId)).append("\n"); + sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" accountName: ").append(toIndentedString(accountName)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `authToken` to the URL query string + if (getAuthToken() != null) { + joiner.add(String.format("%sauthToken%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAuthToken()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `debitFeePercent` to the URL query string + if (getDebitFeePercent() != null) { + joiner.add(String.format("%sdebitFeePercent%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDebitFeePercent()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `institutionId` to the URL query string + if (getInstitutionId() != null) { + joiner.add(String.format("%sinstitutionId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getInstitutionId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `destinationCardId` to the URL query string + if (getDestinationCardId() != null) { + joiner.add(String.format("%sdestinationCardId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDestinationCardId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `routingNumber` to the URL query string + if (getRoutingNumber() != null) { + joiner.add(String.format("%sroutingNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRoutingNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add(String.format("%saccountNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `accountName` to the URL query string + if (getAccountName() != null) { + joiner.add(String.format("%saccountName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `referenceId` to the URL query string + if (getReferenceId() != null) { + joiner.add(String.format("%sreferenceId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReferenceId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AtmAuthorizationRequest.java b/src/main/java/unit/java/sdk/model/AtmAuthorizationRequest.java new file mode 100644 index 00000000..add6e05b --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AtmAuthorizationRequest.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AtmAuthorizationRequestAllOfAttributes; +import unit.java.sdk.model.AuthorizationRequest; +import unit.java.sdk.model.AuthorizationRequestRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * AtmAuthorizationRequest + */ +@JsonPropertyOrder({ + AtmAuthorizationRequest.JSON_PROPERTY_ATTRIBUTES, + AtmAuthorizationRequest.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class AtmAuthorizationRequest extends AuthorizationRequest { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AtmAuthorizationRequestAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private AuthorizationRequestRelationships relationships; + + public AtmAuthorizationRequest() { + } + + public AtmAuthorizationRequest attributes(AtmAuthorizationRequestAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AtmAuthorizationRequestAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(AtmAuthorizationRequestAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public AtmAuthorizationRequest relationships(AuthorizationRequestRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AuthorizationRequestRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(AuthorizationRequestRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public AtmAuthorizationRequest type(String type) { + this.setType(type); + return this; + } + + @Override + public AtmAuthorizationRequest id(String id) { + this.setId(id); + return this; + } + + /** + * Return true if this AtmAuthorizationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AtmAuthorizationRequest atmAuthorizationRequest = (AtmAuthorizationRequest) o; + return Objects.equals(this.attributes, atmAuthorizationRequest.attributes) && + Objects.equals(this.relationships, atmAuthorizationRequest.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AtmAuthorizationRequest {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AtmAuthorizationRequest", AtmAuthorizationRequest.class); + JSON.registerDiscriminator(AtmAuthorizationRequest.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/AtmAuthorizationRequestAllOfAttributes.java b/src/main/java/unit/java/sdk/model/AtmAuthorizationRequestAllOfAttributes.java new file mode 100644 index 00000000..72abd7cc --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AtmAuthorizationRequestAllOfAttributes.java @@ -0,0 +1,607 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AtmAuthorizationRequestAllOfAttributes + */ +@JsonPropertyOrder({ + AtmAuthorizationRequestAllOfAttributes.JSON_PROPERTY_CREATED_AT, + AtmAuthorizationRequestAllOfAttributes.JSON_PROPERTY_AMOUNT, + AtmAuthorizationRequestAllOfAttributes.JSON_PROPERTY_STATUS, + AtmAuthorizationRequestAllOfAttributes.JSON_PROPERTY_PARTIAL_APPROVAL_ALLOWED, + AtmAuthorizationRequestAllOfAttributes.JSON_PROPERTY_APPROVED_AMOUNT, + AtmAuthorizationRequestAllOfAttributes.JSON_PROPERTY_DECLINE_REASON, + AtmAuthorizationRequestAllOfAttributes.JSON_PROPERTY_DIRECTION, + AtmAuthorizationRequestAllOfAttributes.JSON_PROPERTY_ATM_NAME, + AtmAuthorizationRequestAllOfAttributes.JSON_PROPERTY_ATM_LOCATION, + AtmAuthorizationRequestAllOfAttributes.JSON_PROPERTY_SURCHARGE, + AtmAuthorizationRequestAllOfAttributes.JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE, + AtmAuthorizationRequestAllOfAttributes.JSON_PROPERTY_TAGS, + AtmAuthorizationRequestAllOfAttributes.JSON_PROPERTY_CARD_NETWORK +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AtmAuthorizationRequestAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_PARTIAL_APPROVAL_ALLOWED = "partialApprovalAllowed"; + private Boolean partialApprovalAllowed; + + public static final String JSON_PROPERTY_APPROVED_AMOUNT = "approvedAmount"; + private Integer approvedAmount; + + public static final String JSON_PROPERTY_DECLINE_REASON = "declineReason"; + private String declineReason; + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private String direction; + + public static final String JSON_PROPERTY_ATM_NAME = "atmName"; + private String atmName; + + public static final String JSON_PROPERTY_ATM_LOCATION = "atmLocation"; + private String atmLocation; + + public static final String JSON_PROPERTY_SURCHARGE = "surcharge"; + private Integer surcharge; + + public static final String JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE = "internationalServiceFee"; + private JsonNullable internationalServiceFee = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_CARD_NETWORK = "cardNetwork"; + private String cardNetwork; + + public AtmAuthorizationRequestAllOfAttributes() { + } + + public AtmAuthorizationRequestAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public AtmAuthorizationRequestAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public AtmAuthorizationRequestAllOfAttributes status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(String status) { + this.status = status; + } + + + public AtmAuthorizationRequestAllOfAttributes partialApprovalAllowed(Boolean partialApprovalAllowed) { + this.partialApprovalAllowed = partialApprovalAllowed; + return this; + } + + /** + * Get partialApprovalAllowed + * @return partialApprovalAllowed + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARTIAL_APPROVAL_ALLOWED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getPartialApprovalAllowed() { + return partialApprovalAllowed; + } + + + @JsonProperty(JSON_PROPERTY_PARTIAL_APPROVAL_ALLOWED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPartialApprovalAllowed(Boolean partialApprovalAllowed) { + this.partialApprovalAllowed = partialApprovalAllowed; + } + + + public AtmAuthorizationRequestAllOfAttributes approvedAmount(Integer approvedAmount) { + this.approvedAmount = approvedAmount; + return this; + } + + /** + * Get approvedAmount + * @return approvedAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPROVED_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getApprovedAmount() { + return approvedAmount; + } + + + @JsonProperty(JSON_PROPERTY_APPROVED_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setApprovedAmount(Integer approvedAmount) { + this.approvedAmount = approvedAmount; + } + + + public AtmAuthorizationRequestAllOfAttributes declineReason(String declineReason) { + this.declineReason = declineReason; + return this; + } + + /** + * Get declineReason + * @return declineReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECLINE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDeclineReason() { + return declineReason; + } + + + @JsonProperty(JSON_PROPERTY_DECLINE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeclineReason(String declineReason) { + this.declineReason = declineReason; + } + + + public AtmAuthorizationRequestAllOfAttributes direction(String direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(String direction) { + this.direction = direction; + } + + + public AtmAuthorizationRequestAllOfAttributes atmName(String atmName) { + this.atmName = atmName; + return this; + } + + /** + * Get atmName + * @return atmName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATM_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getAtmName() { + return atmName; + } + + + @JsonProperty(JSON_PROPERTY_ATM_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAtmName(String atmName) { + this.atmName = atmName; + } + + + public AtmAuthorizationRequestAllOfAttributes atmLocation(String atmLocation) { + this.atmLocation = atmLocation; + return this; + } + + /** + * Get atmLocation + * @return atmLocation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATM_LOCATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAtmLocation() { + return atmLocation; + } + + + @JsonProperty(JSON_PROPERTY_ATM_LOCATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAtmLocation(String atmLocation) { + this.atmLocation = atmLocation; + } + + + public AtmAuthorizationRequestAllOfAttributes surcharge(Integer surcharge) { + this.surcharge = surcharge; + return this; + } + + /** + * Get surcharge + * @return surcharge + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SURCHARGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getSurcharge() { + return surcharge; + } + + + @JsonProperty(JSON_PROPERTY_SURCHARGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSurcharge(Integer surcharge) { + this.surcharge = surcharge; + } + + + public AtmAuthorizationRequestAllOfAttributes internationalServiceFee(BigDecimal internationalServiceFee) { + this.internationalServiceFee = JsonNullable.of(internationalServiceFee); + return this; + } + + /** + * Get internationalServiceFee + * @return internationalServiceFee + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public BigDecimal getInternationalServiceFee() { + return internationalServiceFee.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getInternationalServiceFee_JsonNullable() { + return internationalServiceFee; + } + + @JsonProperty(JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE) + public void setInternationalServiceFee_JsonNullable(JsonNullable internationalServiceFee) { + this.internationalServiceFee = internationalServiceFee; + } + + public void setInternationalServiceFee(BigDecimal internationalServiceFee) { + this.internationalServiceFee = JsonNullable.of(internationalServiceFee); + } + + + public AtmAuthorizationRequestAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public AtmAuthorizationRequestAllOfAttributes cardNetwork(String cardNetwork) { + this.cardNetwork = cardNetwork; + return this; + } + + /** + * Get cardNetwork + * @return cardNetwork + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_NETWORK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCardNetwork() { + return cardNetwork; + } + + + @JsonProperty(JSON_PROPERTY_CARD_NETWORK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardNetwork(String cardNetwork) { + this.cardNetwork = cardNetwork; + } + + + /** + * Return true if this AtmAuthorizationRequest_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AtmAuthorizationRequestAllOfAttributes atmAuthorizationRequestAllOfAttributes = (AtmAuthorizationRequestAllOfAttributes) o; + return Objects.equals(this.createdAt, atmAuthorizationRequestAllOfAttributes.createdAt) && + Objects.equals(this.amount, atmAuthorizationRequestAllOfAttributes.amount) && + Objects.equals(this.status, atmAuthorizationRequestAllOfAttributes.status) && + Objects.equals(this.partialApprovalAllowed, atmAuthorizationRequestAllOfAttributes.partialApprovalAllowed) && + Objects.equals(this.approvedAmount, atmAuthorizationRequestAllOfAttributes.approvedAmount) && + Objects.equals(this.declineReason, atmAuthorizationRequestAllOfAttributes.declineReason) && + Objects.equals(this.direction, atmAuthorizationRequestAllOfAttributes.direction) && + Objects.equals(this.atmName, atmAuthorizationRequestAllOfAttributes.atmName) && + Objects.equals(this.atmLocation, atmAuthorizationRequestAllOfAttributes.atmLocation) && + Objects.equals(this.surcharge, atmAuthorizationRequestAllOfAttributes.surcharge) && + equalsNullable(this.internationalServiceFee, atmAuthorizationRequestAllOfAttributes.internationalServiceFee) && + Objects.equals(this.tags, atmAuthorizationRequestAllOfAttributes.tags) && + Objects.equals(this.cardNetwork, atmAuthorizationRequestAllOfAttributes.cardNetwork); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, amount, status, partialApprovalAllowed, approvedAmount, declineReason, direction, atmName, atmLocation, surcharge, hashCodeNullable(internationalServiceFee), tags, cardNetwork); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AtmAuthorizationRequestAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" partialApprovalAllowed: ").append(toIndentedString(partialApprovalAllowed)).append("\n"); + sb.append(" approvedAmount: ").append(toIndentedString(approvedAmount)).append("\n"); + sb.append(" declineReason: ").append(toIndentedString(declineReason)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" atmName: ").append(toIndentedString(atmName)).append("\n"); + sb.append(" atmLocation: ").append(toIndentedString(atmLocation)).append("\n"); + sb.append(" surcharge: ").append(toIndentedString(surcharge)).append("\n"); + sb.append(" internationalServiceFee: ").append(toIndentedString(internationalServiceFee)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" cardNetwork: ").append(toIndentedString(cardNetwork)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `partialApprovalAllowed` to the URL query string + if (getPartialApprovalAllowed() != null) { + joiner.add(String.format("%spartialApprovalAllowed%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPartialApprovalAllowed()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `approvedAmount` to the URL query string + if (getApprovedAmount() != null) { + joiner.add(String.format("%sapprovedAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getApprovedAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `declineReason` to the URL query string + if (getDeclineReason() != null) { + joiner.add(String.format("%sdeclineReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDeclineReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `atmName` to the URL query string + if (getAtmName() != null) { + joiner.add(String.format("%satmName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAtmName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `atmLocation` to the URL query string + if (getAtmLocation() != null) { + joiner.add(String.format("%satmLocation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAtmLocation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `surcharge` to the URL query string + if (getSurcharge() != null) { + joiner.add(String.format("%ssurcharge%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSurcharge()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `internationalServiceFee` to the URL query string + if (getInternationalServiceFee() != null) { + joiner.add(String.format("%sinternationalServiceFee%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getInternationalServiceFee()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardNetwork` to the URL query string + if (getCardNetwork() != null) { + joiner.add(String.format("%scardNetwork%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardNetwork()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AtmLocation.java b/src/main/java/unit/java/sdk/model/AtmLocation.java new file mode 100644 index 00000000..1b26737c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AtmLocation.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AtmLocationAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AtmLocation + */ +@JsonPropertyOrder({ + AtmLocation.JSON_PROPERTY_TYPE, + AtmLocation.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AtmLocation { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "atmLocation"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AtmLocationAttributes attributes; + + public AtmLocation() { + } + + public AtmLocation type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public AtmLocation attributes(AtmLocationAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AtmLocationAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(AtmLocationAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this atm_location object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AtmLocation atmLocation = (AtmLocation) o; + return Objects.equals(this.type, atmLocation.type) && + Objects.equals(this.attributes, atmLocation.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AtmLocation {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AtmLocationAttributes.java b/src/main/java/unit/java/sdk/model/AtmLocationAttributes.java new file mode 100644 index 00000000..135d1ab7 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AtmLocationAttributes.java @@ -0,0 +1,368 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.Coordinates; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AtmLocationAttributes + */ +@JsonPropertyOrder({ + AtmLocationAttributes.JSON_PROPERTY_NETWORK, + AtmLocationAttributes.JSON_PROPERTY_LOCATION_NAME, + AtmLocationAttributes.JSON_PROPERTY_COORDINATES, + AtmLocationAttributes.JSON_PROPERTY_ADDRESS, + AtmLocationAttributes.JSON_PROPERTY_DISTANCE, + AtmLocationAttributes.JSON_PROPERTY_SURCHARGE_FREE, + AtmLocationAttributes.JSON_PROPERTY_ACCEPT_DEPOSITS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AtmLocationAttributes { + public static final String JSON_PROPERTY_NETWORK = "network"; + private String network; + + public static final String JSON_PROPERTY_LOCATION_NAME = "locationName"; + private String locationName; + + public static final String JSON_PROPERTY_COORDINATES = "coordinates"; + private Coordinates coordinates; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_DISTANCE = "distance"; + private Integer distance; + + public static final String JSON_PROPERTY_SURCHARGE_FREE = "surchargeFree"; + private Boolean surchargeFree; + + public static final String JSON_PROPERTY_ACCEPT_DEPOSITS = "acceptDeposits"; + private Boolean acceptDeposits; + + public AtmLocationAttributes() { + } + + public AtmLocationAttributes network(String network) { + this.network = network; + return this; + } + + /** + * Get network + * @return network + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNetwork() { + return network; + } + + + @JsonProperty(JSON_PROPERTY_NETWORK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNetwork(String network) { + this.network = network; + } + + + public AtmLocationAttributes locationName(String locationName) { + this.locationName = locationName; + return this; + } + + /** + * Get locationName + * @return locationName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCATION_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLocationName() { + return locationName; + } + + + @JsonProperty(JSON_PROPERTY_LOCATION_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLocationName(String locationName) { + this.locationName = locationName; + } + + + public AtmLocationAttributes coordinates(Coordinates coordinates) { + this.coordinates = coordinates; + return this; + } + + /** + * Get coordinates + * @return coordinates + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COORDINATES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Coordinates getCoordinates() { + return coordinates; + } + + + @JsonProperty(JSON_PROPERTY_COORDINATES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCoordinates(Coordinates coordinates) { + this.coordinates = coordinates; + } + + + public AtmLocationAttributes address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(Address address) { + this.address = address; + } + + + public AtmLocationAttributes distance(Integer distance) { + this.distance = distance; + return this; + } + + /** + * Get distance + * @return distance + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISTANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getDistance() { + return distance; + } + + + @JsonProperty(JSON_PROPERTY_DISTANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDistance(Integer distance) { + this.distance = distance; + } + + + public AtmLocationAttributes surchargeFree(Boolean surchargeFree) { + this.surchargeFree = surchargeFree; + return this; + } + + /** + * Get surchargeFree + * @return surchargeFree + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SURCHARGE_FREE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSurchargeFree() { + return surchargeFree; + } + + + @JsonProperty(JSON_PROPERTY_SURCHARGE_FREE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSurchargeFree(Boolean surchargeFree) { + this.surchargeFree = surchargeFree; + } + + + public AtmLocationAttributes acceptDeposits(Boolean acceptDeposits) { + this.acceptDeposits = acceptDeposits; + return this; + } + + /** + * Get acceptDeposits + * @return acceptDeposits + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCEPT_DEPOSITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getAcceptDeposits() { + return acceptDeposits; + } + + + @JsonProperty(JSON_PROPERTY_ACCEPT_DEPOSITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAcceptDeposits(Boolean acceptDeposits) { + this.acceptDeposits = acceptDeposits; + } + + + /** + * Return true if this atm_location_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AtmLocationAttributes atmLocationAttributes = (AtmLocationAttributes) o; + return Objects.equals(this.network, atmLocationAttributes.network) && + Objects.equals(this.locationName, atmLocationAttributes.locationName) && + Objects.equals(this.coordinates, atmLocationAttributes.coordinates) && + Objects.equals(this.address, atmLocationAttributes.address) && + Objects.equals(this.distance, atmLocationAttributes.distance) && + Objects.equals(this.surchargeFree, atmLocationAttributes.surchargeFree) && + Objects.equals(this.acceptDeposits, atmLocationAttributes.acceptDeposits); + } + + @Override + public int hashCode() { + return Objects.hash(network, locationName, coordinates, address, distance, surchargeFree, acceptDeposits); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AtmLocationAttributes {\n"); + sb.append(" network: ").append(toIndentedString(network)).append("\n"); + sb.append(" locationName: ").append(toIndentedString(locationName)).append("\n"); + sb.append(" coordinates: ").append(toIndentedString(coordinates)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" distance: ").append(toIndentedString(distance)).append("\n"); + sb.append(" surchargeFree: ").append(toIndentedString(surchargeFree)).append("\n"); + sb.append(" acceptDeposits: ").append(toIndentedString(acceptDeposits)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `network` to the URL query string + if (getNetwork() != null) { + joiner.add(String.format("%snetwork%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNetwork()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `locationName` to the URL query string + if (getLocationName() != null) { + joiner.add(String.format("%slocationName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLocationName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `coordinates` to the URL query string + if (getCoordinates() != null) { + joiner.add(getCoordinates().toUrlQueryString(prefix + "coordinates" + suffix)); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `distance` to the URL query string + if (getDistance() != null) { + joiner.add(String.format("%sdistance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDistance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `surchargeFree` to the URL query string + if (getSurchargeFree() != null) { + joiner.add(String.format("%ssurchargeFree%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSurchargeFree()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `acceptDeposits` to the URL query string + if (getAcceptDeposits() != null) { + joiner.add(String.format("%sacceptDeposits%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAcceptDeposits()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AtmTransaction.java b/src/main/java/unit/java/sdk/model/AtmTransaction.java new file mode 100644 index 00000000..25aa27b1 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AtmTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AtmTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * AtmTransaction + */ +@JsonPropertyOrder({ + AtmTransaction.JSON_PROPERTY_ATTRIBUTES, + AtmTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class AtmTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AtmTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public AtmTransaction() { + } + + public AtmTransaction attributes(AtmTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AtmTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(AtmTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public AtmTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public AtmTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public AtmTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this AtmTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AtmTransaction atmTransaction = (AtmTransaction) o; + return Objects.equals(this.attributes, atmTransaction.attributes) && + Objects.equals(this.relationships, atmTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AtmTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AtmTransaction", AtmTransaction.class); + JSON.registerDiscriminator(AtmTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/AtmTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/AtmTransactionAllOfAttributes.java new file mode 100644 index 00000000..0ab9c729 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AtmTransactionAllOfAttributes.java @@ -0,0 +1,685 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AtmTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + AtmTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + AtmTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + AtmTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + AtmTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + AtmTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + AtmTransactionAllOfAttributes.JSON_PROPERTY_CARD_LAST4_DIGITS, + AtmTransactionAllOfAttributes.JSON_PROPERTY_ATM_NAME, + AtmTransactionAllOfAttributes.JSON_PROPERTY_ATM_LOCATION, + AtmTransactionAllOfAttributes.JSON_PROPERTY_SURCHARGE, + AtmTransactionAllOfAttributes.JSON_PROPERTY_TAGS, + AtmTransactionAllOfAttributes.JSON_PROPERTY_NETWORK_TRANSACTION_ID, + AtmTransactionAllOfAttributes.JSON_PROPERTY_INTERCHANGE, + AtmTransactionAllOfAttributes.JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE, + AtmTransactionAllOfAttributes.JSON_PROPERTY_CARD_NETWORK +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AtmTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_CARD_LAST4_DIGITS = "cardLast4Digits"; + private String cardLast4Digits; + + public static final String JSON_PROPERTY_ATM_NAME = "atmName"; + private String atmName; + + public static final String JSON_PROPERTY_ATM_LOCATION = "atmLocation"; + private String atmLocation; + + public static final String JSON_PROPERTY_SURCHARGE = "surcharge"; + private Integer surcharge; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_NETWORK_TRANSACTION_ID = "networkTransactionId"; + private String networkTransactionId; + + public static final String JSON_PROPERTY_INTERCHANGE = "interchange"; + private JsonNullable interchange = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE = "internationalServiceFee"; + private JsonNullable internationalServiceFee = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CARD_NETWORK = "cardNetwork"; + private String cardNetwork; + + public AtmTransactionAllOfAttributes() { + } + + public AtmTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public AtmTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public AtmTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public AtmTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public AtmTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public AtmTransactionAllOfAttributes cardLast4Digits(String cardLast4Digits) { + this.cardLast4Digits = cardLast4Digits; + return this; + } + + /** + * Get cardLast4Digits + * @return cardLast4Digits + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CARD_LAST4_DIGITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCardLast4Digits() { + return cardLast4Digits; + } + + + @JsonProperty(JSON_PROPERTY_CARD_LAST4_DIGITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCardLast4Digits(String cardLast4Digits) { + this.cardLast4Digits = cardLast4Digits; + } + + + public AtmTransactionAllOfAttributes atmName(String atmName) { + this.atmName = atmName; + return this; + } + + /** + * Get atmName + * @return atmName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATM_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getAtmName() { + return atmName; + } + + + @JsonProperty(JSON_PROPERTY_ATM_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAtmName(String atmName) { + this.atmName = atmName; + } + + + public AtmTransactionAllOfAttributes atmLocation(String atmLocation) { + this.atmLocation = atmLocation; + return this; + } + + /** + * Get atmLocation + * @return atmLocation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATM_LOCATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAtmLocation() { + return atmLocation; + } + + + @JsonProperty(JSON_PROPERTY_ATM_LOCATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAtmLocation(String atmLocation) { + this.atmLocation = atmLocation; + } + + + public AtmTransactionAllOfAttributes surcharge(Integer surcharge) { + this.surcharge = surcharge; + return this; + } + + /** + * Get surcharge + * @return surcharge + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SURCHARGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getSurcharge() { + return surcharge; + } + + + @JsonProperty(JSON_PROPERTY_SURCHARGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSurcharge(Integer surcharge) { + this.surcharge = surcharge; + } + + + public AtmTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public AtmTransactionAllOfAttributes networkTransactionId(String networkTransactionId) { + this.networkTransactionId = networkTransactionId; + return this; + } + + /** + * Get networkTransactionId + * @return networkTransactionId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNetworkTransactionId() { + return networkTransactionId; + } + + + @JsonProperty(JSON_PROPERTY_NETWORK_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNetworkTransactionId(String networkTransactionId) { + this.networkTransactionId = networkTransactionId; + } + + + public AtmTransactionAllOfAttributes interchange(String interchange) { + this.interchange = JsonNullable.of(interchange); + return this; + } + + /** + * Get interchange + * @return interchange + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getInterchange() { + return interchange.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTERCHANGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getInterchange_JsonNullable() { + return interchange; + } + + @JsonProperty(JSON_PROPERTY_INTERCHANGE) + public void setInterchange_JsonNullable(JsonNullable interchange) { + this.interchange = interchange; + } + + public void setInterchange(String interchange) { + this.interchange = JsonNullable.of(interchange); + } + + + public AtmTransactionAllOfAttributes internationalServiceFee(Integer internationalServiceFee) { + this.internationalServiceFee = JsonNullable.of(internationalServiceFee); + return this; + } + + /** + * Get internationalServiceFee + * @return internationalServiceFee + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public Integer getInternationalServiceFee() { + return internationalServiceFee.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getInternationalServiceFee_JsonNullable() { + return internationalServiceFee; + } + + @JsonProperty(JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE) + public void setInternationalServiceFee_JsonNullable(JsonNullable internationalServiceFee) { + this.internationalServiceFee = internationalServiceFee; + } + + public void setInternationalServiceFee(Integer internationalServiceFee) { + this.internationalServiceFee = JsonNullable.of(internationalServiceFee); + } + + + public AtmTransactionAllOfAttributes cardNetwork(String cardNetwork) { + this.cardNetwork = cardNetwork; + return this; + } + + /** + * Get cardNetwork + * @return cardNetwork + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_NETWORK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCardNetwork() { + return cardNetwork; + } + + + @JsonProperty(JSON_PROPERTY_CARD_NETWORK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardNetwork(String cardNetwork) { + this.cardNetwork = cardNetwork; + } + + + /** + * Return true if this AtmTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AtmTransactionAllOfAttributes atmTransactionAllOfAttributes = (AtmTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, atmTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, atmTransactionAllOfAttributes.direction) && + Objects.equals(this.amount, atmTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, atmTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, atmTransactionAllOfAttributes.summary) && + Objects.equals(this.cardLast4Digits, atmTransactionAllOfAttributes.cardLast4Digits) && + Objects.equals(this.atmName, atmTransactionAllOfAttributes.atmName) && + Objects.equals(this.atmLocation, atmTransactionAllOfAttributes.atmLocation) && + Objects.equals(this.surcharge, atmTransactionAllOfAttributes.surcharge) && + Objects.equals(this.tags, atmTransactionAllOfAttributes.tags) && + Objects.equals(this.networkTransactionId, atmTransactionAllOfAttributes.networkTransactionId) && + equalsNullable(this.interchange, atmTransactionAllOfAttributes.interchange) && + equalsNullable(this.internationalServiceFee, atmTransactionAllOfAttributes.internationalServiceFee) && + Objects.equals(this.cardNetwork, atmTransactionAllOfAttributes.cardNetwork); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, amount, balance, summary, cardLast4Digits, atmName, atmLocation, surcharge, tags, networkTransactionId, hashCodeNullable(interchange), hashCodeNullable(internationalServiceFee), cardNetwork); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AtmTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" cardLast4Digits: ").append(toIndentedString(cardLast4Digits)).append("\n"); + sb.append(" atmName: ").append(toIndentedString(atmName)).append("\n"); + sb.append(" atmLocation: ").append(toIndentedString(atmLocation)).append("\n"); + sb.append(" surcharge: ").append(toIndentedString(surcharge)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" networkTransactionId: ").append(toIndentedString(networkTransactionId)).append("\n"); + sb.append(" interchange: ").append(toIndentedString(interchange)).append("\n"); + sb.append(" internationalServiceFee: ").append(toIndentedString(internationalServiceFee)).append("\n"); + sb.append(" cardNetwork: ").append(toIndentedString(cardNetwork)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardLast4Digits` to the URL query string + if (getCardLast4Digits() != null) { + joiner.add(String.format("%scardLast4Digits%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardLast4Digits()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `atmName` to the URL query string + if (getAtmName() != null) { + joiner.add(String.format("%satmName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAtmName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `atmLocation` to the URL query string + if (getAtmLocation() != null) { + joiner.add(String.format("%satmLocation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAtmLocation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `surcharge` to the URL query string + if (getSurcharge() != null) { + joiner.add(String.format("%ssurcharge%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSurcharge()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `networkTransactionId` to the URL query string + if (getNetworkTransactionId() != null) { + joiner.add(String.format("%snetworkTransactionId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNetworkTransactionId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `interchange` to the URL query string + if (getInterchange() != null) { + joiner.add(String.format("%sinterchange%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getInterchange()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `internationalServiceFee` to the URL query string + if (getInternationalServiceFee() != null) { + joiner.add(String.format("%sinternationalServiceFee%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getInternationalServiceFee()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardNetwork` to the URL query string + if (getCardNetwork() != null) { + joiner.add(String.format("%scardNetwork%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardNetwork()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Authorization.java b/src/main/java/unit/java/sdk/model/Authorization.java new file mode 100644 index 00000000..c8dd8c00 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Authorization.java @@ -0,0 +1,259 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Authorization + */ +@JsonPropertyOrder({ + Authorization.JSON_PROPERTY_TYPE, + Authorization.JSON_PROPERTY_ID, + Authorization.JSON_PROPERTY_ATTRIBUTES, + Authorization.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Authorization { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "authorization"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AuthorizationAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private Object relationships; + + public Authorization() { + } + + public Authorization type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public Authorization id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + public Authorization attributes(AuthorizationAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AuthorizationAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(AuthorizationAttributes attributes) { + this.attributes = attributes; + } + + + public Authorization relationships(Object relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Object getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(Object relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this authorization object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Authorization authorization = (Authorization) o; + return Objects.equals(this.type, authorization.type) && + Objects.equals(this.id, authorization.id) && + Objects.equals(this.attributes, authorization.attributes) && + Objects.equals(this.relationships, authorization.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Authorization {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(String.format("%srelationships%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRelationships()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AuthorizationAttributes.java b/src/main/java/unit/java/sdk/model/AuthorizationAttributes.java new file mode 100644 index 00000000..3792b6ee --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AuthorizationAttributes.java @@ -0,0 +1,621 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.CardVerificationData; +import unit.java.sdk.model.Merchant; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AuthorizationAttributes + */ +@JsonPropertyOrder({ + AuthorizationAttributes.JSON_PROPERTY_CREATED_AT, + AuthorizationAttributes.JSON_PROPERTY_AMOUNT, + AuthorizationAttributes.JSON_PROPERTY_CARD_LAST4_DIGITS, + AuthorizationAttributes.JSON_PROPERTY_MERCHANT, + AuthorizationAttributes.JSON_PROPERTY_RECURRING, + AuthorizationAttributes.JSON_PROPERTY_STATUS, + AuthorizationAttributes.JSON_PROPERTY_DECLINE_REASON, + AuthorizationAttributes.JSON_PROPERTY_TAGS, + AuthorizationAttributes.JSON_PROPERTY_PAYMENT_METHOD, + AuthorizationAttributes.JSON_PROPERTY_DIGITAL_WALLET, + AuthorizationAttributes.JSON_PROPERTY_SUMMARY, + AuthorizationAttributes.JSON_PROPERTY_CARD_VERIFICATION_DATA, + AuthorizationAttributes.JSON_PROPERTY_CARD_NETWORK, + AuthorizationAttributes.JSON_PROPERTY_CASH_WITHDRAWAL_AMOUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuthorizationAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_CARD_LAST4_DIGITS = "cardLast4Digits"; + private String cardLast4Digits; + + public static final String JSON_PROPERTY_MERCHANT = "merchant"; + private Merchant merchant; + + public static final String JSON_PROPERTY_RECURRING = "recurring"; + private Boolean recurring; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_DECLINE_REASON = "declineReason"; + private String declineReason; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_PAYMENT_METHOD = "paymentMethod"; + private String paymentMethod; + + public static final String JSON_PROPERTY_DIGITAL_WALLET = "digitalWallet"; + private String digitalWallet; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_CARD_VERIFICATION_DATA = "cardVerificationData"; + private CardVerificationData cardVerificationData; + + public static final String JSON_PROPERTY_CARD_NETWORK = "cardNetwork"; + private String cardNetwork; + + public static final String JSON_PROPERTY_CASH_WITHDRAWAL_AMOUNT = "cashWithdrawalAmount"; + private Integer cashWithdrawalAmount; + + public AuthorizationAttributes() { + } + + public AuthorizationAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public AuthorizationAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public AuthorizationAttributes cardLast4Digits(String cardLast4Digits) { + this.cardLast4Digits = cardLast4Digits; + return this; + } + + /** + * Get cardLast4Digits + * @return cardLast4Digits + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CARD_LAST4_DIGITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCardLast4Digits() { + return cardLast4Digits; + } + + + @JsonProperty(JSON_PROPERTY_CARD_LAST4_DIGITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCardLast4Digits(String cardLast4Digits) { + this.cardLast4Digits = cardLast4Digits; + } + + + public AuthorizationAttributes merchant(Merchant merchant) { + this.merchant = merchant; + return this; + } + + /** + * Get merchant + * @return merchant + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MERCHANT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Merchant getMerchant() { + return merchant; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMerchant(Merchant merchant) { + this.merchant = merchant; + } + + + public AuthorizationAttributes recurring(Boolean recurring) { + this.recurring = recurring; + return this; + } + + /** + * Get recurring + * @return recurring + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECURRING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getRecurring() { + return recurring; + } + + + @JsonProperty(JSON_PROPERTY_RECURRING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRecurring(Boolean recurring) { + this.recurring = recurring; + } + + + public AuthorizationAttributes status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(String status) { + this.status = status; + } + + + public AuthorizationAttributes declineReason(String declineReason) { + this.declineReason = declineReason; + return this; + } + + /** + * Get declineReason + * @return declineReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECLINE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDeclineReason() { + return declineReason; + } + + + @JsonProperty(JSON_PROPERTY_DECLINE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeclineReason(String declineReason) { + this.declineReason = declineReason; + } + + + public AuthorizationAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public AuthorizationAttributes paymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + + /** + * Get paymentMethod + * @return paymentMethod + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYMENT_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPaymentMethod() { + return paymentMethod; + } + + + @JsonProperty(JSON_PROPERTY_PAYMENT_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + } + + + public AuthorizationAttributes digitalWallet(String digitalWallet) { + this.digitalWallet = digitalWallet; + return this; + } + + /** + * Get digitalWallet + * @return digitalWallet + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DIGITAL_WALLET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDigitalWallet() { + return digitalWallet; + } + + + @JsonProperty(JSON_PROPERTY_DIGITAL_WALLET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDigitalWallet(String digitalWallet) { + this.digitalWallet = digitalWallet; + } + + + public AuthorizationAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public AuthorizationAttributes cardVerificationData(CardVerificationData cardVerificationData) { + this.cardVerificationData = cardVerificationData; + return this; + } + + /** + * Get cardVerificationData + * @return cardVerificationData + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_VERIFICATION_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CardVerificationData getCardVerificationData() { + return cardVerificationData; + } + + + @JsonProperty(JSON_PROPERTY_CARD_VERIFICATION_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardVerificationData(CardVerificationData cardVerificationData) { + this.cardVerificationData = cardVerificationData; + } + + + public AuthorizationAttributes cardNetwork(String cardNetwork) { + this.cardNetwork = cardNetwork; + return this; + } + + /** + * Get cardNetwork + * @return cardNetwork + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_NETWORK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCardNetwork() { + return cardNetwork; + } + + + @JsonProperty(JSON_PROPERTY_CARD_NETWORK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardNetwork(String cardNetwork) { + this.cardNetwork = cardNetwork; + } + + + public AuthorizationAttributes cashWithdrawalAmount(Integer cashWithdrawalAmount) { + this.cashWithdrawalAmount = cashWithdrawalAmount; + return this; + } + + /** + * Get cashWithdrawalAmount + * @return cashWithdrawalAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CASH_WITHDRAWAL_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getCashWithdrawalAmount() { + return cashWithdrawalAmount; + } + + + @JsonProperty(JSON_PROPERTY_CASH_WITHDRAWAL_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCashWithdrawalAmount(Integer cashWithdrawalAmount) { + this.cashWithdrawalAmount = cashWithdrawalAmount; + } + + + /** + * Return true if this authorization_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorizationAttributes authorizationAttributes = (AuthorizationAttributes) o; + return Objects.equals(this.createdAt, authorizationAttributes.createdAt) && + Objects.equals(this.amount, authorizationAttributes.amount) && + Objects.equals(this.cardLast4Digits, authorizationAttributes.cardLast4Digits) && + Objects.equals(this.merchant, authorizationAttributes.merchant) && + Objects.equals(this.recurring, authorizationAttributes.recurring) && + Objects.equals(this.status, authorizationAttributes.status) && + Objects.equals(this.declineReason, authorizationAttributes.declineReason) && + Objects.equals(this.tags, authorizationAttributes.tags) && + Objects.equals(this.paymentMethod, authorizationAttributes.paymentMethod) && + Objects.equals(this.digitalWallet, authorizationAttributes.digitalWallet) && + Objects.equals(this.summary, authorizationAttributes.summary) && + Objects.equals(this.cardVerificationData, authorizationAttributes.cardVerificationData) && + Objects.equals(this.cardNetwork, authorizationAttributes.cardNetwork) && + Objects.equals(this.cashWithdrawalAmount, authorizationAttributes.cashWithdrawalAmount); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, amount, cardLast4Digits, merchant, recurring, status, declineReason, tags, paymentMethod, digitalWallet, summary, cardVerificationData, cardNetwork, cashWithdrawalAmount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorizationAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" cardLast4Digits: ").append(toIndentedString(cardLast4Digits)).append("\n"); + sb.append(" merchant: ").append(toIndentedString(merchant)).append("\n"); + sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" declineReason: ").append(toIndentedString(declineReason)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n"); + sb.append(" digitalWallet: ").append(toIndentedString(digitalWallet)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" cardVerificationData: ").append(toIndentedString(cardVerificationData)).append("\n"); + sb.append(" cardNetwork: ").append(toIndentedString(cardNetwork)).append("\n"); + sb.append(" cashWithdrawalAmount: ").append(toIndentedString(cashWithdrawalAmount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardLast4Digits` to the URL query string + if (getCardLast4Digits() != null) { + joiner.add(String.format("%scardLast4Digits%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardLast4Digits()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `merchant` to the URL query string + if (getMerchant() != null) { + joiner.add(getMerchant().toUrlQueryString(prefix + "merchant" + suffix)); + } + + // add `recurring` to the URL query string + if (getRecurring() != null) { + joiner.add(String.format("%srecurring%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRecurring()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `declineReason` to the URL query string + if (getDeclineReason() != null) { + joiner.add(String.format("%sdeclineReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDeclineReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `paymentMethod` to the URL query string + if (getPaymentMethod() != null) { + joiner.add(String.format("%spaymentMethod%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPaymentMethod()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `digitalWallet` to the URL query string + if (getDigitalWallet() != null) { + joiner.add(String.format("%sdigitalWallet%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDigitalWallet()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardVerificationData` to the URL query string + if (getCardVerificationData() != null) { + joiner.add(getCardVerificationData().toUrlQueryString(prefix + "cardVerificationData" + suffix)); + } + + // add `cardNetwork` to the URL query string + if (getCardNetwork() != null) { + joiner.add(String.format("%scardNetwork%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardNetwork()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cashWithdrawalAmount` to the URL query string + if (getCashWithdrawalAmount() != null) { + joiner.add(String.format("%scashWithdrawalAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCashWithdrawalAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AuthorizationRelationship.java b/src/main/java/unit/java/sdk/model/AuthorizationRelationship.java new file mode 100644 index 00000000..653a6bb8 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AuthorizationRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationRelationshipData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AuthorizationRelationship + */ +@JsonPropertyOrder({ + AuthorizationRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuthorizationRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private AuthorizationRelationshipData data; + + public AuthorizationRelationship() { + } + + public AuthorizationRelationship data(AuthorizationRelationshipData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AuthorizationRelationshipData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(AuthorizationRelationshipData data) { + this.data = data; + } + + + /** + * Return true if this authorizationRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorizationRelationship authorizationRelationship = (AuthorizationRelationship) o; + return Objects.equals(this.data, authorizationRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorizationRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AuthorizationRelationshipData.java b/src/main/java/unit/java/sdk/model/AuthorizationRelationshipData.java new file mode 100644 index 00000000..c2dc6be2 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AuthorizationRelationshipData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AuthorizationRelationshipData + */ +@JsonPropertyOrder({ + AuthorizationRelationshipData.JSON_PROPERTY_TYPE, + AuthorizationRelationshipData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuthorizationRelationshipData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "authorization"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public AuthorizationRelationshipData() { + } + + public AuthorizationRelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public AuthorizationRelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this authorizationRelationship_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorizationRelationshipData authorizationRelationshipData = (AuthorizationRelationshipData) o; + return Objects.equals(this.type, authorizationRelationshipData.type) && + Objects.equals(this.id, authorizationRelationshipData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorizationRelationshipData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AuthorizationRequest.java b/src/main/java/unit/java/sdk/model/AuthorizationRequest.java new file mode 100644 index 00000000..5b70b291 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AuthorizationRequest.java @@ -0,0 +1,210 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * AuthorizationRequest + */ +@JsonPropertyOrder({ + AuthorizationRequest.JSON_PROPERTY_TYPE, + AuthorizationRequest.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = AtmAuthorizationRequest.class, name = "atmAuthorizationRequest"), + @JsonSubTypes.Type(value = CardTransactionAuthorizationRequest.class, name = "cardTransactionAuthorizationRequest"), + @JsonSubTypes.Type(value = PurchaseAuthorizationRequest.class, name = "purchaseAuthorizationRequest"), +}) + +public class AuthorizationRequest { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public AuthorizationRequest() { + } + + public AuthorizationRequest type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public AuthorizationRequest id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this authorization_request object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorizationRequest authorizationRequest = (AuthorizationRequest) o; + return Objects.equals(this.type, authorizationRequest.type) && + Objects.equals(this.id, authorizationRequest.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorizationRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("atmAuthorizationRequest", AtmAuthorizationRequest.class); + mappings.put("cardTransactionAuthorizationRequest", CardTransactionAuthorizationRequest.class); + mappings.put("purchaseAuthorizationRequest", PurchaseAuthorizationRequest.class); + mappings.put("authorization_request", AuthorizationRequest.class); + JSON.registerDiscriminator(AuthorizationRequest.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/AuthorizationRequestRelationship.java b/src/main/java/unit/java/sdk/model/AuthorizationRequestRelationship.java new file mode 100644 index 00000000..7c7d8d1c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AuthorizationRequestRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationRequestRelationshipData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AuthorizationRequestRelationship + */ +@JsonPropertyOrder({ + AuthorizationRequestRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuthorizationRequestRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private AuthorizationRequestRelationshipData data; + + public AuthorizationRequestRelationship() { + } + + public AuthorizationRequestRelationship data(AuthorizationRequestRelationshipData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AuthorizationRequestRelationshipData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(AuthorizationRequestRelationshipData data) { + this.data = data; + } + + + /** + * Return true if this authorizationRequestRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorizationRequestRelationship authorizationRequestRelationship = (AuthorizationRequestRelationship) o; + return Objects.equals(this.data, authorizationRequestRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorizationRequestRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AuthorizationRequestRelationshipData.java b/src/main/java/unit/java/sdk/model/AuthorizationRequestRelationshipData.java new file mode 100644 index 00000000..95add2cf --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AuthorizationRequestRelationshipData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AuthorizationRequestRelationshipData + */ +@JsonPropertyOrder({ + AuthorizationRequestRelationshipData.JSON_PROPERTY_TYPE, + AuthorizationRequestRelationshipData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuthorizationRequestRelationshipData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "authorizationRequest"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public AuthorizationRequestRelationshipData() { + } + + public AuthorizationRequestRelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public AuthorizationRequestRelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this authorizationRequestRelationship_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorizationRequestRelationshipData authorizationRequestRelationshipData = (AuthorizationRequestRelationshipData) o; + return Objects.equals(this.type, authorizationRequestRelationshipData.type) && + Objects.equals(this.id, authorizationRequestRelationshipData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorizationRequestRelationshipData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AuthorizationRequestRelationships.java b/src/main/java/unit/java/sdk/model/AuthorizationRequestRelationships.java new file mode 100644 index 00000000..c1e19646 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AuthorizationRequestRelationships.java @@ -0,0 +1,261 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationRequestRelationshipsCard; +import unit.java.sdk.model.RelationshipsAccount; +import unit.java.sdk.model.RelationshipsCustomer; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AuthorizationRequestRelationships + */ +@JsonPropertyOrder({ + AuthorizationRequestRelationships.JSON_PROPERTY_CUSTOMER, + AuthorizationRequestRelationships.JSON_PROPERTY_ACCOUNT, + AuthorizationRequestRelationships.JSON_PROPERTY_FUNDING_ACCOUNT, + AuthorizationRequestRelationships.JSON_PROPERTY_CARD +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuthorizationRequestRelationships { + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private RelationshipsCustomer customer; + + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private RelationshipsAccount account; + + public static final String JSON_PROPERTY_FUNDING_ACCOUNT = "fundingAccount"; + private RelationshipsAccount fundingAccount; + + public static final String JSON_PROPERTY_CARD = "card"; + private AuthorizationRequestRelationshipsCard card; + + public AuthorizationRequestRelationships() { + } + + public AuthorizationRequestRelationships customer(RelationshipsCustomer customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RelationshipsCustomer getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomer(RelationshipsCustomer customer) { + this.customer = customer; + } + + + public AuthorizationRequestRelationships account(RelationshipsAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RelationshipsAccount getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(RelationshipsAccount account) { + this.account = account; + } + + + public AuthorizationRequestRelationships fundingAccount(RelationshipsAccount fundingAccount) { + this.fundingAccount = fundingAccount; + return this; + } + + /** + * Get fundingAccount + * @return fundingAccount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FUNDING_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RelationshipsAccount getFundingAccount() { + return fundingAccount; + } + + + @JsonProperty(JSON_PROPERTY_FUNDING_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFundingAccount(RelationshipsAccount fundingAccount) { + this.fundingAccount = fundingAccount; + } + + + public AuthorizationRequestRelationships card(AuthorizationRequestRelationshipsCard card) { + this.card = card; + return this; + } + + /** + * Get card + * @return card + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CARD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AuthorizationRequestRelationshipsCard getCard() { + return card; + } + + + @JsonProperty(JSON_PROPERTY_CARD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCard(AuthorizationRequestRelationshipsCard card) { + this.card = card; + } + + + /** + * Return true if this authorizationRequestRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorizationRequestRelationships authorizationRequestRelationships = (AuthorizationRequestRelationships) o; + return Objects.equals(this.customer, authorizationRequestRelationships.customer) && + Objects.equals(this.account, authorizationRequestRelationships.account) && + Objects.equals(this.fundingAccount, authorizationRequestRelationships.fundingAccount) && + Objects.equals(this.card, authorizationRequestRelationships.card); + } + + @Override + public int hashCode() { + return Objects.hash(customer, account, fundingAccount, card); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorizationRequestRelationships {\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" fundingAccount: ").append(toIndentedString(fundingAccount)).append("\n"); + sb.append(" card: ").append(toIndentedString(card)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `fundingAccount` to the URL query string + if (getFundingAccount() != null) { + joiner.add(getFundingAccount().toUrlQueryString(prefix + "fundingAccount" + suffix)); + } + + // add `card` to the URL query string + if (getCard() != null) { + joiner.add(getCard().toUrlQueryString(prefix + "card" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AuthorizationRequestRelationshipsCard.java b/src/main/java/unit/java/sdk/model/AuthorizationRequestRelationshipsCard.java new file mode 100644 index 00000000..3d4cbbdd --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AuthorizationRequestRelationshipsCard.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationRequestRelationshipsCardData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AuthorizationRequestRelationshipsCard + */ +@JsonPropertyOrder({ + AuthorizationRequestRelationshipsCard.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuthorizationRequestRelationshipsCard { + public static final String JSON_PROPERTY_DATA = "data"; + private AuthorizationRequestRelationshipsCardData data; + + public AuthorizationRequestRelationshipsCard() { + } + + public AuthorizationRequestRelationshipsCard data(AuthorizationRequestRelationshipsCardData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AuthorizationRequestRelationshipsCardData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(AuthorizationRequestRelationshipsCardData data) { + this.data = data; + } + + + /** + * Return true if this authorizationRequestRelationships_card object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorizationRequestRelationshipsCard authorizationRequestRelationshipsCard = (AuthorizationRequestRelationshipsCard) o; + return Objects.equals(this.data, authorizationRequestRelationshipsCard.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorizationRequestRelationshipsCard {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AuthorizationRequestRelationshipsCardData.java b/src/main/java/unit/java/sdk/model/AuthorizationRequestRelationshipsCardData.java new file mode 100644 index 00000000..262ca44f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AuthorizationRequestRelationshipsCardData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AuthorizationRequestRelationshipsCardData + */ +@JsonPropertyOrder({ + AuthorizationRequestRelationshipsCardData.JSON_PROPERTY_TYPE, + AuthorizationRequestRelationshipsCardData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuthorizationRequestRelationshipsCardData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "card"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public AuthorizationRequestRelationshipsCardData() { + } + + public AuthorizationRequestRelationshipsCardData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public AuthorizationRequestRelationshipsCardData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this authorizationRequestRelationships_card_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorizationRequestRelationshipsCardData authorizationRequestRelationshipsCardData = (AuthorizationRequestRelationshipsCardData) o; + return Objects.equals(this.type, authorizationRequestRelationshipsCardData.type) && + Objects.equals(this.id, authorizationRequestRelationshipsCardData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorizationRequestRelationshipsCardData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/AuthorizedUser.java b/src/main/java/unit/java/sdk/model/AuthorizedUser.java new file mode 100644 index 00000000..9e61b4e5 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/AuthorizedUser.java @@ -0,0 +1,283 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AuthorizedUser + */ +@JsonPropertyOrder({ + AuthorizedUser.JSON_PROPERTY_FULL_NAME, + AuthorizedUser.JSON_PROPERTY_EMAIL, + AuthorizedUser.JSON_PROPERTY_PHONE, + AuthorizedUser.JSON_PROPERTY_JWT_SUBJECT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuthorizedUser { + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_JWT_SUBJECT = "jwtSubject"; + private JsonNullable jwtSubject = JsonNullable.undefined(); + + public AuthorizedUser() { + } + + public AuthorizedUser fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public AuthorizedUser email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEmail(String email) { + this.email = email; + } + + + public AuthorizedUser phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public AuthorizedUser jwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + return this; + } + + /** + * Get jwtSubject + * @return jwtSubject + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getJwtSubject() { + return jwtSubject.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getJwtSubject_JsonNullable() { + return jwtSubject; + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + public void setJwtSubject_JsonNullable(JsonNullable jwtSubject) { + this.jwtSubject = jwtSubject; + } + + public void setJwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + } + + + /** + * Return true if this authorizedUser object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorizedUser authorizedUser = (AuthorizedUser) o; + return Objects.equals(this.fullName, authorizedUser.fullName) && + Objects.equals(this.email, authorizedUser.email) && + Objects.equals(this.phone, authorizedUser.phone) && + equalsNullable(this.jwtSubject, authorizedUser.jwtSubject); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(fullName, email, phone, hashCodeNullable(jwtSubject)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorizedUser {\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `jwtSubject` to the URL query string + if (getJwtSubject() != null) { + joiner.add(String.format("%sjwtSubject%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getJwtSubject()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/BIN.java b/src/main/java/unit/java/sdk/model/BIN.java new file mode 100644 index 00000000..52094f06 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BIN.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * BIN + */ +@JsonPropertyOrder({ + BIN.JSON_PROPERTY_BIN, + BIN.JSON_PROPERTY_INSTITUTION_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BIN { + public static final String JSON_PROPERTY_BIN = "bin"; + private String bin; + + public static final String JSON_PROPERTY_INSTITUTION_ID = "institutionId"; + private String institutionId; + + public BIN() { + } + + public BIN bin(String bin) { + this.bin = bin; + return this; + } + + /** + * Get bin + * @return bin + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getBin() { + return bin; + } + + + @JsonProperty(JSON_PROPERTY_BIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBin(String bin) { + this.bin = bin; + } + + + public BIN institutionId(String institutionId) { + this.institutionId = institutionId; + return this; + } + + /** + * Get institutionId + * @return institutionId + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INSTITUTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getInstitutionId() { + return institutionId; + } + + + @JsonProperty(JSON_PROPERTY_INSTITUTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInstitutionId(String institutionId) { + this.institutionId = institutionId; + } + + + /** + * Return true if this BIN object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BIN BIN = (BIN) o; + return Objects.equals(this.bin, BIN.bin) && + Objects.equals(this.institutionId, BIN.institutionId); + } + + @Override + public int hashCode() { + return Objects.hash(bin, institutionId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BIN {\n"); + sb.append(" bin: ").append(toIndentedString(bin)).append("\n"); + sb.append(" institutionId: ").append(toIndentedString(institutionId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `bin` to the URL query string + if (getBin() != null) { + joiner.add(String.format("%sbin%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBin()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `institutionId` to the URL query string + if (getInstitutionId() != null) { + joiner.add(String.format("%sinstitutionId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getInstitutionId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/BankRepaymentTransaction.java b/src/main/java/unit/java/sdk/model/BankRepaymentTransaction.java new file mode 100644 index 00000000..311221ba --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BankRepaymentTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BankRepaymentTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * BankRepaymentTransaction + */ +@JsonPropertyOrder({ + BankRepaymentTransaction.JSON_PROPERTY_ATTRIBUTES, + BankRepaymentTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class BankRepaymentTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private BankRepaymentTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public BankRepaymentTransaction() { + } + + public BankRepaymentTransaction attributes(BankRepaymentTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BankRepaymentTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(BankRepaymentTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public BankRepaymentTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public BankRepaymentTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public BankRepaymentTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this BankRepaymentTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BankRepaymentTransaction bankRepaymentTransaction = (BankRepaymentTransaction) o; + return Objects.equals(this.attributes, bankRepaymentTransaction.attributes) && + Objects.equals(this.relationships, bankRepaymentTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BankRepaymentTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("BankRepaymentTransaction", BankRepaymentTransaction.class); + JSON.registerDiscriminator(BankRepaymentTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/BankRepaymentTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/BankRepaymentTransactionAllOfAttributes.java new file mode 100644 index 00000000..c8c28b2d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BankRepaymentTransactionAllOfAttributes.java @@ -0,0 +1,402 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * BankRepaymentTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + BankRepaymentTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + BankRepaymentTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + BankRepaymentTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + BankRepaymentTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + BankRepaymentTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + BankRepaymentTransactionAllOfAttributes.JSON_PROPERTY_PAID_FOR_DATE, + BankRepaymentTransactionAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BankRepaymentTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_PAID_FOR_DATE = "paidForDate"; + private String paidForDate; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public BankRepaymentTransactionAllOfAttributes() { + } + + public BankRepaymentTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public BankRepaymentTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public BankRepaymentTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public BankRepaymentTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public BankRepaymentTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public BankRepaymentTransactionAllOfAttributes paidForDate(String paidForDate) { + this.paidForDate = paidForDate; + return this; + } + + /** + * Get paidForDate + * @return paidForDate + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAID_FOR_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getPaidForDate() { + return paidForDate; + } + + + @JsonProperty(JSON_PROPERTY_PAID_FOR_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPaidForDate(String paidForDate) { + this.paidForDate = paidForDate; + } + + + public BankRepaymentTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this BankRepaymentTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BankRepaymentTransactionAllOfAttributes bankRepaymentTransactionAllOfAttributes = (BankRepaymentTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, bankRepaymentTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, bankRepaymentTransactionAllOfAttributes.direction) && + Objects.equals(this.amount, bankRepaymentTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, bankRepaymentTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, bankRepaymentTransactionAllOfAttributes.summary) && + Objects.equals(this.paidForDate, bankRepaymentTransactionAllOfAttributes.paidForDate) && + Objects.equals(this.tags, bankRepaymentTransactionAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, amount, balance, summary, paidForDate, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BankRepaymentTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" paidForDate: ").append(toIndentedString(paidForDate)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `paidForDate` to the URL query string + if (getPaidForDate() != null) { + joiner.add(String.format("%spaidForDate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPaidForDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/BeneficialOwner.java b/src/main/java/unit/java/sdk/model/BeneficialOwner.java new file mode 100644 index 00000000..327923f2 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BeneficialOwner.java @@ -0,0 +1,904 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.SourceOfIncome; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * BeneficialOwner + */ +@JsonPropertyOrder({ + BeneficialOwner.JSON_PROPERTY_STATUS, + BeneficialOwner.JSON_PROPERTY_FULL_NAME, + BeneficialOwner.JSON_PROPERTY_EMAIL, + BeneficialOwner.JSON_PROPERTY_PHONE, + BeneficialOwner.JSON_PROPERTY_SSN, + BeneficialOwner.JSON_PROPERTY_PASSPORT, + BeneficialOwner.JSON_PROPERTY_NATIONALITY, + BeneficialOwner.JSON_PROPERTY_MATRICULA_CONSULAR, + BeneficialOwner.JSON_PROPERTY_ADDRESS, + BeneficialOwner.JSON_PROPERTY_DATE_OF_BIRTH, + BeneficialOwner.JSON_PROPERTY_EVALUATION_ID, + BeneficialOwner.JSON_PROPERTY_PERCENTAGE, + BeneficialOwner.JSON_PROPERTY_EVALUATION_FLAGS, + BeneficialOwner.JSON_PROPERTY_MASKED_S_S_N, + BeneficialOwner.JSON_PROPERTY_MASKED_PASSPORT, + BeneficialOwner.JSON_PROPERTY_MASKED_MATRICULA_CONSULAR, + BeneficialOwner.JSON_PROPERTY_ID_THEFT_SCORE, + BeneficialOwner.JSON_PROPERTY_EVALUATION_CODES, + BeneficialOwner.JSON_PROPERTY_OCCUPATION, + BeneficialOwner.JSON_PROPERTY_ANNUAL_INCOME, + BeneficialOwner.JSON_PROPERTY_SOURCE_OF_INCOME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BeneficialOwner { + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_SSN = "ssn"; + private String ssn; + + public static final String JSON_PROPERTY_PASSPORT = "passport"; + private String passport; + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public static final String JSON_PROPERTY_MATRICULA_CONSULAR = "matriculaConsular"; + private String matriculaConsular; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Object address; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public static final String JSON_PROPERTY_EVALUATION_ID = "evaluationId"; + private String evaluationId; + + public static final String JSON_PROPERTY_PERCENTAGE = "percentage"; + private Integer percentage; + + public static final String JSON_PROPERTY_EVALUATION_FLAGS = "evaluationFlags"; + private List evaluationFlags; + + public static final String JSON_PROPERTY_MASKED_S_S_N = "maskedSSN"; + private String maskedSSN; + + public static final String JSON_PROPERTY_MASKED_PASSPORT = "maskedPassport"; + private String maskedPassport; + + public static final String JSON_PROPERTY_MASKED_MATRICULA_CONSULAR = "maskedMatriculaConsular"; + private String maskedMatriculaConsular; + + public static final String JSON_PROPERTY_ID_THEFT_SCORE = "idTheftScore"; + private Integer idTheftScore; + + public static final String JSON_PROPERTY_EVALUATION_CODES = "evaluationCodes"; + private List evaluationCodes; + + public static final String JSON_PROPERTY_OCCUPATION = "occupation"; + private Occupation occupation; + + public static final String JSON_PROPERTY_ANNUAL_INCOME = "annualIncome"; + private AnnualIncome annualIncome; + + public static final String JSON_PROPERTY_SOURCE_OF_INCOME = "sourceOfIncome"; + private SourceOfIncome sourceOfIncome; + + public BeneficialOwner() { + } + + public BeneficialOwner status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(String status) { + this.status = status; + } + + + public BeneficialOwner fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public BeneficialOwner email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public BeneficialOwner phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public BeneficialOwner ssn(String ssn) { + this.ssn = ssn; + return this; + } + + /** + * Get ssn + * @return ssn + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSsn() { + return ssn; + } + + + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSsn(String ssn) { + this.ssn = ssn; + } + + + public BeneficialOwner passport(String passport) { + this.passport = passport; + return this; + } + + /** + * Get passport + * @return passport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassport() { + return passport; + } + + + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassport(String passport) { + this.passport = passport; + } + + + public BeneficialOwner nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * Get nationality + * @return nationality + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + public BeneficialOwner matriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + return this; + } + + /** + * Get matriculaConsular + * @return matriculaConsular + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMatriculaConsular() { + return matriculaConsular; + } + + + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMatriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + } + + + public BeneficialOwner address(Object address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(Object address) { + this.address = address; + } + + + public BeneficialOwner dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + public BeneficialOwner evaluationId(String evaluationId) { + this.evaluationId = evaluationId; + return this; + } + + /** + * Get evaluationId + * @return evaluationId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEvaluationId() { + return evaluationId; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationId(String evaluationId) { + this.evaluationId = evaluationId; + } + + + public BeneficialOwner percentage(Integer percentage) { + this.percentage = percentage; + return this; + } + + /** + * Get percentage + * minimum: 0 + * maximum: 100 + * @return percentage + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERCENTAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getPercentage() { + return percentage; + } + + + @JsonProperty(JSON_PROPERTY_PERCENTAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPercentage(Integer percentage) { + this.percentage = percentage; + } + + + public BeneficialOwner evaluationFlags(List evaluationFlags) { + this.evaluationFlags = evaluationFlags; + return this; + } + + public BeneficialOwner addEvaluationFlagsItem(String evaluationFlagsItem) { + if (this.evaluationFlags == null) { + this.evaluationFlags = new ArrayList<>(); + } + this.evaluationFlags.add(evaluationFlagsItem); + return this; + } + + /** + * Get evaluationFlags + * @return evaluationFlags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_FLAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getEvaluationFlags() { + return evaluationFlags; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_FLAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationFlags(List evaluationFlags) { + this.evaluationFlags = evaluationFlags; + } + + + public BeneficialOwner maskedSSN(String maskedSSN) { + this.maskedSSN = maskedSSN; + return this; + } + + /** + * Get maskedSSN + * @return maskedSSN + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MASKED_S_S_N) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMaskedSSN() { + return maskedSSN; + } + + + @JsonProperty(JSON_PROPERTY_MASKED_S_S_N) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaskedSSN(String maskedSSN) { + this.maskedSSN = maskedSSN; + } + + + public BeneficialOwner maskedPassport(String maskedPassport) { + this.maskedPassport = maskedPassport; + return this; + } + + /** + * Get maskedPassport + * @return maskedPassport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MASKED_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMaskedPassport() { + return maskedPassport; + } + + + @JsonProperty(JSON_PROPERTY_MASKED_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaskedPassport(String maskedPassport) { + this.maskedPassport = maskedPassport; + } + + + public BeneficialOwner maskedMatriculaConsular(String maskedMatriculaConsular) { + this.maskedMatriculaConsular = maskedMatriculaConsular; + return this; + } + + /** + * Get maskedMatriculaConsular + * @return maskedMatriculaConsular + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MASKED_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMaskedMatriculaConsular() { + return maskedMatriculaConsular; + } + + + @JsonProperty(JSON_PROPERTY_MASKED_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaskedMatriculaConsular(String maskedMatriculaConsular) { + this.maskedMatriculaConsular = maskedMatriculaConsular; + } + + + public BeneficialOwner idTheftScore(Integer idTheftScore) { + this.idTheftScore = idTheftScore; + return this; + } + + /** + * Get idTheftScore + * @return idTheftScore + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID_THEFT_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getIdTheftScore() { + return idTheftScore; + } + + + @JsonProperty(JSON_PROPERTY_ID_THEFT_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdTheftScore(Integer idTheftScore) { + this.idTheftScore = idTheftScore; + } + + + public BeneficialOwner evaluationCodes(List evaluationCodes) { + this.evaluationCodes = evaluationCodes; + return this; + } + + public BeneficialOwner addEvaluationCodesItem(String evaluationCodesItem) { + if (this.evaluationCodes == null) { + this.evaluationCodes = new ArrayList<>(); + } + this.evaluationCodes.add(evaluationCodesItem); + return this; + } + + /** + * Get evaluationCodes + * @return evaluationCodes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_CODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getEvaluationCodes() { + return evaluationCodes; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_CODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationCodes(List evaluationCodes) { + this.evaluationCodes = evaluationCodes; + } + + + public BeneficialOwner occupation(Occupation occupation) { + this.occupation = occupation; + return this; + } + + /** + * Get occupation + * @return occupation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Occupation getOccupation() { + return occupation; + } + + + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOccupation(Occupation occupation) { + this.occupation = occupation; + } + + + public BeneficialOwner annualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + return this; + } + + /** + * Get annualIncome + * @return annualIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnnualIncome getAnnualIncome() { + return annualIncome; + } + + + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + } + + + public BeneficialOwner sourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + return this; + } + + /** + * Get sourceOfIncome + * @return sourceOfIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SourceOfIncome getSourceOfIncome() { + return sourceOfIncome; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + } + + + /** + * Return true if this beneficialOwner object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BeneficialOwner beneficialOwner = (BeneficialOwner) o; + return Objects.equals(this.status, beneficialOwner.status) && + Objects.equals(this.fullName, beneficialOwner.fullName) && + Objects.equals(this.email, beneficialOwner.email) && + Objects.equals(this.phone, beneficialOwner.phone) && + Objects.equals(this.ssn, beneficialOwner.ssn) && + Objects.equals(this.passport, beneficialOwner.passport) && + Objects.equals(this.nationality, beneficialOwner.nationality) && + Objects.equals(this.matriculaConsular, beneficialOwner.matriculaConsular) && + Objects.equals(this.address, beneficialOwner.address) && + Objects.equals(this.dateOfBirth, beneficialOwner.dateOfBirth) && + Objects.equals(this.evaluationId, beneficialOwner.evaluationId) && + Objects.equals(this.percentage, beneficialOwner.percentage) && + Objects.equals(this.evaluationFlags, beneficialOwner.evaluationFlags) && + Objects.equals(this.maskedSSN, beneficialOwner.maskedSSN) && + Objects.equals(this.maskedPassport, beneficialOwner.maskedPassport) && + Objects.equals(this.maskedMatriculaConsular, beneficialOwner.maskedMatriculaConsular) && + Objects.equals(this.idTheftScore, beneficialOwner.idTheftScore) && + Objects.equals(this.evaluationCodes, beneficialOwner.evaluationCodes) && + Objects.equals(this.occupation, beneficialOwner.occupation) && + Objects.equals(this.annualIncome, beneficialOwner.annualIncome) && + Objects.equals(this.sourceOfIncome, beneficialOwner.sourceOfIncome); + } + + @Override + public int hashCode() { + return Objects.hash(status, fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, evaluationId, percentage, evaluationFlags, maskedSSN, maskedPassport, maskedMatriculaConsular, idTheftScore, evaluationCodes, occupation, annualIncome, sourceOfIncome); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BeneficialOwner {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); + sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); + sb.append(" percentage: ").append(toIndentedString(percentage)).append("\n"); + sb.append(" evaluationFlags: ").append(toIndentedString(evaluationFlags)).append("\n"); + sb.append(" maskedSSN: ").append(toIndentedString(maskedSSN)).append("\n"); + sb.append(" maskedPassport: ").append(toIndentedString(maskedPassport)).append("\n"); + sb.append(" maskedMatriculaConsular: ").append(toIndentedString(maskedMatriculaConsular)).append("\n"); + sb.append(" idTheftScore: ").append(toIndentedString(idTheftScore)).append("\n"); + sb.append(" evaluationCodes: ").append(toIndentedString(evaluationCodes)).append("\n"); + sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); + sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); + sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `ssn` to the URL query string + if (getSsn() != null) { + joiner.add(String.format("%sssn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSsn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `passport` to the URL query string + if (getPassport() != null) { + joiner.add(String.format("%spassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nationality` to the URL query string + if (getNationality() != null) { + joiner.add(String.format("%snationality%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNationality()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `matriculaConsular` to the URL query string + if (getMatriculaConsular() != null) { + joiner.add(String.format("%smatriculaConsular%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMatriculaConsular()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(String.format("%saddress%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAddress()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationId` to the URL query string + if (getEvaluationId() != null) { + joiner.add(String.format("%sevaluationId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEvaluationId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `percentage` to the URL query string + if (getPercentage() != null) { + joiner.add(String.format("%spercentage%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPercentage()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationFlags` to the URL query string + if (getEvaluationFlags() != null) { + for (int i = 0; i < getEvaluationFlags().size(); i++) { + joiner.add(String.format("%sevaluationFlags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getEvaluationFlags().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `maskedSSN` to the URL query string + if (getMaskedSSN() != null) { + joiner.add(String.format("%smaskedSSN%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMaskedSSN()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `maskedPassport` to the URL query string + if (getMaskedPassport() != null) { + joiner.add(String.format("%smaskedPassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMaskedPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `maskedMatriculaConsular` to the URL query string + if (getMaskedMatriculaConsular() != null) { + joiner.add(String.format("%smaskedMatriculaConsular%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMaskedMatriculaConsular()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idTheftScore` to the URL query string + if (getIdTheftScore() != null) { + joiner.add(String.format("%sidTheftScore%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdTheftScore()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationCodes` to the URL query string + if (getEvaluationCodes() != null) { + for (int i = 0; i < getEvaluationCodes().size(); i++) { + joiner.add(String.format("%sevaluationCodes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getEvaluationCodes().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `occupation` to the URL query string + if (getOccupation() != null) { + joiner.add(String.format("%soccupation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOccupation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `annualIncome` to the URL query string + if (getAnnualIncome() != null) { + joiner.add(String.format("%sannualIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAnnualIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sourceOfIncome` to the URL query string + if (getSourceOfIncome() != null) { + joiner.add(String.format("%ssourceOfIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSourceOfIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Beneficiary.java b/src/main/java/unit/java/sdk/model/Beneficiary.java new file mode 100644 index 00000000..dc44e9f7 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Beneficiary.java @@ -0,0 +1,188 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import unit.java.sdk.model.FullName; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Beneficiary + */ +@JsonPropertyOrder({ + Beneficiary.JSON_PROPERTY_FULL_NAME, + Beneficiary.JSON_PROPERTY_DATE_OF_BIRTH +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Beneficiary { + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public Beneficiary() { + } + + public Beneficiary fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public Beneficiary dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + /** + * Return true if this beneficiary object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Beneficiary beneficiary = (Beneficiary) o; + return Objects.equals(this.fullName, beneficiary.fullName) && + Objects.equals(this.dateOfBirth, beneficiary.dateOfBirth); + } + + @Override + public int hashCode() { + return Objects.hash(fullName, dateOfBirth); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Beneficiary {\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/BillPayTransaction.java b/src/main/java/unit/java/sdk/model/BillPayTransaction.java new file mode 100644 index 00000000..561589a9 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BillPayTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * BillPayTransaction + */ +@JsonPropertyOrder({ + BillPayTransaction.JSON_PROPERTY_ATTRIBUTES, + BillPayTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class BillPayTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CheckDepositTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public BillPayTransaction() { + } + + public BillPayTransaction attributes(CheckDepositTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CheckDepositTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CheckDepositTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public BillPayTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public BillPayTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public BillPayTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this BillPayTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BillPayTransaction billPayTransaction = (BillPayTransaction) o; + return Objects.equals(this.attributes, billPayTransaction.attributes) && + Objects.equals(this.relationships, billPayTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BillPayTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("BillPayTransaction", BillPayTransaction.class); + JSON.registerDiscriminator(BillPayTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/BillPayment.java b/src/main/java/unit/java/sdk/model/BillPayment.java new file mode 100644 index 00000000..50d65d38 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BillPayment.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BillPaymentAllOfAttributes; +import unit.java.sdk.model.Payment; +import unit.java.sdk.model.PaymentRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * BillPayment + */ +@JsonPropertyOrder({ + BillPayment.JSON_PROPERTY_ATTRIBUTES, + BillPayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class BillPayment extends Payment { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private BillPaymentAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private PaymentRelationships relationships; + + public BillPayment() { + } + + public BillPayment attributes(BillPaymentAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BillPaymentAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(BillPaymentAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public BillPayment relationships(PaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(PaymentRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public BillPayment type(String type) { + this.setType(type); + return this; + } + + @Override + public BillPayment id(String id) { + this.setId(id); + return this; + } + + /** + * Return true if this BillPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BillPayment billPayment = (BillPayment) o; + return Objects.equals(this.attributes, billPayment.attributes) && + Objects.equals(this.relationships, billPayment.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BillPayment {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(String.format("%srelationships%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRelationships()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("BillPayment", BillPayment.class); + JSON.registerDiscriminator(BillPayment.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/BillPaymentAllOfAttributes.java b/src/main/java/unit/java/sdk/model/BillPaymentAllOfAttributes.java new file mode 100644 index 00000000..82120834 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BillPaymentAllOfAttributes.java @@ -0,0 +1,412 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * BillPaymentAllOfAttributes + */ +@JsonPropertyOrder({ + BillPaymentAllOfAttributes.JSON_PROPERTY_CREATED_AT, + BillPaymentAllOfAttributes.JSON_PROPERTY_AMOUNT, + BillPaymentAllOfAttributes.JSON_PROPERTY_DIRECTION, + BillPaymentAllOfAttributes.JSON_PROPERTY_DESCRIPTION, + BillPaymentAllOfAttributes.JSON_PROPERTY_STATUS, + BillPaymentAllOfAttributes.JSON_PROPERTY_REASON +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BillPaymentAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + INITIALIZED("Initialized"), + + PENDING("Pending"), + + REJECTED("Rejected"), + + CLEARING("Clearing"), + + SENT("Sent"), + + CANCELED("Canceled"), + + RETURNED("Returned"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public BillPaymentAllOfAttributes() { + } + + public BillPaymentAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public BillPaymentAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public BillPaymentAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public BillPaymentAllOfAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public BillPaymentAllOfAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public BillPaymentAllOfAttributes reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(String reason) { + this.reason = reason; + } + + + /** + * Return true if this BillPayment_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BillPaymentAllOfAttributes billPaymentAllOfAttributes = (BillPaymentAllOfAttributes) o; + return Objects.equals(this.createdAt, billPaymentAllOfAttributes.createdAt) && + Objects.equals(this.amount, billPaymentAllOfAttributes.amount) && + Objects.equals(this.direction, billPaymentAllOfAttributes.direction) && + Objects.equals(this.description, billPaymentAllOfAttributes.description) && + Objects.equals(this.status, billPaymentAllOfAttributes.status) && + Objects.equals(this.reason, billPaymentAllOfAttributes.reason); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, amount, direction, description, status, reason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BillPaymentAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/BookPayment.java b/src/main/java/unit/java/sdk/model/BookPayment.java new file mode 100644 index 00000000..d0a5c205 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BookPayment.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BookPaymentAllOfAttributes; +import unit.java.sdk.model.Payment; +import unit.java.sdk.model.PaymentRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * BookPayment + */ +@JsonPropertyOrder({ + BookPayment.JSON_PROPERTY_ATTRIBUTES, + BookPayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class BookPayment extends Payment { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private BookPaymentAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private PaymentRelationships relationships; + + public BookPayment() { + } + + public BookPayment attributes(BookPaymentAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BookPaymentAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(BookPaymentAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public BookPayment relationships(PaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(PaymentRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public BookPayment type(String type) { + this.setType(type); + return this; + } + + @Override + public BookPayment id(String id) { + this.setId(id); + return this; + } + + /** + * Return true if this BookPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BookPayment bookPayment = (BookPayment) o; + return Objects.equals(this.attributes, bookPayment.attributes) && + Objects.equals(this.relationships, bookPayment.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BookPayment {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(String.format("%srelationships%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRelationships()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("BookPayment", BookPayment.class); + JSON.registerDiscriminator(BookPayment.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/BookPaymentAllOfAttributes.java b/src/main/java/unit/java/sdk/model/BookPaymentAllOfAttributes.java new file mode 100644 index 00000000..ff5585dd --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BookPaymentAllOfAttributes.java @@ -0,0 +1,482 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * BookPaymentAllOfAttributes + */ +@JsonPropertyOrder({ + BookPaymentAllOfAttributes.JSON_PROPERTY_CREATED_AT, + BookPaymentAllOfAttributes.JSON_PROPERTY_AMOUNT, + BookPaymentAllOfAttributes.JSON_PROPERTY_DIRECTION, + BookPaymentAllOfAttributes.JSON_PROPERTY_DESCRIPTION, + BookPaymentAllOfAttributes.JSON_PROPERTY_STATUS, + BookPaymentAllOfAttributes.JSON_PROPERTY_TRANSACTION_SUMMARY_OVERRIDE, + BookPaymentAllOfAttributes.JSON_PROPERTY_REASON, + BookPaymentAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BookPaymentAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + PENDING("Pending"), + + REJECTED("Rejected"), + + CLEARING("Clearing"), + + SENT("Sent"), + + CANCELED("Canceled"), + + RETURNED("Returned"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_TRANSACTION_SUMMARY_OVERRIDE = "transactionSummaryOverride"; + private String transactionSummaryOverride; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public BookPaymentAllOfAttributes() { + } + + public BookPaymentAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public BookPaymentAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public BookPaymentAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public BookPaymentAllOfAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public BookPaymentAllOfAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public BookPaymentAllOfAttributes transactionSummaryOverride(String transactionSummaryOverride) { + this.transactionSummaryOverride = transactionSummaryOverride; + return this; + } + + /** + * Get transactionSummaryOverride + * @return transactionSummaryOverride + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRANSACTION_SUMMARY_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTransactionSummaryOverride() { + return transactionSummaryOverride; + } + + + @JsonProperty(JSON_PROPERTY_TRANSACTION_SUMMARY_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransactionSummaryOverride(String transactionSummaryOverride) { + this.transactionSummaryOverride = transactionSummaryOverride; + } + + + public BookPaymentAllOfAttributes reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(String reason) { + this.reason = reason; + } + + + public BookPaymentAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this BookPayment_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BookPaymentAllOfAttributes bookPaymentAllOfAttributes = (BookPaymentAllOfAttributes) o; + return Objects.equals(this.createdAt, bookPaymentAllOfAttributes.createdAt) && + Objects.equals(this.amount, bookPaymentAllOfAttributes.amount) && + Objects.equals(this.direction, bookPaymentAllOfAttributes.direction) && + Objects.equals(this.description, bookPaymentAllOfAttributes.description) && + Objects.equals(this.status, bookPaymentAllOfAttributes.status) && + Objects.equals(this.transactionSummaryOverride, bookPaymentAllOfAttributes.transactionSummaryOverride) && + Objects.equals(this.reason, bookPaymentAllOfAttributes.reason) && + Objects.equals(this.tags, bookPaymentAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, amount, direction, description, status, transactionSummaryOverride, reason, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BookPaymentAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" transactionSummaryOverride: ").append(toIndentedString(transactionSummaryOverride)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `transactionSummaryOverride` to the URL query string + if (getTransactionSummaryOverride() != null) { + joiner.add(String.format("%stransactionSummaryOverride%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTransactionSummaryOverride()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/BookRepayment.java b/src/main/java/unit/java/sdk/model/BookRepayment.java new file mode 100644 index 00000000..2a8bbd7b --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BookRepayment.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BookRepaymentAllOfAttributes; +import unit.java.sdk.model.BookRepaymentAllOfRelationships; +import unit.java.sdk.model.Repayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * BookRepayment + */ +@JsonPropertyOrder({ + BookRepayment.JSON_PROPERTY_ATTRIBUTES, + BookRepayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class BookRepayment extends Repayment { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private BookRepaymentAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private BookRepaymentAllOfRelationships relationships; + + public BookRepayment() { + } + + public BookRepayment attributes(BookRepaymentAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BookRepaymentAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(BookRepaymentAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public BookRepayment relationships(BookRepaymentAllOfRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BookRepaymentAllOfRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(BookRepaymentAllOfRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public BookRepayment id(String id) { + this.setId(id); + return this; + } + + @Override + public BookRepayment type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this BookRepayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BookRepayment bookRepayment = (BookRepayment) o; + return Objects.equals(this.attributes, bookRepayment.attributes) && + Objects.equals(this.relationships, bookRepayment.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BookRepayment {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("BookRepayment", BookRepayment.class); + JSON.registerDiscriminator(BookRepayment.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/BookRepaymentAllOfAttributes.java b/src/main/java/unit/java/sdk/model/BookRepaymentAllOfAttributes.java new file mode 100644 index 00000000..c13f748e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BookRepaymentAllOfAttributes.java @@ -0,0 +1,337 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * BookRepaymentAllOfAttributes + */ +@JsonPropertyOrder({ + BookRepaymentAllOfAttributes.JSON_PROPERTY_CREATED_AT, + BookRepaymentAllOfAttributes.JSON_PROPERTY_UPDATED_AT, + BookRepaymentAllOfAttributes.JSON_PROPERTY_AMOUNT, + BookRepaymentAllOfAttributes.JSON_PROPERTY_TAGS, + BookRepaymentAllOfAttributes.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BookRepaymentAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + PENDING("Pending"), + + PENDINGREVIEW("PendingReview"), + + SENT("Sent"), + + RETURNED("Returned"), + + REJECTED("Rejected"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public BookRepaymentAllOfAttributes() { + } + + public BookRepaymentAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public BookRepaymentAllOfAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public BookRepaymentAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public BookRepaymentAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public BookRepaymentAllOfAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + /** + * Return true if this BookRepayment_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BookRepaymentAllOfAttributes bookRepaymentAllOfAttributes = (BookRepaymentAllOfAttributes) o; + return Objects.equals(this.createdAt, bookRepaymentAllOfAttributes.createdAt) && + Objects.equals(this.updatedAt, bookRepaymentAllOfAttributes.updatedAt) && + Objects.equals(this.amount, bookRepaymentAllOfAttributes.amount) && + Objects.equals(this.tags, bookRepaymentAllOfAttributes.tags) && + Objects.equals(this.status, bookRepaymentAllOfAttributes.status); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, updatedAt, amount, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BookRepaymentAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/BookRepaymentAllOfRelationships.java b/src/main/java/unit/java/sdk/model/BookRepaymentAllOfRelationships.java new file mode 100644 index 00000000..d961d088 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BookRepaymentAllOfRelationships.java @@ -0,0 +1,299 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsAccount; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsCreditAccount; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsCustomer; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsPayment; +import unit.java.sdk.model.BookRepaymentAllOfRelationshipsCounterpartyAccount; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * BookRepaymentAllOfRelationships + */ +@JsonPropertyOrder({ + BookRepaymentAllOfRelationships.JSON_PROPERTY_ACCOUNT, + BookRepaymentAllOfRelationships.JSON_PROPERTY_CREDIT_ACCOUNT, + BookRepaymentAllOfRelationships.JSON_PROPERTY_COUNTERPARTY_ACCOUNT, + BookRepaymentAllOfRelationships.JSON_PROPERTY_CUSTOMER, + BookRepaymentAllOfRelationships.JSON_PROPERTY_PAYMENT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BookRepaymentAllOfRelationships { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private AchRepaymentAllOfRelationshipsAccount account; + + public static final String JSON_PROPERTY_CREDIT_ACCOUNT = "creditAccount"; + private AchRepaymentAllOfRelationshipsCreditAccount creditAccount; + + public static final String JSON_PROPERTY_COUNTERPARTY_ACCOUNT = "counterpartyAccount"; + private BookRepaymentAllOfRelationshipsCounterpartyAccount counterpartyAccount; + + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private AchRepaymentAllOfRelationshipsCustomer customer; + + public static final String JSON_PROPERTY_PAYMENT = "payment"; + private AchRepaymentAllOfRelationshipsPayment payment; + + public BookRepaymentAllOfRelationships() { + } + + public BookRepaymentAllOfRelationships account(AchRepaymentAllOfRelationshipsAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AchRepaymentAllOfRelationshipsAccount getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccount(AchRepaymentAllOfRelationshipsAccount account) { + this.account = account; + } + + + public BookRepaymentAllOfRelationships creditAccount(AchRepaymentAllOfRelationshipsCreditAccount creditAccount) { + this.creditAccount = creditAccount; + return this; + } + + /** + * Get creditAccount + * @return creditAccount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREDIT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AchRepaymentAllOfRelationshipsCreditAccount getCreditAccount() { + return creditAccount; + } + + + @JsonProperty(JSON_PROPERTY_CREDIT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreditAccount(AchRepaymentAllOfRelationshipsCreditAccount creditAccount) { + this.creditAccount = creditAccount; + } + + + public BookRepaymentAllOfRelationships counterpartyAccount(BookRepaymentAllOfRelationshipsCounterpartyAccount counterpartyAccount) { + this.counterpartyAccount = counterpartyAccount; + return this; + } + + /** + * Get counterpartyAccount + * @return counterpartyAccount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BookRepaymentAllOfRelationshipsCounterpartyAccount getCounterpartyAccount() { + return counterpartyAccount; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterpartyAccount(BookRepaymentAllOfRelationshipsCounterpartyAccount counterpartyAccount) { + this.counterpartyAccount = counterpartyAccount; + } + + + public BookRepaymentAllOfRelationships customer(AchRepaymentAllOfRelationshipsCustomer customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AchRepaymentAllOfRelationshipsCustomer getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomer(AchRepaymentAllOfRelationshipsCustomer customer) { + this.customer = customer; + } + + + public BookRepaymentAllOfRelationships payment(AchRepaymentAllOfRelationshipsPayment payment) { + this.payment = payment; + return this; + } + + /** + * Get payment + * @return payment + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AchRepaymentAllOfRelationshipsPayment getPayment() { + return payment; + } + + + @JsonProperty(JSON_PROPERTY_PAYMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayment(AchRepaymentAllOfRelationshipsPayment payment) { + this.payment = payment; + } + + + /** + * Return true if this BookRepayment_allOf_relationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BookRepaymentAllOfRelationships bookRepaymentAllOfRelationships = (BookRepaymentAllOfRelationships) o; + return Objects.equals(this.account, bookRepaymentAllOfRelationships.account) && + Objects.equals(this.creditAccount, bookRepaymentAllOfRelationships.creditAccount) && + Objects.equals(this.counterpartyAccount, bookRepaymentAllOfRelationships.counterpartyAccount) && + Objects.equals(this.customer, bookRepaymentAllOfRelationships.customer) && + Objects.equals(this.payment, bookRepaymentAllOfRelationships.payment); + } + + @Override + public int hashCode() { + return Objects.hash(account, creditAccount, counterpartyAccount, customer, payment); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BookRepaymentAllOfRelationships {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" creditAccount: ").append(toIndentedString(creditAccount)).append("\n"); + sb.append(" counterpartyAccount: ").append(toIndentedString(counterpartyAccount)).append("\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" payment: ").append(toIndentedString(payment)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `creditAccount` to the URL query string + if (getCreditAccount() != null) { + joiner.add(getCreditAccount().toUrlQueryString(prefix + "creditAccount" + suffix)); + } + + // add `counterpartyAccount` to the URL query string + if (getCounterpartyAccount() != null) { + joiner.add(getCounterpartyAccount().toUrlQueryString(prefix + "counterpartyAccount" + suffix)); + } + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + // add `payment` to the URL query string + if (getPayment() != null) { + joiner.add(getPayment().toUrlQueryString(prefix + "payment" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/BookRepaymentAllOfRelationshipsCounterpartyAccount.java b/src/main/java/unit/java/sdk/model/BookRepaymentAllOfRelationshipsCounterpartyAccount.java new file mode 100644 index 00000000..d9368c64 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BookRepaymentAllOfRelationshipsCounterpartyAccount.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BookRepaymentAllOfRelationshipsCounterpartyAccountData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * BookRepaymentAllOfRelationshipsCounterpartyAccount + */ +@JsonPropertyOrder({ + BookRepaymentAllOfRelationshipsCounterpartyAccount.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BookRepaymentAllOfRelationshipsCounterpartyAccount { + public static final String JSON_PROPERTY_DATA = "data"; + private BookRepaymentAllOfRelationshipsCounterpartyAccountData data; + + public BookRepaymentAllOfRelationshipsCounterpartyAccount() { + } + + public BookRepaymentAllOfRelationshipsCounterpartyAccount data(BookRepaymentAllOfRelationshipsCounterpartyAccountData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BookRepaymentAllOfRelationshipsCounterpartyAccountData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(BookRepaymentAllOfRelationshipsCounterpartyAccountData data) { + this.data = data; + } + + + /** + * Return true if this BookRepayment_allOf_relationships_counterpartyAccount object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BookRepaymentAllOfRelationshipsCounterpartyAccount bookRepaymentAllOfRelationshipsCounterpartyAccount = (BookRepaymentAllOfRelationshipsCounterpartyAccount) o; + return Objects.equals(this.data, bookRepaymentAllOfRelationshipsCounterpartyAccount.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BookRepaymentAllOfRelationshipsCounterpartyAccount {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/BookRepaymentAllOfRelationshipsCounterpartyAccountData.java b/src/main/java/unit/java/sdk/model/BookRepaymentAllOfRelationshipsCounterpartyAccountData.java new file mode 100644 index 00000000..b20e43a7 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BookRepaymentAllOfRelationshipsCounterpartyAccountData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * BookRepaymentAllOfRelationshipsCounterpartyAccountData + */ +@JsonPropertyOrder({ + BookRepaymentAllOfRelationshipsCounterpartyAccountData.JSON_PROPERTY_TYPE, + BookRepaymentAllOfRelationshipsCounterpartyAccountData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BookRepaymentAllOfRelationshipsCounterpartyAccountData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "account"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public BookRepaymentAllOfRelationshipsCounterpartyAccountData() { + } + + public BookRepaymentAllOfRelationshipsCounterpartyAccountData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public BookRepaymentAllOfRelationshipsCounterpartyAccountData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this BookRepayment_allOf_relationships_counterpartyAccount_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BookRepaymentAllOfRelationshipsCounterpartyAccountData bookRepaymentAllOfRelationshipsCounterpartyAccountData = (BookRepaymentAllOfRelationshipsCounterpartyAccountData) o; + return Objects.equals(this.type, bookRepaymentAllOfRelationshipsCounterpartyAccountData.type) && + Objects.equals(this.id, bookRepaymentAllOfRelationshipsCounterpartyAccountData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BookRepaymentAllOfRelationshipsCounterpartyAccountData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/BookTransaction.java b/src/main/java/unit/java/sdk/model/BookTransaction.java new file mode 100644 index 00000000..8342fbd4 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BookTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BookTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * BookTransaction + */ +@JsonPropertyOrder({ + BookTransaction.JSON_PROPERTY_ATTRIBUTES, + BookTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class BookTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private BookTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public BookTransaction() { + } + + public BookTransaction attributes(BookTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BookTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(BookTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public BookTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public BookTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public BookTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this BookTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BookTransaction bookTransaction = (BookTransaction) o; + return Objects.equals(this.attributes, bookTransaction.attributes) && + Objects.equals(this.relationships, bookTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BookTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("BookTransaction", BookTransaction.class); + JSON.registerDiscriminator(BookTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/BookTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/BookTransactionAllOfAttributes.java new file mode 100644 index 00000000..299aa701 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BookTransactionAllOfAttributes.java @@ -0,0 +1,403 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * BookTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + BookTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + BookTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + BookTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + BookTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + BookTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + BookTransactionAllOfAttributes.JSON_PROPERTY_COUNTERPARTY, + BookTransactionAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BookTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; + private Counterparty counterparty; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public BookTransactionAllOfAttributes() { + } + + public BookTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public BookTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public BookTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public BookTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public BookTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public BookTransactionAllOfAttributes counterparty(Counterparty counterparty) { + this.counterparty = counterparty; + return this; + } + + /** + * Get counterparty + * @return counterparty + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Counterparty getCounterparty() { + return counterparty; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCounterparty(Counterparty counterparty) { + this.counterparty = counterparty; + } + + + public BookTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this BookTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BookTransactionAllOfAttributes bookTransactionAllOfAttributes = (BookTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, bookTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, bookTransactionAllOfAttributes.direction) && + Objects.equals(this.amount, bookTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, bookTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, bookTransactionAllOfAttributes.summary) && + Objects.equals(this.counterparty, bookTransactionAllOfAttributes.counterparty) && + Objects.equals(this.tags, bookTransactionAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, amount, balance, summary, counterparty, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BookTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterparty` to the URL query string + if (getCounterparty() != null) { + joiner.add(getCounterparty().toUrlQueryString(prefix + "counterparty" + suffix)); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/BusinessAnnualRevenue.java b/src/main/java/unit/java/sdk/model/BusinessAnnualRevenue.java new file mode 100644 index 00000000..5bda865d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BusinessAnnualRevenue.java @@ -0,0 +1,84 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets businessAnnualRevenue + */ +public enum BusinessAnnualRevenue { + + UPTO250K("UpTo250k"), + + BETWEEN250KAND500K("Between250kAnd500k"), + + BETWEEN500KAND1M("Between500kAnd1m"), + + BETWEEN1MAND5M("Between1mAnd5m"), + + OVER5M("Over5m"); + + private String value; + + BusinessAnnualRevenue(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BusinessAnnualRevenue fromValue(String value) { + for (BusinessAnnualRevenue b : BusinessAnnualRevenue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } + +} + diff --git a/src/main/java/unit/java/sdk/model/BusinessApplication.java b/src/main/java/unit/java/sdk/model/BusinessApplication.java new file mode 100644 index 00000000..3e8d6854 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BusinessApplication.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Application; +import unit.java.sdk.model.ApplicationRelationships; +import unit.java.sdk.model.BusinessApplicationAllOfAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * BusinessApplication + */ +@JsonPropertyOrder({ + BusinessApplication.JSON_PROPERTY_ATTRIBUTES, + BusinessApplication.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class BusinessApplication extends Application { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private BusinessApplicationAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private ApplicationRelationships relationships; + + public BusinessApplication() { + } + + public BusinessApplication attributes(BusinessApplicationAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BusinessApplicationAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(BusinessApplicationAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public BusinessApplication relationships(ApplicationRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApplicationRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(ApplicationRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public BusinessApplication id(String id) { + this.setId(id); + return this; + } + + @Override + public BusinessApplication type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this BusinessApplication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BusinessApplication businessApplication = (BusinessApplication) o; + return Objects.equals(this.attributes, businessApplication.attributes) && + Objects.equals(this.relationships, businessApplication.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BusinessApplication {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("BusinessApplication", BusinessApplication.class); + JSON.registerDiscriminator(BusinessApplication.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/BusinessApplicationAllOfAttributes.java b/src/main/java/unit/java/sdk/model/BusinessApplicationAllOfAttributes.java new file mode 100644 index 00000000..84d7812b --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BusinessApplicationAllOfAttributes.java @@ -0,0 +1,1666 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.ApplicationStatus; +import unit.java.sdk.model.BeneficialOwner; +import unit.java.sdk.model.BusinessAnnualRevenue; +import unit.java.sdk.model.BusinessNumberOfEmployees; +import unit.java.sdk.model.BusinessVertical; +import unit.java.sdk.model.CashFlow; +import unit.java.sdk.model.Contact; +import unit.java.sdk.model.EntityType; +import unit.java.sdk.model.Industry; +import unit.java.sdk.model.Officer; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * BusinessApplicationAllOfAttributes + */ +@JsonPropertyOrder({ + BusinessApplicationAllOfAttributes.JSON_PROPERTY_CREATED_AT, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_UPDATED_AT, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_STATUS, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_MESSAGE, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_EVALUATION_OUTCOME, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_EVALUATION_ID, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_EVALUATION_ENTITY_ID, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_NAME, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_DBA, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_EIN, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_ENTITY_TYPE, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_DATE_OF_INCORPORATION, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_STATE_OF_INCORPORATION, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_PURPOSE, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_PHONE, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_ADDRESS, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_CONTACT, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_OFFICER, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_IP, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_WEBSITE, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_BENEFICIAL_OWNERS, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_DECISION_METHOD, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_DECISION_USER_ID, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_DECISION_REASON, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_DECISION_DATE_TIME, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_TAGS, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_RISK_RATE, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_EVALUATION_FLAGS, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_IP_LOCATION_DETAILS, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_PHONE_LOCATION_DETAILS, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_ARCHIVED, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_INDUSTRY, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_ANNUAL_REVENUE, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_NUMBER_OF_EMPLOYEES, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_CASH_FLOW, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_YEAR_OF_INCORPORATION, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_COUNTRIES_OF_OPERATION, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_STOCK_SYMBOL, + BusinessApplicationAllOfAttributes.JSON_PROPERTY_BUSINESS_VERTICAL +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BusinessApplicationAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_STATUS = "status"; + private ApplicationStatus status; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_EVALUATION_OUTCOME = "evaluationOutcome"; + private String evaluationOutcome; + + public static final String JSON_PROPERTY_EVALUATION_ID = "evaluationId"; + private String evaluationId; + + public static final String JSON_PROPERTY_EVALUATION_ENTITY_ID = "evaluationEntityId"; + private String evaluationEntityId; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_DBA = "dba"; + private JsonNullable dba = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EIN = "ein"; + private String ein; + + public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; + private EntityType entityType; + + public static final String JSON_PROPERTY_DATE_OF_INCORPORATION = "dateOfIncorporation"; + private LocalDate dateOfIncorporation; + + public static final String JSON_PROPERTY_STATE_OF_INCORPORATION = "stateOfIncorporation"; + private String stateOfIncorporation; + + public static final String JSON_PROPERTY_PURPOSE = "purpose"; + private String purpose; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_CONTACT = "contact"; + private Contact contact; + + public static final String JSON_PROPERTY_OFFICER = "officer"; + private Officer officer; + + public static final String JSON_PROPERTY_IP = "ip"; + private String ip; + + public static final String JSON_PROPERTY_WEBSITE = "website"; + private String website; + + public static final String JSON_PROPERTY_BENEFICIAL_OWNERS = "beneficialOwners"; + private List beneficialOwners = new ArrayList<>(); + + /** + * Gets or Sets decisionMethod + */ + public enum DecisionMethodEnum { + MANUALLY("Manually"), + + AUTOMATICALLY("Automatically"); + + private String value; + + DecisionMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DecisionMethodEnum fromValue(String value) { + for (DecisionMethodEnum b : DecisionMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DECISION_METHOD = "decisionMethod"; + private DecisionMethodEnum decisionMethod; + + public static final String JSON_PROPERTY_DECISION_USER_ID = "decisionUserId"; + private String decisionUserId; + + public static final String JSON_PROPERTY_DECISION_REASON = "decisionReason"; + private String decisionReason; + + public static final String JSON_PROPERTY_DECISION_DATE_TIME = "decisionDateTime"; + private OffsetDateTime decisionDateTime; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + /** + * Gets or Sets riskRate + */ + public enum RiskRateEnum { + LOW("low"), + + MEDIUM("medium"), + + HIGH("high"); + + private String value; + + RiskRateEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RiskRateEnum fromValue(String value) { + for (RiskRateEnum b : RiskRateEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RISK_RATE = "riskRate"; + private RiskRateEnum riskRate; + + public static final String JSON_PROPERTY_EVALUATION_FLAGS = "evaluationFlags"; + private List evaluationFlags; + + public static final String JSON_PROPERTY_IP_LOCATION_DETAILS = "ipLocationDetails"; + private Object ipLocationDetails; + + public static final String JSON_PROPERTY_PHONE_LOCATION_DETAILS = "phoneLocationDetails"; + private Object phoneLocationDetails; + + public static final String JSON_PROPERTY_ARCHIVED = "archived"; + private Boolean archived; + + public static final String JSON_PROPERTY_INDUSTRY = "industry"; + private Industry industry; + + public static final String JSON_PROPERTY_ANNUAL_REVENUE = "annualRevenue"; + private BusinessAnnualRevenue annualRevenue; + + public static final String JSON_PROPERTY_NUMBER_OF_EMPLOYEES = "numberOfEmployees"; + private BusinessNumberOfEmployees numberOfEmployees; + + public static final String JSON_PROPERTY_CASH_FLOW = "cashFlow"; + private CashFlow cashFlow; + + public static final String JSON_PROPERTY_YEAR_OF_INCORPORATION = "yearOfIncorporation"; + private String yearOfIncorporation; + + public static final String JSON_PROPERTY_COUNTRIES_OF_OPERATION = "countriesOfOperation"; + private List countriesOfOperation; + + public static final String JSON_PROPERTY_STOCK_SYMBOL = "stockSymbol"; + private String stockSymbol; + + public static final String JSON_PROPERTY_BUSINESS_VERTICAL = "businessVertical"; + private BusinessVertical businessVertical; + + public BusinessApplicationAllOfAttributes() { + } + + public BusinessApplicationAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public BusinessApplicationAllOfAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public BusinessApplicationAllOfAttributes status(ApplicationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ApplicationStatus getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(ApplicationStatus status) { + this.status = status; + } + + + public BusinessApplicationAllOfAttributes message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + + public BusinessApplicationAllOfAttributes evaluationOutcome(String evaluationOutcome) { + this.evaluationOutcome = evaluationOutcome; + return this; + } + + /** + * Get evaluationOutcome + * @return evaluationOutcome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_OUTCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEvaluationOutcome() { + return evaluationOutcome; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_OUTCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationOutcome(String evaluationOutcome) { + this.evaluationOutcome = evaluationOutcome; + } + + + public BusinessApplicationAllOfAttributes evaluationId(String evaluationId) { + this.evaluationId = evaluationId; + return this; + } + + /** + * Get evaluationId + * @return evaluationId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEvaluationId() { + return evaluationId; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationId(String evaluationId) { + this.evaluationId = evaluationId; + } + + + public BusinessApplicationAllOfAttributes evaluationEntityId(String evaluationEntityId) { + this.evaluationEntityId = evaluationEntityId; + return this; + } + + /** + * Get evaluationEntityId + * @return evaluationEntityId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_ENTITY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEvaluationEntityId() { + return evaluationEntityId; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_ENTITY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationEntityId(String evaluationEntityId) { + this.evaluationEntityId = evaluationEntityId; + } + + + public BusinessApplicationAllOfAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public BusinessApplicationAllOfAttributes dba(String dba) { + this.dba = JsonNullable.of(dba); + return this; + } + + /** + * Get dba + * @return dba + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDba() { + return dba.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DBA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDba_JsonNullable() { + return dba; + } + + @JsonProperty(JSON_PROPERTY_DBA) + public void setDba_JsonNullable(JsonNullable dba) { + this.dba = dba; + } + + public void setDba(String dba) { + this.dba = JsonNullable.of(dba); + } + + + public BusinessApplicationAllOfAttributes ein(String ein) { + this.ein = ein; + return this; + } + + /** + * Get ein + * @return ein + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEin() { + return ein; + } + + + @JsonProperty(JSON_PROPERTY_EIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEin(String ein) { + this.ein = ein; + } + + + public BusinessApplicationAllOfAttributes entityType(EntityType entityType) { + this.entityType = entityType; + return this; + } + + /** + * Get entityType + * @return entityType + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public EntityType getEntityType() { + return entityType; + } + + + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEntityType(EntityType entityType) { + this.entityType = entityType; + } + + + public BusinessApplicationAllOfAttributes dateOfIncorporation(LocalDate dateOfIncorporation) { + this.dateOfIncorporation = dateOfIncorporation; + return this; + } + + /** + * Get dateOfIncorporation + * @return dateOfIncorporation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getDateOfIncorporation() { + return dateOfIncorporation; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfIncorporation(LocalDate dateOfIncorporation) { + this.dateOfIncorporation = dateOfIncorporation; + } + + + public BusinessApplicationAllOfAttributes stateOfIncorporation(String stateOfIncorporation) { + this.stateOfIncorporation = stateOfIncorporation; + return this; + } + + /** + * Get stateOfIncorporation + * @return stateOfIncorporation + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getStateOfIncorporation() { + return stateOfIncorporation; + } + + + @JsonProperty(JSON_PROPERTY_STATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStateOfIncorporation(String stateOfIncorporation) { + this.stateOfIncorporation = stateOfIncorporation; + } + + + public BusinessApplicationAllOfAttributes purpose(String purpose) { + this.purpose = purpose; + return this; + } + + /** + * Get purpose + * @return purpose + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PURPOSE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPurpose() { + return purpose; + } + + + @JsonProperty(JSON_PROPERTY_PURPOSE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPurpose(String purpose) { + this.purpose = purpose; + } + + + public BusinessApplicationAllOfAttributes phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public BusinessApplicationAllOfAttributes address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(Address address) { + this.address = address; + } + + + public BusinessApplicationAllOfAttributes contact(Contact contact) { + this.contact = contact; + return this; + } + + /** + * Get contact + * @return contact + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Contact getContact() { + return contact; + } + + + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setContact(Contact contact) { + this.contact = contact; + } + + + public BusinessApplicationAllOfAttributes officer(Officer officer) { + this.officer = officer; + return this; + } + + /** + * Get officer + * @return officer + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OFFICER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Officer getOfficer() { + return officer; + } + + + @JsonProperty(JSON_PROPERTY_OFFICER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOfficer(Officer officer) { + this.officer = officer; + } + + + public BusinessApplicationAllOfAttributes ip(String ip) { + this.ip = ip; + return this; + } + + /** + * Get ip + * @return ip + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIp() { + return ip; + } + + + @JsonProperty(JSON_PROPERTY_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIp(String ip) { + this.ip = ip; + } + + + public BusinessApplicationAllOfAttributes website(String website) { + this.website = website; + return this; + } + + /** + * Get website + * @return website + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEBSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebsite() { + return website; + } + + + @JsonProperty(JSON_PROPERTY_WEBSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWebsite(String website) { + this.website = website; + } + + + public BusinessApplicationAllOfAttributes beneficialOwners(List beneficialOwners) { + this.beneficialOwners = beneficialOwners; + return this; + } + + public BusinessApplicationAllOfAttributes addBeneficialOwnersItem(BeneficialOwner beneficialOwnersItem) { + if (this.beneficialOwners == null) { + this.beneficialOwners = new ArrayList<>(); + } + this.beneficialOwners.add(beneficialOwnersItem); + return this; + } + + /** + * Get beneficialOwners + * @return beneficialOwners + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BENEFICIAL_OWNERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getBeneficialOwners() { + return beneficialOwners; + } + + + @JsonProperty(JSON_PROPERTY_BENEFICIAL_OWNERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBeneficialOwners(List beneficialOwners) { + this.beneficialOwners = beneficialOwners; + } + + + public BusinessApplicationAllOfAttributes decisionMethod(DecisionMethodEnum decisionMethod) { + this.decisionMethod = decisionMethod; + return this; + } + + /** + * Get decisionMethod + * @return decisionMethod + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECISION_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DecisionMethodEnum getDecisionMethod() { + return decisionMethod; + } + + + @JsonProperty(JSON_PROPERTY_DECISION_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecisionMethod(DecisionMethodEnum decisionMethod) { + this.decisionMethod = decisionMethod; + } + + + public BusinessApplicationAllOfAttributes decisionUserId(String decisionUserId) { + this.decisionUserId = decisionUserId; + return this; + } + + /** + * Get decisionUserId + * @return decisionUserId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECISION_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDecisionUserId() { + return decisionUserId; + } + + + @JsonProperty(JSON_PROPERTY_DECISION_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecisionUserId(String decisionUserId) { + this.decisionUserId = decisionUserId; + } + + + public BusinessApplicationAllOfAttributes decisionReason(String decisionReason) { + this.decisionReason = decisionReason; + return this; + } + + /** + * Get decisionReason + * @return decisionReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECISION_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDecisionReason() { + return decisionReason; + } + + + @JsonProperty(JSON_PROPERTY_DECISION_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecisionReason(String decisionReason) { + this.decisionReason = decisionReason; + } + + + public BusinessApplicationAllOfAttributes decisionDateTime(OffsetDateTime decisionDateTime) { + this.decisionDateTime = decisionDateTime; + return this; + } + + /** + * Get decisionDateTime + * @return decisionDateTime + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECISION_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getDecisionDateTime() { + return decisionDateTime; + } + + + @JsonProperty(JSON_PROPERTY_DECISION_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecisionDateTime(OffsetDateTime decisionDateTime) { + this.decisionDateTime = decisionDateTime; + } + + + public BusinessApplicationAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public BusinessApplicationAllOfAttributes riskRate(RiskRateEnum riskRate) { + this.riskRate = riskRate; + return this; + } + + /** + * Get riskRate + * @return riskRate + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RISK_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RiskRateEnum getRiskRate() { + return riskRate; + } + + + @JsonProperty(JSON_PROPERTY_RISK_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRiskRate(RiskRateEnum riskRate) { + this.riskRate = riskRate; + } + + + public BusinessApplicationAllOfAttributes evaluationFlags(List evaluationFlags) { + this.evaluationFlags = evaluationFlags; + return this; + } + + public BusinessApplicationAllOfAttributes addEvaluationFlagsItem(String evaluationFlagsItem) { + if (this.evaluationFlags == null) { + this.evaluationFlags = new ArrayList<>(); + } + this.evaluationFlags.add(evaluationFlagsItem); + return this; + } + + /** + * Get evaluationFlags + * @return evaluationFlags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_FLAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getEvaluationFlags() { + return evaluationFlags; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_FLAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationFlags(List evaluationFlags) { + this.evaluationFlags = evaluationFlags; + } + + + public BusinessApplicationAllOfAttributes ipLocationDetails(Object ipLocationDetails) { + this.ipLocationDetails = ipLocationDetails; + return this; + } + + /** + * Get ipLocationDetails + * @return ipLocationDetails + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IP_LOCATION_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getIpLocationDetails() { + return ipLocationDetails; + } + + + @JsonProperty(JSON_PROPERTY_IP_LOCATION_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIpLocationDetails(Object ipLocationDetails) { + this.ipLocationDetails = ipLocationDetails; + } + + + public BusinessApplicationAllOfAttributes phoneLocationDetails(Object phoneLocationDetails) { + this.phoneLocationDetails = phoneLocationDetails; + return this; + } + + /** + * Get phoneLocationDetails + * @return phoneLocationDetails + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE_LOCATION_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getPhoneLocationDetails() { + return phoneLocationDetails; + } + + + @JsonProperty(JSON_PROPERTY_PHONE_LOCATION_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhoneLocationDetails(Object phoneLocationDetails) { + this.phoneLocationDetails = phoneLocationDetails; + } + + + public BusinessApplicationAllOfAttributes archived(Boolean archived) { + this.archived = archived; + return this; + } + + /** + * Get archived + * @return archived + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getArchived() { + return archived; + } + + + @JsonProperty(JSON_PROPERTY_ARCHIVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArchived(Boolean archived) { + this.archived = archived; + } + + + public BusinessApplicationAllOfAttributes industry(Industry industry) { + this.industry = industry; + return this; + } + + /** + * Get industry + * @return industry + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDUSTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Industry getIndustry() { + return industry; + } + + + @JsonProperty(JSON_PROPERTY_INDUSTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIndustry(Industry industry) { + this.industry = industry; + } + + + public BusinessApplicationAllOfAttributes annualRevenue(BusinessAnnualRevenue annualRevenue) { + this.annualRevenue = annualRevenue; + return this; + } + + /** + * Get annualRevenue + * @return annualRevenue + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNUAL_REVENUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BusinessAnnualRevenue getAnnualRevenue() { + return annualRevenue; + } + + + @JsonProperty(JSON_PROPERTY_ANNUAL_REVENUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnualRevenue(BusinessAnnualRevenue annualRevenue) { + this.annualRevenue = annualRevenue; + } + + + public BusinessApplicationAllOfAttributes numberOfEmployees(BusinessNumberOfEmployees numberOfEmployees) { + this.numberOfEmployees = numberOfEmployees; + return this; + } + + /** + * Get numberOfEmployees + * @return numberOfEmployees + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUMBER_OF_EMPLOYEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BusinessNumberOfEmployees getNumberOfEmployees() { + return numberOfEmployees; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER_OF_EMPLOYEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumberOfEmployees(BusinessNumberOfEmployees numberOfEmployees) { + this.numberOfEmployees = numberOfEmployees; + } + + + public BusinessApplicationAllOfAttributes cashFlow(CashFlow cashFlow) { + this.cashFlow = cashFlow; + return this; + } + + /** + * Get cashFlow + * @return cashFlow + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CASH_FLOW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CashFlow getCashFlow() { + return cashFlow; + } + + + @JsonProperty(JSON_PROPERTY_CASH_FLOW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCashFlow(CashFlow cashFlow) { + this.cashFlow = cashFlow; + } + + + public BusinessApplicationAllOfAttributes yearOfIncorporation(String yearOfIncorporation) { + this.yearOfIncorporation = yearOfIncorporation; + return this; + } + + /** + * Get yearOfIncorporation + * @return yearOfIncorporation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_YEAR_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getYearOfIncorporation() { + return yearOfIncorporation; + } + + + @JsonProperty(JSON_PROPERTY_YEAR_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setYearOfIncorporation(String yearOfIncorporation) { + this.yearOfIncorporation = yearOfIncorporation; + } + + + public BusinessApplicationAllOfAttributes countriesOfOperation(List countriesOfOperation) { + this.countriesOfOperation = countriesOfOperation; + return this; + } + + public BusinessApplicationAllOfAttributes addCountriesOfOperationItem(String countriesOfOperationItem) { + if (this.countriesOfOperation == null) { + this.countriesOfOperation = new ArrayList<>(); + } + this.countriesOfOperation.add(countriesOfOperationItem); + return this; + } + + /** + * Get countriesOfOperation + * @return countriesOfOperation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTRIES_OF_OPERATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getCountriesOfOperation() { + return countriesOfOperation; + } + + + @JsonProperty(JSON_PROPERTY_COUNTRIES_OF_OPERATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCountriesOfOperation(List countriesOfOperation) { + this.countriesOfOperation = countriesOfOperation; + } + + + public BusinessApplicationAllOfAttributes stockSymbol(String stockSymbol) { + this.stockSymbol = stockSymbol; + return this; + } + + /** + * Get stockSymbol + * @return stockSymbol + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STOCK_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStockSymbol() { + return stockSymbol; + } + + + @JsonProperty(JSON_PROPERTY_STOCK_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStockSymbol(String stockSymbol) { + this.stockSymbol = stockSymbol; + } + + + public BusinessApplicationAllOfAttributes businessVertical(BusinessVertical businessVertical) { + this.businessVertical = businessVertical; + return this; + } + + /** + * Get businessVertical + * @return businessVertical + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUSINESS_VERTICAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BusinessVertical getBusinessVertical() { + return businessVertical; + } + + + @JsonProperty(JSON_PROPERTY_BUSINESS_VERTICAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBusinessVertical(BusinessVertical businessVertical) { + this.businessVertical = businessVertical; + } + + + /** + * Return true if this BusinessApplication_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BusinessApplicationAllOfAttributes businessApplicationAllOfAttributes = (BusinessApplicationAllOfAttributes) o; + return Objects.equals(this.createdAt, businessApplicationAllOfAttributes.createdAt) && + Objects.equals(this.updatedAt, businessApplicationAllOfAttributes.updatedAt) && + Objects.equals(this.status, businessApplicationAllOfAttributes.status) && + Objects.equals(this.message, businessApplicationAllOfAttributes.message) && + Objects.equals(this.evaluationOutcome, businessApplicationAllOfAttributes.evaluationOutcome) && + Objects.equals(this.evaluationId, businessApplicationAllOfAttributes.evaluationId) && + Objects.equals(this.evaluationEntityId, businessApplicationAllOfAttributes.evaluationEntityId) && + Objects.equals(this.name, businessApplicationAllOfAttributes.name) && + equalsNullable(this.dba, businessApplicationAllOfAttributes.dba) && + Objects.equals(this.ein, businessApplicationAllOfAttributes.ein) && + Objects.equals(this.entityType, businessApplicationAllOfAttributes.entityType) && + Objects.equals(this.dateOfIncorporation, businessApplicationAllOfAttributes.dateOfIncorporation) && + Objects.equals(this.stateOfIncorporation, businessApplicationAllOfAttributes.stateOfIncorporation) && + Objects.equals(this.purpose, businessApplicationAllOfAttributes.purpose) && + Objects.equals(this.phone, businessApplicationAllOfAttributes.phone) && + Objects.equals(this.address, businessApplicationAllOfAttributes.address) && + Objects.equals(this.contact, businessApplicationAllOfAttributes.contact) && + Objects.equals(this.officer, businessApplicationAllOfAttributes.officer) && + Objects.equals(this.ip, businessApplicationAllOfAttributes.ip) && + Objects.equals(this.website, businessApplicationAllOfAttributes.website) && + Objects.equals(this.beneficialOwners, businessApplicationAllOfAttributes.beneficialOwners) && + Objects.equals(this.decisionMethod, businessApplicationAllOfAttributes.decisionMethod) && + Objects.equals(this.decisionUserId, businessApplicationAllOfAttributes.decisionUserId) && + Objects.equals(this.decisionReason, businessApplicationAllOfAttributes.decisionReason) && + Objects.equals(this.decisionDateTime, businessApplicationAllOfAttributes.decisionDateTime) && + Objects.equals(this.tags, businessApplicationAllOfAttributes.tags) && + Objects.equals(this.riskRate, businessApplicationAllOfAttributes.riskRate) && + Objects.equals(this.evaluationFlags, businessApplicationAllOfAttributes.evaluationFlags) && + Objects.equals(this.ipLocationDetails, businessApplicationAllOfAttributes.ipLocationDetails) && + Objects.equals(this.phoneLocationDetails, businessApplicationAllOfAttributes.phoneLocationDetails) && + Objects.equals(this.archived, businessApplicationAllOfAttributes.archived) && + Objects.equals(this.industry, businessApplicationAllOfAttributes.industry) && + Objects.equals(this.annualRevenue, businessApplicationAllOfAttributes.annualRevenue) && + Objects.equals(this.numberOfEmployees, businessApplicationAllOfAttributes.numberOfEmployees) && + Objects.equals(this.cashFlow, businessApplicationAllOfAttributes.cashFlow) && + Objects.equals(this.yearOfIncorporation, businessApplicationAllOfAttributes.yearOfIncorporation) && + Objects.equals(this.countriesOfOperation, businessApplicationAllOfAttributes.countriesOfOperation) && + Objects.equals(this.stockSymbol, businessApplicationAllOfAttributes.stockSymbol) && + Objects.equals(this.businessVertical, businessApplicationAllOfAttributes.businessVertical); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, updatedAt, status, message, evaluationOutcome, evaluationId, evaluationEntityId, name, hashCodeNullable(dba), ein, entityType, dateOfIncorporation, stateOfIncorporation, purpose, phone, address, contact, officer, ip, website, beneficialOwners, decisionMethod, decisionUserId, decisionReason, decisionDateTime, tags, riskRate, evaluationFlags, ipLocationDetails, phoneLocationDetails, archived, industry, annualRevenue, numberOfEmployees, cashFlow, yearOfIncorporation, countriesOfOperation, stockSymbol, businessVertical); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BusinessApplicationAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" evaluationOutcome: ").append(toIndentedString(evaluationOutcome)).append("\n"); + sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); + sb.append(" evaluationEntityId: ").append(toIndentedString(evaluationEntityId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" dba: ").append(toIndentedString(dba)).append("\n"); + sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); + sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" dateOfIncorporation: ").append(toIndentedString(dateOfIncorporation)).append("\n"); + sb.append(" stateOfIncorporation: ").append(toIndentedString(stateOfIncorporation)).append("\n"); + sb.append(" purpose: ").append(toIndentedString(purpose)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" officer: ").append(toIndentedString(officer)).append("\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append(" website: ").append(toIndentedString(website)).append("\n"); + sb.append(" beneficialOwners: ").append(toIndentedString(beneficialOwners)).append("\n"); + sb.append(" decisionMethod: ").append(toIndentedString(decisionMethod)).append("\n"); + sb.append(" decisionUserId: ").append(toIndentedString(decisionUserId)).append("\n"); + sb.append(" decisionReason: ").append(toIndentedString(decisionReason)).append("\n"); + sb.append(" decisionDateTime: ").append(toIndentedString(decisionDateTime)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" riskRate: ").append(toIndentedString(riskRate)).append("\n"); + sb.append(" evaluationFlags: ").append(toIndentedString(evaluationFlags)).append("\n"); + sb.append(" ipLocationDetails: ").append(toIndentedString(ipLocationDetails)).append("\n"); + sb.append(" phoneLocationDetails: ").append(toIndentedString(phoneLocationDetails)).append("\n"); + sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); + sb.append(" industry: ").append(toIndentedString(industry)).append("\n"); + sb.append(" annualRevenue: ").append(toIndentedString(annualRevenue)).append("\n"); + sb.append(" numberOfEmployees: ").append(toIndentedString(numberOfEmployees)).append("\n"); + sb.append(" cashFlow: ").append(toIndentedString(cashFlow)).append("\n"); + sb.append(" yearOfIncorporation: ").append(toIndentedString(yearOfIncorporation)).append("\n"); + sb.append(" countriesOfOperation: ").append(toIndentedString(countriesOfOperation)).append("\n"); + sb.append(" stockSymbol: ").append(toIndentedString(stockSymbol)).append("\n"); + sb.append(" businessVertical: ").append(toIndentedString(businessVertical)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationOutcome` to the URL query string + if (getEvaluationOutcome() != null) { + joiner.add(String.format("%sevaluationOutcome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEvaluationOutcome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationId` to the URL query string + if (getEvaluationId() != null) { + joiner.add(String.format("%sevaluationId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEvaluationId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationEntityId` to the URL query string + if (getEvaluationEntityId() != null) { + joiner.add(String.format("%sevaluationEntityId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEvaluationEntityId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dba` to the URL query string + if (getDba() != null) { + joiner.add(String.format("%sdba%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDba()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ein` to the URL query string + if (getEin() != null) { + joiner.add(String.format("%sein%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEin()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format("%sentityType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEntityType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dateOfIncorporation` to the URL query string + if (getDateOfIncorporation() != null) { + joiner.add(String.format("%sdateOfIncorporation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfIncorporation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `stateOfIncorporation` to the URL query string + if (getStateOfIncorporation() != null) { + joiner.add(String.format("%sstateOfIncorporation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStateOfIncorporation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `purpose` to the URL query string + if (getPurpose() != null) { + joiner.add(String.format("%spurpose%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPurpose()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `contact` to the URL query string + if (getContact() != null) { + joiner.add(getContact().toUrlQueryString(prefix + "contact" + suffix)); + } + + // add `officer` to the URL query string + if (getOfficer() != null) { + joiner.add(getOfficer().toUrlQueryString(prefix + "officer" + suffix)); + } + + // add `ip` to the URL query string + if (getIp() != null) { + joiner.add(String.format("%sip%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIp()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `website` to the URL query string + if (getWebsite() != null) { + joiner.add(String.format("%swebsite%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getWebsite()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `beneficialOwners` to the URL query string + if (getBeneficialOwners() != null) { + for (int i = 0; i < getBeneficialOwners().size(); i++) { + if (getBeneficialOwners().get(i) != null) { + joiner.add(getBeneficialOwners().get(i).toUrlQueryString(String.format("%sbeneficialOwners%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `decisionMethod` to the URL query string + if (getDecisionMethod() != null) { + joiner.add(String.format("%sdecisionMethod%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDecisionMethod()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `decisionUserId` to the URL query string + if (getDecisionUserId() != null) { + joiner.add(String.format("%sdecisionUserId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDecisionUserId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `decisionReason` to the URL query string + if (getDecisionReason() != null) { + joiner.add(String.format("%sdecisionReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDecisionReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `decisionDateTime` to the URL query string + if (getDecisionDateTime() != null) { + joiner.add(String.format("%sdecisionDateTime%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDecisionDateTime()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `riskRate` to the URL query string + if (getRiskRate() != null) { + joiner.add(String.format("%sriskRate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRiskRate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationFlags` to the URL query string + if (getEvaluationFlags() != null) { + for (int i = 0; i < getEvaluationFlags().size(); i++) { + joiner.add(String.format("%sevaluationFlags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getEvaluationFlags().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `ipLocationDetails` to the URL query string + if (getIpLocationDetails() != null) { + joiner.add(String.format("%sipLocationDetails%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIpLocationDetails()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phoneLocationDetails` to the URL query string + if (getPhoneLocationDetails() != null) { + joiner.add(String.format("%sphoneLocationDetails%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPhoneLocationDetails()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `archived` to the URL query string + if (getArchived() != null) { + joiner.add(String.format("%sarchived%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getArchived()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `industry` to the URL query string + if (getIndustry() != null) { + joiner.add(String.format("%sindustry%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIndustry()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `annualRevenue` to the URL query string + if (getAnnualRevenue() != null) { + joiner.add(String.format("%sannualRevenue%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAnnualRevenue()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `numberOfEmployees` to the URL query string + if (getNumberOfEmployees() != null) { + joiner.add(String.format("%snumberOfEmployees%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNumberOfEmployees()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cashFlow` to the URL query string + if (getCashFlow() != null) { + joiner.add(String.format("%scashFlow%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCashFlow()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `yearOfIncorporation` to the URL query string + if (getYearOfIncorporation() != null) { + joiner.add(String.format("%syearOfIncorporation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getYearOfIncorporation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `countriesOfOperation` to the URL query string + if (getCountriesOfOperation() != null) { + for (int i = 0; i < getCountriesOfOperation().size(); i++) { + joiner.add(String.format("%scountriesOfOperation%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getCountriesOfOperation().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `stockSymbol` to the URL query string + if (getStockSymbol() != null) { + joiner.add(String.format("%sstockSymbol%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStockSymbol()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `businessVertical` to the URL query string + if (getBusinessVertical() != null) { + joiner.add(String.format("%sbusinessVertical%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBusinessVertical()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/BusinessCreditCard.java b/src/main/java/unit/java/sdk/model/BusinessCreditCard.java new file mode 100644 index 00000000..b145e66c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BusinessCreditCard.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BusinessDebitCardAllOfAttributes; +import unit.java.sdk.model.Card; +import unit.java.sdk.model.CardRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * BusinessCreditCard + */ +@JsonPropertyOrder({ + BusinessCreditCard.JSON_PROPERTY_ATTRIBUTES, + BusinessCreditCard.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class BusinessCreditCard extends Card { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private BusinessDebitCardAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CardRelationships relationships; + + public BusinessCreditCard() { + } + + public BusinessCreditCard attributes(BusinessDebitCardAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BusinessDebitCardAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(BusinessDebitCardAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public BusinessCreditCard relationships(CardRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CardRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CardRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public BusinessCreditCard type(String type) { + this.setType(type); + return this; + } + + @Override + public BusinessCreditCard id(String id) { + this.setId(id); + return this; + } + + /** + * Return true if this BusinessCreditCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BusinessCreditCard businessCreditCard = (BusinessCreditCard) o; + return Objects.equals(this.attributes, businessCreditCard.attributes) && + Objects.equals(this.relationships, businessCreditCard.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BusinessCreditCard {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("BusinessCreditCard", BusinessCreditCard.class); + JSON.registerDiscriminator(BusinessCreditCard.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/BusinessCustomer.java b/src/main/java/unit/java/sdk/model/BusinessCustomer.java new file mode 100644 index 00000000..39119089 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BusinessCustomer.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BusinessCustomerAllOfAttributes; +import unit.java.sdk.model.Customer; +import unit.java.sdk.model.CustomerRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * BusinessCustomer + */ +@JsonPropertyOrder({ + BusinessCustomer.JSON_PROPERTY_ATTRIBUTES, + BusinessCustomer.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class BusinessCustomer extends Customer { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private BusinessCustomerAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CustomerRelationships relationships; + + public BusinessCustomer() { + } + + public BusinessCustomer attributes(BusinessCustomerAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BusinessCustomerAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(BusinessCustomerAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public BusinessCustomer relationships(CustomerRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CustomerRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(CustomerRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public BusinessCustomer id(String id) { + this.setId(id); + return this; + } + + @Override + public BusinessCustomer type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this BusinessCustomer object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BusinessCustomer businessCustomer = (BusinessCustomer) o; + return Objects.equals(this.attributes, businessCustomer.attributes) && + Objects.equals(this.relationships, businessCustomer.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BusinessCustomer {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(String.format("%srelationships%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRelationships()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("BusinessCustomer", BusinessCustomer.class); + JSON.registerDiscriminator(BusinessCustomer.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/BusinessCustomerAllOfAttributes.java b/src/main/java/unit/java/sdk/model/BusinessCustomerAllOfAttributes.java new file mode 100644 index 00000000..3e9bb5fa --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BusinessCustomerAllOfAttributes.java @@ -0,0 +1,831 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.AuthorizedUser; +import unit.java.sdk.model.Contact; +import unit.java.sdk.model.EntityType; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * BusinessCustomerAllOfAttributes + */ +@JsonPropertyOrder({ + BusinessCustomerAllOfAttributes.JSON_PROPERTY_CREATED_AT, + BusinessCustomerAllOfAttributes.JSON_PROPERTY_NAME, + BusinessCustomerAllOfAttributes.JSON_PROPERTY_DBA, + BusinessCustomerAllOfAttributes.JSON_PROPERTY_EIN, + BusinessCustomerAllOfAttributes.JSON_PROPERTY_ENTITY_TYPE, + BusinessCustomerAllOfAttributes.JSON_PROPERTY_DATE_OF_INCORPORATION, + BusinessCustomerAllOfAttributes.JSON_PROPERTY_STATE_OF_INCORPORATION, + BusinessCustomerAllOfAttributes.JSON_PROPERTY_PURPOSE, + BusinessCustomerAllOfAttributes.JSON_PROPERTY_PHONE, + BusinessCustomerAllOfAttributes.JSON_PROPERTY_ADDRESS, + BusinessCustomerAllOfAttributes.JSON_PROPERTY_CONTACT, + BusinessCustomerAllOfAttributes.JSON_PROPERTY_TAGS, + BusinessCustomerAllOfAttributes.JSON_PROPERTY_RISK_RATE, + BusinessCustomerAllOfAttributes.JSON_PROPERTY_AUTHORIZED_USERS, + BusinessCustomerAllOfAttributes.JSON_PROPERTY_STATUS, + BusinessCustomerAllOfAttributes.JSON_PROPERTY_ARCHIVE_REASON +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BusinessCustomerAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_DBA = "dba"; + private String dba; + + public static final String JSON_PROPERTY_EIN = "ein"; + private String ein; + + public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; + private EntityType entityType; + + public static final String JSON_PROPERTY_DATE_OF_INCORPORATION = "dateOfIncorporation"; + private LocalDate dateOfIncorporation; + + public static final String JSON_PROPERTY_STATE_OF_INCORPORATION = "stateOfIncorporation"; + private String stateOfIncorporation; + + public static final String JSON_PROPERTY_PURPOSE = "purpose"; + private String purpose; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_CONTACT = "contact"; + private Contact contact; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + /** + * Gets or Sets riskRate + */ + public enum RiskRateEnum { + LOW("low"), + + MEDIUM("medium"), + + HIGH("high"); + + private String value; + + RiskRateEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RiskRateEnum fromValue(String value) { + for (RiskRateEnum b : RiskRateEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RISK_RATE = "riskRate"; + private RiskRateEnum riskRate; + + public static final String JSON_PROPERTY_AUTHORIZED_USERS = "authorizedUsers"; + private List authorizedUsers; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + ACTIVE("Active"), + + ARCHIVED("Archived"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + /** + * Gets or Sets archiveReason + */ + public enum ArchiveReasonEnum { + INACTIVE("Inactive"), + + FRAUDACHACTIVITY("FraudACHActivity"), + + FRAUDCARDACTIVITY("FraudCardActivity"), + + FRAUDCHECKACTIVITY("FraudCheckActivity"), + + FRAUDAPPLICATIONHISTORY("FraudApplicationHistory"), + + FRAUDACCOUNTACTIVITY("FraudAccountActivity"), + + FRAUDCLIENTIDENTIFIED("FraudClientIdentified"), + + FRAUDLINKEDTOFRAUDULENTCUSTOMER("FraudLinkedToFraudulentCustomer"); + + private String value; + + ArchiveReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArchiveReasonEnum fromValue(String value) { + for (ArchiveReasonEnum b : ArchiveReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ARCHIVE_REASON = "archiveReason"; + private ArchiveReasonEnum archiveReason; + + public BusinessCustomerAllOfAttributes() { + } + + public BusinessCustomerAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public BusinessCustomerAllOfAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public BusinessCustomerAllOfAttributes dba(String dba) { + this.dba = dba; + return this; + } + + /** + * Get dba + * @return dba + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDba() { + return dba; + } + + + @JsonProperty(JSON_PROPERTY_DBA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDba(String dba) { + this.dba = dba; + } + + + public BusinessCustomerAllOfAttributes ein(String ein) { + this.ein = ein; + return this; + } + + /** + * Get ein + * @return ein + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEin() { + return ein; + } + + + @JsonProperty(JSON_PROPERTY_EIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEin(String ein) { + this.ein = ein; + } + + + public BusinessCustomerAllOfAttributes entityType(EntityType entityType) { + this.entityType = entityType; + return this; + } + + /** + * Get entityType + * @return entityType + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public EntityType getEntityType() { + return entityType; + } + + + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEntityType(EntityType entityType) { + this.entityType = entityType; + } + + + public BusinessCustomerAllOfAttributes dateOfIncorporation(LocalDate dateOfIncorporation) { + this.dateOfIncorporation = dateOfIncorporation; + return this; + } + + /** + * Get dateOfIncorporation + * @return dateOfIncorporation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getDateOfIncorporation() { + return dateOfIncorporation; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfIncorporation(LocalDate dateOfIncorporation) { + this.dateOfIncorporation = dateOfIncorporation; + } + + + public BusinessCustomerAllOfAttributes stateOfIncorporation(String stateOfIncorporation) { + this.stateOfIncorporation = stateOfIncorporation; + return this; + } + + /** + * Get stateOfIncorporation + * @return stateOfIncorporation + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getStateOfIncorporation() { + return stateOfIncorporation; + } + + + @JsonProperty(JSON_PROPERTY_STATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStateOfIncorporation(String stateOfIncorporation) { + this.stateOfIncorporation = stateOfIncorporation; + } + + + public BusinessCustomerAllOfAttributes purpose(String purpose) { + this.purpose = purpose; + return this; + } + + /** + * Get purpose + * @return purpose + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PURPOSE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPurpose() { + return purpose; + } + + + @JsonProperty(JSON_PROPERTY_PURPOSE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPurpose(String purpose) { + this.purpose = purpose; + } + + + public BusinessCustomerAllOfAttributes phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public BusinessCustomerAllOfAttributes address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(Address address) { + this.address = address; + } + + + public BusinessCustomerAllOfAttributes contact(Contact contact) { + this.contact = contact; + return this; + } + + /** + * Get contact + * @return contact + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Contact getContact() { + return contact; + } + + + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setContact(Contact contact) { + this.contact = contact; + } + + + public BusinessCustomerAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public BusinessCustomerAllOfAttributes riskRate(RiskRateEnum riskRate) { + this.riskRate = riskRate; + return this; + } + + /** + * Get riskRate + * @return riskRate + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RISK_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RiskRateEnum getRiskRate() { + return riskRate; + } + + + @JsonProperty(JSON_PROPERTY_RISK_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRiskRate(RiskRateEnum riskRate) { + this.riskRate = riskRate; + } + + + public BusinessCustomerAllOfAttributes authorizedUsers(List authorizedUsers) { + this.authorizedUsers = authorizedUsers; + return this; + } + + public BusinessCustomerAllOfAttributes addAuthorizedUsersItem(AuthorizedUser authorizedUsersItem) { + if (this.authorizedUsers == null) { + this.authorizedUsers = new ArrayList<>(); + } + this.authorizedUsers.add(authorizedUsersItem); + return this; + } + + /** + * Get authorizedUsers + * @return authorizedUsers + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHORIZED_USERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getAuthorizedUsers() { + return authorizedUsers; + } + + + @JsonProperty(JSON_PROPERTY_AUTHORIZED_USERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAuthorizedUsers(List authorizedUsers) { + this.authorizedUsers = authorizedUsers; + } + + + public BusinessCustomerAllOfAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public BusinessCustomerAllOfAttributes archiveReason(ArchiveReasonEnum archiveReason) { + this.archiveReason = archiveReason; + return this; + } + + /** + * Get archiveReason + * @return archiveReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ArchiveReasonEnum getArchiveReason() { + return archiveReason; + } + + + @JsonProperty(JSON_PROPERTY_ARCHIVE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArchiveReason(ArchiveReasonEnum archiveReason) { + this.archiveReason = archiveReason; + } + + + /** + * Return true if this BusinessCustomer_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BusinessCustomerAllOfAttributes businessCustomerAllOfAttributes = (BusinessCustomerAllOfAttributes) o; + return Objects.equals(this.createdAt, businessCustomerAllOfAttributes.createdAt) && + Objects.equals(this.name, businessCustomerAllOfAttributes.name) && + Objects.equals(this.dba, businessCustomerAllOfAttributes.dba) && + Objects.equals(this.ein, businessCustomerAllOfAttributes.ein) && + Objects.equals(this.entityType, businessCustomerAllOfAttributes.entityType) && + Objects.equals(this.dateOfIncorporation, businessCustomerAllOfAttributes.dateOfIncorporation) && + Objects.equals(this.stateOfIncorporation, businessCustomerAllOfAttributes.stateOfIncorporation) && + Objects.equals(this.purpose, businessCustomerAllOfAttributes.purpose) && + Objects.equals(this.phone, businessCustomerAllOfAttributes.phone) && + Objects.equals(this.address, businessCustomerAllOfAttributes.address) && + Objects.equals(this.contact, businessCustomerAllOfAttributes.contact) && + Objects.equals(this.tags, businessCustomerAllOfAttributes.tags) && + Objects.equals(this.riskRate, businessCustomerAllOfAttributes.riskRate) && + Objects.equals(this.authorizedUsers, businessCustomerAllOfAttributes.authorizedUsers) && + Objects.equals(this.status, businessCustomerAllOfAttributes.status) && + Objects.equals(this.archiveReason, businessCustomerAllOfAttributes.archiveReason); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, name, dba, ein, entityType, dateOfIncorporation, stateOfIncorporation, purpose, phone, address, contact, tags, riskRate, authorizedUsers, status, archiveReason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BusinessCustomerAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" dba: ").append(toIndentedString(dba)).append("\n"); + sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); + sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" dateOfIncorporation: ").append(toIndentedString(dateOfIncorporation)).append("\n"); + sb.append(" stateOfIncorporation: ").append(toIndentedString(stateOfIncorporation)).append("\n"); + sb.append(" purpose: ").append(toIndentedString(purpose)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" riskRate: ").append(toIndentedString(riskRate)).append("\n"); + sb.append(" authorizedUsers: ").append(toIndentedString(authorizedUsers)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" archiveReason: ").append(toIndentedString(archiveReason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dba` to the URL query string + if (getDba() != null) { + joiner.add(String.format("%sdba%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDba()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ein` to the URL query string + if (getEin() != null) { + joiner.add(String.format("%sein%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEin()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format("%sentityType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEntityType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dateOfIncorporation` to the URL query string + if (getDateOfIncorporation() != null) { + joiner.add(String.format("%sdateOfIncorporation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfIncorporation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `stateOfIncorporation` to the URL query string + if (getStateOfIncorporation() != null) { + joiner.add(String.format("%sstateOfIncorporation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStateOfIncorporation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `purpose` to the URL query string + if (getPurpose() != null) { + joiner.add(String.format("%spurpose%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPurpose()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `contact` to the URL query string + if (getContact() != null) { + joiner.add(getContact().toUrlQueryString(prefix + "contact" + suffix)); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `riskRate` to the URL query string + if (getRiskRate() != null) { + joiner.add(String.format("%sriskRate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRiskRate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `authorizedUsers` to the URL query string + if (getAuthorizedUsers() != null) { + for (int i = 0; i < getAuthorizedUsers().size(); i++) { + if (getAuthorizedUsers().get(i) != null) { + joiner.add(getAuthorizedUsers().get(i).toUrlQueryString(String.format("%sauthorizedUsers%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `archiveReason` to the URL query string + if (getArchiveReason() != null) { + joiner.add(String.format("%sarchiveReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getArchiveReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/BusinessDebitCard.java b/src/main/java/unit/java/sdk/model/BusinessDebitCard.java new file mode 100644 index 00000000..6584fd7b --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BusinessDebitCard.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BusinessDebitCardAllOfAttributes; +import unit.java.sdk.model.Card; +import unit.java.sdk.model.CardRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * BusinessDebitCard + */ +@JsonPropertyOrder({ + BusinessDebitCard.JSON_PROPERTY_ATTRIBUTES, + BusinessDebitCard.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class BusinessDebitCard extends Card { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private BusinessDebitCardAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CardRelationships relationships; + + public BusinessDebitCard() { + } + + public BusinessDebitCard attributes(BusinessDebitCardAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BusinessDebitCardAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(BusinessDebitCardAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public BusinessDebitCard relationships(CardRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CardRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CardRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public BusinessDebitCard type(String type) { + this.setType(type); + return this; + } + + @Override + public BusinessDebitCard id(String id) { + this.setId(id); + return this; + } + + /** + * Return true if this BusinessDebitCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BusinessDebitCard businessDebitCard = (BusinessDebitCard) o; + return Objects.equals(this.attributes, businessDebitCard.attributes) && + Objects.equals(this.relationships, businessDebitCard.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BusinessDebitCard {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("BusinessDebitCard", BusinessDebitCard.class); + JSON.registerDiscriminator(BusinessDebitCard.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/BusinessDebitCardAllOfAttributes.java b/src/main/java/unit/java/sdk/model/BusinessDebitCardAllOfAttributes.java new file mode 100644 index 00000000..906976e2 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BusinessDebitCardAllOfAttributes.java @@ -0,0 +1,768 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.PhysicalCardStatus; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * BusinessDebitCardAllOfAttributes + */ +@JsonPropertyOrder({ + BusinessDebitCardAllOfAttributes.JSON_PROPERTY_CREATED_AT, + BusinessDebitCardAllOfAttributes.JSON_PROPERTY_UPDATED_AT, + BusinessDebitCardAllOfAttributes.JSON_PROPERTY_LAST4_DIGITS, + BusinessDebitCardAllOfAttributes.JSON_PROPERTY_EXPIRATION_DATE, + BusinessDebitCardAllOfAttributes.JSON_PROPERTY_SHIPPING_ADDRESS, + BusinessDebitCardAllOfAttributes.JSON_PROPERTY_ADDRESS, + BusinessDebitCardAllOfAttributes.JSON_PROPERTY_FULL_NAME, + BusinessDebitCardAllOfAttributes.JSON_PROPERTY_PHONE, + BusinessDebitCardAllOfAttributes.JSON_PROPERTY_EMAIL, + BusinessDebitCardAllOfAttributes.JSON_PROPERTY_DATE_OF_BIRTH, + BusinessDebitCardAllOfAttributes.JSON_PROPERTY_NATIONALITY, + BusinessDebitCardAllOfAttributes.JSON_PROPERTY_SSN, + BusinessDebitCardAllOfAttributes.JSON_PROPERTY_PASSPORT, + BusinessDebitCardAllOfAttributes.JSON_PROPERTY_BIN, + BusinessDebitCardAllOfAttributes.JSON_PROPERTY_STATUS, + BusinessDebitCardAllOfAttributes.JSON_PROPERTY_DESIGN, + BusinessDebitCardAllOfAttributes.JSON_PROPERTY_TAGS, + BusinessDebitCardAllOfAttributes.JSON_PROPERTY_FREEZE_REASON +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BusinessDebitCardAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_LAST4_DIGITS = "last4Digits"; + private String last4Digits; + + public static final String JSON_PROPERTY_EXPIRATION_DATE = "expirationDate"; + private String expirationDate; + + public static final String JSON_PROPERTY_SHIPPING_ADDRESS = "shippingAddress"; + private Address shippingAddress; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public static final String JSON_PROPERTY_SSN = "ssn"; + private String ssn; + + public static final String JSON_PROPERTY_PASSPORT = "passport"; + private String passport; + + public static final String JSON_PROPERTY_BIN = "bin"; + private String bin; + + public static final String JSON_PROPERTY_STATUS = "status"; + private PhysicalCardStatus status; + + public static final String JSON_PROPERTY_DESIGN = "design"; + private String design; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_FREEZE_REASON = "freezeReason"; + private String freezeReason; + + public BusinessDebitCardAllOfAttributes() { + } + + public BusinessDebitCardAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public BusinessDebitCardAllOfAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public BusinessDebitCardAllOfAttributes last4Digits(String last4Digits) { + this.last4Digits = last4Digits; + return this; + } + + /** + * Get last4Digits + * @return last4Digits + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LAST4_DIGITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getLast4Digits() { + return last4Digits; + } + + + @JsonProperty(JSON_PROPERTY_LAST4_DIGITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLast4Digits(String last4Digits) { + this.last4Digits = last4Digits; + } + + + public BusinessDebitCardAllOfAttributes expirationDate(String expirationDate) { + this.expirationDate = expirationDate; + return this; + } + + /** + * Get expirationDate + * @return expirationDate + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getExpirationDate() { + return expirationDate; + } + + + @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExpirationDate(String expirationDate) { + this.expirationDate = expirationDate; + } + + + public BusinessDebitCardAllOfAttributes shippingAddress(Address shippingAddress) { + this.shippingAddress = shippingAddress; + return this; + } + + /** + * Get shippingAddress + * @return shippingAddress + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHIPPING_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Address getShippingAddress() { + return shippingAddress; + } + + + @JsonProperty(JSON_PROPERTY_SHIPPING_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShippingAddress(Address shippingAddress) { + this.shippingAddress = shippingAddress; + } + + + public BusinessDebitCardAllOfAttributes address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(Address address) { + this.address = address; + } + + + public BusinessDebitCardAllOfAttributes fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public BusinessDebitCardAllOfAttributes phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public BusinessDebitCardAllOfAttributes email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEmail(String email) { + this.email = email; + } + + + public BusinessDebitCardAllOfAttributes dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + public BusinessDebitCardAllOfAttributes nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * Get nationality + * @return nationality + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + public BusinessDebitCardAllOfAttributes ssn(String ssn) { + this.ssn = ssn; + return this; + } + + /** + * Get ssn + * @return ssn + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSsn() { + return ssn; + } + + + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSsn(String ssn) { + this.ssn = ssn; + } + + + public BusinessDebitCardAllOfAttributes passport(String passport) { + this.passport = passport; + return this; + } + + /** + * Get passport + * @return passport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassport() { + return passport; + } + + + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassport(String passport) { + this.passport = passport; + } + + + public BusinessDebitCardAllOfAttributes bin(String bin) { + this.bin = bin; + return this; + } + + /** + * Get bin + * @return bin + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBin() { + return bin; + } + + + @JsonProperty(JSON_PROPERTY_BIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBin(String bin) { + this.bin = bin; + } + + + public BusinessDebitCardAllOfAttributes status(PhysicalCardStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PhysicalCardStatus getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(PhysicalCardStatus status) { + this.status = status; + } + + + public BusinessDebitCardAllOfAttributes design(String design) { + this.design = design; + return this; + } + + /** + * Get design + * @return design + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDesign() { + return design; + } + + + @JsonProperty(JSON_PROPERTY_DESIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDesign(String design) { + this.design = design; + } + + + public BusinessDebitCardAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public BusinessDebitCardAllOfAttributes freezeReason(String freezeReason) { + this.freezeReason = freezeReason; + return this; + } + + /** + * Get freezeReason + * @return freezeReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FREEZE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFreezeReason() { + return freezeReason; + } + + + @JsonProperty(JSON_PROPERTY_FREEZE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFreezeReason(String freezeReason) { + this.freezeReason = freezeReason; + } + + + /** + * Return true if this BusinessDebitCard_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BusinessDebitCardAllOfAttributes businessDebitCardAllOfAttributes = (BusinessDebitCardAllOfAttributes) o; + return Objects.equals(this.createdAt, businessDebitCardAllOfAttributes.createdAt) && + Objects.equals(this.updatedAt, businessDebitCardAllOfAttributes.updatedAt) && + Objects.equals(this.last4Digits, businessDebitCardAllOfAttributes.last4Digits) && + Objects.equals(this.expirationDate, businessDebitCardAllOfAttributes.expirationDate) && + Objects.equals(this.shippingAddress, businessDebitCardAllOfAttributes.shippingAddress) && + Objects.equals(this.address, businessDebitCardAllOfAttributes.address) && + Objects.equals(this.fullName, businessDebitCardAllOfAttributes.fullName) && + Objects.equals(this.phone, businessDebitCardAllOfAttributes.phone) && + Objects.equals(this.email, businessDebitCardAllOfAttributes.email) && + Objects.equals(this.dateOfBirth, businessDebitCardAllOfAttributes.dateOfBirth) && + Objects.equals(this.nationality, businessDebitCardAllOfAttributes.nationality) && + Objects.equals(this.ssn, businessDebitCardAllOfAttributes.ssn) && + Objects.equals(this.passport, businessDebitCardAllOfAttributes.passport) && + Objects.equals(this.bin, businessDebitCardAllOfAttributes.bin) && + Objects.equals(this.status, businessDebitCardAllOfAttributes.status) && + Objects.equals(this.design, businessDebitCardAllOfAttributes.design) && + Objects.equals(this.tags, businessDebitCardAllOfAttributes.tags) && + Objects.equals(this.freezeReason, businessDebitCardAllOfAttributes.freezeReason); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, updatedAt, last4Digits, expirationDate, shippingAddress, address, fullName, phone, email, dateOfBirth, nationality, ssn, passport, bin, status, design, tags, freezeReason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BusinessDebitCardAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" last4Digits: ").append(toIndentedString(last4Digits)).append("\n"); + sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); + sb.append(" shippingAddress: ").append(toIndentedString(shippingAddress)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); + sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); + sb.append(" bin: ").append(toIndentedString(bin)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" design: ").append(toIndentedString(design)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" freezeReason: ").append(toIndentedString(freezeReason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `last4Digits` to the URL query string + if (getLast4Digits() != null) { + joiner.add(String.format("%slast4Digits%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLast4Digits()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `expirationDate` to the URL query string + if (getExpirationDate() != null) { + joiner.add(String.format("%sexpirationDate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getExpirationDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `shippingAddress` to the URL query string + if (getShippingAddress() != null) { + joiner.add(getShippingAddress().toUrlQueryString(prefix + "shippingAddress" + suffix)); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nationality` to the URL query string + if (getNationality() != null) { + joiner.add(String.format("%snationality%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNationality()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ssn` to the URL query string + if (getSsn() != null) { + joiner.add(String.format("%sssn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSsn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `passport` to the URL query string + if (getPassport() != null) { + joiner.add(String.format("%spassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `bin` to the URL query string + if (getBin() != null) { + joiner.add(String.format("%sbin%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBin()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `design` to the URL query string + if (getDesign() != null) { + joiner.add(String.format("%sdesign%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDesign()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `freezeReason` to the URL query string + if (getFreezeReason() != null) { + joiner.add(String.format("%sfreezeReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFreezeReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/BusinessNumberOfEmployees.java b/src/main/java/unit/java/sdk/model/BusinessNumberOfEmployees.java new file mode 100644 index 00000000..5120f454 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BusinessNumberOfEmployees.java @@ -0,0 +1,84 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets businessNumberOfEmployees + */ +public enum BusinessNumberOfEmployees { + + UPTO10("UpTo10"), + + BETWEEN10AND50("Between10And50"), + + BETWEEN50AND100("Between50And100"), + + BETWEEN100AND500("Between100And500"), + + OVER500("Over500"); + + private String value; + + BusinessNumberOfEmployees(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BusinessNumberOfEmployees fromValue(String value) { + for (BusinessNumberOfEmployees b : BusinessNumberOfEmployees.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } + +} + diff --git a/src/main/java/org/openapitools/client/model/BusinessVertical.java b/src/main/java/unit/java/sdk/model/BusinessVertical.java similarity index 76% rename from src/main/java/org/openapitools/client/model/BusinessVertical.java rename to src/main/java/unit/java/sdk/model/BusinessVertical.java index f19f9f59..59e04e6f 100644 --- a/src/main/java/org/openapitools/client/model/BusinessVertical.java +++ b/src/main/java/unit/java/sdk/model/BusinessVertical.java @@ -2,7 +2,7 @@ * Unit OpenAPI specifications * An OpenAPI specifications for unit-sdk clients * - * The version of the OpenAPI document: 0.0.2 + * The version of the OpenAPI document: 0.0.3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,21 +11,23 @@ */ -package org.openapitools.client.model; +package unit.java.sdk.model; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; import java.util.Objects; -import com.google.gson.annotations.SerializedName; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets businessVertical */ -@JsonAdapter(BusinessVertical.Adapter.class) public enum BusinessVertical { ADULTENTERTAINMENTDATINGORESCORTSERVICES("AdultEntertainmentDatingOrEscortServices"), @@ -94,6 +96,7 @@ public enum BusinessVertical { this.value = value; } + @JsonValue public String getValue() { return value; } @@ -103,6 +106,7 @@ public String toString() { return String.valueOf(value); } + @JsonCreator public static BusinessVertical fromValue(String value) { for (BusinessVertical b : BusinessVertical.values()) { if (b.value.equals(value)) { @@ -112,17 +116,19 @@ public static BusinessVertical fromValue(String value) { throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final BusinessVertical enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; } - @Override - public BusinessVertical read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return BusinessVertical.fromValue(value); - } + return String.format("%s=%s", prefix, this.toString()); } + } diff --git a/src/main/java/unit/java/sdk/model/BusinessVirtualCreditCard.java b/src/main/java/unit/java/sdk/model/BusinessVirtualCreditCard.java new file mode 100644 index 00000000..fe85db17 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BusinessVirtualCreditCard.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BusinessVirtualDebitCardAllOfAttributes; +import unit.java.sdk.model.Card; +import unit.java.sdk.model.CardRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * BusinessVirtualCreditCard + */ +@JsonPropertyOrder({ + BusinessVirtualCreditCard.JSON_PROPERTY_ATTRIBUTES, + BusinessVirtualCreditCard.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class BusinessVirtualCreditCard extends Card { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private BusinessVirtualDebitCardAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CardRelationships relationships; + + public BusinessVirtualCreditCard() { + } + + public BusinessVirtualCreditCard attributes(BusinessVirtualDebitCardAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BusinessVirtualDebitCardAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(BusinessVirtualDebitCardAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public BusinessVirtualCreditCard relationships(CardRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CardRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CardRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public BusinessVirtualCreditCard type(String type) { + this.setType(type); + return this; + } + + @Override + public BusinessVirtualCreditCard id(String id) { + this.setId(id); + return this; + } + + /** + * Return true if this BusinessVirtualCreditCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BusinessVirtualCreditCard businessVirtualCreditCard = (BusinessVirtualCreditCard) o; + return Objects.equals(this.attributes, businessVirtualCreditCard.attributes) && + Objects.equals(this.relationships, businessVirtualCreditCard.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BusinessVirtualCreditCard {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("BusinessVirtualCreditCard", BusinessVirtualCreditCard.class); + JSON.registerDiscriminator(BusinessVirtualCreditCard.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/BusinessVirtualDebitCard.java b/src/main/java/unit/java/sdk/model/BusinessVirtualDebitCard.java new file mode 100644 index 00000000..1f444114 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BusinessVirtualDebitCard.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BusinessVirtualDebitCardAllOfAttributes; +import unit.java.sdk.model.Card; +import unit.java.sdk.model.CardRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * BusinessVirtualDebitCard + */ +@JsonPropertyOrder({ + BusinessVirtualDebitCard.JSON_PROPERTY_ATTRIBUTES, + BusinessVirtualDebitCard.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class BusinessVirtualDebitCard extends Card { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private BusinessVirtualDebitCardAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CardRelationships relationships; + + public BusinessVirtualDebitCard() { + } + + public BusinessVirtualDebitCard attributes(BusinessVirtualDebitCardAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BusinessVirtualDebitCardAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(BusinessVirtualDebitCardAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public BusinessVirtualDebitCard relationships(CardRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CardRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CardRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public BusinessVirtualDebitCard type(String type) { + this.setType(type); + return this; + } + + @Override + public BusinessVirtualDebitCard id(String id) { + this.setId(id); + return this; + } + + /** + * Return true if this BusinessVirtualDebitCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BusinessVirtualDebitCard businessVirtualDebitCard = (BusinessVirtualDebitCard) o; + return Objects.equals(this.attributes, businessVirtualDebitCard.attributes) && + Objects.equals(this.relationships, businessVirtualDebitCard.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BusinessVirtualDebitCard {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("BusinessVirtualDebitCard", BusinessVirtualDebitCard.class); + JSON.registerDiscriminator(BusinessVirtualDebitCard.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/BusinessVirtualDebitCardAllOfAttributes.java b/src/main/java/unit/java/sdk/model/BusinessVirtualDebitCardAllOfAttributes.java new file mode 100644 index 00000000..d0d46b43 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/BusinessVirtualDebitCardAllOfAttributes.java @@ -0,0 +1,696 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.VirtualCardStatus; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * BusinessVirtualDebitCardAllOfAttributes + */ +@JsonPropertyOrder({ + BusinessVirtualDebitCardAllOfAttributes.JSON_PROPERTY_CREATED_AT, + BusinessVirtualDebitCardAllOfAttributes.JSON_PROPERTY_UPDATED_AT, + BusinessVirtualDebitCardAllOfAttributes.JSON_PROPERTY_LAST4_DIGITS, + BusinessVirtualDebitCardAllOfAttributes.JSON_PROPERTY_EXPIRATION_DATE, + BusinessVirtualDebitCardAllOfAttributes.JSON_PROPERTY_ADDRESS, + BusinessVirtualDebitCardAllOfAttributes.JSON_PROPERTY_FULL_NAME, + BusinessVirtualDebitCardAllOfAttributes.JSON_PROPERTY_PHONE, + BusinessVirtualDebitCardAllOfAttributes.JSON_PROPERTY_EMAIL, + BusinessVirtualDebitCardAllOfAttributes.JSON_PROPERTY_DATE_OF_BIRTH, + BusinessVirtualDebitCardAllOfAttributes.JSON_PROPERTY_NATIONALITY, + BusinessVirtualDebitCardAllOfAttributes.JSON_PROPERTY_SSN, + BusinessVirtualDebitCardAllOfAttributes.JSON_PROPERTY_PASSPORT, + BusinessVirtualDebitCardAllOfAttributes.JSON_PROPERTY_BIN, + BusinessVirtualDebitCardAllOfAttributes.JSON_PROPERTY_STATUS, + BusinessVirtualDebitCardAllOfAttributes.JSON_PROPERTY_TAGS, + BusinessVirtualDebitCardAllOfAttributes.JSON_PROPERTY_FREEZE_REASON +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BusinessVirtualDebitCardAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_LAST4_DIGITS = "last4Digits"; + private String last4Digits; + + public static final String JSON_PROPERTY_EXPIRATION_DATE = "expirationDate"; + private String expirationDate; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public static final String JSON_PROPERTY_SSN = "ssn"; + private String ssn; + + public static final String JSON_PROPERTY_PASSPORT = "passport"; + private String passport; + + public static final String JSON_PROPERTY_BIN = "bin"; + private String bin; + + public static final String JSON_PROPERTY_STATUS = "status"; + private VirtualCardStatus status; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_FREEZE_REASON = "freezeReason"; + private String freezeReason; + + public BusinessVirtualDebitCardAllOfAttributes() { + } + + public BusinessVirtualDebitCardAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public BusinessVirtualDebitCardAllOfAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public BusinessVirtualDebitCardAllOfAttributes last4Digits(String last4Digits) { + this.last4Digits = last4Digits; + return this; + } + + /** + * Get last4Digits + * @return last4Digits + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LAST4_DIGITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getLast4Digits() { + return last4Digits; + } + + + @JsonProperty(JSON_PROPERTY_LAST4_DIGITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLast4Digits(String last4Digits) { + this.last4Digits = last4Digits; + } + + + public BusinessVirtualDebitCardAllOfAttributes expirationDate(String expirationDate) { + this.expirationDate = expirationDate; + return this; + } + + /** + * Get expirationDate + * @return expirationDate + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getExpirationDate() { + return expirationDate; + } + + + @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExpirationDate(String expirationDate) { + this.expirationDate = expirationDate; + } + + + public BusinessVirtualDebitCardAllOfAttributes address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(Address address) { + this.address = address; + } + + + public BusinessVirtualDebitCardAllOfAttributes fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public BusinessVirtualDebitCardAllOfAttributes phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public BusinessVirtualDebitCardAllOfAttributes email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEmail(String email) { + this.email = email; + } + + + public BusinessVirtualDebitCardAllOfAttributes dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + public BusinessVirtualDebitCardAllOfAttributes nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * Get nationality + * @return nationality + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + public BusinessVirtualDebitCardAllOfAttributes ssn(String ssn) { + this.ssn = ssn; + return this; + } + + /** + * Get ssn + * @return ssn + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSsn() { + return ssn; + } + + + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSsn(String ssn) { + this.ssn = ssn; + } + + + public BusinessVirtualDebitCardAllOfAttributes passport(String passport) { + this.passport = passport; + return this; + } + + /** + * Get passport + * @return passport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassport() { + return passport; + } + + + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassport(String passport) { + this.passport = passport; + } + + + public BusinessVirtualDebitCardAllOfAttributes bin(String bin) { + this.bin = bin; + return this; + } + + /** + * Get bin + * @return bin + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBin() { + return bin; + } + + + @JsonProperty(JSON_PROPERTY_BIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBin(String bin) { + this.bin = bin; + } + + + public BusinessVirtualDebitCardAllOfAttributes status(VirtualCardStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public VirtualCardStatus getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(VirtualCardStatus status) { + this.status = status; + } + + + public BusinessVirtualDebitCardAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public BusinessVirtualDebitCardAllOfAttributes freezeReason(String freezeReason) { + this.freezeReason = freezeReason; + return this; + } + + /** + * Get freezeReason + * @return freezeReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FREEZE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFreezeReason() { + return freezeReason; + } + + + @JsonProperty(JSON_PROPERTY_FREEZE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFreezeReason(String freezeReason) { + this.freezeReason = freezeReason; + } + + + /** + * Return true if this BusinessVirtualDebitCard_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BusinessVirtualDebitCardAllOfAttributes businessVirtualDebitCardAllOfAttributes = (BusinessVirtualDebitCardAllOfAttributes) o; + return Objects.equals(this.createdAt, businessVirtualDebitCardAllOfAttributes.createdAt) && + Objects.equals(this.updatedAt, businessVirtualDebitCardAllOfAttributes.updatedAt) && + Objects.equals(this.last4Digits, businessVirtualDebitCardAllOfAttributes.last4Digits) && + Objects.equals(this.expirationDate, businessVirtualDebitCardAllOfAttributes.expirationDate) && + Objects.equals(this.address, businessVirtualDebitCardAllOfAttributes.address) && + Objects.equals(this.fullName, businessVirtualDebitCardAllOfAttributes.fullName) && + Objects.equals(this.phone, businessVirtualDebitCardAllOfAttributes.phone) && + Objects.equals(this.email, businessVirtualDebitCardAllOfAttributes.email) && + Objects.equals(this.dateOfBirth, businessVirtualDebitCardAllOfAttributes.dateOfBirth) && + Objects.equals(this.nationality, businessVirtualDebitCardAllOfAttributes.nationality) && + Objects.equals(this.ssn, businessVirtualDebitCardAllOfAttributes.ssn) && + Objects.equals(this.passport, businessVirtualDebitCardAllOfAttributes.passport) && + Objects.equals(this.bin, businessVirtualDebitCardAllOfAttributes.bin) && + Objects.equals(this.status, businessVirtualDebitCardAllOfAttributes.status) && + Objects.equals(this.tags, businessVirtualDebitCardAllOfAttributes.tags) && + Objects.equals(this.freezeReason, businessVirtualDebitCardAllOfAttributes.freezeReason); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, updatedAt, last4Digits, expirationDate, address, fullName, phone, email, dateOfBirth, nationality, ssn, passport, bin, status, tags, freezeReason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BusinessVirtualDebitCardAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" last4Digits: ").append(toIndentedString(last4Digits)).append("\n"); + sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); + sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); + sb.append(" bin: ").append(toIndentedString(bin)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" freezeReason: ").append(toIndentedString(freezeReason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `last4Digits` to the URL query string + if (getLast4Digits() != null) { + joiner.add(String.format("%slast4Digits%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLast4Digits()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `expirationDate` to the URL query string + if (getExpirationDate() != null) { + joiner.add(String.format("%sexpirationDate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getExpirationDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nationality` to the URL query string + if (getNationality() != null) { + joiner.add(String.format("%snationality%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNationality()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ssn` to the URL query string + if (getSsn() != null) { + joiner.add(String.format("%sssn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSsn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `passport` to the URL query string + if (getPassport() != null) { + joiner.add(String.format("%spassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `bin` to the URL query string + if (getBin() != null) { + joiner.add(String.format("%sbin%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBin()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `freezeReason` to the URL query string + if (getFreezeReason() != null) { + joiner.add(String.format("%sfreezeReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFreezeReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CancelApplicationRequest.java b/src/main/java/unit/java/sdk/model/CancelApplicationRequest.java new file mode 100644 index 00000000..46ea21ef --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CancelApplicationRequest.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CancelApplicationRequestData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CancelApplicationRequest + */ +@JsonPropertyOrder({ + CancelApplicationRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CancelApplicationRequest { + public static final String JSON_PROPERTY_DATA = "data"; + private CancelApplicationRequestData data; + + public CancelApplicationRequest() { + } + + public CancelApplicationRequest data(CancelApplicationRequestData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CancelApplicationRequestData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(CancelApplicationRequestData data) { + this.data = data; + } + + + /** + * Return true if this CancelApplicationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CancelApplicationRequest cancelApplicationRequest = (CancelApplicationRequest) o; + return Objects.equals(this.data, cancelApplicationRequest.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CancelApplicationRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CancelApplicationRequestData.java b/src/main/java/unit/java/sdk/model/CancelApplicationRequestData.java new file mode 100644 index 00000000..79ab3369 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CancelApplicationRequestData.java @@ -0,0 +1,220 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CancelApplicationRequestDataAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CancelApplicationRequestData + */ +@JsonPropertyOrder({ + CancelApplicationRequestData.JSON_PROPERTY_TYPE, + CancelApplicationRequestData.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CancelApplicationRequestData { + /** + * Gets or Sets type + */ + public enum TypeEnum { + CANCELAPPLICATION("cancelApplication"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CancelApplicationRequestDataAttributes attributes; + + public CancelApplicationRequestData() { + } + + public CancelApplicationRequestData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public CancelApplicationRequestData attributes(CancelApplicationRequestDataAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CancelApplicationRequestDataAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(CancelApplicationRequestDataAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this CancelApplicationRequest_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CancelApplicationRequestData cancelApplicationRequestData = (CancelApplicationRequestData) o; + return Objects.equals(this.type, cancelApplicationRequestData.type) && + Objects.equals(this.attributes, cancelApplicationRequestData.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CancelApplicationRequestData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CancelApplicationRequestDataAttributes.java b/src/main/java/unit/java/sdk/model/CancelApplicationRequestDataAttributes.java new file mode 100644 index 00000000..3ad04e21 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CancelApplicationRequestDataAttributes.java @@ -0,0 +1,150 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CancelApplicationRequestDataAttributes + */ +@JsonPropertyOrder({ + CancelApplicationRequestDataAttributes.JSON_PROPERTY_REASON +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CancelApplicationRequestDataAttributes { + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public CancelApplicationRequestDataAttributes() { + } + + public CancelApplicationRequestDataAttributes reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(String reason) { + this.reason = reason; + } + + + /** + * Return true if this CancelApplicationRequest_data_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CancelApplicationRequestDataAttributes cancelApplicationRequestDataAttributes = (CancelApplicationRequestDataAttributes) o; + return Objects.equals(this.reason, cancelApplicationRequestDataAttributes.reason); + } + + @Override + public int hashCode() { + return Objects.hash(reason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CancelApplicationRequestDataAttributes {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Card.java b/src/main/java/unit/java/sdk/model/Card.java new file mode 100644 index 00000000..44868bac --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Card.java @@ -0,0 +1,216 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * Card + */ +@JsonPropertyOrder({ + Card.JSON_PROPERTY_TYPE, + Card.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BusinessCreditCard.class, name = "businessCreditCard"), + @JsonSubTypes.Type(value = BusinessDebitCard.class, name = "businessDebitCard"), + @JsonSubTypes.Type(value = BusinessVirtualCreditCard.class, name = "businessVirtualCreditCard"), + @JsonSubTypes.Type(value = BusinessVirtualDebitCard.class, name = "businessVirtualDebitCard"), + @JsonSubTypes.Type(value = IndividualDebitCard.class, name = "individualDebitCard"), + @JsonSubTypes.Type(value = IndividualVirtualDebitCard.class, name = "individualVirtualDebitCard"), +}) + +public class Card { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public Card() { + } + + public Card type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public Card id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this card object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Card card = (Card) o; + return Objects.equals(this.type, card.type) && + Objects.equals(this.id, card.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Card {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("businessCreditCard", BusinessCreditCard.class); + mappings.put("businessDebitCard", BusinessDebitCard.class); + mappings.put("businessVirtualCreditCard", BusinessVirtualCreditCard.class); + mappings.put("businessVirtualDebitCard", BusinessVirtualDebitCard.class); + mappings.put("individualDebitCard", IndividualDebitCard.class); + mappings.put("individualVirtualDebitCard", IndividualVirtualDebitCard.class); + mappings.put("card", Card.class); + JSON.registerDiscriminator(Card.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/CardLevelLimits.java b/src/main/java/unit/java/sdk/model/CardLevelLimits.java new file mode 100644 index 00000000..e61b54ea --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CardLevelLimits.java @@ -0,0 +1,258 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CardLevelLimits + */ +@JsonPropertyOrder({ + CardLevelLimits.JSON_PROPERTY_DAILY_WITHDRAWAL, + CardLevelLimits.JSON_PROPERTY_DAILY_PURCHASE, + CardLevelLimits.JSON_PROPERTY_MONTHLY_WITHDRAWAL, + CardLevelLimits.JSON_PROPERTY_MONTHLY_PURCHASE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CardLevelLimits { + public static final String JSON_PROPERTY_DAILY_WITHDRAWAL = "dailyWithdrawal"; + private Integer dailyWithdrawal; + + public static final String JSON_PROPERTY_DAILY_PURCHASE = "dailyPurchase"; + private Integer dailyPurchase; + + public static final String JSON_PROPERTY_MONTHLY_WITHDRAWAL = "monthlyWithdrawal"; + private Integer monthlyWithdrawal; + + public static final String JSON_PROPERTY_MONTHLY_PURCHASE = "monthlyPurchase"; + private Integer monthlyPurchase; + + public CardLevelLimits() { + } + + public CardLevelLimits dailyWithdrawal(Integer dailyWithdrawal) { + this.dailyWithdrawal = dailyWithdrawal; + return this; + } + + /** + * Get dailyWithdrawal + * @return dailyWithdrawal + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DAILY_WITHDRAWAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getDailyWithdrawal() { + return dailyWithdrawal; + } + + + @JsonProperty(JSON_PROPERTY_DAILY_WITHDRAWAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDailyWithdrawal(Integer dailyWithdrawal) { + this.dailyWithdrawal = dailyWithdrawal; + } + + + public CardLevelLimits dailyPurchase(Integer dailyPurchase) { + this.dailyPurchase = dailyPurchase; + return this; + } + + /** + * Get dailyPurchase + * @return dailyPurchase + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DAILY_PURCHASE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getDailyPurchase() { + return dailyPurchase; + } + + + @JsonProperty(JSON_PROPERTY_DAILY_PURCHASE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDailyPurchase(Integer dailyPurchase) { + this.dailyPurchase = dailyPurchase; + } + + + public CardLevelLimits monthlyWithdrawal(Integer monthlyWithdrawal) { + this.monthlyWithdrawal = monthlyWithdrawal; + return this; + } + + /** + * Get monthlyWithdrawal + * @return monthlyWithdrawal + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONTHLY_WITHDRAWAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getMonthlyWithdrawal() { + return monthlyWithdrawal; + } + + + @JsonProperty(JSON_PROPERTY_MONTHLY_WITHDRAWAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMonthlyWithdrawal(Integer monthlyWithdrawal) { + this.monthlyWithdrawal = monthlyWithdrawal; + } + + + public CardLevelLimits monthlyPurchase(Integer monthlyPurchase) { + this.monthlyPurchase = monthlyPurchase; + return this; + } + + /** + * Get monthlyPurchase + * @return monthlyPurchase + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONTHLY_PURCHASE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getMonthlyPurchase() { + return monthlyPurchase; + } + + + @JsonProperty(JSON_PROPERTY_MONTHLY_PURCHASE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMonthlyPurchase(Integer monthlyPurchase) { + this.monthlyPurchase = monthlyPurchase; + } + + + /** + * Return true if this cardLevelLimits object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CardLevelLimits cardLevelLimits = (CardLevelLimits) o; + return Objects.equals(this.dailyWithdrawal, cardLevelLimits.dailyWithdrawal) && + Objects.equals(this.dailyPurchase, cardLevelLimits.dailyPurchase) && + Objects.equals(this.monthlyWithdrawal, cardLevelLimits.monthlyWithdrawal) && + Objects.equals(this.monthlyPurchase, cardLevelLimits.monthlyPurchase); + } + + @Override + public int hashCode() { + return Objects.hash(dailyWithdrawal, dailyPurchase, monthlyWithdrawal, monthlyPurchase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CardLevelLimits {\n"); + sb.append(" dailyWithdrawal: ").append(toIndentedString(dailyWithdrawal)).append("\n"); + sb.append(" dailyPurchase: ").append(toIndentedString(dailyPurchase)).append("\n"); + sb.append(" monthlyWithdrawal: ").append(toIndentedString(monthlyWithdrawal)).append("\n"); + sb.append(" monthlyPurchase: ").append(toIndentedString(monthlyPurchase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dailyWithdrawal` to the URL query string + if (getDailyWithdrawal() != null) { + joiner.add(String.format("%sdailyWithdrawal%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDailyWithdrawal()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dailyPurchase` to the URL query string + if (getDailyPurchase() != null) { + joiner.add(String.format("%sdailyPurchase%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDailyPurchase()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `monthlyWithdrawal` to the URL query string + if (getMonthlyWithdrawal() != null) { + joiner.add(String.format("%smonthlyWithdrawal%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMonthlyWithdrawal()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `monthlyPurchase` to the URL query string + if (getMonthlyPurchase() != null) { + joiner.add(String.format("%smonthlyPurchase%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMonthlyPurchase()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CardRelationship.java b/src/main/java/unit/java/sdk/model/CardRelationship.java new file mode 100644 index 00000000..cf9ae5e0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CardRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationRequestRelationshipsCardData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CardRelationship + */ +@JsonPropertyOrder({ + CardRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CardRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private AuthorizationRequestRelationshipsCardData data; + + public CardRelationship() { + } + + public CardRelationship data(AuthorizationRequestRelationshipsCardData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AuthorizationRequestRelationshipsCardData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(AuthorizationRequestRelationshipsCardData data) { + this.data = data; + } + + + /** + * Return true if this cardRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CardRelationship cardRelationship = (CardRelationship) o; + return Objects.equals(this.data, cardRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CardRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CardRelationships.java b/src/main/java/unit/java/sdk/model/CardRelationships.java new file mode 100644 index 00000000..7a246c51 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CardRelationships.java @@ -0,0 +1,188 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CardRelationshipsAccount; +import unit.java.sdk.model.ReceivedPaymentRelationshipsCustomer; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CardRelationships + */ +@JsonPropertyOrder({ + CardRelationships.JSON_PROPERTY_ACCOUNT, + CardRelationships.JSON_PROPERTY_CUSTOMER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CardRelationships { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private CardRelationshipsAccount account; + + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private ReceivedPaymentRelationshipsCustomer customer; + + public CardRelationships() { + } + + public CardRelationships account(CardRelationshipsAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CardRelationshipsAccount getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(CardRelationshipsAccount account) { + this.account = account; + } + + + public CardRelationships customer(ReceivedPaymentRelationshipsCustomer customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReceivedPaymentRelationshipsCustomer getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomer(ReceivedPaymentRelationshipsCustomer customer) { + this.customer = customer; + } + + + /** + * Return true if this cardRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CardRelationships cardRelationships = (CardRelationships) o; + return Objects.equals(this.account, cardRelationships.account) && + Objects.equals(this.customer, cardRelationships.customer); + } + + @Override + public int hashCode() { + return Objects.hash(account, customer); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CardRelationships {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CardRelationshipsAccount.java b/src/main/java/unit/java/sdk/model/CardRelationshipsAccount.java new file mode 100644 index 00000000..29a89fc4 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CardRelationshipsAccount.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CounterpartyAccountRelationshipData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CardRelationshipsAccount + */ +@JsonPropertyOrder({ + CardRelationshipsAccount.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CardRelationshipsAccount { + public static final String JSON_PROPERTY_DATA = "data"; + private CounterpartyAccountRelationshipData data; + + public CardRelationshipsAccount() { + } + + public CardRelationshipsAccount data(CounterpartyAccountRelationshipData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CounterpartyAccountRelationshipData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(CounterpartyAccountRelationshipData data) { + this.data = data; + } + + + /** + * Return true if this cardRelationships_account object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CardRelationshipsAccount cardRelationshipsAccount = (CardRelationshipsAccount) o; + return Objects.equals(this.data, cardRelationshipsAccount.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CardRelationshipsAccount {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CardTransaction.java b/src/main/java/unit/java/sdk/model/CardTransaction.java new file mode 100644 index 00000000..58a71458 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CardTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CardTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * CardTransaction + */ +@JsonPropertyOrder({ + CardTransaction.JSON_PROPERTY_ATTRIBUTES, + CardTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class CardTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CardTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public CardTransaction() { + } + + public CardTransaction attributes(CardTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CardTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CardTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public CardTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public CardTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public CardTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this CardTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CardTransaction cardTransaction = (CardTransaction) o; + return Objects.equals(this.attributes, cardTransaction.attributes) && + Objects.equals(this.relationships, cardTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CardTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CardTransaction", CardTransaction.class); + JSON.registerDiscriminator(CardTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/CardTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/CardTransactionAllOfAttributes.java new file mode 100644 index 00000000..3756746b --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CardTransactionAllOfAttributes.java @@ -0,0 +1,759 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.CardVerificationData; +import unit.java.sdk.model.Merchant; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CardTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + CardTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + CardTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + CardTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + CardTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + CardTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + CardTransactionAllOfAttributes.JSON_PROPERTY_CARD_LAST4_DIGITS, + CardTransactionAllOfAttributes.JSON_PROPERTY_TAGS, + CardTransactionAllOfAttributes.JSON_PROPERTY_NETWORK_TRANSACTION_ID, + CardTransactionAllOfAttributes.JSON_PROPERTY_INTERCHANGE, + CardTransactionAllOfAttributes.JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE, + CardTransactionAllOfAttributes.JSON_PROPERTY_MERCHANT, + CardTransactionAllOfAttributes.JSON_PROPERTY_RECURRING, + CardTransactionAllOfAttributes.JSON_PROPERTY_PAYMENT_METHOD, + CardTransactionAllOfAttributes.JSON_PROPERTY_DIGITAL_WALLET, + CardTransactionAllOfAttributes.JSON_PROPERTY_CARD_VERIFICATION_DATA, + CardTransactionAllOfAttributes.JSON_PROPERTY_CARD_NETWORK +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CardTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_CARD_LAST4_DIGITS = "cardLast4Digits"; + private String cardLast4Digits; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_NETWORK_TRANSACTION_ID = "networkTransactionId"; + private String networkTransactionId; + + public static final String JSON_PROPERTY_INTERCHANGE = "interchange"; + private JsonNullable interchange = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE = "internationalServiceFee"; + private JsonNullable internationalServiceFee = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MERCHANT = "merchant"; + private Merchant merchant; + + public static final String JSON_PROPERTY_RECURRING = "recurring"; + private Boolean recurring; + + public static final String JSON_PROPERTY_PAYMENT_METHOD = "paymentMethod"; + private String paymentMethod; + + public static final String JSON_PROPERTY_DIGITAL_WALLET = "digitalWallet"; + private String digitalWallet; + + public static final String JSON_PROPERTY_CARD_VERIFICATION_DATA = "cardVerificationData"; + private CardVerificationData cardVerificationData; + + public static final String JSON_PROPERTY_CARD_NETWORK = "cardNetwork"; + private String cardNetwork; + + public CardTransactionAllOfAttributes() { + } + + public CardTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public CardTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public CardTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CardTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public CardTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public CardTransactionAllOfAttributes cardLast4Digits(String cardLast4Digits) { + this.cardLast4Digits = cardLast4Digits; + return this; + } + + /** + * Get cardLast4Digits + * @return cardLast4Digits + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CARD_LAST4_DIGITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCardLast4Digits() { + return cardLast4Digits; + } + + + @JsonProperty(JSON_PROPERTY_CARD_LAST4_DIGITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCardLast4Digits(String cardLast4Digits) { + this.cardLast4Digits = cardLast4Digits; + } + + + public CardTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CardTransactionAllOfAttributes networkTransactionId(String networkTransactionId) { + this.networkTransactionId = networkTransactionId; + return this; + } + + /** + * Get networkTransactionId + * @return networkTransactionId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNetworkTransactionId() { + return networkTransactionId; + } + + + @JsonProperty(JSON_PROPERTY_NETWORK_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNetworkTransactionId(String networkTransactionId) { + this.networkTransactionId = networkTransactionId; + } + + + public CardTransactionAllOfAttributes interchange(String interchange) { + this.interchange = JsonNullable.of(interchange); + return this; + } + + /** + * Get interchange + * @return interchange + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getInterchange() { + return interchange.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTERCHANGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getInterchange_JsonNullable() { + return interchange; + } + + @JsonProperty(JSON_PROPERTY_INTERCHANGE) + public void setInterchange_JsonNullable(JsonNullable interchange) { + this.interchange = interchange; + } + + public void setInterchange(String interchange) { + this.interchange = JsonNullable.of(interchange); + } + + + public CardTransactionAllOfAttributes internationalServiceFee(Integer internationalServiceFee) { + this.internationalServiceFee = JsonNullable.of(internationalServiceFee); + return this; + } + + /** + * Get internationalServiceFee + * @return internationalServiceFee + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public Integer getInternationalServiceFee() { + return internationalServiceFee.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getInternationalServiceFee_JsonNullable() { + return internationalServiceFee; + } + + @JsonProperty(JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE) + public void setInternationalServiceFee_JsonNullable(JsonNullable internationalServiceFee) { + this.internationalServiceFee = internationalServiceFee; + } + + public void setInternationalServiceFee(Integer internationalServiceFee) { + this.internationalServiceFee = JsonNullable.of(internationalServiceFee); + } + + + public CardTransactionAllOfAttributes merchant(Merchant merchant) { + this.merchant = merchant; + return this; + } + + /** + * Get merchant + * @return merchant + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MERCHANT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Merchant getMerchant() { + return merchant; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMerchant(Merchant merchant) { + this.merchant = merchant; + } + + + public CardTransactionAllOfAttributes recurring(Boolean recurring) { + this.recurring = recurring; + return this; + } + + /** + * Get recurring + * @return recurring + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECURRING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getRecurring() { + return recurring; + } + + + @JsonProperty(JSON_PROPERTY_RECURRING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRecurring(Boolean recurring) { + this.recurring = recurring; + } + + + public CardTransactionAllOfAttributes paymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + + /** + * Get paymentMethod + * @return paymentMethod + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYMENT_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPaymentMethod() { + return paymentMethod; + } + + + @JsonProperty(JSON_PROPERTY_PAYMENT_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + } + + + public CardTransactionAllOfAttributes digitalWallet(String digitalWallet) { + this.digitalWallet = digitalWallet; + return this; + } + + /** + * Get digitalWallet + * @return digitalWallet + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DIGITAL_WALLET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDigitalWallet() { + return digitalWallet; + } + + + @JsonProperty(JSON_PROPERTY_DIGITAL_WALLET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDigitalWallet(String digitalWallet) { + this.digitalWallet = digitalWallet; + } + + + public CardTransactionAllOfAttributes cardVerificationData(CardVerificationData cardVerificationData) { + this.cardVerificationData = cardVerificationData; + return this; + } + + /** + * Get cardVerificationData + * @return cardVerificationData + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_VERIFICATION_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CardVerificationData getCardVerificationData() { + return cardVerificationData; + } + + + @JsonProperty(JSON_PROPERTY_CARD_VERIFICATION_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardVerificationData(CardVerificationData cardVerificationData) { + this.cardVerificationData = cardVerificationData; + } + + + public CardTransactionAllOfAttributes cardNetwork(String cardNetwork) { + this.cardNetwork = cardNetwork; + return this; + } + + /** + * Get cardNetwork + * @return cardNetwork + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_NETWORK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCardNetwork() { + return cardNetwork; + } + + + @JsonProperty(JSON_PROPERTY_CARD_NETWORK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardNetwork(String cardNetwork) { + this.cardNetwork = cardNetwork; + } + + + /** + * Return true if this CardTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CardTransactionAllOfAttributes cardTransactionAllOfAttributes = (CardTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, cardTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, cardTransactionAllOfAttributes.direction) && + Objects.equals(this.amount, cardTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, cardTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, cardTransactionAllOfAttributes.summary) && + Objects.equals(this.cardLast4Digits, cardTransactionAllOfAttributes.cardLast4Digits) && + Objects.equals(this.tags, cardTransactionAllOfAttributes.tags) && + Objects.equals(this.networkTransactionId, cardTransactionAllOfAttributes.networkTransactionId) && + equalsNullable(this.interchange, cardTransactionAllOfAttributes.interchange) && + equalsNullable(this.internationalServiceFee, cardTransactionAllOfAttributes.internationalServiceFee) && + Objects.equals(this.merchant, cardTransactionAllOfAttributes.merchant) && + Objects.equals(this.recurring, cardTransactionAllOfAttributes.recurring) && + Objects.equals(this.paymentMethod, cardTransactionAllOfAttributes.paymentMethod) && + Objects.equals(this.digitalWallet, cardTransactionAllOfAttributes.digitalWallet) && + Objects.equals(this.cardVerificationData, cardTransactionAllOfAttributes.cardVerificationData) && + Objects.equals(this.cardNetwork, cardTransactionAllOfAttributes.cardNetwork); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, amount, balance, summary, cardLast4Digits, tags, networkTransactionId, hashCodeNullable(interchange), hashCodeNullable(internationalServiceFee), merchant, recurring, paymentMethod, digitalWallet, cardVerificationData, cardNetwork); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CardTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" cardLast4Digits: ").append(toIndentedString(cardLast4Digits)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" networkTransactionId: ").append(toIndentedString(networkTransactionId)).append("\n"); + sb.append(" interchange: ").append(toIndentedString(interchange)).append("\n"); + sb.append(" internationalServiceFee: ").append(toIndentedString(internationalServiceFee)).append("\n"); + sb.append(" merchant: ").append(toIndentedString(merchant)).append("\n"); + sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n"); + sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n"); + sb.append(" digitalWallet: ").append(toIndentedString(digitalWallet)).append("\n"); + sb.append(" cardVerificationData: ").append(toIndentedString(cardVerificationData)).append("\n"); + sb.append(" cardNetwork: ").append(toIndentedString(cardNetwork)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardLast4Digits` to the URL query string + if (getCardLast4Digits() != null) { + joiner.add(String.format("%scardLast4Digits%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardLast4Digits()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `networkTransactionId` to the URL query string + if (getNetworkTransactionId() != null) { + joiner.add(String.format("%snetworkTransactionId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNetworkTransactionId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `interchange` to the URL query string + if (getInterchange() != null) { + joiner.add(String.format("%sinterchange%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getInterchange()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `internationalServiceFee` to the URL query string + if (getInternationalServiceFee() != null) { + joiner.add(String.format("%sinternationalServiceFee%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getInternationalServiceFee()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `merchant` to the URL query string + if (getMerchant() != null) { + joiner.add(getMerchant().toUrlQueryString(prefix + "merchant" + suffix)); + } + + // add `recurring` to the URL query string + if (getRecurring() != null) { + joiner.add(String.format("%srecurring%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRecurring()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `paymentMethod` to the URL query string + if (getPaymentMethod() != null) { + joiner.add(String.format("%spaymentMethod%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPaymentMethod()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `digitalWallet` to the URL query string + if (getDigitalWallet() != null) { + joiner.add(String.format("%sdigitalWallet%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDigitalWallet()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardVerificationData` to the URL query string + if (getCardVerificationData() != null) { + joiner.add(getCardVerificationData().toUrlQueryString(prefix + "cardVerificationData" + suffix)); + } + + // add `cardNetwork` to the URL query string + if (getCardNetwork() != null) { + joiner.add(String.format("%scardNetwork%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardNetwork()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CardTransactionAuthorizationRequest.java b/src/main/java/unit/java/sdk/model/CardTransactionAuthorizationRequest.java new file mode 100644 index 00000000..5707c250 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CardTransactionAuthorizationRequest.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationRequest; +import unit.java.sdk.model.AuthorizationRequestRelationships; +import unit.java.sdk.model.CardTransactionAuthorizationRequestAllOfAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * CardTransactionAuthorizationRequest + */ +@JsonPropertyOrder({ + CardTransactionAuthorizationRequest.JSON_PROPERTY_ATTRIBUTES, + CardTransactionAuthorizationRequest.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class CardTransactionAuthorizationRequest extends AuthorizationRequest { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CardTransactionAuthorizationRequestAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private AuthorizationRequestRelationships relationships; + + public CardTransactionAuthorizationRequest() { + } + + public CardTransactionAuthorizationRequest attributes(CardTransactionAuthorizationRequestAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CardTransactionAuthorizationRequestAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(CardTransactionAuthorizationRequestAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public CardTransactionAuthorizationRequest relationships(AuthorizationRequestRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AuthorizationRequestRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(AuthorizationRequestRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public CardTransactionAuthorizationRequest type(String type) { + this.setType(type); + return this; + } + + @Override + public CardTransactionAuthorizationRequest id(String id) { + this.setId(id); + return this; + } + + /** + * Return true if this CardTransactionAuthorizationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CardTransactionAuthorizationRequest cardTransactionAuthorizationRequest = (CardTransactionAuthorizationRequest) o; + return Objects.equals(this.attributes, cardTransactionAuthorizationRequest.attributes) && + Objects.equals(this.relationships, cardTransactionAuthorizationRequest.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CardTransactionAuthorizationRequest {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CardTransactionAuthorizationRequest", CardTransactionAuthorizationRequest.class); + JSON.registerDiscriminator(CardTransactionAuthorizationRequest.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/CardTransactionAuthorizationRequestAllOfAttributes.java b/src/main/java/unit/java/sdk/model/CardTransactionAuthorizationRequestAllOfAttributes.java new file mode 100644 index 00000000..2d61891a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CardTransactionAuthorizationRequestAllOfAttributes.java @@ -0,0 +1,585 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.CardVerificationData; +import unit.java.sdk.model.Merchant; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CardTransactionAuthorizationRequestAllOfAttributes + */ +@JsonPropertyOrder({ + CardTransactionAuthorizationRequestAllOfAttributes.JSON_PROPERTY_CREATED_AT, + CardTransactionAuthorizationRequestAllOfAttributes.JSON_PROPERTY_AMOUNT, + CardTransactionAuthorizationRequestAllOfAttributes.JSON_PROPERTY_STATUS, + CardTransactionAuthorizationRequestAllOfAttributes.JSON_PROPERTY_PARTIAL_APPROVAL_ALLOWED, + CardTransactionAuthorizationRequestAllOfAttributes.JSON_PROPERTY_APPROVED_AMOUNT, + CardTransactionAuthorizationRequestAllOfAttributes.JSON_PROPERTY_DECLINE_REASON, + CardTransactionAuthorizationRequestAllOfAttributes.JSON_PROPERTY_MERCHANT, + CardTransactionAuthorizationRequestAllOfAttributes.JSON_PROPERTY_RECURRING, + CardTransactionAuthorizationRequestAllOfAttributes.JSON_PROPERTY_TAGS, + CardTransactionAuthorizationRequestAllOfAttributes.JSON_PROPERTY_PAYMENT_METHOD, + CardTransactionAuthorizationRequestAllOfAttributes.JSON_PROPERTY_DIGITAL_WALLET, + CardTransactionAuthorizationRequestAllOfAttributes.JSON_PROPERTY_CARD_VERIFICATION_DATA, + CardTransactionAuthorizationRequestAllOfAttributes.JSON_PROPERTY_CARD_NETWORK +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CardTransactionAuthorizationRequestAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_PARTIAL_APPROVAL_ALLOWED = "partialApprovalAllowed"; + private Boolean partialApprovalAllowed; + + public static final String JSON_PROPERTY_APPROVED_AMOUNT = "approvedAmount"; + private Integer approvedAmount; + + public static final String JSON_PROPERTY_DECLINE_REASON = "declineReason"; + private String declineReason; + + public static final String JSON_PROPERTY_MERCHANT = "merchant"; + private Merchant merchant; + + public static final String JSON_PROPERTY_RECURRING = "recurring"; + private Boolean recurring; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_PAYMENT_METHOD = "paymentMethod"; + private String paymentMethod; + + public static final String JSON_PROPERTY_DIGITAL_WALLET = "digitalWallet"; + private String digitalWallet; + + public static final String JSON_PROPERTY_CARD_VERIFICATION_DATA = "cardVerificationData"; + private CardVerificationData cardVerificationData; + + public static final String JSON_PROPERTY_CARD_NETWORK = "cardNetwork"; + private String cardNetwork; + + public CardTransactionAuthorizationRequestAllOfAttributes() { + } + + public CardTransactionAuthorizationRequestAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public CardTransactionAuthorizationRequestAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CardTransactionAuthorizationRequestAllOfAttributes status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(String status) { + this.status = status; + } + + + public CardTransactionAuthorizationRequestAllOfAttributes partialApprovalAllowed(Boolean partialApprovalAllowed) { + this.partialApprovalAllowed = partialApprovalAllowed; + return this; + } + + /** + * Get partialApprovalAllowed + * @return partialApprovalAllowed + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARTIAL_APPROVAL_ALLOWED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getPartialApprovalAllowed() { + return partialApprovalAllowed; + } + + + @JsonProperty(JSON_PROPERTY_PARTIAL_APPROVAL_ALLOWED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPartialApprovalAllowed(Boolean partialApprovalAllowed) { + this.partialApprovalAllowed = partialApprovalAllowed; + } + + + public CardTransactionAuthorizationRequestAllOfAttributes approvedAmount(Integer approvedAmount) { + this.approvedAmount = approvedAmount; + return this; + } + + /** + * Get approvedAmount + * @return approvedAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPROVED_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getApprovedAmount() { + return approvedAmount; + } + + + @JsonProperty(JSON_PROPERTY_APPROVED_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setApprovedAmount(Integer approvedAmount) { + this.approvedAmount = approvedAmount; + } + + + public CardTransactionAuthorizationRequestAllOfAttributes declineReason(String declineReason) { + this.declineReason = declineReason; + return this; + } + + /** + * Get declineReason + * @return declineReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECLINE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDeclineReason() { + return declineReason; + } + + + @JsonProperty(JSON_PROPERTY_DECLINE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeclineReason(String declineReason) { + this.declineReason = declineReason; + } + + + public CardTransactionAuthorizationRequestAllOfAttributes merchant(Merchant merchant) { + this.merchant = merchant; + return this; + } + + /** + * Get merchant + * @return merchant + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MERCHANT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Merchant getMerchant() { + return merchant; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMerchant(Merchant merchant) { + this.merchant = merchant; + } + + + public CardTransactionAuthorizationRequestAllOfAttributes recurring(Boolean recurring) { + this.recurring = recurring; + return this; + } + + /** + * Get recurring + * @return recurring + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECURRING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getRecurring() { + return recurring; + } + + + @JsonProperty(JSON_PROPERTY_RECURRING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRecurring(Boolean recurring) { + this.recurring = recurring; + } + + + public CardTransactionAuthorizationRequestAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CardTransactionAuthorizationRequestAllOfAttributes paymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + + /** + * Get paymentMethod + * @return paymentMethod + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYMENT_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPaymentMethod() { + return paymentMethod; + } + + + @JsonProperty(JSON_PROPERTY_PAYMENT_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + } + + + public CardTransactionAuthorizationRequestAllOfAttributes digitalWallet(String digitalWallet) { + this.digitalWallet = digitalWallet; + return this; + } + + /** + * Get digitalWallet + * @return digitalWallet + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DIGITAL_WALLET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDigitalWallet() { + return digitalWallet; + } + + + @JsonProperty(JSON_PROPERTY_DIGITAL_WALLET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDigitalWallet(String digitalWallet) { + this.digitalWallet = digitalWallet; + } + + + public CardTransactionAuthorizationRequestAllOfAttributes cardVerificationData(CardVerificationData cardVerificationData) { + this.cardVerificationData = cardVerificationData; + return this; + } + + /** + * Get cardVerificationData + * @return cardVerificationData + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_VERIFICATION_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CardVerificationData getCardVerificationData() { + return cardVerificationData; + } + + + @JsonProperty(JSON_PROPERTY_CARD_VERIFICATION_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardVerificationData(CardVerificationData cardVerificationData) { + this.cardVerificationData = cardVerificationData; + } + + + public CardTransactionAuthorizationRequestAllOfAttributes cardNetwork(String cardNetwork) { + this.cardNetwork = cardNetwork; + return this; + } + + /** + * Get cardNetwork + * @return cardNetwork + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_NETWORK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCardNetwork() { + return cardNetwork; + } + + + @JsonProperty(JSON_PROPERTY_CARD_NETWORK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardNetwork(String cardNetwork) { + this.cardNetwork = cardNetwork; + } + + + /** + * Return true if this CardTransactionAuthorizationRequest_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CardTransactionAuthorizationRequestAllOfAttributes cardTransactionAuthorizationRequestAllOfAttributes = (CardTransactionAuthorizationRequestAllOfAttributes) o; + return Objects.equals(this.createdAt, cardTransactionAuthorizationRequestAllOfAttributes.createdAt) && + Objects.equals(this.amount, cardTransactionAuthorizationRequestAllOfAttributes.amount) && + Objects.equals(this.status, cardTransactionAuthorizationRequestAllOfAttributes.status) && + Objects.equals(this.partialApprovalAllowed, cardTransactionAuthorizationRequestAllOfAttributes.partialApprovalAllowed) && + Objects.equals(this.approvedAmount, cardTransactionAuthorizationRequestAllOfAttributes.approvedAmount) && + Objects.equals(this.declineReason, cardTransactionAuthorizationRequestAllOfAttributes.declineReason) && + Objects.equals(this.merchant, cardTransactionAuthorizationRequestAllOfAttributes.merchant) && + Objects.equals(this.recurring, cardTransactionAuthorizationRequestAllOfAttributes.recurring) && + Objects.equals(this.tags, cardTransactionAuthorizationRequestAllOfAttributes.tags) && + Objects.equals(this.paymentMethod, cardTransactionAuthorizationRequestAllOfAttributes.paymentMethod) && + Objects.equals(this.digitalWallet, cardTransactionAuthorizationRequestAllOfAttributes.digitalWallet) && + Objects.equals(this.cardVerificationData, cardTransactionAuthorizationRequestAllOfAttributes.cardVerificationData) && + Objects.equals(this.cardNetwork, cardTransactionAuthorizationRequestAllOfAttributes.cardNetwork); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, amount, status, partialApprovalAllowed, approvedAmount, declineReason, merchant, recurring, tags, paymentMethod, digitalWallet, cardVerificationData, cardNetwork); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CardTransactionAuthorizationRequestAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" partialApprovalAllowed: ").append(toIndentedString(partialApprovalAllowed)).append("\n"); + sb.append(" approvedAmount: ").append(toIndentedString(approvedAmount)).append("\n"); + sb.append(" declineReason: ").append(toIndentedString(declineReason)).append("\n"); + sb.append(" merchant: ").append(toIndentedString(merchant)).append("\n"); + sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n"); + sb.append(" digitalWallet: ").append(toIndentedString(digitalWallet)).append("\n"); + sb.append(" cardVerificationData: ").append(toIndentedString(cardVerificationData)).append("\n"); + sb.append(" cardNetwork: ").append(toIndentedString(cardNetwork)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `partialApprovalAllowed` to the URL query string + if (getPartialApprovalAllowed() != null) { + joiner.add(String.format("%spartialApprovalAllowed%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPartialApprovalAllowed()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `approvedAmount` to the URL query string + if (getApprovedAmount() != null) { + joiner.add(String.format("%sapprovedAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getApprovedAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `declineReason` to the URL query string + if (getDeclineReason() != null) { + joiner.add(String.format("%sdeclineReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDeclineReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `merchant` to the URL query string + if (getMerchant() != null) { + joiner.add(getMerchant().toUrlQueryString(prefix + "merchant" + suffix)); + } + + // add `recurring` to the URL query string + if (getRecurring() != null) { + joiner.add(String.format("%srecurring%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRecurring()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `paymentMethod` to the URL query string + if (getPaymentMethod() != null) { + joiner.add(String.format("%spaymentMethod%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPaymentMethod()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `digitalWallet` to the URL query string + if (getDigitalWallet() != null) { + joiner.add(String.format("%sdigitalWallet%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDigitalWallet()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardVerificationData` to the URL query string + if (getCardVerificationData() != null) { + joiner.add(getCardVerificationData().toUrlQueryString(prefix + "cardVerificationData" + suffix)); + } + + // add `cardNetwork` to the URL query string + if (getCardNetwork() != null) { + joiner.add(String.format("%scardNetwork%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardNetwork()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CardVerificationData.java b/src/main/java/unit/java/sdk/model/CardVerificationData.java new file mode 100644 index 00000000..7ded0f8d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CardVerificationData.java @@ -0,0 +1,150 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CardVerificationData + */ +@JsonPropertyOrder({ + CardVerificationData.JSON_PROPERTY_VERIFICATION_METHOD +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CardVerificationData { + public static final String JSON_PROPERTY_VERIFICATION_METHOD = "verificationMethod"; + private String verificationMethod; + + public CardVerificationData() { + } + + public CardVerificationData verificationMethod(String verificationMethod) { + this.verificationMethod = verificationMethod; + return this; + } + + /** + * Get verificationMethod + * @return verificationMethod + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERIFICATION_METHOD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getVerificationMethod() { + return verificationMethod; + } + + + @JsonProperty(JSON_PROPERTY_VERIFICATION_METHOD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVerificationMethod(String verificationMethod) { + this.verificationMethod = verificationMethod; + } + + + /** + * Return true if this cardVerificationData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CardVerificationData cardVerificationData = (CardVerificationData) o; + return Objects.equals(this.verificationMethod, cardVerificationData.verificationMethod); + } + + @Override + public int hashCode() { + return Objects.hash(verificationMethod); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CardVerificationData {\n"); + sb.append(" verificationMethod: ").append(toIndentedString(verificationMethod)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `verificationMethod` to the URL query string + if (getVerificationMethod() != null) { + joiner.add(String.format("%sverificationMethod%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVerificationMethod()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CashDepositTransaction.java b/src/main/java/unit/java/sdk/model/CashDepositTransaction.java new file mode 100644 index 00000000..443058f4 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CashDepositTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CashDepositTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * CashDepositTransaction + */ +@JsonPropertyOrder({ + CashDepositTransaction.JSON_PROPERTY_ATTRIBUTES, + CashDepositTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class CashDepositTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CashDepositTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public CashDepositTransaction() { + } + + public CashDepositTransaction attributes(CashDepositTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CashDepositTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CashDepositTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public CashDepositTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public CashDepositTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public CashDepositTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this CashDepositTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CashDepositTransaction cashDepositTransaction = (CashDepositTransaction) o; + return Objects.equals(this.attributes, cashDepositTransaction.attributes) && + Objects.equals(this.relationships, cashDepositTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CashDepositTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CashDepositTransaction", CashDepositTransaction.class); + JSON.registerDiscriminator(CashDepositTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/CashDepositTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/CashDepositTransactionAllOfAttributes.java new file mode 100644 index 00000000..3d0fdfd5 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CashDepositTransactionAllOfAttributes.java @@ -0,0 +1,402 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CashDepositTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + CashDepositTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + CashDepositTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + CashDepositTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + CashDepositTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + CashDepositTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + CashDepositTransactionAllOfAttributes.JSON_PROPERTY_TAGS, + CashDepositTransactionAllOfAttributes.JSON_PROPERTY_RECURRING +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CashDepositTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_RECURRING = "recurring"; + private Boolean recurring; + + public CashDepositTransactionAllOfAttributes() { + } + + public CashDepositTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public CashDepositTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public CashDepositTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CashDepositTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public CashDepositTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public CashDepositTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CashDepositTransactionAllOfAttributes recurring(Boolean recurring) { + this.recurring = recurring; + return this; + } + + /** + * Get recurring + * @return recurring + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECURRING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getRecurring() { + return recurring; + } + + + @JsonProperty(JSON_PROPERTY_RECURRING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRecurring(Boolean recurring) { + this.recurring = recurring; + } + + + /** + * Return true if this CashDepositTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CashDepositTransactionAllOfAttributes cashDepositTransactionAllOfAttributes = (CashDepositTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, cashDepositTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, cashDepositTransactionAllOfAttributes.direction) && + Objects.equals(this.amount, cashDepositTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, cashDepositTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, cashDepositTransactionAllOfAttributes.summary) && + Objects.equals(this.tags, cashDepositTransactionAllOfAttributes.tags) && + Objects.equals(this.recurring, cashDepositTransactionAllOfAttributes.recurring); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, amount, balance, summary, tags, recurring); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CashDepositTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `recurring` to the URL query string + if (getRecurring() != null) { + joiner.add(String.format("%srecurring%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRecurring()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CashFlow.java b/src/main/java/unit/java/sdk/model/CashFlow.java new file mode 100644 index 00000000..b69e21d6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CashFlow.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets cashFlow + */ +public enum CashFlow { + + UNPREDICTABLE("Unpredictable"), + + PREDICTABLE("Predictable"); + + private String value; + + CashFlow(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CashFlow fromValue(String value) { + for (CashFlow b : CashFlow.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } + +} + diff --git a/src/main/java/unit/java/sdk/model/ChargebackRelationship.java b/src/main/java/unit/java/sdk/model/ChargebackRelationship.java new file mode 100644 index 00000000..9a77ff3d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ChargebackRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ChargebackRelationshipData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ChargebackRelationship + */ +@JsonPropertyOrder({ + ChargebackRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ChargebackRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private ChargebackRelationshipData data; + + public ChargebackRelationship() { + } + + public ChargebackRelationship data(ChargebackRelationshipData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ChargebackRelationshipData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(ChargebackRelationshipData data) { + this.data = data; + } + + + /** + * Return true if this chargebackRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChargebackRelationship chargebackRelationship = (ChargebackRelationship) o; + return Objects.equals(this.data, chargebackRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChargebackRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ChargebackRelationshipData.java b/src/main/java/unit/java/sdk/model/ChargebackRelationshipData.java new file mode 100644 index 00000000..d6465918 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ChargebackRelationshipData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ChargebackRelationshipData + */ +@JsonPropertyOrder({ + ChargebackRelationshipData.JSON_PROPERTY_TYPE, + ChargebackRelationshipData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ChargebackRelationshipData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "chargeback"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public ChargebackRelationshipData() { + } + + public ChargebackRelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public ChargebackRelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this chargebackRelationship_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChargebackRelationshipData chargebackRelationshipData = (ChargebackRelationshipData) o; + return Objects.equals(this.type, chargebackRelationshipData.type) && + Objects.equals(this.id, chargebackRelationshipData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChargebackRelationshipData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ChargebackTransaction.java b/src/main/java/unit/java/sdk/model/ChargebackTransaction.java new file mode 100644 index 00000000..76cc8db6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ChargebackTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ChargebackTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * ChargebackTransaction + */ +@JsonPropertyOrder({ + ChargebackTransaction.JSON_PROPERTY_ATTRIBUTES, + ChargebackTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class ChargebackTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ChargebackTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public ChargebackTransaction() { + } + + public ChargebackTransaction attributes(ChargebackTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ChargebackTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(ChargebackTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public ChargebackTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public ChargebackTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public ChargebackTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this ChargebackTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChargebackTransaction chargebackTransaction = (ChargebackTransaction) o; + return Objects.equals(this.attributes, chargebackTransaction.attributes) && + Objects.equals(this.relationships, chargebackTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChargebackTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ChargebackTransaction", ChargebackTransaction.class); + JSON.registerDiscriminator(ChargebackTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/ChargebackTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/ChargebackTransactionAllOfAttributes.java new file mode 100644 index 00000000..7c7ec1d8 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ChargebackTransactionAllOfAttributes.java @@ -0,0 +1,403 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ChargebackTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + ChargebackTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + ChargebackTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + ChargebackTransactionAllOfAttributes.JSON_PROPERTY_COUNTERPARTY, + ChargebackTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + ChargebackTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + ChargebackTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + ChargebackTransactionAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ChargebackTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; + private Counterparty counterparty; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public ChargebackTransactionAllOfAttributes() { + } + + public ChargebackTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public ChargebackTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public ChargebackTransactionAllOfAttributes counterparty(Counterparty counterparty) { + this.counterparty = counterparty; + return this; + } + + /** + * Get counterparty + * @return counterparty + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Counterparty getCounterparty() { + return counterparty; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterparty(Counterparty counterparty) { + this.counterparty = counterparty; + } + + + public ChargebackTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public ChargebackTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public ChargebackTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public ChargebackTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this ChargebackTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChargebackTransactionAllOfAttributes chargebackTransactionAllOfAttributes = (ChargebackTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, chargebackTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, chargebackTransactionAllOfAttributes.direction) && + Objects.equals(this.counterparty, chargebackTransactionAllOfAttributes.counterparty) && + Objects.equals(this.amount, chargebackTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, chargebackTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, chargebackTransactionAllOfAttributes.summary) && + Objects.equals(this.tags, chargebackTransactionAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, counterparty, amount, balance, summary, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChargebackTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterparty` to the URL query string + if (getCounterparty() != null) { + joiner.add(getCounterparty().toUrlQueryString(prefix + "counterparty" + suffix)); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CheckDeposit.java b/src/main/java/unit/java/sdk/model/CheckDeposit.java new file mode 100644 index 00000000..2446df1a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CheckDeposit.java @@ -0,0 +1,293 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositAttributes; +import unit.java.sdk.model.CheckDepositRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CheckDeposit + */ +@JsonPropertyOrder({ + CheckDeposit.JSON_PROPERTY_TYPE, + CheckDeposit.JSON_PROPERTY_ID, + CheckDeposit.JSON_PROPERTY_ATTRIBUTES, + CheckDeposit.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CheckDeposit { + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHECKDEPOSIT("checkDeposit"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CheckDepositAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CheckDepositRelationships relationships; + + public CheckDeposit() { + } + + public CheckDeposit type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public CheckDeposit id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + public CheckDeposit attributes(CheckDepositAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CheckDepositAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CheckDepositAttributes attributes) { + this.attributes = attributes; + } + + + public CheckDeposit relationships(CheckDepositRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CheckDepositRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CheckDepositRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this check_deposit object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckDeposit checkDeposit = (CheckDeposit) o; + return Objects.equals(this.type, checkDeposit.type) && + Objects.equals(this.id, checkDeposit.id) && + Objects.equals(this.attributes, checkDeposit.attributes) && + Objects.equals(this.relationships, checkDeposit.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CheckDeposit {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CheckDepositAttributes.java b/src/main/java/unit/java/sdk/model/CheckDepositAttributes.java new file mode 100644 index 00000000..6c5354b1 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CheckDepositAttributes.java @@ -0,0 +1,714 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Counterparty2; +import unit.java.sdk.model.StatusEvent; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CheckDepositAttributes + */ +@JsonPropertyOrder({ + CheckDepositAttributes.JSON_PROPERTY_CREATED_AT, + CheckDepositAttributes.JSON_PROPERTY_SETTLEMENT_DATE, + CheckDepositAttributes.JSON_PROPERTY_AMOUNT, + CheckDepositAttributes.JSON_PROPERTY_DESCRIPTION, + CheckDepositAttributes.JSON_PROPERTY_STATUS, + CheckDepositAttributes.JSON_PROPERTY_REASON, + CheckDepositAttributes.JSON_PROPERTY_STATUS_CREATED_AT, + CheckDepositAttributes.JSON_PROPERTY_STATUS_SET_BY, + CheckDepositAttributes.JSON_PROPERTY_STATUS_HISTORY, + CheckDepositAttributes.JSON_PROPERTY_REASON_TEXT, + CheckDepositAttributes.JSON_PROPERTY_CHECK_NUMBER, + CheckDepositAttributes.JSON_PROPERTY_VENDOR, + CheckDepositAttributes.JSON_PROPERTY_COUNTERPARTY, + CheckDepositAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CheckDepositAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_SETTLEMENT_DATE = "settlementDate"; + private LocalDate settlementDate; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + AWAITINGIMAGES("AwaitingImages"), + + AWAITINGFRONTIMAGE("AwaitingFrontImage"), + + AWAITINGBACKIMAGE("AwaitingBackImage"), + + PENDING("Pending"), + + PENDINGREVIEW("PendingReview"), + + AWAITINGCUSTOMERCONFIRMATION("AwaitingCustomerConfirmation"), + + REJECTED("Rejected"), + + CLEARING("Clearing"), + + SENT("Sent"), + + CANCELED("Canceled"), + + RETURNED("Returned"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_REASON = "reason"; + private JsonNullable reason = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STATUS_CREATED_AT = "statusCreatedAt"; + private OffsetDateTime statusCreatedAt; + + public static final String JSON_PROPERTY_STATUS_SET_BY = "statusSetBy"; + private String statusSetBy; + + public static final String JSON_PROPERTY_STATUS_HISTORY = "statusHistory"; + private List statusHistory; + + public static final String JSON_PROPERTY_REASON_TEXT = "reasonText"; + private String reasonText; + + public static final String JSON_PROPERTY_CHECK_NUMBER = "checkNumber"; + private String checkNumber; + + public static final String JSON_PROPERTY_VENDOR = "vendor"; + private String vendor; + + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; + private Counterparty2 counterparty; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public CheckDepositAttributes() { + } + + public CheckDepositAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public CheckDepositAttributes settlementDate(LocalDate settlementDate) { + this.settlementDate = settlementDate; + return this; + } + + /** + * Get settlementDate + * @return settlementDate + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTLEMENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getSettlementDate() { + return settlementDate; + } + + + @JsonProperty(JSON_PROPERTY_SETTLEMENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSettlementDate(LocalDate settlementDate) { + this.settlementDate = settlementDate; + } + + + public CheckDepositAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CheckDepositAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public CheckDepositAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public CheckDepositAttributes reason(String reason) { + this.reason = JsonNullable.of(reason); + return this; + } + + /** + * Get reason + * @return reason + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getReason() { + return reason.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getReason_JsonNullable() { + return reason; + } + + @JsonProperty(JSON_PROPERTY_REASON) + public void setReason_JsonNullable(JsonNullable reason) { + this.reason = reason; + } + + public void setReason(String reason) { + this.reason = JsonNullable.of(reason); + } + + + public CheckDepositAttributes statusCreatedAt(OffsetDateTime statusCreatedAt) { + this.statusCreatedAt = statusCreatedAt; + return this; + } + + /** + * Get statusCreatedAt + * @return statusCreatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getStatusCreatedAt() { + return statusCreatedAt; + } + + + @JsonProperty(JSON_PROPERTY_STATUS_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatusCreatedAt(OffsetDateTime statusCreatedAt) { + this.statusCreatedAt = statusCreatedAt; + } + + + public CheckDepositAttributes statusSetBy(String statusSetBy) { + this.statusSetBy = statusSetBy; + return this; + } + + /** + * Get statusSetBy + * @return statusSetBy + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_SET_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStatusSetBy() { + return statusSetBy; + } + + + @JsonProperty(JSON_PROPERTY_STATUS_SET_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatusSetBy(String statusSetBy) { + this.statusSetBy = statusSetBy; + } + + + public CheckDepositAttributes statusHistory(List statusHistory) { + this.statusHistory = statusHistory; + return this; + } + + public CheckDepositAttributes addStatusHistoryItem(StatusEvent statusHistoryItem) { + if (this.statusHistory == null) { + this.statusHistory = new ArrayList<>(); + } + this.statusHistory.add(statusHistoryItem); + return this; + } + + /** + * Get statusHistory + * @return statusHistory + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_HISTORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getStatusHistory() { + return statusHistory; + } + + + @JsonProperty(JSON_PROPERTY_STATUS_HISTORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatusHistory(List statusHistory) { + this.statusHistory = statusHistory; + } + + + public CheckDepositAttributes reasonText(String reasonText) { + this.reasonText = reasonText; + return this; + } + + /** + * Get reasonText + * @return reasonText + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReasonText() { + return reasonText; + } + + + @JsonProperty(JSON_PROPERTY_REASON_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReasonText(String reasonText) { + this.reasonText = reasonText; + } + + + public CheckDepositAttributes checkNumber(String checkNumber) { + this.checkNumber = checkNumber; + return this; + } + + /** + * Get checkNumber + * @return checkNumber + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCheckNumber() { + return checkNumber; + } + + + @JsonProperty(JSON_PROPERTY_CHECK_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCheckNumber(String checkNumber) { + this.checkNumber = checkNumber; + } + + + public CheckDepositAttributes vendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * Get vendor + * @return vendor + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VENDOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getVendor() { + return vendor; + } + + + @JsonProperty(JSON_PROPERTY_VENDOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVendor(String vendor) { + this.vendor = vendor; + } + + + public CheckDepositAttributes counterparty(Counterparty2 counterparty) { + this.counterparty = counterparty; + return this; + } + + /** + * Get counterparty + * @return counterparty + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Counterparty2 getCounterparty() { + return counterparty; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterparty(Counterparty2 counterparty) { + this.counterparty = counterparty; + } + + + public CheckDepositAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this check_deposit_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckDepositAttributes checkDepositAttributes = (CheckDepositAttributes) o; + return Objects.equals(this.createdAt, checkDepositAttributes.createdAt) && + Objects.equals(this.settlementDate, checkDepositAttributes.settlementDate) && + Objects.equals(this.amount, checkDepositAttributes.amount) && + Objects.equals(this.description, checkDepositAttributes.description) && + Objects.equals(this.status, checkDepositAttributes.status) && + equalsNullable(this.reason, checkDepositAttributes.reason) && + Objects.equals(this.statusCreatedAt, checkDepositAttributes.statusCreatedAt) && + Objects.equals(this.statusSetBy, checkDepositAttributes.statusSetBy) && + Objects.equals(this.statusHistory, checkDepositAttributes.statusHistory) && + Objects.equals(this.reasonText, checkDepositAttributes.reasonText) && + Objects.equals(this.checkNumber, checkDepositAttributes.checkNumber) && + Objects.equals(this.vendor, checkDepositAttributes.vendor) && + Objects.equals(this.counterparty, checkDepositAttributes.counterparty) && + Objects.equals(this.tags, checkDepositAttributes.tags); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, settlementDate, amount, description, status, hashCodeNullable(reason), statusCreatedAt, statusSetBy, statusHistory, reasonText, checkNumber, vendor, counterparty, tags); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CheckDepositAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" settlementDate: ").append(toIndentedString(settlementDate)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" statusCreatedAt: ").append(toIndentedString(statusCreatedAt)).append("\n"); + sb.append(" statusSetBy: ").append(toIndentedString(statusSetBy)).append("\n"); + sb.append(" statusHistory: ").append(toIndentedString(statusHistory)).append("\n"); + sb.append(" reasonText: ").append(toIndentedString(reasonText)).append("\n"); + sb.append(" checkNumber: ").append(toIndentedString(checkNumber)).append("\n"); + sb.append(" vendor: ").append(toIndentedString(vendor)).append("\n"); + sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `settlementDate` to the URL query string + if (getSettlementDate() != null) { + joiner.add(String.format("%ssettlementDate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSettlementDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `statusCreatedAt` to the URL query string + if (getStatusCreatedAt() != null) { + joiner.add(String.format("%sstatusCreatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatusCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `statusSetBy` to the URL query string + if (getStatusSetBy() != null) { + joiner.add(String.format("%sstatusSetBy%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatusSetBy()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `statusHistory` to the URL query string + if (getStatusHistory() != null) { + for (int i = 0; i < getStatusHistory().size(); i++) { + if (getStatusHistory().get(i) != null) { + joiner.add(getStatusHistory().get(i).toUrlQueryString(String.format("%sstatusHistory%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `reasonText` to the URL query string + if (getReasonText() != null) { + joiner.add(String.format("%sreasonText%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReasonText()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `checkNumber` to the URL query string + if (getCheckNumber() != null) { + joiner.add(String.format("%scheckNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCheckNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `vendor` to the URL query string + if (getVendor() != null) { + joiner.add(String.format("%svendor%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVendor()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterparty` to the URL query string + if (getCounterparty() != null) { + joiner.add(getCounterparty().toUrlQueryString(prefix + "counterparty" + suffix)); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CheckDepositRelationship.java b/src/main/java/unit/java/sdk/model/CheckDepositRelationship.java new file mode 100644 index 00000000..ca4def21 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CheckDepositRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositRelationshipData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CheckDepositRelationship + */ +@JsonPropertyOrder({ + CheckDepositRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CheckDepositRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private CheckDepositRelationshipData data; + + public CheckDepositRelationship() { + } + + public CheckDepositRelationship data(CheckDepositRelationshipData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CheckDepositRelationshipData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(CheckDepositRelationshipData data) { + this.data = data; + } + + + /** + * Return true if this checkDepositRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckDepositRelationship checkDepositRelationship = (CheckDepositRelationship) o; + return Objects.equals(this.data, checkDepositRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CheckDepositRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CheckDepositRelationshipData.java b/src/main/java/unit/java/sdk/model/CheckDepositRelationshipData.java new file mode 100644 index 00000000..37bb4aee --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CheckDepositRelationshipData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CheckDepositRelationshipData + */ +@JsonPropertyOrder({ + CheckDepositRelationshipData.JSON_PROPERTY_TYPE, + CheckDepositRelationshipData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CheckDepositRelationshipData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "checkDeposit"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public CheckDepositRelationshipData() { + } + + public CheckDepositRelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CheckDepositRelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this checkDepositRelationship_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckDepositRelationshipData checkDepositRelationshipData = (CheckDepositRelationshipData) o; + return Objects.equals(this.type, checkDepositRelationshipData.type) && + Objects.equals(this.id, checkDepositRelationshipData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CheckDepositRelationshipData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CheckDepositRelationships.java b/src/main/java/unit/java/sdk/model/CheckDepositRelationships.java new file mode 100644 index 00000000..3cb4f83a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CheckDepositRelationships.java @@ -0,0 +1,262 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositRelationshipsAccount; +import unit.java.sdk.model.OrgRelationship; +import unit.java.sdk.model.ReceivedPaymentRelationshipsCustomer; +import unit.java.sdk.model.ReceivedPaymentRelationshipsReceivePaymentTransaction; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CheckDepositRelationships + */ +@JsonPropertyOrder({ + CheckDepositRelationships.JSON_PROPERTY_ORG, + CheckDepositRelationships.JSON_PROPERTY_ACCOUNT, + CheckDepositRelationships.JSON_PROPERTY_CUSTOMER, + CheckDepositRelationships.JSON_PROPERTY_TRANSACTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CheckDepositRelationships { + public static final String JSON_PROPERTY_ORG = "org"; + private OrgRelationship org; + + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private CheckDepositRelationshipsAccount account; + + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private ReceivedPaymentRelationshipsCustomer customer; + + public static final String JSON_PROPERTY_TRANSACTION = "transaction"; + private ReceivedPaymentRelationshipsReceivePaymentTransaction transaction; + + public CheckDepositRelationships() { + } + + public CheckDepositRelationships org(OrgRelationship org) { + this.org = org; + return this; + } + + /** + * Get org + * @return org + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OrgRelationship getOrg() { + return org; + } + + + @JsonProperty(JSON_PROPERTY_ORG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOrg(OrgRelationship org) { + this.org = org; + } + + + public CheckDepositRelationships account(CheckDepositRelationshipsAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CheckDepositRelationshipsAccount getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(CheckDepositRelationshipsAccount account) { + this.account = account; + } + + + public CheckDepositRelationships customer(ReceivedPaymentRelationshipsCustomer customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReceivedPaymentRelationshipsCustomer getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomer(ReceivedPaymentRelationshipsCustomer customer) { + this.customer = customer; + } + + + public CheckDepositRelationships transaction(ReceivedPaymentRelationshipsReceivePaymentTransaction transaction) { + this.transaction = transaction; + return this; + } + + /** + * Get transaction + * @return transaction + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReceivedPaymentRelationshipsReceivePaymentTransaction getTransaction() { + return transaction; + } + + + @JsonProperty(JSON_PROPERTY_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction transaction) { + this.transaction = transaction; + } + + + /** + * Return true if this checkDepositRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckDepositRelationships checkDepositRelationships = (CheckDepositRelationships) o; + return Objects.equals(this.org, checkDepositRelationships.org) && + Objects.equals(this.account, checkDepositRelationships.account) && + Objects.equals(this.customer, checkDepositRelationships.customer) && + Objects.equals(this.transaction, checkDepositRelationships.transaction); + } + + @Override + public int hashCode() { + return Objects.hash(org, account, customer, transaction); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CheckDepositRelationships {\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" transaction: ").append(toIndentedString(transaction)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `org` to the URL query string + if (getOrg() != null) { + joiner.add(getOrg().toUrlQueryString(prefix + "org" + suffix)); + } + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(String.format("%saccount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + // add `transaction` to the URL query string + if (getTransaction() != null) { + joiner.add(getTransaction().toUrlQueryString(prefix + "transaction" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CheckDepositRelationshipsAccount.java b/src/main/java/unit/java/sdk/model/CheckDepositRelationshipsAccount.java new file mode 100644 index 00000000..5ec041de --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CheckDepositRelationshipsAccount.java @@ -0,0 +1,204 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import unit.java.sdk.model.CheckDepositRelationshipsAccountData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CheckDepositRelationshipsAccount + */ +@JsonPropertyOrder({ + CheckDepositRelationshipsAccount.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CheckDepositRelationshipsAccount extends HashMap { + public static final String JSON_PROPERTY_DATA = "data"; + private CheckDepositRelationshipsAccountData data; + + public CheckDepositRelationshipsAccount() { + } + + public CheckDepositRelationshipsAccount data(CheckDepositRelationshipsAccountData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CheckDepositRelationshipsAccountData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(CheckDepositRelationshipsAccountData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public CheckDepositRelationshipsAccount putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this checkDepositRelationships_account object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckDepositRelationshipsAccount checkDepositRelationshipsAccount = (CheckDepositRelationshipsAccount) o; + return Objects.equals(this.data, checkDepositRelationshipsAccount.data)&& + Objects.equals(this.additionalProperties, checkDepositRelationshipsAccount.additionalProperties) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(data, super.hashCode(), additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CheckDepositRelationshipsAccount {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CheckDepositRelationshipsAccountData.java b/src/main/java/unit/java/sdk/model/CheckDepositRelationshipsAccountData.java new file mode 100644 index 00000000..3d8a7a2d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CheckDepositRelationshipsAccountData.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CheckDepositRelationshipsAccountData + */ +@JsonPropertyOrder({ + CheckDepositRelationshipsAccountData.JSON_PROPERTY_TYPE, + CheckDepositRelationshipsAccountData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CheckDepositRelationshipsAccountData { + /** + * Gets or Sets type + */ + public enum TypeEnum { + ACCOUNT("account"), + + DEPOSITACCOUNT("depositAccount"), + + BATCHACCOUNT("batchAccount"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public CheckDepositRelationshipsAccountData() { + } + + public CheckDepositRelationshipsAccountData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public CheckDepositRelationshipsAccountData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this checkDepositRelationships_account_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckDepositRelationshipsAccountData checkDepositRelationshipsAccountData = (CheckDepositRelationshipsAccountData) o; + return Objects.equals(this.type, checkDepositRelationshipsAccountData.type) && + Objects.equals(this.id, checkDepositRelationshipsAccountData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CheckDepositRelationshipsAccountData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CheckDepositStatus.java b/src/main/java/unit/java/sdk/model/CheckDepositStatus.java new file mode 100644 index 00000000..b13f3623 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CheckDepositStatus.java @@ -0,0 +1,96 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets checkDepositStatus + */ +public enum CheckDepositStatus { + + AWAITINGIMAGES("AwaitingImages"), + + AWAITINGFRONTIMAGE("AwaitingFrontImage"), + + AWAITINGBACKIMAGE("AwaitingBackImage"), + + AWAITINGCUSTOMERCONFIRMATION("AwaitingCustomerConfirmation"), + + PENDING("Pending"), + + PENDINGREVIEW("PendingReview"), + + REJECTED("Rejected"), + + CLEARING("Clearing"), + + SENT("Sent"), + + CANCELED("Canceled"), + + RETURNED("Returned"); + + private String value; + + CheckDepositStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CheckDepositStatus fromValue(String value) { + for (CheckDepositStatus b : CheckDepositStatus.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } + +} + diff --git a/src/main/java/unit/java/sdk/model/CheckDepositTransaction.java b/src/main/java/unit/java/sdk/model/CheckDepositTransaction.java new file mode 100644 index 00000000..ff83872d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CheckDepositTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * CheckDepositTransaction + */ +@JsonPropertyOrder({ + CheckDepositTransaction.JSON_PROPERTY_ATTRIBUTES, + CheckDepositTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class CheckDepositTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CheckDepositTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public CheckDepositTransaction() { + } + + public CheckDepositTransaction attributes(CheckDepositTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CheckDepositTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CheckDepositTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public CheckDepositTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public CheckDepositTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public CheckDepositTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this CheckDepositTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckDepositTransaction checkDepositTransaction = (CheckDepositTransaction) o; + return Objects.equals(this.attributes, checkDepositTransaction.attributes) && + Objects.equals(this.relationships, checkDepositTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CheckDepositTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CheckDepositTransaction", CheckDepositTransaction.class); + JSON.registerDiscriminator(CheckDepositTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/CheckDepositTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/CheckDepositTransactionAllOfAttributes.java new file mode 100644 index 00000000..f0afaf6d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CheckDepositTransactionAllOfAttributes.java @@ -0,0 +1,366 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CheckDepositTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + CheckDepositTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + CheckDepositTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + CheckDepositTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + CheckDepositTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + CheckDepositTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + CheckDepositTransactionAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CheckDepositTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public CheckDepositTransactionAllOfAttributes() { + } + + public CheckDepositTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public CheckDepositTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CheckDepositTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public CheckDepositTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public CheckDepositTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public CheckDepositTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this CheckDepositTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckDepositTransactionAllOfAttributes checkDepositTransactionAllOfAttributes = (CheckDepositTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, checkDepositTransactionAllOfAttributes.createdAt) && + Objects.equals(this.amount, checkDepositTransactionAllOfAttributes.amount) && + Objects.equals(this.direction, checkDepositTransactionAllOfAttributes.direction) && + Objects.equals(this.balance, checkDepositTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, checkDepositTransactionAllOfAttributes.summary) && + Objects.equals(this.tags, checkDepositTransactionAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, amount, direction, balance, summary, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CheckDepositTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CheckPayment.java b/src/main/java/unit/java/sdk/model/CheckPayment.java new file mode 100644 index 00000000..e0928d9f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CheckPayment.java @@ -0,0 +1,260 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckPaymentAttributes; +import unit.java.sdk.model.CheckPaymentRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CheckPayment + */ +@JsonPropertyOrder({ + CheckPayment.JSON_PROPERTY_TYPE, + CheckPayment.JSON_PROPERTY_ID, + CheckPayment.JSON_PROPERTY_ATTRIBUTES, + CheckPayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CheckPayment { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "checkPayment"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CheckPaymentAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CheckPaymentRelationships relationships; + + public CheckPayment() { + } + + public CheckPayment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CheckPayment id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + public CheckPayment attributes(CheckPaymentAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CheckPaymentAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CheckPaymentAttributes attributes) { + this.attributes = attributes; + } + + + public CheckPayment relationships(CheckPaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CheckPaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CheckPaymentRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CheckPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckPayment checkPayment = (CheckPayment) o; + return Objects.equals(this.type, checkPayment.type) && + Objects.equals(this.id, checkPayment.id) && + Objects.equals(this.attributes, checkPayment.attributes) && + Objects.equals(this.relationships, checkPayment.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CheckPayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CheckPaymentAttributes.java b/src/main/java/unit/java/sdk/model/CheckPaymentAttributes.java new file mode 100644 index 00000000..ddf03824 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CheckPaymentAttributes.java @@ -0,0 +1,1149 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.CheckPaymentAttributesCounterparty; +import unit.java.sdk.model.ReturnReason; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CheckPaymentAttributes + */ +@JsonPropertyOrder({ + CheckPaymentAttributes.JSON_PROPERTY_CREATED_AT, + CheckPaymentAttributes.JSON_PROPERTY_UPDATED_AT, + CheckPaymentAttributes.JSON_PROPERTY_AMOUNT, + CheckPaymentAttributes.JSON_PROPERTY_RETURN_CUTOFF_TIME, + CheckPaymentAttributes.JSON_PROPERTY_STATUS, + CheckPaymentAttributes.JSON_PROPERTY_MEMO, + CheckPaymentAttributes.JSON_PROPERTY_DELIVERY_STATUS, + CheckPaymentAttributes.JSON_PROPERTY_SEND_AT, + CheckPaymentAttributes.JSON_PROPERTY_COUNTERPARTY, + CheckPaymentAttributes.JSON_PROPERTY_TRACKED_AT, + CheckPaymentAttributes.JSON_PROPERTY_POSTAL_CODE, + CheckPaymentAttributes.JSON_PROPERTY_EXPECTED_DELIVERY, + CheckPaymentAttributes.JSON_PROPERTY_ORIGINATED, + CheckPaymentAttributes.JSON_PROPERTY_EXPIRATION_DATE, + CheckPaymentAttributes.JSON_PROPERTY_REJECT_REASON, + CheckPaymentAttributes.JSON_PROPERTY_TAGS, + CheckPaymentAttributes.JSON_PROPERTY_DESCRIPTION, + CheckPaymentAttributes.JSON_PROPERTY_RETURN_REASON, + CheckPaymentAttributes.JSON_PROPERTY_PENDING_REVIEW_REASONS, + CheckPaymentAttributes.JSON_PROPERTY_CHECK_NUMBER, + CheckPaymentAttributes.JSON_PROPERTY_ON_US_AUXILIARY, + CheckPaymentAttributes.JSON_PROPERTY_ON_US, + CheckPaymentAttributes.JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER, + CheckPaymentAttributes.JSON_PROPERTY_ADDITIONAL_VERIFICATION_STATUS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CheckPaymentAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_RETURN_CUTOFF_TIME = "returnCutoffTime"; + private OffsetDateTime returnCutoffTime; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + MARKEDFORRETURN("MarkedForReturn"), + + RETURNED("Returned"), + + PROCESSED("Processed"), + + PENDINGREVIEW("PendingReview"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_MEMO = "memo"; + private String memo; + + /** + * Gets or Sets deliveryStatus + */ + public enum DeliveryStatusEnum { + MAILED("Mailed"), + + INLOCALAREA("InLocalArea"), + + DELIVERED("Delivered"), + + REROUTED("Rerouted"), + + RETURNEDTOSENDER("ReturnedToSender"); + + private String value; + + DeliveryStatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DeliveryStatusEnum fromValue(String value) { + for (DeliveryStatusEnum b : DeliveryStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DELIVERY_STATUS = "deliveryStatus"; + private DeliveryStatusEnum deliveryStatus; + + public static final String JSON_PROPERTY_SEND_AT = "sendAt"; + private OffsetDateTime sendAt; + + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; + private CheckPaymentAttributesCounterparty counterparty; + + public static final String JSON_PROPERTY_TRACKED_AT = "trackedAt"; + private OffsetDateTime trackedAt; + + public static final String JSON_PROPERTY_POSTAL_CODE = "postalCode"; + private String postalCode; + + public static final String JSON_PROPERTY_EXPECTED_DELIVERY = "expectedDelivery"; + private LocalDate expectedDelivery; + + public static final String JSON_PROPERTY_ORIGINATED = "originated"; + private Boolean originated; + + public static final String JSON_PROPERTY_EXPIRATION_DATE = "expirationDate"; + private LocalDate expirationDate; + + public static final String JSON_PROPERTY_REJECT_REASON = "rejectReason"; + private String rejectReason; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_RETURN_REASON = "returnReason"; + private ReturnReason returnReason; + + /** + * Gets or Sets pendingReviewReasons + */ + public enum PendingReviewReasonsEnum { + NAMEMISSMATCH("NameMissMatch"), + + SOFTLIMIT("SoftLimit"); + + private String value; + + PendingReviewReasonsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PendingReviewReasonsEnum fromValue(String value) { + for (PendingReviewReasonsEnum b : PendingReviewReasonsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PENDING_REVIEW_REASONS = "pendingReviewReasons"; + private List pendingReviewReasons; + + public static final String JSON_PROPERTY_CHECK_NUMBER = "checkNumber"; + private String checkNumber; + + public static final String JSON_PROPERTY_ON_US_AUXILIARY = "onUsAuxiliary"; + private String onUsAuxiliary; + + public static final String JSON_PROPERTY_ON_US = "onUs"; + private String onUs; + + public static final String JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER = "counterpartyRoutingNumber"; + private String counterpartyRoutingNumber; + + /** + * Gets or Sets additionalVerificationStatus + */ + public enum AdditionalVerificationStatusEnum { + REQUIRED("Required"), + + NOTREQUIRED("NotRequired"), + + APPROVED("Approved"); + + private String value; + + AdditionalVerificationStatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AdditionalVerificationStatusEnum fromValue(String value) { + for (AdditionalVerificationStatusEnum b : AdditionalVerificationStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ADDITIONAL_VERIFICATION_STATUS = "additionalVerificationStatus"; + private AdditionalVerificationStatusEnum additionalVerificationStatus; + + public CheckPaymentAttributes() { + } + + public CheckPaymentAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public CheckPaymentAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public CheckPaymentAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CheckPaymentAttributes returnCutoffTime(OffsetDateTime returnCutoffTime) { + this.returnCutoffTime = returnCutoffTime; + return this; + } + + /** + * Get returnCutoffTime + * @return returnCutoffTime + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RETURN_CUTOFF_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getReturnCutoffTime() { + return returnCutoffTime; + } + + + @JsonProperty(JSON_PROPERTY_RETURN_CUTOFF_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReturnCutoffTime(OffsetDateTime returnCutoffTime) { + this.returnCutoffTime = returnCutoffTime; + } + + + public CheckPaymentAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public CheckPaymentAttributes memo(String memo) { + this.memo = memo; + return this; + } + + /** + * Get memo + * @return memo + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MEMO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMemo() { + return memo; + } + + + @JsonProperty(JSON_PROPERTY_MEMO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMemo(String memo) { + this.memo = memo; + } + + + public CheckPaymentAttributes deliveryStatus(DeliveryStatusEnum deliveryStatus) { + this.deliveryStatus = deliveryStatus; + return this; + } + + /** + * Get deliveryStatus + * @return deliveryStatus + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELIVERY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DeliveryStatusEnum getDeliveryStatus() { + return deliveryStatus; + } + + + @JsonProperty(JSON_PROPERTY_DELIVERY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeliveryStatus(DeliveryStatusEnum deliveryStatus) { + this.deliveryStatus = deliveryStatus; + } + + + public CheckPaymentAttributes sendAt(OffsetDateTime sendAt) { + this.sendAt = sendAt; + return this; + } + + /** + * Get sendAt + * @return sendAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEND_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getSendAt() { + return sendAt; + } + + + @JsonProperty(JSON_PROPERTY_SEND_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSendAt(OffsetDateTime sendAt) { + this.sendAt = sendAt; + } + + + public CheckPaymentAttributes counterparty(CheckPaymentAttributesCounterparty counterparty) { + this.counterparty = counterparty; + return this; + } + + /** + * Get counterparty + * @return counterparty + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CheckPaymentAttributesCounterparty getCounterparty() { + return counterparty; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterparty(CheckPaymentAttributesCounterparty counterparty) { + this.counterparty = counterparty; + } + + + public CheckPaymentAttributes trackedAt(OffsetDateTime trackedAt) { + this.trackedAt = trackedAt; + return this; + } + + /** + * Get trackedAt + * @return trackedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACKED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getTrackedAt() { + return trackedAt; + } + + + @JsonProperty(JSON_PROPERTY_TRACKED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTrackedAt(OffsetDateTime trackedAt) { + this.trackedAt = trackedAt; + } + + + public CheckPaymentAttributes postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * Get postalCode + * @return postalCode + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPostalCode() { + return postalCode; + } + + + @JsonProperty(JSON_PROPERTY_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public CheckPaymentAttributes expectedDelivery(LocalDate expectedDelivery) { + this.expectedDelivery = expectedDelivery; + return this; + } + + /** + * Get expectedDelivery + * @return expectedDelivery + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPECTED_DELIVERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getExpectedDelivery() { + return expectedDelivery; + } + + + @JsonProperty(JSON_PROPERTY_EXPECTED_DELIVERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpectedDelivery(LocalDate expectedDelivery) { + this.expectedDelivery = expectedDelivery; + } + + + public CheckPaymentAttributes originated(Boolean originated) { + this.originated = originated; + return this; + } + + /** + * Get originated + * @return originated + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ORIGINATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getOriginated() { + return originated; + } + + + @JsonProperty(JSON_PROPERTY_ORIGINATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOriginated(Boolean originated) { + this.originated = originated; + } + + + public CheckPaymentAttributes expirationDate(LocalDate expirationDate) { + this.expirationDate = expirationDate; + return this; + } + + /** + * Get expirationDate + * @return expirationDate + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getExpirationDate() { + return expirationDate; + } + + + @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpirationDate(LocalDate expirationDate) { + this.expirationDate = expirationDate; + } + + + public CheckPaymentAttributes rejectReason(String rejectReason) { + this.rejectReason = rejectReason; + return this; + } + + /** + * Get rejectReason + * @return rejectReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REJECT_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRejectReason() { + return rejectReason; + } + + + @JsonProperty(JSON_PROPERTY_REJECT_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRejectReason(String rejectReason) { + this.rejectReason = rejectReason; + } + + + public CheckPaymentAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CheckPaymentAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + + public CheckPaymentAttributes returnReason(ReturnReason returnReason) { + this.returnReason = returnReason; + return this; + } + + /** + * Get returnReason + * @return returnReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RETURN_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReturnReason getReturnReason() { + return returnReason; + } + + + @JsonProperty(JSON_PROPERTY_RETURN_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReturnReason(ReturnReason returnReason) { + this.returnReason = returnReason; + } + + + public CheckPaymentAttributes pendingReviewReasons(List pendingReviewReasons) { + this.pendingReviewReasons = pendingReviewReasons; + return this; + } + + public CheckPaymentAttributes addPendingReviewReasonsItem(PendingReviewReasonsEnum pendingReviewReasonsItem) { + if (this.pendingReviewReasons == null) { + this.pendingReviewReasons = new ArrayList<>(); + } + this.pendingReviewReasons.add(pendingReviewReasonsItem); + return this; + } + + /** + * Get pendingReviewReasons + * @return pendingReviewReasons + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PENDING_REVIEW_REASONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getPendingReviewReasons() { + return pendingReviewReasons; + } + + + @JsonProperty(JSON_PROPERTY_PENDING_REVIEW_REASONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPendingReviewReasons(List pendingReviewReasons) { + this.pendingReviewReasons = pendingReviewReasons; + } + + + public CheckPaymentAttributes checkNumber(String checkNumber) { + this.checkNumber = checkNumber; + return this; + } + + /** + * Get checkNumber + * @return checkNumber + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCheckNumber() { + return checkNumber; + } + + + @JsonProperty(JSON_PROPERTY_CHECK_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCheckNumber(String checkNumber) { + this.checkNumber = checkNumber; + } + + + public CheckPaymentAttributes onUsAuxiliary(String onUsAuxiliary) { + this.onUsAuxiliary = onUsAuxiliary; + return this; + } + + /** + * Get onUsAuxiliary + * @return onUsAuxiliary + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ON_US_AUXILIARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOnUsAuxiliary() { + return onUsAuxiliary; + } + + + @JsonProperty(JSON_PROPERTY_ON_US_AUXILIARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOnUsAuxiliary(String onUsAuxiliary) { + this.onUsAuxiliary = onUsAuxiliary; + } + + + public CheckPaymentAttributes onUs(String onUs) { + this.onUs = onUs; + return this; + } + + /** + * Get onUs + * @return onUs + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ON_US) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOnUs() { + return onUs; + } + + + @JsonProperty(JSON_PROPERTY_ON_US) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOnUs(String onUs) { + this.onUs = onUs; + } + + + public CheckPaymentAttributes counterpartyRoutingNumber(String counterpartyRoutingNumber) { + this.counterpartyRoutingNumber = counterpartyRoutingNumber; + return this; + } + + /** + * Get counterpartyRoutingNumber + * @return counterpartyRoutingNumber + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCounterpartyRoutingNumber() { + return counterpartyRoutingNumber; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterpartyRoutingNumber(String counterpartyRoutingNumber) { + this.counterpartyRoutingNumber = counterpartyRoutingNumber; + } + + + public CheckPaymentAttributes additionalVerificationStatus(AdditionalVerificationStatusEnum additionalVerificationStatus) { + this.additionalVerificationStatus = additionalVerificationStatus; + return this; + } + + /** + * Get additionalVerificationStatus + * @return additionalVerificationStatus + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDITIONAL_VERIFICATION_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AdditionalVerificationStatusEnum getAdditionalVerificationStatus() { + return additionalVerificationStatus; + } + + + @JsonProperty(JSON_PROPERTY_ADDITIONAL_VERIFICATION_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdditionalVerificationStatus(AdditionalVerificationStatusEnum additionalVerificationStatus) { + this.additionalVerificationStatus = additionalVerificationStatus; + } + + + /** + * Return true if this CheckPayment_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckPaymentAttributes checkPaymentAttributes = (CheckPaymentAttributes) o; + return Objects.equals(this.createdAt, checkPaymentAttributes.createdAt) && + Objects.equals(this.updatedAt, checkPaymentAttributes.updatedAt) && + Objects.equals(this.amount, checkPaymentAttributes.amount) && + Objects.equals(this.returnCutoffTime, checkPaymentAttributes.returnCutoffTime) && + Objects.equals(this.status, checkPaymentAttributes.status) && + Objects.equals(this.memo, checkPaymentAttributes.memo) && + Objects.equals(this.deliveryStatus, checkPaymentAttributes.deliveryStatus) && + Objects.equals(this.sendAt, checkPaymentAttributes.sendAt) && + Objects.equals(this.counterparty, checkPaymentAttributes.counterparty) && + Objects.equals(this.trackedAt, checkPaymentAttributes.trackedAt) && + Objects.equals(this.postalCode, checkPaymentAttributes.postalCode) && + Objects.equals(this.expectedDelivery, checkPaymentAttributes.expectedDelivery) && + Objects.equals(this.originated, checkPaymentAttributes.originated) && + Objects.equals(this.expirationDate, checkPaymentAttributes.expirationDate) && + Objects.equals(this.rejectReason, checkPaymentAttributes.rejectReason) && + Objects.equals(this.tags, checkPaymentAttributes.tags) && + Objects.equals(this.description, checkPaymentAttributes.description) && + Objects.equals(this.returnReason, checkPaymentAttributes.returnReason) && + Objects.equals(this.pendingReviewReasons, checkPaymentAttributes.pendingReviewReasons) && + Objects.equals(this.checkNumber, checkPaymentAttributes.checkNumber) && + Objects.equals(this.onUsAuxiliary, checkPaymentAttributes.onUsAuxiliary) && + Objects.equals(this.onUs, checkPaymentAttributes.onUs) && + Objects.equals(this.counterpartyRoutingNumber, checkPaymentAttributes.counterpartyRoutingNumber) && + Objects.equals(this.additionalVerificationStatus, checkPaymentAttributes.additionalVerificationStatus); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, updatedAt, amount, returnCutoffTime, status, memo, deliveryStatus, sendAt, counterparty, trackedAt, postalCode, expectedDelivery, originated, expirationDate, rejectReason, tags, description, returnReason, pendingReviewReasons, checkNumber, onUsAuxiliary, onUs, counterpartyRoutingNumber, additionalVerificationStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CheckPaymentAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" returnCutoffTime: ").append(toIndentedString(returnCutoffTime)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" memo: ").append(toIndentedString(memo)).append("\n"); + sb.append(" deliveryStatus: ").append(toIndentedString(deliveryStatus)).append("\n"); + sb.append(" sendAt: ").append(toIndentedString(sendAt)).append("\n"); + sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); + sb.append(" trackedAt: ").append(toIndentedString(trackedAt)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" expectedDelivery: ").append(toIndentedString(expectedDelivery)).append("\n"); + sb.append(" originated: ").append(toIndentedString(originated)).append("\n"); + sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); + sb.append(" rejectReason: ").append(toIndentedString(rejectReason)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" returnReason: ").append(toIndentedString(returnReason)).append("\n"); + sb.append(" pendingReviewReasons: ").append(toIndentedString(pendingReviewReasons)).append("\n"); + sb.append(" checkNumber: ").append(toIndentedString(checkNumber)).append("\n"); + sb.append(" onUsAuxiliary: ").append(toIndentedString(onUsAuxiliary)).append("\n"); + sb.append(" onUs: ").append(toIndentedString(onUs)).append("\n"); + sb.append(" counterpartyRoutingNumber: ").append(toIndentedString(counterpartyRoutingNumber)).append("\n"); + sb.append(" additionalVerificationStatus: ").append(toIndentedString(additionalVerificationStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `returnCutoffTime` to the URL query string + if (getReturnCutoffTime() != null) { + joiner.add(String.format("%sreturnCutoffTime%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReturnCutoffTime()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `memo` to the URL query string + if (getMemo() != null) { + joiner.add(String.format("%smemo%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMemo()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `deliveryStatus` to the URL query string + if (getDeliveryStatus() != null) { + joiner.add(String.format("%sdeliveryStatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDeliveryStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sendAt` to the URL query string + if (getSendAt() != null) { + joiner.add(String.format("%ssendAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSendAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterparty` to the URL query string + if (getCounterparty() != null) { + joiner.add(getCounterparty().toUrlQueryString(prefix + "counterparty" + suffix)); + } + + // add `trackedAt` to the URL query string + if (getTrackedAt() != null) { + joiner.add(String.format("%strackedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTrackedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `postalCode` to the URL query string + if (getPostalCode() != null) { + joiner.add(String.format("%spostalCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPostalCode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `expectedDelivery` to the URL query string + if (getExpectedDelivery() != null) { + joiner.add(String.format("%sexpectedDelivery%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getExpectedDelivery()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `originated` to the URL query string + if (getOriginated() != null) { + joiner.add(String.format("%soriginated%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOriginated()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `expirationDate` to the URL query string + if (getExpirationDate() != null) { + joiner.add(String.format("%sexpirationDate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getExpirationDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `rejectReason` to the URL query string + if (getRejectReason() != null) { + joiner.add(String.format("%srejectReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRejectReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `returnReason` to the URL query string + if (getReturnReason() != null) { + joiner.add(String.format("%sreturnReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReturnReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `pendingReviewReasons` to the URL query string + if (getPendingReviewReasons() != null) { + for (int i = 0; i < getPendingReviewReasons().size(); i++) { + joiner.add(String.format("%spendingReviewReasons%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getPendingReviewReasons().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `checkNumber` to the URL query string + if (getCheckNumber() != null) { + joiner.add(String.format("%scheckNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCheckNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `onUsAuxiliary` to the URL query string + if (getOnUsAuxiliary() != null) { + joiner.add(String.format("%sonUsAuxiliary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOnUsAuxiliary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `onUs` to the URL query string + if (getOnUs() != null) { + joiner.add(String.format("%sonUs%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOnUs()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterpartyRoutingNumber` to the URL query string + if (getCounterpartyRoutingNumber() != null) { + joiner.add(String.format("%scounterpartyRoutingNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCounterpartyRoutingNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `additionalVerificationStatus` to the URL query string + if (getAdditionalVerificationStatus() != null) { + joiner.add(String.format("%sadditionalVerificationStatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAdditionalVerificationStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CheckPaymentAttributesCounterparty.java b/src/main/java/unit/java/sdk/model/CheckPaymentAttributesCounterparty.java new file mode 100644 index 00000000..f1f815d1 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CheckPaymentAttributesCounterparty.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CheckPaymentAttributesCounterparty + */ +@JsonPropertyOrder({ + CheckPaymentAttributesCounterparty.JSON_PROPERTY_NAME, + CheckPaymentAttributesCounterparty.JSON_PROPERTY_ADDRESS, + CheckPaymentAttributesCounterparty.JSON_PROPERTY_COUNTERPARTY_MOVED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CheckPaymentAttributesCounterparty { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_COUNTERPARTY_MOVED = "counterpartyMoved"; + private Boolean counterpartyMoved; + + public CheckPaymentAttributesCounterparty() { + } + + public CheckPaymentAttributesCounterparty name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + public CheckPaymentAttributesCounterparty address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(Address address) { + this.address = address; + } + + + public CheckPaymentAttributesCounterparty counterpartyMoved(Boolean counterpartyMoved) { + this.counterpartyMoved = counterpartyMoved; + return this; + } + + /** + * Get counterpartyMoved + * @return counterpartyMoved + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_MOVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getCounterpartyMoved() { + return counterpartyMoved; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_MOVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterpartyMoved(Boolean counterpartyMoved) { + this.counterpartyMoved = counterpartyMoved; + } + + + /** + * Return true if this CheckPayment_attributes_counterparty object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckPaymentAttributesCounterparty checkPaymentAttributesCounterparty = (CheckPaymentAttributesCounterparty) o; + return Objects.equals(this.name, checkPaymentAttributesCounterparty.name) && + Objects.equals(this.address, checkPaymentAttributesCounterparty.address) && + Objects.equals(this.counterpartyMoved, checkPaymentAttributesCounterparty.counterpartyMoved); + } + + @Override + public int hashCode() { + return Objects.hash(name, address, counterpartyMoved); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CheckPaymentAttributesCounterparty {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" counterpartyMoved: ").append(toIndentedString(counterpartyMoved)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `counterpartyMoved` to the URL query string + if (getCounterpartyMoved() != null) { + joiner.add(String.format("%scounterpartyMoved%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCounterpartyMoved()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CheckPaymentRelationship.java b/src/main/java/unit/java/sdk/model/CheckPaymentRelationship.java new file mode 100644 index 00000000..272b290d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CheckPaymentRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PaymentRelationshipData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CheckPaymentRelationship + */ +@JsonPropertyOrder({ + CheckPaymentRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CheckPaymentRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private PaymentRelationshipData data; + + public CheckPaymentRelationship() { + } + + public CheckPaymentRelationship data(PaymentRelationshipData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PaymentRelationshipData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(PaymentRelationshipData data) { + this.data = data; + } + + + /** + * Return true if this checkPaymentRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckPaymentRelationship checkPaymentRelationship = (CheckPaymentRelationship) o; + return Objects.equals(this.data, checkPaymentRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CheckPaymentRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CheckPaymentRelationships.java b/src/main/java/unit/java/sdk/model/CheckPaymentRelationships.java new file mode 100644 index 00000000..9c25d211 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CheckPaymentRelationships.java @@ -0,0 +1,262 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomersRelationship; +import unit.java.sdk.model.ReceivedPaymentRelationshipsCustomer; +import unit.java.sdk.model.ReceivedPaymentRelationshipsReceivePaymentTransaction; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsAccount; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CheckPaymentRelationships + */ +@JsonPropertyOrder({ + CheckPaymentRelationships.JSON_PROPERTY_ACCOUNT, + CheckPaymentRelationships.JSON_PROPERTY_CUSTOMER, + CheckPaymentRelationships.JSON_PROPERTY_CUSTOMERS, + CheckPaymentRelationships.JSON_PROPERTY_TRANSACTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CheckPaymentRelationships { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private RecurringAchPaymentRelationshipsAccount account; + + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private ReceivedPaymentRelationshipsCustomer customer; + + public static final String JSON_PROPERTY_CUSTOMERS = "customers"; + private CustomersRelationship customers; + + public static final String JSON_PROPERTY_TRANSACTION = "transaction"; + private ReceivedPaymentRelationshipsReceivePaymentTransaction transaction; + + public CheckPaymentRelationships() { + } + + public CheckPaymentRelationships account(RecurringAchPaymentRelationshipsAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RecurringAchPaymentRelationshipsAccount getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(RecurringAchPaymentRelationshipsAccount account) { + this.account = account; + } + + + public CheckPaymentRelationships customer(ReceivedPaymentRelationshipsCustomer customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReceivedPaymentRelationshipsCustomer getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomer(ReceivedPaymentRelationshipsCustomer customer) { + this.customer = customer; + } + + + public CheckPaymentRelationships customers(CustomersRelationship customers) { + this.customers = customers; + return this; + } + + /** + * Get customers + * @return customers + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CustomersRelationship getCustomers() { + return customers; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomers(CustomersRelationship customers) { + this.customers = customers; + } + + + public CheckPaymentRelationships transaction(ReceivedPaymentRelationshipsReceivePaymentTransaction transaction) { + this.transaction = transaction; + return this; + } + + /** + * Get transaction + * @return transaction + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReceivedPaymentRelationshipsReceivePaymentTransaction getTransaction() { + return transaction; + } + + + @JsonProperty(JSON_PROPERTY_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction transaction) { + this.transaction = transaction; + } + + + /** + * Return true if this CheckPayment_relationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckPaymentRelationships checkPaymentRelationships = (CheckPaymentRelationships) o; + return Objects.equals(this.account, checkPaymentRelationships.account) && + Objects.equals(this.customer, checkPaymentRelationships.customer) && + Objects.equals(this.customers, checkPaymentRelationships.customers) && + Objects.equals(this.transaction, checkPaymentRelationships.transaction); + } + + @Override + public int hashCode() { + return Objects.hash(account, customer, customers, transaction); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CheckPaymentRelationships {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" customers: ").append(toIndentedString(customers)).append("\n"); + sb.append(" transaction: ").append(toIndentedString(transaction)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + // add `customers` to the URL query string + if (getCustomers() != null) { + joiner.add(getCustomers().toUrlQueryString(prefix + "customers" + suffix)); + } + + // add `transaction` to the URL query string + if (getTransaction() != null) { + joiner.add(getTransaction().toUrlQueryString(prefix + "transaction" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CheckPaymentTransaction.java b/src/main/java/unit/java/sdk/model/CheckPaymentTransaction.java new file mode 100644 index 00000000..7a6c901e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CheckPaymentTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * CheckPaymentTransaction + */ +@JsonPropertyOrder({ + CheckPaymentTransaction.JSON_PROPERTY_ATTRIBUTES, + CheckPaymentTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class CheckPaymentTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CheckDepositTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public CheckPaymentTransaction() { + } + + public CheckPaymentTransaction attributes(CheckDepositTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CheckDepositTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CheckDepositTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public CheckPaymentTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public CheckPaymentTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public CheckPaymentTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this CheckPaymentTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckPaymentTransaction checkPaymentTransaction = (CheckPaymentTransaction) o; + return Objects.equals(this.attributes, checkPaymentTransaction.attributes) && + Objects.equals(this.relationships, checkPaymentTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CheckPaymentTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CheckPaymentTransaction", CheckPaymentTransaction.class); + JSON.registerDiscriminator(CheckPaymentTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/CloseAccountRequest.java b/src/main/java/unit/java/sdk/model/CloseAccountRequest.java new file mode 100644 index 00000000..13278bdb --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CloseAccountRequest.java @@ -0,0 +1,150 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CloseAccountRequest + */ +@JsonPropertyOrder({ + CloseAccountRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloseAccountRequest { + public static final String JSON_PROPERTY_DATA = "data"; + private CloseAccountRequest data; + + public CloseAccountRequest() { + } + + public CloseAccountRequest data(CloseAccountRequest data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CloseAccountRequest getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(CloseAccountRequest data) { + this.data = data; + } + + + /** + * Return true if this CloseAccountRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CloseAccountRequest closeAccountRequest = (CloseAccountRequest) o; + return Objects.equals(this.data, closeAccountRequest.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloseAccountRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CloseAccountRequestAttributes.java b/src/main/java/unit/java/sdk/model/CloseAccountRequestAttributes.java new file mode 100644 index 00000000..414432cc --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CloseAccountRequestAttributes.java @@ -0,0 +1,291 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CloseAccountRequestAttributes + */ +@JsonPropertyOrder({ + CloseAccountRequestAttributes.JSON_PROPERTY_REASON, + CloseAccountRequestAttributes.JSON_PROPERTY_FRAUD_REASON +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloseAccountRequestAttributes { + /** + * Gets or Sets reason + */ + public enum ReasonEnum { + BYCUSTOMER("ByCustomer"), + + FRAUD("Fraud"); + + private String value; + + ReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ReasonEnum fromValue(String value) { + for (ReasonEnum b : ReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_REASON = "reason"; + private ReasonEnum reason = ReasonEnum.BYCUSTOMER; + + /** + * Gets or Sets fraudReason + */ + public enum FraudReasonEnum { + ACHACTIVITY("ACHActivity"), + + CARDACTIVITY("CardActivity"), + + CHECKACTIVITY("CheckActivity"), + + APPLICATIONHISTORY("ApplicationHistory"), + + ACCOUNTACTIVITY("AccountActivity"), + + CLIENTIDENTIFIED("ClientIdentified"), + + IDENTITYTHEFT("IdentityTheft"), + + LINKEDTOFRAUDULENTCUSTOMER("LinkedToFraudulentCustomer"); + + private String value; + + FraudReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FraudReasonEnum fromValue(String value) { + for (FraudReasonEnum b : FraudReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_FRAUD_REASON = "fraudReason"; + private JsonNullable fraudReason = JsonNullable.undefined(); + + public CloseAccountRequestAttributes() { + } + + public CloseAccountRequestAttributes reason(ReasonEnum reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReasonEnum getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(ReasonEnum reason) { + this.reason = reason; + } + + + public CloseAccountRequestAttributes fraudReason(FraudReasonEnum fraudReason) { + this.fraudReason = JsonNullable.of(fraudReason); + return this; + } + + /** + * Get fraudReason + * @return fraudReason + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public FraudReasonEnum getFraudReason() { + return fraudReason.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FRAUD_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getFraudReason_JsonNullable() { + return fraudReason; + } + + @JsonProperty(JSON_PROPERTY_FRAUD_REASON) + public void setFraudReason_JsonNullable(JsonNullable fraudReason) { + this.fraudReason = fraudReason; + } + + public void setFraudReason(FraudReasonEnum fraudReason) { + this.fraudReason = JsonNullable.of(fraudReason); + } + + + /** + * Return true if this closeAccountRequest_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CloseAccountRequestAttributes closeAccountRequestAttributes = (CloseAccountRequestAttributes) o; + return Objects.equals(this.reason, closeAccountRequestAttributes.reason) && + equalsNullable(this.fraudReason, closeAccountRequestAttributes.fraudReason); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(reason, hashCodeNullable(fraudReason)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloseAccountRequestAttributes {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" fraudReason: ").append(toIndentedString(fraudReason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `fraudReason` to the URL query string + if (getFraudReason() != null) { + joiner.add(String.format("%sfraudReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFraudReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Contact.java b/src/main/java/unit/java/sdk/model/Contact.java new file mode 100644 index 00000000..0a28655c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Contact.java @@ -0,0 +1,283 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Contact + */ +@JsonPropertyOrder({ + Contact.JSON_PROPERTY_FULL_NAME, + Contact.JSON_PROPERTY_EMAIL, + Contact.JSON_PROPERTY_PHONE, + Contact.JSON_PROPERTY_JWT_SUBJECT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Contact { + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_JWT_SUBJECT = "jwtSubject"; + private JsonNullable jwtSubject = JsonNullable.undefined(); + + public Contact() { + } + + public Contact fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public Contact email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public Contact phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public Contact jwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + return this; + } + + /** + * Get jwtSubject + * @return jwtSubject + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getJwtSubject() { + return jwtSubject.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getJwtSubject_JsonNullable() { + return jwtSubject; + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + public void setJwtSubject_JsonNullable(JsonNullable jwtSubject) { + this.jwtSubject = jwtSubject; + } + + public void setJwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + } + + + /** + * Return true if this contact object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Contact contact = (Contact) o; + return Objects.equals(this.fullName, contact.fullName) && + Objects.equals(this.email, contact.email) && + Objects.equals(this.phone, contact.phone) && + equalsNullable(this.jwtSubject, contact.jwtSubject); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(fullName, email, phone, hashCodeNullable(jwtSubject)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Contact {\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `jwtSubject` to the URL query string + if (getJwtSubject() != null) { + joiner.add(String.format("%sjwtSubject%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getJwtSubject()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Coordinates.java b/src/main/java/unit/java/sdk/model/Coordinates.java new file mode 100644 index 00000000..a1526a79 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Coordinates.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Coordinates + */ +@JsonPropertyOrder({ + Coordinates.JSON_PROPERTY_LONGITUDE, + Coordinates.JSON_PROPERTY_LATITUDE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Coordinates { + public static final String JSON_PROPERTY_LONGITUDE = "longitude"; + private BigDecimal longitude; + + public static final String JSON_PROPERTY_LATITUDE = "latitude"; + private BigDecimal latitude; + + public Coordinates() { + } + + public Coordinates longitude(BigDecimal longitude) { + this.longitude = longitude; + return this; + } + + /** + * Get longitude + * @return longitude + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LONGITUDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getLongitude() { + return longitude; + } + + + @JsonProperty(JSON_PROPERTY_LONGITUDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLongitude(BigDecimal longitude) { + this.longitude = longitude; + } + + + public Coordinates latitude(BigDecimal latitude) { + this.latitude = latitude; + return this; + } + + /** + * Get latitude + * @return latitude + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LATITUDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getLatitude() { + return latitude; + } + + + @JsonProperty(JSON_PROPERTY_LATITUDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLatitude(BigDecimal latitude) { + this.latitude = latitude; + } + + + /** + * Return true if this coordinates object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Coordinates coordinates = (Coordinates) o; + return Objects.equals(this.longitude, coordinates.longitude) && + Objects.equals(this.latitude, coordinates.latitude); + } + + @Override + public int hashCode() { + return Objects.hash(longitude, latitude); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Coordinates {\n"); + sb.append(" longitude: ").append(toIndentedString(longitude)).append("\n"); + sb.append(" latitude: ").append(toIndentedString(latitude)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `longitude` to the URL query string + if (getLongitude() != null) { + joiner.add(String.format("%slongitude%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLongitude()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `latitude` to the URL query string + if (getLatitude() != null) { + joiner.add(String.format("%slatitude%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLatitude()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Counterparty.java b/src/main/java/unit/java/sdk/model/Counterparty.java new file mode 100644 index 00000000..531ebf50 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Counterparty.java @@ -0,0 +1,295 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Counterparty + */ +@JsonPropertyOrder({ + Counterparty.JSON_PROPERTY_ROUTING_NUMBER, + Counterparty.JSON_PROPERTY_ACCOUNT_NUMBER, + Counterparty.JSON_PROPERTY_ACCOUNT_TYPE, + Counterparty.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Counterparty { + public static final String JSON_PROPERTY_ROUTING_NUMBER = "routingNumber"; + private String routingNumber; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + private String accountNumber; + + /** + * Gets or Sets accountType + */ + public enum AccountTypeEnum { + CHECKING("Checking"), + + SAVINGS("Savings"), + + LOAN("Loan"); + + private String value; + + AccountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AccountTypeEnum fromValue(String value) { + for (AccountTypeEnum b : AccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ACCOUNT_TYPE = "accountType"; + private AccountTypeEnum accountType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public Counterparty() { + } + + public Counterparty routingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; + } + + /** + * Get routingNumber + * @return routingNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getRoutingNumber() { + return routingNumber; + } + + + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + } + + + public Counterparty accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getAccountNumber() { + return accountNumber; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Counterparty accountType(AccountTypeEnum accountType) { + this.accountType = accountType; + return this; + } + + /** + * Get accountType + * @return accountType + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AccountTypeEnum getAccountType() { + return accountType; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountType(AccountTypeEnum accountType) { + this.accountType = accountType; + } + + + public Counterparty name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + /** + * Return true if this counterparty object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Counterparty counterparty = (Counterparty) o; + return Objects.equals(this.routingNumber, counterparty.routingNumber) && + Objects.equals(this.accountNumber, counterparty.accountNumber) && + Objects.equals(this.accountType, counterparty.accountType) && + Objects.equals(this.name, counterparty.name); + } + + @Override + public int hashCode() { + return Objects.hash(routingNumber, accountNumber, accountType, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Counterparty {\n"); + sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `routingNumber` to the URL query string + if (getRoutingNumber() != null) { + joiner.add(String.format("%sroutingNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRoutingNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add(String.format("%saccountNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `accountType` to the URL query string + if (getAccountType() != null) { + joiner.add(String.format("%saccountType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Counterparty1.java b/src/main/java/unit/java/sdk/model/Counterparty1.java new file mode 100644 index 00000000..d1e6a17e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Counterparty1.java @@ -0,0 +1,260 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty1Attributes; +import unit.java.sdk.model.CounterpartyRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Counterparty1 + */ +@JsonPropertyOrder({ + Counterparty1.JSON_PROPERTY_TYPE, + Counterparty1.JSON_PROPERTY_ID, + Counterparty1.JSON_PROPERTY_ATTRIBUTES, + Counterparty1.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Counterparty1 { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private Counterparty1Attributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CounterpartyRelationships relationships; + + public Counterparty1() { + } + + public Counterparty1 type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public Counterparty1 id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public Counterparty1 attributes(Counterparty1Attributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Counterparty1Attributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(Counterparty1Attributes attributes) { + this.attributes = attributes; + } + + + public Counterparty1 relationships(CounterpartyRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CounterpartyRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(CounterpartyRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this counterparty_1 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Counterparty1 counterparty1 = (Counterparty1) o; + return Objects.equals(this.type, counterparty1.type) && + Objects.equals(this.id, counterparty1.id) && + Objects.equals(this.attributes, counterparty1.attributes) && + Objects.equals(this.relationships, counterparty1.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Counterparty1 {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Counterparty1Attributes.java b/src/main/java/unit/java/sdk/model/Counterparty1Attributes.java new file mode 100644 index 00000000..ed4f94c6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Counterparty1Attributes.java @@ -0,0 +1,550 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Counterparty1Attributes + */ +@JsonPropertyOrder({ + Counterparty1Attributes.JSON_PROPERTY_ROUTING_NUMBER, + Counterparty1Attributes.JSON_PROPERTY_ACCOUNT_NUMBER, + Counterparty1Attributes.JSON_PROPERTY_ACCOUNT_TYPE, + Counterparty1Attributes.JSON_PROPERTY_TYPE, + Counterparty1Attributes.JSON_PROPERTY_NAME, + Counterparty1Attributes.JSON_PROPERTY_BANK, + Counterparty1Attributes.JSON_PROPERTY_PERMISSIONS, + Counterparty1Attributes.JSON_PROPERTY_TAGS, + Counterparty1Attributes.JSON_PROPERTY_CREATED_AT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Counterparty1Attributes { + public static final String JSON_PROPERTY_ROUTING_NUMBER = "routingNumber"; + private String routingNumber; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + private String accountNumber; + + /** + * Gets or Sets accountType + */ + public enum AccountTypeEnum { + CHECKING("Checking"), + + SAVINGS("Savings"), + + LOAN("Loan"); + + private String value; + + AccountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AccountTypeEnum fromValue(String value) { + for (AccountTypeEnum b : AccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ACCOUNT_TYPE = "accountType"; + private AccountTypeEnum accountType; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + BUSINESS("Business"), + + PERSON("Person"), + + UNKNOWN("Unknown"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_BANK = "bank"; + private String bank; + + /** + * Gets or Sets permissions + */ + public enum PermissionsEnum { + CREDITONLY("CreditOnly"), + + DEBITONLY("DebitOnly"), + + CREDITANDDEBIT("CreditAndDebit"); + + private String value; + + PermissionsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PermissionsEnum fromValue(String value) { + for (PermissionsEnum b : PermissionsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PERMISSIONS = "permissions"; + private PermissionsEnum permissions; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public Counterparty1Attributes() { + } + + public Counterparty1Attributes routingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; + } + + /** + * Get routingNumber + * @return routingNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getRoutingNumber() { + return routingNumber; + } + + + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + } + + + public Counterparty1Attributes accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getAccountNumber() { + return accountNumber; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Counterparty1Attributes accountType(AccountTypeEnum accountType) { + this.accountType = accountType; + return this; + } + + /** + * Get accountType + * @return accountType + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AccountTypeEnum getAccountType() { + return accountType; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountType(AccountTypeEnum accountType) { + this.accountType = accountType; + } + + + public Counterparty1Attributes type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public Counterparty1Attributes name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public Counterparty1Attributes bank(String bank) { + this.bank = bank; + return this; + } + + /** + * Get bank + * @return bank + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BANK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBank() { + return bank; + } + + + @JsonProperty(JSON_PROPERTY_BANK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBank(String bank) { + this.bank = bank; + } + + + public Counterparty1Attributes permissions(PermissionsEnum permissions) { + this.permissions = permissions; + return this; + } + + /** + * Get permissions + * @return permissions + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PERMISSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PermissionsEnum getPermissions() { + return permissions; + } + + + @JsonProperty(JSON_PROPERTY_PERMISSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPermissions(PermissionsEnum permissions) { + this.permissions = permissions; + } + + + public Counterparty1Attributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public Counterparty1Attributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + /** + * Return true if this counterparty_1_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Counterparty1Attributes counterparty1Attributes = (Counterparty1Attributes) o; + return Objects.equals(this.routingNumber, counterparty1Attributes.routingNumber) && + Objects.equals(this.accountNumber, counterparty1Attributes.accountNumber) && + Objects.equals(this.accountType, counterparty1Attributes.accountType) && + Objects.equals(this.type, counterparty1Attributes.type) && + Objects.equals(this.name, counterparty1Attributes.name) && + Objects.equals(this.bank, counterparty1Attributes.bank) && + Objects.equals(this.permissions, counterparty1Attributes.permissions) && + Objects.equals(this.tags, counterparty1Attributes.tags) && + Objects.equals(this.createdAt, counterparty1Attributes.createdAt); + } + + @Override + public int hashCode() { + return Objects.hash(routingNumber, accountNumber, accountType, type, name, bank, permissions, tags, createdAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Counterparty1Attributes {\n"); + sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" bank: ").append(toIndentedString(bank)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `routingNumber` to the URL query string + if (getRoutingNumber() != null) { + joiner.add(String.format("%sroutingNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRoutingNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add(String.format("%saccountNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `accountType` to the URL query string + if (getAccountType() != null) { + joiner.add(String.format("%saccountType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `bank` to the URL query string + if (getBank() != null) { + joiner.add(String.format("%sbank%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBank()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `permissions` to the URL query string + if (getPermissions() != null) { + joiner.add(String.format("%spermissions%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPermissions()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Counterparty2.java b/src/main/java/unit/java/sdk/model/Counterparty2.java new file mode 100644 index 00000000..fbfb5686 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Counterparty2.java @@ -0,0 +1,222 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Counterparty2 + */ +@JsonPropertyOrder({ + Counterparty2.JSON_PROPERTY_ROUTING_NUMBER, + Counterparty2.JSON_PROPERTY_ACCOUNT_NUMBER, + Counterparty2.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Counterparty2 { + public static final String JSON_PROPERTY_ROUTING_NUMBER = "routingNumber"; + private String routingNumber; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + private String accountNumber; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public Counterparty2() { + } + + public Counterparty2 routingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; + } + + /** + * Get routingNumber + * @return routingNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getRoutingNumber() { + return routingNumber; + } + + + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + } + + + public Counterparty2 accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getAccountNumber() { + return accountNumber; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Counterparty2 name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + /** + * Return true if this counterparty_2 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Counterparty2 counterparty2 = (Counterparty2) o; + return Objects.equals(this.routingNumber, counterparty2.routingNumber) && + Objects.equals(this.accountNumber, counterparty2.accountNumber) && + Objects.equals(this.name, counterparty2.name); + } + + @Override + public int hashCode() { + return Objects.hash(routingNumber, accountNumber, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Counterparty2 {\n"); + sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `routingNumber` to the URL query string + if (getRoutingNumber() != null) { + joiner.add(String.format("%sroutingNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRoutingNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add(String.format("%saccountNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CounterpartyAccountRelationship.java b/src/main/java/unit/java/sdk/model/CounterpartyAccountRelationship.java new file mode 100644 index 00000000..ba802c80 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CounterpartyAccountRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CounterpartyAccountRelationshipData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CounterpartyAccountRelationship + */ +@JsonPropertyOrder({ + CounterpartyAccountRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CounterpartyAccountRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private CounterpartyAccountRelationshipData data; + + public CounterpartyAccountRelationship() { + } + + public CounterpartyAccountRelationship data(CounterpartyAccountRelationshipData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CounterpartyAccountRelationshipData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(CounterpartyAccountRelationshipData data) { + this.data = data; + } + + + /** + * Return true if this counterpartyAccountRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CounterpartyAccountRelationship counterpartyAccountRelationship = (CounterpartyAccountRelationship) o; + return Objects.equals(this.data, counterpartyAccountRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CounterpartyAccountRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CounterpartyAccountRelationship1.java b/src/main/java/unit/java/sdk/model/CounterpartyAccountRelationship1.java new file mode 100644 index 00000000..768c0073 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CounterpartyAccountRelationship1.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RelationshipsAccountData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CounterpartyAccountRelationship1 + */ +@JsonPropertyOrder({ + CounterpartyAccountRelationship1.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CounterpartyAccountRelationship1 { + public static final String JSON_PROPERTY_DATA = "data"; + private RelationshipsAccountData data; + + public CounterpartyAccountRelationship1() { + } + + public CounterpartyAccountRelationship1 data(RelationshipsAccountData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RelationshipsAccountData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(RelationshipsAccountData data) { + this.data = data; + } + + + /** + * Return true if this counterpartyAccountRelationship_1 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CounterpartyAccountRelationship1 counterpartyAccountRelationship1 = (CounterpartyAccountRelationship1) o; + return Objects.equals(this.data, counterpartyAccountRelationship1.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CounterpartyAccountRelationship1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CounterpartyAccountRelationshipData.java b/src/main/java/unit/java/sdk/model/CounterpartyAccountRelationshipData.java new file mode 100644 index 00000000..d3e15b99 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CounterpartyAccountRelationshipData.java @@ -0,0 +1,221 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CounterpartyAccountRelationshipData + */ +@JsonPropertyOrder({ + CounterpartyAccountRelationshipData.JSON_PROPERTY_TYPE, + CounterpartyAccountRelationshipData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CounterpartyAccountRelationshipData { + /** + * Gets or Sets type + */ + public enum TypeEnum { + ACCOUNT("account"), + + DEPOSITACCOUNT("depositAccount"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public CounterpartyAccountRelationshipData() { + } + + public CounterpartyAccountRelationshipData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public CounterpartyAccountRelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this counterpartyAccountRelationship_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CounterpartyAccountRelationshipData counterpartyAccountRelationshipData = (CounterpartyAccountRelationshipData) o; + return Objects.equals(this.type, counterpartyAccountRelationshipData.type) && + Objects.equals(this.id, counterpartyAccountRelationshipData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CounterpartyAccountRelationshipData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CounterpartyBalance.java b/src/main/java/unit/java/sdk/model/CounterpartyBalance.java new file mode 100644 index 00000000..33a26d47 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CounterpartyBalance.java @@ -0,0 +1,260 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CounterpartyBalanceAttributes; +import unit.java.sdk.model.CounterpartyBalanceRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CounterpartyBalance + */ +@JsonPropertyOrder({ + CounterpartyBalance.JSON_PROPERTY_TYPE, + CounterpartyBalance.JSON_PROPERTY_ID, + CounterpartyBalance.JSON_PROPERTY_ATTRIBUTES, + CounterpartyBalance.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CounterpartyBalance { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "counterpartyBalance"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CounterpartyBalanceAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CounterpartyBalanceRelationships relationships; + + public CounterpartyBalance() { + } + + public CounterpartyBalance type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CounterpartyBalance id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + public CounterpartyBalance attributes(CounterpartyBalanceAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CounterpartyBalanceAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(CounterpartyBalanceAttributes attributes) { + this.attributes = attributes; + } + + + public CounterpartyBalance relationships(CounterpartyBalanceRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CounterpartyBalanceRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CounterpartyBalanceRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this counterparty_balance object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CounterpartyBalance counterpartyBalance = (CounterpartyBalance) o; + return Objects.equals(this.type, counterpartyBalance.type) && + Objects.equals(this.id, counterpartyBalance.id) && + Objects.equals(this.attributes, counterpartyBalance.attributes) && + Objects.equals(this.relationships, counterpartyBalance.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CounterpartyBalance {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CounterpartyBalanceAttributes.java b/src/main/java/unit/java/sdk/model/CounterpartyBalanceAttributes.java new file mode 100644 index 00000000..272cdcca --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CounterpartyBalanceAttributes.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CounterpartyBalanceAttributes + */ +@JsonPropertyOrder({ + CounterpartyBalanceAttributes.JSON_PROPERTY_BALANCE, + CounterpartyBalanceAttributes.JSON_PROPERTY_AVAILABLE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CounterpartyBalanceAttributes { + public static final String JSON_PROPERTY_BALANCE = "balance"; + private BigDecimal balance; + + public static final String JSON_PROPERTY_AVAILABLE = "available"; + private BigDecimal available; + + public CounterpartyBalanceAttributes() { + } + + public CounterpartyBalanceAttributes balance(BigDecimal balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(BigDecimal balance) { + this.balance = balance; + } + + + public CounterpartyBalanceAttributes available(BigDecimal available) { + this.available = available; + return this; + } + + /** + * Get available + * @return available + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getAvailable() { + return available; + } + + + @JsonProperty(JSON_PROPERTY_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAvailable(BigDecimal available) { + this.available = available; + } + + + /** + * Return true if this counterparty_balance_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CounterpartyBalanceAttributes counterpartyBalanceAttributes = (CounterpartyBalanceAttributes) o; + return Objects.equals(this.balance, counterpartyBalanceAttributes.balance) && + Objects.equals(this.available, counterpartyBalanceAttributes.available); + } + + @Override + public int hashCode() { + return Objects.hash(balance, available); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CounterpartyBalanceAttributes {\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" available: ").append(toIndentedString(available)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `available` to the URL query string + if (getAvailable() != null) { + joiner.add(String.format("%savailable%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAvailable()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CounterpartyBalanceRelationships.java b/src/main/java/unit/java/sdk/model/CounterpartyBalanceRelationships.java new file mode 100644 index 00000000..f12befb8 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CounterpartyBalanceRelationships.java @@ -0,0 +1,188 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CounterpartyBalanceRelationshipsCounterparty; +import unit.java.sdk.model.RelationshipsCustomer; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CounterpartyBalanceRelationships + */ +@JsonPropertyOrder({ + CounterpartyBalanceRelationships.JSON_PROPERTY_COUNTERPARTY, + CounterpartyBalanceRelationships.JSON_PROPERTY_CUSTOMER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CounterpartyBalanceRelationships { + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; + private CounterpartyBalanceRelationshipsCounterparty counterparty; + + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private RelationshipsCustomer customer; + + public CounterpartyBalanceRelationships() { + } + + public CounterpartyBalanceRelationships counterparty(CounterpartyBalanceRelationshipsCounterparty counterparty) { + this.counterparty = counterparty; + return this; + } + + /** + * Get counterparty + * @return counterparty + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CounterpartyBalanceRelationshipsCounterparty getCounterparty() { + return counterparty; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCounterparty(CounterpartyBalanceRelationshipsCounterparty counterparty) { + this.counterparty = counterparty; + } + + + public CounterpartyBalanceRelationships customer(RelationshipsCustomer customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RelationshipsCustomer getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomer(RelationshipsCustomer customer) { + this.customer = customer; + } + + + /** + * Return true if this counterpartyBalanceRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CounterpartyBalanceRelationships counterpartyBalanceRelationships = (CounterpartyBalanceRelationships) o; + return Objects.equals(this.counterparty, counterpartyBalanceRelationships.counterparty) && + Objects.equals(this.customer, counterpartyBalanceRelationships.customer); + } + + @Override + public int hashCode() { + return Objects.hash(counterparty, customer); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CounterpartyBalanceRelationships {\n"); + sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `counterparty` to the URL query string + if (getCounterparty() != null) { + joiner.add(getCounterparty().toUrlQueryString(prefix + "counterparty" + suffix)); + } + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CounterpartyBalanceRelationshipsCounterparty.java b/src/main/java/unit/java/sdk/model/CounterpartyBalanceRelationshipsCounterparty.java new file mode 100644 index 00000000..091ef0bf --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CounterpartyBalanceRelationshipsCounterparty.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CounterpartyBalanceRelationshipsCounterpartyData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CounterpartyBalanceRelationshipsCounterparty + */ +@JsonPropertyOrder({ + CounterpartyBalanceRelationshipsCounterparty.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CounterpartyBalanceRelationshipsCounterparty { + public static final String JSON_PROPERTY_DATA = "data"; + private CounterpartyBalanceRelationshipsCounterpartyData data; + + public CounterpartyBalanceRelationshipsCounterparty() { + } + + public CounterpartyBalanceRelationshipsCounterparty data(CounterpartyBalanceRelationshipsCounterpartyData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CounterpartyBalanceRelationshipsCounterpartyData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(CounterpartyBalanceRelationshipsCounterpartyData data) { + this.data = data; + } + + + /** + * Return true if this counterpartyBalanceRelationships_counterparty object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CounterpartyBalanceRelationshipsCounterparty counterpartyBalanceRelationshipsCounterparty = (CounterpartyBalanceRelationshipsCounterparty) o; + return Objects.equals(this.data, counterpartyBalanceRelationshipsCounterparty.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CounterpartyBalanceRelationshipsCounterparty {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CounterpartyBalanceRelationshipsCounterpartyData.java b/src/main/java/unit/java/sdk/model/CounterpartyBalanceRelationshipsCounterpartyData.java new file mode 100644 index 00000000..c979bfc6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CounterpartyBalanceRelationshipsCounterpartyData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CounterpartyBalanceRelationshipsCounterpartyData + */ +@JsonPropertyOrder({ + CounterpartyBalanceRelationshipsCounterpartyData.JSON_PROPERTY_TYPE, + CounterpartyBalanceRelationshipsCounterpartyData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CounterpartyBalanceRelationshipsCounterpartyData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "counterparty"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public CounterpartyBalanceRelationshipsCounterpartyData() { + } + + public CounterpartyBalanceRelationshipsCounterpartyData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CounterpartyBalanceRelationshipsCounterpartyData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this counterpartyBalanceRelationships_counterparty_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CounterpartyBalanceRelationshipsCounterpartyData counterpartyBalanceRelationshipsCounterpartyData = (CounterpartyBalanceRelationshipsCounterpartyData) o; + return Objects.equals(this.type, counterpartyBalanceRelationshipsCounterpartyData.type) && + Objects.equals(this.id, counterpartyBalanceRelationshipsCounterpartyData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CounterpartyBalanceRelationshipsCounterpartyData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CounterpartyCustomerRelationship.java b/src/main/java/unit/java/sdk/model/CounterpartyCustomerRelationship.java new file mode 100644 index 00000000..7c00f53e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CounterpartyCustomerRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RelationshipsCustomerData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CounterpartyCustomerRelationship + */ +@JsonPropertyOrder({ + CounterpartyCustomerRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CounterpartyCustomerRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private RelationshipsCustomerData data; + + public CounterpartyCustomerRelationship() { + } + + public CounterpartyCustomerRelationship data(RelationshipsCustomerData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RelationshipsCustomerData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(RelationshipsCustomerData data) { + this.data = data; + } + + + /** + * Return true if this counterpartyCustomerRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CounterpartyCustomerRelationship counterpartyCustomerRelationship = (CounterpartyCustomerRelationship) o; + return Objects.equals(this.data, counterpartyCustomerRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CounterpartyCustomerRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CounterpartyRelationship.java b/src/main/java/unit/java/sdk/model/CounterpartyRelationship.java new file mode 100644 index 00000000..a6265687 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CounterpartyRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CounterpartyRelationshipData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CounterpartyRelationship + */ +@JsonPropertyOrder({ + CounterpartyRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CounterpartyRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private CounterpartyRelationshipData data; + + public CounterpartyRelationship() { + } + + public CounterpartyRelationship data(CounterpartyRelationshipData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CounterpartyRelationshipData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(CounterpartyRelationshipData data) { + this.data = data; + } + + + /** + * Return true if this counterpartyRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CounterpartyRelationship counterpartyRelationship = (CounterpartyRelationship) o; + return Objects.equals(this.data, counterpartyRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CounterpartyRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CounterpartyRelationshipData.java b/src/main/java/unit/java/sdk/model/CounterpartyRelationshipData.java new file mode 100644 index 00000000..6998577d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CounterpartyRelationshipData.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CounterpartyRelationshipData + */ +@JsonPropertyOrder({ + CounterpartyRelationshipData.JSON_PROPERTY_TYPE, + CounterpartyRelationshipData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CounterpartyRelationshipData { + /** + * Gets or Sets type + */ + public enum TypeEnum { + ACCOUNT("account"), + + DEPOSITACCOUNT("depositAccount"), + + COUNTERPARTY("counterparty"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public CounterpartyRelationshipData() { + } + + public CounterpartyRelationshipData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public CounterpartyRelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this counterpartyRelationship_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CounterpartyRelationshipData counterpartyRelationshipData = (CounterpartyRelationshipData) o; + return Objects.equals(this.type, counterpartyRelationshipData.type) && + Objects.equals(this.id, counterpartyRelationshipData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CounterpartyRelationshipData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CounterpartyRelationships.java b/src/main/java/unit/java/sdk/model/CounterpartyRelationships.java new file mode 100644 index 00000000..a6dccadb --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CounterpartyRelationships.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RelationshipsCustomer; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CounterpartyRelationships + */ +@JsonPropertyOrder({ + CounterpartyRelationships.JSON_PROPERTY_CUSTOMER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CounterpartyRelationships { + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private RelationshipsCustomer customer; + + public CounterpartyRelationships() { + } + + public CounterpartyRelationships customer(RelationshipsCustomer customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RelationshipsCustomer getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomer(RelationshipsCustomer customer) { + this.customer = customer; + } + + + /** + * Return true if this counterpartyRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CounterpartyRelationships counterpartyRelationships = (CounterpartyRelationships) o; + return Objects.equals(this.customer, counterpartyRelationships.customer); + } + + @Override + public int hashCode() { + return Objects.hash(customer); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CounterpartyRelationships {\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateAccount.java b/src/main/java/unit/java/sdk/model/CreateAccount.java new file mode 100644 index 00000000..d8c39b81 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateAccount.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAccountData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateAccount + */ +@JsonPropertyOrder({ + CreateAccount.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAccount { + public static final String JSON_PROPERTY_DATA = "data"; + private CreateAccountData data; + + public CreateAccount() { + } + + public CreateAccount data(CreateAccountData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateAccountData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(CreateAccountData data) { + this.data = data; + } + + + /** + * Return true if this createAccount object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAccount createAccount = (CreateAccount) o; + return Objects.equals(this.data, createAccount.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAccount {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateAccountData.java b/src/main/java/unit/java/sdk/model/CreateAccountData.java new file mode 100644 index 00000000..964c1e4b --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateAccountData.java @@ -0,0 +1,298 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCreditAccount; +import unit.java.sdk.model.CreateDepositAccount; +import unit.java.sdk.model.CreateDepositAccountAttributes; +import unit.java.sdk.model.CreateDepositAccountRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import unit.java.sdk.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = CreateAccountData.CreateAccountDataDeserializer.class) +@JsonSerialize(using = CreateAccountData.CreateAccountDataSerializer.class) +public class CreateAccountData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreateAccountData.class.getName()); + + public static class CreateAccountDataSerializer extends StdSerializer { + public CreateAccountDataSerializer(Class t) { + super(t); + } + + public CreateAccountDataSerializer() { + this(null); + } + + @Override + public void serialize(CreateAccountData value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class CreateAccountDataDeserializer extends StdDeserializer { + public CreateAccountDataDeserializer() { + this(CreateAccountData.class); + } + + public CreateAccountDataDeserializer(Class vc) { + super(vc); + } + + @Override + public CreateAccountData deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize CreateCreditAccount + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateCreditAccount.class.equals(Integer.class) || CreateCreditAccount.class.equals(Long.class) || CreateCreditAccount.class.equals(Float.class) || CreateCreditAccount.class.equals(Double.class) || CreateCreditAccount.class.equals(Boolean.class) || CreateCreditAccount.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateCreditAccount.class.equals(Integer.class) || CreateCreditAccount.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateCreditAccount.class.equals(Float.class) || CreateCreditAccount.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateCreditAccount.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateCreditAccount.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateCreditAccount.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateCreditAccount'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateCreditAccount'", e); + } + + // deserialize CreateDepositAccount + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateDepositAccount.class.equals(Integer.class) || CreateDepositAccount.class.equals(Long.class) || CreateDepositAccount.class.equals(Float.class) || CreateDepositAccount.class.equals(Double.class) || CreateDepositAccount.class.equals(Boolean.class) || CreateDepositAccount.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateDepositAccount.class.equals(Integer.class) || CreateDepositAccount.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateDepositAccount.class.equals(Float.class) || CreateDepositAccount.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateDepositAccount.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateDepositAccount.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateDepositAccount.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateDepositAccount'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateDepositAccount'", e); + } + + if (match == 1) { + CreateAccountData ret = new CreateAccountData(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for CreateAccountData: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public CreateAccountData getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "CreateAccountData cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public CreateAccountData() { + super("oneOf", Boolean.FALSE); + } + + public CreateAccountData(CreateCreditAccount o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateAccountData(CreateDepositAccount o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("CreateCreditAccount", CreateCreditAccount.class); + schemas.put("CreateDepositAccount", CreateDepositAccount.class); + JSON.registerDescendants(CreateAccountData.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return CreateAccountData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * CreateCreditAccount, CreateDepositAccount + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(CreateCreditAccount.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreateDepositAccount.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be CreateCreditAccount, CreateDepositAccount"); + } + + /** + * Get the actual instance, which can be the following: + * CreateCreditAccount, CreateDepositAccount + * + * @return The actual instance (CreateCreditAccount, CreateDepositAccount) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateCreditAccount`. If the actual instance is not `CreateCreditAccount`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateCreditAccount` + * @throws ClassCastException if the instance is not `CreateCreditAccount` + */ + public CreateCreditAccount getCreateCreditAccount() throws ClassCastException { + return (CreateCreditAccount)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateDepositAccount`. If the actual instance is not `CreateDepositAccount`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateDepositAccount` + * @throws ClassCastException if the instance is not `CreateDepositAccount` + */ + public CreateDepositAccount getCreateDepositAccount() throws ClassCastException { + return (CreateDepositAccount)super.getActualInstance(); + } + + + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof CreateCreditAccount) { + if (getActualInstance() != null) { + joiner.add(((CreateCreditAccount)getActualInstance()).toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateDepositAccount) { + if (getActualInstance() != null) { + joiner.add(((CreateDepositAccount)getActualInstance()).toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } + +} + diff --git a/src/main/java/unit/java/sdk/model/CreateAchCounterparty.java b/src/main/java/unit/java/sdk/model/CreateAchCounterparty.java new file mode 100644 index 00000000..8ec16ac0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateAchCounterparty.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchCounterpartyAttributes; +import unit.java.sdk.model.CreateCounterpartyRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateAchCounterparty + */ +@JsonPropertyOrder({ + CreateAchCounterparty.JSON_PROPERTY_TYPE, + CreateAchCounterparty.JSON_PROPERTY_ATTRIBUTES, + CreateAchCounterparty.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAchCounterparty { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateAchCounterpartyAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateCounterpartyRelationships relationships; + + public CreateAchCounterparty() { + } + + public CreateAchCounterparty type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CreateAchCounterparty attributes(CreateAchCounterpartyAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateAchCounterpartyAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateAchCounterpartyAttributes attributes) { + this.attributes = attributes; + } + + + public CreateAchCounterparty relationships(CreateCounterpartyRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateCounterpartyRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateCounterpartyRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreateAchCounterparty object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAchCounterparty createAchCounterparty = (CreateAchCounterparty) o; + return Objects.equals(this.type, createAchCounterparty.type) && + Objects.equals(this.attributes, createAchCounterparty.attributes) && + Objects.equals(this.relationships, createAchCounterparty.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAchCounterparty {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateAchCounterpartyAttributes.java b/src/main/java/unit/java/sdk/model/CreateAchCounterpartyAttributes.java new file mode 100644 index 00000000..a340abf4 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateAchCounterpartyAttributes.java @@ -0,0 +1,513 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateAchCounterpartyAttributes + */ +@JsonPropertyOrder({ + CreateAchCounterpartyAttributes.JSON_PROPERTY_ROUTING_NUMBER, + CreateAchCounterpartyAttributes.JSON_PROPERTY_ACCOUNT_NUMBER, + CreateAchCounterpartyAttributes.JSON_PROPERTY_ACCOUNT_TYPE, + CreateAchCounterpartyAttributes.JSON_PROPERTY_PERMISSIONS, + CreateAchCounterpartyAttributes.JSON_PROPERTY_TYPE, + CreateAchCounterpartyAttributes.JSON_PROPERTY_NAME, + CreateAchCounterpartyAttributes.JSON_PROPERTY_TAGS, + CreateAchCounterpartyAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAchCounterpartyAttributes { + public static final String JSON_PROPERTY_ROUTING_NUMBER = "routingNumber"; + private String routingNumber; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + private String accountNumber; + + /** + * Gets or Sets accountType + */ + public enum AccountTypeEnum { + CHECKING("Checking"), + + SAVINGS("Savings"), + + LOAN("Loan"); + + private String value; + + AccountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AccountTypeEnum fromValue(String value) { + for (AccountTypeEnum b : AccountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ACCOUNT_TYPE = "accountType"; + private AccountTypeEnum accountType; + + /** + * Gets or Sets permissions + */ + public enum PermissionsEnum { + CREDITONLY("CreditOnly"), + + DEBITONLY("DebitOnly"), + + CREDITANDDEBIT("CreditAndDebit"); + + private String value; + + PermissionsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PermissionsEnum fromValue(String value) { + for (PermissionsEnum b : PermissionsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PERMISSIONS = "permissions"; + private PermissionsEnum permissions; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + BUSINESS("Business"), + + PERSON("Person"), + + UNKNOWN("Unknown"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public CreateAchCounterpartyAttributes() { + } + + public CreateAchCounterpartyAttributes routingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; + } + + /** + * Get routingNumber + * @return routingNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getRoutingNumber() { + return routingNumber; + } + + + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + } + + + public CreateAchCounterpartyAttributes accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getAccountNumber() { + return accountNumber; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public CreateAchCounterpartyAttributes accountType(AccountTypeEnum accountType) { + this.accountType = accountType; + return this; + } + + /** + * Get accountType + * @return accountType + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AccountTypeEnum getAccountType() { + return accountType; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountType(AccountTypeEnum accountType) { + this.accountType = accountType; + } + + + public CreateAchCounterpartyAttributes permissions(PermissionsEnum permissions) { + this.permissions = permissions; + return this; + } + + /** + * Get permissions + * @return permissions + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERMISSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PermissionsEnum getPermissions() { + return permissions; + } + + + @JsonProperty(JSON_PROPERTY_PERMISSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPermissions(PermissionsEnum permissions) { + this.permissions = permissions; + } + + + public CreateAchCounterpartyAttributes type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public CreateAchCounterpartyAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public CreateAchCounterpartyAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateAchCounterpartyAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + /** + * Return true if this CreateAchCounterparty_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAchCounterpartyAttributes createAchCounterpartyAttributes = (CreateAchCounterpartyAttributes) o; + return Objects.equals(this.routingNumber, createAchCounterpartyAttributes.routingNumber) && + Objects.equals(this.accountNumber, createAchCounterpartyAttributes.accountNumber) && + Objects.equals(this.accountType, createAchCounterpartyAttributes.accountType) && + Objects.equals(this.permissions, createAchCounterpartyAttributes.permissions) && + Objects.equals(this.type, createAchCounterpartyAttributes.type) && + Objects.equals(this.name, createAchCounterpartyAttributes.name) && + Objects.equals(this.tags, createAchCounterpartyAttributes.tags) && + Objects.equals(this.idempotencyKey, createAchCounterpartyAttributes.idempotencyKey); + } + + @Override + public int hashCode() { + return Objects.hash(routingNumber, accountNumber, accountType, permissions, type, name, tags, idempotencyKey); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAchCounterpartyAttributes {\n"); + sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `routingNumber` to the URL query string + if (getRoutingNumber() != null) { + joiner.add(String.format("%sroutingNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRoutingNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add(String.format("%saccountNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `accountType` to the URL query string + if (getAccountType() != null) { + joiner.add(String.format("%saccountType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `permissions` to the URL query string + if (getPermissions() != null) { + joiner.add(String.format("%spermissions%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPermissions()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateAchPayment.java b/src/main/java/unit/java/sdk/model/CreateAchPayment.java new file mode 100644 index 00000000..bc9b044c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateAchPayment.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchPaymentAttributes; +import unit.java.sdk.model.CreateAchPaymentRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateAchPayment + */ +@JsonPropertyOrder({ + CreateAchPayment.JSON_PROPERTY_TYPE, + CreateAchPayment.JSON_PROPERTY_ATTRIBUTES, + CreateAchPayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAchPayment { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "achPayment"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateAchPaymentAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateAchPaymentRelationships relationships; + + public CreateAchPayment() { + } + + public CreateAchPayment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public CreateAchPayment attributes(CreateAchPaymentAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateAchPaymentAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateAchPaymentAttributes attributes) { + this.attributes = attributes; + } + + + public CreateAchPayment relationships(CreateAchPaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateAchPaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateAchPaymentRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreateAchPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAchPayment createAchPayment = (CreateAchPayment) o; + return Objects.equals(this.type, createAchPayment.type) && + Objects.equals(this.attributes, createAchPayment.attributes) && + Objects.equals(this.relationships, createAchPayment.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAchPayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateAchPaymentAttributes.java b/src/main/java/unit/java/sdk/model/CreateAchPaymentAttributes.java new file mode 100644 index 00000000..0efecef0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateAchPaymentAttributes.java @@ -0,0 +1,511 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateAchPaymentAttributes + */ +@JsonPropertyOrder({ + CreateAchPaymentAttributes.JSON_PROPERTY_AMOUNT, + CreateAchPaymentAttributes.JSON_PROPERTY_DESCRIPTION, + CreateAchPaymentAttributes.JSON_PROPERTY_ADDENDA, + CreateAchPaymentAttributes.JSON_PROPERTY_DIRECTION, + CreateAchPaymentAttributes.JSON_PROPERTY_COUNTERPARTY, + CreateAchPaymentAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateAchPaymentAttributes.JSON_PROPERTY_SAME_DAY, + CreateAchPaymentAttributes.JSON_PROPERTY_TAGS, + CreateAchPaymentAttributes.JSON_PROPERTY_SEC_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAchPaymentAttributes { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ADDENDA = "addenda"; + private String addenda; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + DEBIT("Debit"), + + CREDIT("Credit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; + private Counterparty counterparty; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_SAME_DAY = "sameDay"; + private Boolean sameDay; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + /** + * Gets or Sets secCode + */ + public enum SecCodeEnum { + WEB("WEB"), + + CCD("CCD"), + + PPD("PPD"); + + private String value; + + SecCodeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SecCodeEnum fromValue(String value) { + for (SecCodeEnum b : SecCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SEC_CODE = "secCode"; + private SecCodeEnum secCode; + + public CreateAchPaymentAttributes() { + } + + public CreateAchPaymentAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CreateAchPaymentAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public CreateAchPaymentAttributes addenda(String addenda) { + this.addenda = addenda; + return this; + } + + /** + * Get addenda + * @return addenda + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAddenda() { + return addenda; + } + + + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddenda(String addenda) { + this.addenda = addenda; + } + + + public CreateAchPaymentAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public CreateAchPaymentAttributes counterparty(Counterparty counterparty) { + this.counterparty = counterparty; + return this; + } + + /** + * Get counterparty + * @return counterparty + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Counterparty getCounterparty() { + return counterparty; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCounterparty(Counterparty counterparty) { + this.counterparty = counterparty; + } + + + public CreateAchPaymentAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateAchPaymentAttributes sameDay(Boolean sameDay) { + this.sameDay = sameDay; + return this; + } + + /** + * Get sameDay + * @return sameDay + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAME_DAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSameDay() { + return sameDay; + } + + + @JsonProperty(JSON_PROPERTY_SAME_DAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSameDay(Boolean sameDay) { + this.sameDay = sameDay; + } + + + public CreateAchPaymentAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateAchPaymentAttributes secCode(SecCodeEnum secCode) { + this.secCode = secCode; + return this; + } + + /** + * Get secCode + * @return secCode + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEC_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SecCodeEnum getSecCode() { + return secCode; + } + + + @JsonProperty(JSON_PROPERTY_SEC_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSecCode(SecCodeEnum secCode) { + this.secCode = secCode; + } + + + /** + * Return true if this CreateAchPayment_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAchPaymentAttributes createAchPaymentAttributes = (CreateAchPaymentAttributes) o; + return Objects.equals(this.amount, createAchPaymentAttributes.amount) && + Objects.equals(this.description, createAchPaymentAttributes.description) && + Objects.equals(this.addenda, createAchPaymentAttributes.addenda) && + Objects.equals(this.direction, createAchPaymentAttributes.direction) && + Objects.equals(this.counterparty, createAchPaymentAttributes.counterparty) && + Objects.equals(this.idempotencyKey, createAchPaymentAttributes.idempotencyKey) && + Objects.equals(this.sameDay, createAchPaymentAttributes.sameDay) && + Objects.equals(this.tags, createAchPaymentAttributes.tags) && + Objects.equals(this.secCode, createAchPaymentAttributes.secCode); + } + + @Override + public int hashCode() { + return Objects.hash(amount, description, addenda, direction, counterparty, idempotencyKey, sameDay, tags, secCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAchPaymentAttributes {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" sameDay: ").append(toIndentedString(sameDay)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" secCode: ").append(toIndentedString(secCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `addenda` to the URL query string + if (getAddenda() != null) { + joiner.add(String.format("%saddenda%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAddenda()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterparty` to the URL query string + if (getCounterparty() != null) { + joiner.add(getCounterparty().toUrlQueryString(prefix + "counterparty" + suffix)); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sameDay` to the URL query string + if (getSameDay() != null) { + joiner.add(String.format("%ssameDay%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSameDay()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `secCode` to the URL query string + if (getSecCode() != null) { + joiner.add(String.format("%ssecCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSecCode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateAchPaymentCounterparty.java b/src/main/java/unit/java/sdk/model/CreateAchPaymentCounterparty.java new file mode 100644 index 00000000..25775f44 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateAchPaymentCounterparty.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchPaymentCounterpartyAttributes; +import unit.java.sdk.model.CreateAchPaymentCounterpartyRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateAchPaymentCounterparty + */ +@JsonPropertyOrder({ + CreateAchPaymentCounterparty.JSON_PROPERTY_TYPE, + CreateAchPaymentCounterparty.JSON_PROPERTY_ATTRIBUTES, + CreateAchPaymentCounterparty.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAchPaymentCounterparty { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "achPayment"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateAchPaymentCounterpartyAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateAchPaymentCounterpartyRelationships relationships; + + public CreateAchPaymentCounterparty() { + } + + public CreateAchPaymentCounterparty type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public CreateAchPaymentCounterparty attributes(CreateAchPaymentCounterpartyAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateAchPaymentCounterpartyAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateAchPaymentCounterpartyAttributes attributes) { + this.attributes = attributes; + } + + + public CreateAchPaymentCounterparty relationships(CreateAchPaymentCounterpartyRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateAchPaymentCounterpartyRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateAchPaymentCounterpartyRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreateAchPaymentCounterparty object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAchPaymentCounterparty createAchPaymentCounterparty = (CreateAchPaymentCounterparty) o; + return Objects.equals(this.type, createAchPaymentCounterparty.type) && + Objects.equals(this.attributes, createAchPaymentCounterparty.attributes) && + Objects.equals(this.relationships, createAchPaymentCounterparty.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAchPaymentCounterparty {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateAchPaymentCounterpartyAttributes.java b/src/main/java/unit/java/sdk/model/CreateAchPaymentCounterpartyAttributes.java new file mode 100644 index 00000000..545458ee --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateAchPaymentCounterpartyAttributes.java @@ -0,0 +1,510 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateAchPaymentCounterpartyAttributes + */ +@JsonPropertyOrder({ + CreateAchPaymentCounterpartyAttributes.JSON_PROPERTY_AMOUNT, + CreateAchPaymentCounterpartyAttributes.JSON_PROPERTY_DESCRIPTION, + CreateAchPaymentCounterpartyAttributes.JSON_PROPERTY_ADDENDA, + CreateAchPaymentCounterpartyAttributes.JSON_PROPERTY_DIRECTION, + CreateAchPaymentCounterpartyAttributes.JSON_PROPERTY_SAME_DAY, + CreateAchPaymentCounterpartyAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateAchPaymentCounterpartyAttributes.JSON_PROPERTY_TAGS, + CreateAchPaymentCounterpartyAttributes.JSON_PROPERTY_VERIFY_COUNTERPARTY_BALANCE, + CreateAchPaymentCounterpartyAttributes.JSON_PROPERTY_SEC_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAchPaymentCounterpartyAttributes { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ADDENDA = "addenda"; + private String addenda; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + DEBIT("Debit"), + + CREDIT("Credit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_SAME_DAY = "sameDay"; + private Boolean sameDay; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_VERIFY_COUNTERPARTY_BALANCE = "verifyCounterpartyBalance"; + private Boolean verifyCounterpartyBalance = false; + + /** + * Gets or Sets secCode + */ + public enum SecCodeEnum { + WEB("WEB"), + + CCD("CCD"), + + PPD("PPD"); + + private String value; + + SecCodeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SecCodeEnum fromValue(String value) { + for (SecCodeEnum b : SecCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SEC_CODE = "secCode"; + private SecCodeEnum secCode; + + public CreateAchPaymentCounterpartyAttributes() { + } + + public CreateAchPaymentCounterpartyAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CreateAchPaymentCounterpartyAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public CreateAchPaymentCounterpartyAttributes addenda(String addenda) { + this.addenda = addenda; + return this; + } + + /** + * Get addenda + * @return addenda + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAddenda() { + return addenda; + } + + + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddenda(String addenda) { + this.addenda = addenda; + } + + + public CreateAchPaymentCounterpartyAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public CreateAchPaymentCounterpartyAttributes sameDay(Boolean sameDay) { + this.sameDay = sameDay; + return this; + } + + /** + * Get sameDay + * @return sameDay + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAME_DAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSameDay() { + return sameDay; + } + + + @JsonProperty(JSON_PROPERTY_SAME_DAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSameDay(Boolean sameDay) { + this.sameDay = sameDay; + } + + + public CreateAchPaymentCounterpartyAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateAchPaymentCounterpartyAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateAchPaymentCounterpartyAttributes verifyCounterpartyBalance(Boolean verifyCounterpartyBalance) { + this.verifyCounterpartyBalance = verifyCounterpartyBalance; + return this; + } + + /** + * Get verifyCounterpartyBalance + * @return verifyCounterpartyBalance + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERIFY_COUNTERPARTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getVerifyCounterpartyBalance() { + return verifyCounterpartyBalance; + } + + + @JsonProperty(JSON_PROPERTY_VERIFY_COUNTERPARTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVerifyCounterpartyBalance(Boolean verifyCounterpartyBalance) { + this.verifyCounterpartyBalance = verifyCounterpartyBalance; + } + + + public CreateAchPaymentCounterpartyAttributes secCode(SecCodeEnum secCode) { + this.secCode = secCode; + return this; + } + + /** + * Get secCode + * @return secCode + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEC_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SecCodeEnum getSecCode() { + return secCode; + } + + + @JsonProperty(JSON_PROPERTY_SEC_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSecCode(SecCodeEnum secCode) { + this.secCode = secCode; + } + + + /** + * Return true if this CreateAchPaymentCounterparty_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAchPaymentCounterpartyAttributes createAchPaymentCounterpartyAttributes = (CreateAchPaymentCounterpartyAttributes) o; + return Objects.equals(this.amount, createAchPaymentCounterpartyAttributes.amount) && + Objects.equals(this.description, createAchPaymentCounterpartyAttributes.description) && + Objects.equals(this.addenda, createAchPaymentCounterpartyAttributes.addenda) && + Objects.equals(this.direction, createAchPaymentCounterpartyAttributes.direction) && + Objects.equals(this.sameDay, createAchPaymentCounterpartyAttributes.sameDay) && + Objects.equals(this.idempotencyKey, createAchPaymentCounterpartyAttributes.idempotencyKey) && + Objects.equals(this.tags, createAchPaymentCounterpartyAttributes.tags) && + Objects.equals(this.verifyCounterpartyBalance, createAchPaymentCounterpartyAttributes.verifyCounterpartyBalance) && + Objects.equals(this.secCode, createAchPaymentCounterpartyAttributes.secCode); + } + + @Override + public int hashCode() { + return Objects.hash(amount, description, addenda, direction, sameDay, idempotencyKey, tags, verifyCounterpartyBalance, secCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAchPaymentCounterpartyAttributes {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" sameDay: ").append(toIndentedString(sameDay)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" verifyCounterpartyBalance: ").append(toIndentedString(verifyCounterpartyBalance)).append("\n"); + sb.append(" secCode: ").append(toIndentedString(secCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `addenda` to the URL query string + if (getAddenda() != null) { + joiner.add(String.format("%saddenda%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAddenda()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sameDay` to the URL query string + if (getSameDay() != null) { + joiner.add(String.format("%ssameDay%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSameDay()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `verifyCounterpartyBalance` to the URL query string + if (getVerifyCounterpartyBalance() != null) { + joiner.add(String.format("%sverifyCounterpartyBalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVerifyCounterpartyBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `secCode` to the URL query string + if (getSecCode() != null) { + joiner.add(String.format("%ssecCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSecCode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateAchPaymentCounterpartyRelationships.java b/src/main/java/unit/java/sdk/model/CreateAchPaymentCounterpartyRelationships.java new file mode 100644 index 00000000..677cfae7 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateAchPaymentCounterpartyRelationships.java @@ -0,0 +1,188 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountRelationship; +import unit.java.sdk.model.CounterpartyRelationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateAchPaymentCounterpartyRelationships + */ +@JsonPropertyOrder({ + CreateAchPaymentCounterpartyRelationships.JSON_PROPERTY_ACCOUNT, + CreateAchPaymentCounterpartyRelationships.JSON_PROPERTY_COUNTERPARTY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAchPaymentCounterpartyRelationships { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private AccountRelationship account; + + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; + private CounterpartyRelationship counterparty; + + public CreateAchPaymentCounterpartyRelationships() { + } + + public CreateAchPaymentCounterpartyRelationships account(AccountRelationship account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AccountRelationship getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(AccountRelationship account) { + this.account = account; + } + + + public CreateAchPaymentCounterpartyRelationships counterparty(CounterpartyRelationship counterparty) { + this.counterparty = counterparty; + return this; + } + + /** + * Get counterparty + * @return counterparty + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CounterpartyRelationship getCounterparty() { + return counterparty; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCounterparty(CounterpartyRelationship counterparty) { + this.counterparty = counterparty; + } + + + /** + * Return true if this CreateAchPaymentCounterparty_relationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAchPaymentCounterpartyRelationships createAchPaymentCounterpartyRelationships = (CreateAchPaymentCounterpartyRelationships) o; + return Objects.equals(this.account, createAchPaymentCounterpartyRelationships.account) && + Objects.equals(this.counterparty, createAchPaymentCounterpartyRelationships.counterparty); + } + + @Override + public int hashCode() { + return Objects.hash(account, counterparty); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAchPaymentCounterpartyRelationships {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `counterparty` to the URL query string + if (getCounterparty() != null) { + joiner.add(getCounterparty().toUrlQueryString(prefix + "counterparty" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateAchPaymentPlaid.java b/src/main/java/unit/java/sdk/model/CreateAchPaymentPlaid.java new file mode 100644 index 00000000..3374f8f9 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateAchPaymentPlaid.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchPaymentPlaidAttributes; +import unit.java.sdk.model.CreateAchPaymentRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateAchPaymentPlaid + */ +@JsonPropertyOrder({ + CreateAchPaymentPlaid.JSON_PROPERTY_TYPE, + CreateAchPaymentPlaid.JSON_PROPERTY_ATTRIBUTES, + CreateAchPaymentPlaid.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAchPaymentPlaid { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "achPayment"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateAchPaymentPlaidAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateAchPaymentRelationships relationships; + + public CreateAchPaymentPlaid() { + } + + public CreateAchPaymentPlaid type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public CreateAchPaymentPlaid attributes(CreateAchPaymentPlaidAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateAchPaymentPlaidAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateAchPaymentPlaidAttributes attributes) { + this.attributes = attributes; + } + + + public CreateAchPaymentPlaid relationships(CreateAchPaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateAchPaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateAchPaymentRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreateAchPaymentPlaid object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAchPaymentPlaid createAchPaymentPlaid = (CreateAchPaymentPlaid) o; + return Objects.equals(this.type, createAchPaymentPlaid.type) && + Objects.equals(this.attributes, createAchPaymentPlaid.attributes) && + Objects.equals(this.relationships, createAchPaymentPlaid.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAchPaymentPlaid {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateAchPaymentPlaidAttributes.java b/src/main/java/unit/java/sdk/model/CreateAchPaymentPlaidAttributes.java new file mode 100644 index 00000000..e73cd7a0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateAchPaymentPlaidAttributes.java @@ -0,0 +1,582 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateAchPaymentPlaidAttributes + */ +@JsonPropertyOrder({ + CreateAchPaymentPlaidAttributes.JSON_PROPERTY_AMOUNT, + CreateAchPaymentPlaidAttributes.JSON_PROPERTY_DESCRIPTION, + CreateAchPaymentPlaidAttributes.JSON_PROPERTY_ADDENDA, + CreateAchPaymentPlaidAttributes.JSON_PROPERTY_DIRECTION, + CreateAchPaymentPlaidAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateAchPaymentPlaidAttributes.JSON_PROPERTY_TAGS, + CreateAchPaymentPlaidAttributes.JSON_PROPERTY_PLAID_PROCESSOR_TOKEN, + CreateAchPaymentPlaidAttributes.JSON_PROPERTY_COUNTERPARTY_NAME, + CreateAchPaymentPlaidAttributes.JSON_PROPERTY_SAME_DAY, + CreateAchPaymentPlaidAttributes.JSON_PROPERTY_VERIFY_COUNTERPARTY_BALANCE, + CreateAchPaymentPlaidAttributes.JSON_PROPERTY_SEC_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAchPaymentPlaidAttributes { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ADDENDA = "addenda"; + private String addenda; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + DEBIT("Debit"), + + CREDIT("Credit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_PLAID_PROCESSOR_TOKEN = "plaidProcessorToken"; + private String plaidProcessorToken; + + public static final String JSON_PROPERTY_COUNTERPARTY_NAME = "counterpartyName"; + private String counterpartyName; + + public static final String JSON_PROPERTY_SAME_DAY = "sameDay"; + private Boolean sameDay; + + public static final String JSON_PROPERTY_VERIFY_COUNTERPARTY_BALANCE = "verifyCounterpartyBalance"; + private Boolean verifyCounterpartyBalance = false; + + /** + * Gets or Sets secCode + */ + public enum SecCodeEnum { + WEB("WEB"), + + CCD("CCD"), + + PPD("PPD"); + + private String value; + + SecCodeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SecCodeEnum fromValue(String value) { + for (SecCodeEnum b : SecCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SEC_CODE = "secCode"; + private SecCodeEnum secCode; + + public CreateAchPaymentPlaidAttributes() { + } + + public CreateAchPaymentPlaidAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CreateAchPaymentPlaidAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public CreateAchPaymentPlaidAttributes addenda(String addenda) { + this.addenda = addenda; + return this; + } + + /** + * Get addenda + * @return addenda + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAddenda() { + return addenda; + } + + + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddenda(String addenda) { + this.addenda = addenda; + } + + + public CreateAchPaymentPlaidAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public CreateAchPaymentPlaidAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateAchPaymentPlaidAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateAchPaymentPlaidAttributes plaidProcessorToken(String plaidProcessorToken) { + this.plaidProcessorToken = plaidProcessorToken; + return this; + } + + /** + * Get plaidProcessorToken + * @return plaidProcessorToken + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PLAID_PROCESSOR_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getPlaidProcessorToken() { + return plaidProcessorToken; + } + + + @JsonProperty(JSON_PROPERTY_PLAID_PROCESSOR_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPlaidProcessorToken(String plaidProcessorToken) { + this.plaidProcessorToken = plaidProcessorToken; + } + + + public CreateAchPaymentPlaidAttributes counterpartyName(String counterpartyName) { + this.counterpartyName = counterpartyName; + return this; + } + + /** + * Get counterpartyName + * @return counterpartyName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCounterpartyName() { + return counterpartyName; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterpartyName(String counterpartyName) { + this.counterpartyName = counterpartyName; + } + + + public CreateAchPaymentPlaidAttributes sameDay(Boolean sameDay) { + this.sameDay = sameDay; + return this; + } + + /** + * Get sameDay + * @return sameDay + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAME_DAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSameDay() { + return sameDay; + } + + + @JsonProperty(JSON_PROPERTY_SAME_DAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSameDay(Boolean sameDay) { + this.sameDay = sameDay; + } + + + public CreateAchPaymentPlaidAttributes verifyCounterpartyBalance(Boolean verifyCounterpartyBalance) { + this.verifyCounterpartyBalance = verifyCounterpartyBalance; + return this; + } + + /** + * Get verifyCounterpartyBalance + * @return verifyCounterpartyBalance + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERIFY_COUNTERPARTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getVerifyCounterpartyBalance() { + return verifyCounterpartyBalance; + } + + + @JsonProperty(JSON_PROPERTY_VERIFY_COUNTERPARTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVerifyCounterpartyBalance(Boolean verifyCounterpartyBalance) { + this.verifyCounterpartyBalance = verifyCounterpartyBalance; + } + + + public CreateAchPaymentPlaidAttributes secCode(SecCodeEnum secCode) { + this.secCode = secCode; + return this; + } + + /** + * Get secCode + * @return secCode + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEC_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SecCodeEnum getSecCode() { + return secCode; + } + + + @JsonProperty(JSON_PROPERTY_SEC_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSecCode(SecCodeEnum secCode) { + this.secCode = secCode; + } + + + /** + * Return true if this CreateAchPaymentPlaid_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAchPaymentPlaidAttributes createAchPaymentPlaidAttributes = (CreateAchPaymentPlaidAttributes) o; + return Objects.equals(this.amount, createAchPaymentPlaidAttributes.amount) && + Objects.equals(this.description, createAchPaymentPlaidAttributes.description) && + Objects.equals(this.addenda, createAchPaymentPlaidAttributes.addenda) && + Objects.equals(this.direction, createAchPaymentPlaidAttributes.direction) && + Objects.equals(this.idempotencyKey, createAchPaymentPlaidAttributes.idempotencyKey) && + Objects.equals(this.tags, createAchPaymentPlaidAttributes.tags) && + Objects.equals(this.plaidProcessorToken, createAchPaymentPlaidAttributes.plaidProcessorToken) && + Objects.equals(this.counterpartyName, createAchPaymentPlaidAttributes.counterpartyName) && + Objects.equals(this.sameDay, createAchPaymentPlaidAttributes.sameDay) && + Objects.equals(this.verifyCounterpartyBalance, createAchPaymentPlaidAttributes.verifyCounterpartyBalance) && + Objects.equals(this.secCode, createAchPaymentPlaidAttributes.secCode); + } + + @Override + public int hashCode() { + return Objects.hash(amount, description, addenda, direction, idempotencyKey, tags, plaidProcessorToken, counterpartyName, sameDay, verifyCounterpartyBalance, secCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAchPaymentPlaidAttributes {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" plaidProcessorToken: ").append(toIndentedString(plaidProcessorToken)).append("\n"); + sb.append(" counterpartyName: ").append(toIndentedString(counterpartyName)).append("\n"); + sb.append(" sameDay: ").append(toIndentedString(sameDay)).append("\n"); + sb.append(" verifyCounterpartyBalance: ").append(toIndentedString(verifyCounterpartyBalance)).append("\n"); + sb.append(" secCode: ").append(toIndentedString(secCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `addenda` to the URL query string + if (getAddenda() != null) { + joiner.add(String.format("%saddenda%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAddenda()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `plaidProcessorToken` to the URL query string + if (getPlaidProcessorToken() != null) { + joiner.add(String.format("%splaidProcessorToken%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPlaidProcessorToken()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterpartyName` to the URL query string + if (getCounterpartyName() != null) { + joiner.add(String.format("%scounterpartyName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCounterpartyName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sameDay` to the URL query string + if (getSameDay() != null) { + joiner.add(String.format("%ssameDay%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSameDay()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `verifyCounterpartyBalance` to the URL query string + if (getVerifyCounterpartyBalance() != null) { + joiner.add(String.format("%sverifyCounterpartyBalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVerifyCounterpartyBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `secCode` to the URL query string + if (getSecCode() != null) { + joiner.add(String.format("%ssecCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSecCode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateAchPaymentRelationships.java b/src/main/java/unit/java/sdk/model/CreateAchPaymentRelationships.java new file mode 100644 index 00000000..b4bfd8fc --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateAchPaymentRelationships.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountRelationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateAchPaymentRelationships + */ +@JsonPropertyOrder({ + CreateAchPaymentRelationships.JSON_PROPERTY_ACCOUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAchPaymentRelationships { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private AccountRelationship account; + + public CreateAchPaymentRelationships() { + } + + public CreateAchPaymentRelationships account(AccountRelationship account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AccountRelationship getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(AccountRelationship account) { + this.account = account; + } + + + /** + * Return true if this CreateAchPayment_relationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAchPaymentRelationships createAchPaymentRelationships = (CreateAchPaymentRelationships) o; + return Objects.equals(this.account, createAchPaymentRelationships.account); + } + + @Override + public int hashCode() { + return Objects.hash(account); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAchPaymentRelationships {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateAchRepayment.java b/src/main/java/unit/java/sdk/model/CreateAchRepayment.java new file mode 100644 index 00000000..9ded7e5d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateAchRepayment.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchRepaymentAttributes; +import unit.java.sdk.model.CreateAchRepaymentRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateAchRepayment + */ +@JsonPropertyOrder({ + CreateAchRepayment.JSON_PROPERTY_TYPE, + CreateAchRepayment.JSON_PROPERTY_ATTRIBUTES, + CreateAchRepayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAchRepayment { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "achRepayment"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateAchRepaymentAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateAchRepaymentRelationships relationships; + + public CreateAchRepayment() { + } + + public CreateAchRepayment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CreateAchRepayment attributes(CreateAchRepaymentAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateAchRepaymentAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateAchRepaymentAttributes attributes) { + this.attributes = attributes; + } + + + public CreateAchRepayment relationships(CreateAchRepaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateAchRepaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateAchRepaymentRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreateAchRepayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAchRepayment createAchRepayment = (CreateAchRepayment) o; + return Objects.equals(this.type, createAchRepayment.type) && + Objects.equals(this.attributes, createAchRepayment.attributes) && + Objects.equals(this.relationships, createAchRepayment.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAchRepayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateAchRepaymentAttributes.java b/src/main/java/unit/java/sdk/model/CreateAchRepaymentAttributes.java new file mode 100644 index 00000000..1accc499 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateAchRepaymentAttributes.java @@ -0,0 +1,331 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateAchRepaymentAttributes + */ +@JsonPropertyOrder({ + CreateAchRepaymentAttributes.JSON_PROPERTY_AMOUNT, + CreateAchRepaymentAttributes.JSON_PROPERTY_DESCRIPTION, + CreateAchRepaymentAttributes.JSON_PROPERTY_ADDENDA, + CreateAchRepaymentAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateAchRepaymentAttributes.JSON_PROPERTY_SAME_DAY, + CreateAchRepaymentAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAchRepaymentAttributes { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ADDENDA = "addenda"; + private String addenda; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_SAME_DAY = "sameDay"; + private Boolean sameDay; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public CreateAchRepaymentAttributes() { + } + + public CreateAchRepaymentAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CreateAchRepaymentAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public CreateAchRepaymentAttributes addenda(String addenda) { + this.addenda = addenda; + return this; + } + + /** + * Get addenda + * @return addenda + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAddenda() { + return addenda; + } + + + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddenda(String addenda) { + this.addenda = addenda; + } + + + public CreateAchRepaymentAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateAchRepaymentAttributes sameDay(Boolean sameDay) { + this.sameDay = sameDay; + return this; + } + + /** + * Get sameDay + * @return sameDay + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAME_DAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSameDay() { + return sameDay; + } + + + @JsonProperty(JSON_PROPERTY_SAME_DAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSameDay(Boolean sameDay) { + this.sameDay = sameDay; + } + + + public CreateAchRepaymentAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this CreateAchRepayment_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAchRepaymentAttributes createAchRepaymentAttributes = (CreateAchRepaymentAttributes) o; + return Objects.equals(this.amount, createAchRepaymentAttributes.amount) && + Objects.equals(this.description, createAchRepaymentAttributes.description) && + Objects.equals(this.addenda, createAchRepaymentAttributes.addenda) && + Objects.equals(this.idempotencyKey, createAchRepaymentAttributes.idempotencyKey) && + Objects.equals(this.sameDay, createAchRepaymentAttributes.sameDay) && + Objects.equals(this.tags, createAchRepaymentAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(amount, description, addenda, idempotencyKey, sameDay, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAchRepaymentAttributes {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" sameDay: ").append(toIndentedString(sameDay)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `addenda` to the URL query string + if (getAddenda() != null) { + joiner.add(String.format("%saddenda%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAddenda()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sameDay` to the URL query string + if (getSameDay() != null) { + joiner.add(String.format("%ssameDay%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSameDay()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateAchRepaymentRelationships.java b/src/main/java/unit/java/sdk/model/CreateAchRepaymentRelationships.java new file mode 100644 index 00000000..e4b43dc0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateAchRepaymentRelationships.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateAchRepaymentRelationships + */ +@JsonPropertyOrder({ + CreateAchRepaymentRelationships.JSON_PROPERTY_ACCOUNT, + CreateAchRepaymentRelationships.JSON_PROPERTY_CREDIT_ACCOUNT, + CreateAchRepaymentRelationships.JSON_PROPERTY_COUNTERPARTY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAchRepaymentRelationships { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private Relationship account; + + public static final String JSON_PROPERTY_CREDIT_ACCOUNT = "creditAccount"; + private Relationship creditAccount; + + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; + private Relationship counterparty; + + public CreateAchRepaymentRelationships() { + } + + public CreateAchRepaymentRelationships account(Relationship account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationship getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(Relationship account) { + this.account = account; + } + + + public CreateAchRepaymentRelationships creditAccount(Relationship creditAccount) { + this.creditAccount = creditAccount; + return this; + } + + /** + * Get creditAccount + * @return creditAccount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREDIT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationship getCreditAccount() { + return creditAccount; + } + + + @JsonProperty(JSON_PROPERTY_CREDIT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreditAccount(Relationship creditAccount) { + this.creditAccount = creditAccount; + } + + + public CreateAchRepaymentRelationships counterparty(Relationship counterparty) { + this.counterparty = counterparty; + return this; + } + + /** + * Get counterparty + * @return counterparty + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationship getCounterparty() { + return counterparty; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCounterparty(Relationship counterparty) { + this.counterparty = counterparty; + } + + + /** + * Return true if this CreateAchRepayment_relationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAchRepaymentRelationships createAchRepaymentRelationships = (CreateAchRepaymentRelationships) o; + return Objects.equals(this.account, createAchRepaymentRelationships.account) && + Objects.equals(this.creditAccount, createAchRepaymentRelationships.creditAccount) && + Objects.equals(this.counterparty, createAchRepaymentRelationships.counterparty); + } + + @Override + public int hashCode() { + return Objects.hash(account, creditAccount, counterparty); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAchRepaymentRelationships {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" creditAccount: ").append(toIndentedString(creditAccount)).append("\n"); + sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `creditAccount` to the URL query string + if (getCreditAccount() != null) { + joiner.add(getCreditAccount().toUrlQueryString(prefix + "creditAccount" + suffix)); + } + + // add `counterparty` to the URL query string + if (getCounterparty() != null) { + joiner.add(getCounterparty().toUrlQueryString(prefix + "counterparty" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateApiToken.java b/src/main/java/unit/java/sdk/model/CreateApiToken.java new file mode 100644 index 00000000..01ab0de3 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateApiToken.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateApiTokenData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateApiToken + */ +@JsonPropertyOrder({ + CreateApiToken.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateApiToken { + public static final String JSON_PROPERTY_DATA = "data"; + private CreateApiTokenData data; + + public CreateApiToken() { + } + + public CreateApiToken data(CreateApiTokenData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateApiTokenData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(CreateApiTokenData data) { + this.data = data; + } + + + /** + * Return true if this createApiToken object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateApiToken createApiToken = (CreateApiToken) o; + return Objects.equals(this.data, createApiToken.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateApiToken {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateApiTokenData.java b/src/main/java/unit/java/sdk/model/CreateApiTokenData.java new file mode 100644 index 00000000..820c09e3 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateApiTokenData.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateApiTokenDataAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateApiTokenData + */ +@JsonPropertyOrder({ + CreateApiTokenData.JSON_PROPERTY_TYPE, + CreateApiTokenData.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateApiTokenData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "apiToken"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateApiTokenDataAttributes attributes; + + public CreateApiTokenData() { + } + + public CreateApiTokenData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CreateApiTokenData attributes(CreateApiTokenDataAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateApiTokenDataAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateApiTokenDataAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this createApiToken_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateApiTokenData createApiTokenData = (CreateApiTokenData) o; + return Objects.equals(this.type, createApiTokenData.type) && + Objects.equals(this.attributes, createApiTokenData.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateApiTokenData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateApiTokenDataAttributes.java b/src/main/java/unit/java/sdk/model/CreateApiTokenDataAttributes.java new file mode 100644 index 00000000..18d69f15 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateApiTokenDataAttributes.java @@ -0,0 +1,311 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.CreateApiTokenDataAttributesResourcesInner; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateApiTokenDataAttributes + */ +@JsonPropertyOrder({ + CreateApiTokenDataAttributes.JSON_PROPERTY_SCOPE, + CreateApiTokenDataAttributes.JSON_PROPERTY_DESCRIPTION, + CreateApiTokenDataAttributes.JSON_PROPERTY_EXPIRATION, + CreateApiTokenDataAttributes.JSON_PROPERTY_SOURCE_IP, + CreateApiTokenDataAttributes.JSON_PROPERTY_RESOURCES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateApiTokenDataAttributes { + public static final String JSON_PROPERTY_SCOPE = "scope"; + private String scope; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_EXPIRATION = "expiration"; + private OffsetDateTime expiration; + + public static final String JSON_PROPERTY_SOURCE_IP = "sourceIp"; + private String sourceIp; + + public static final String JSON_PROPERTY_RESOURCES = "resources"; + private List resources; + + public CreateApiTokenDataAttributes() { + } + + public CreateApiTokenDataAttributes scope(String scope) { + this.scope = scope; + return this; + } + + /** + * Get scope + * @return scope + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getScope() { + return scope; + } + + + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScope(String scope) { + this.scope = scope; + } + + + public CreateApiTokenDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public CreateApiTokenDataAttributes expiration(OffsetDateTime expiration) { + this.expiration = expiration; + return this; + } + + /** + * Get expiration + * @return expiration + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXPIRATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getExpiration() { + return expiration; + } + + + @JsonProperty(JSON_PROPERTY_EXPIRATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExpiration(OffsetDateTime expiration) { + this.expiration = expiration; + } + + + public CreateApiTokenDataAttributes sourceIp(String sourceIp) { + this.sourceIp = sourceIp; + return this; + } + + /** + * Get sourceIp + * @return sourceIp + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSourceIp() { + return sourceIp; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceIp(String sourceIp) { + this.sourceIp = sourceIp; + } + + + public CreateApiTokenDataAttributes resources(List resources) { + this.resources = resources; + return this; + } + + public CreateApiTokenDataAttributes addResourcesItem(CreateApiTokenDataAttributesResourcesInner resourcesItem) { + if (this.resources == null) { + this.resources = new ArrayList<>(); + } + this.resources.add(resourcesItem); + return this; + } + + /** + * Get resources + * @return resources + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getResources() { + return resources; + } + + + @JsonProperty(JSON_PROPERTY_RESOURCES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResources(List resources) { + this.resources = resources; + } + + + /** + * Return true if this createApiToken_data_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateApiTokenDataAttributes createApiTokenDataAttributes = (CreateApiTokenDataAttributes) o; + return Objects.equals(this.scope, createApiTokenDataAttributes.scope) && + Objects.equals(this.description, createApiTokenDataAttributes.description) && + Objects.equals(this.expiration, createApiTokenDataAttributes.expiration) && + Objects.equals(this.sourceIp, createApiTokenDataAttributes.sourceIp) && + Objects.equals(this.resources, createApiTokenDataAttributes.resources); + } + + @Override + public int hashCode() { + return Objects.hash(scope, description, expiration, sourceIp, resources); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateApiTokenDataAttributes {\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" expiration: ").append(toIndentedString(expiration)).append("\n"); + sb.append(" sourceIp: ").append(toIndentedString(sourceIp)).append("\n"); + sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `scope` to the URL query string + if (getScope() != null) { + joiner.add(String.format("%sscope%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getScope()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `expiration` to the URL query string + if (getExpiration() != null) { + joiner.add(String.format("%sexpiration%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getExpiration()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sourceIp` to the URL query string + if (getSourceIp() != null) { + joiner.add(String.format("%ssourceIp%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSourceIp()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `resources` to the URL query string + if (getResources() != null) { + for (int i = 0; i < getResources().size(); i++) { + if (getResources().get(i) != null) { + joiner.add(getResources().get(i).toUrlQueryString(String.format("%sresources%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateApiTokenDataAttributesResourcesInner.java b/src/main/java/unit/java/sdk/model/CreateApiTokenDataAttributesResourcesInner.java new file mode 100644 index 00000000..2b73a6df --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateApiTokenDataAttributesResourcesInner.java @@ -0,0 +1,235 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateApiTokenDataAttributesResourcesInner + */ +@JsonPropertyOrder({ + CreateApiTokenDataAttributesResourcesInner.JSON_PROPERTY_TYPE, + CreateApiTokenDataAttributesResourcesInner.JSON_PROPERTY_IDS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateApiTokenDataAttributesResourcesInner { + /** + * Gets or Sets type + */ + public enum TypeEnum { + CARD("card"), + + ACCOUNT("account"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_IDS = "ids"; + private List ids; + + public CreateApiTokenDataAttributesResourcesInner() { + } + + public CreateApiTokenDataAttributesResourcesInner type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public CreateApiTokenDataAttributesResourcesInner ids(List ids) { + this.ids = ids; + return this; + } + + public CreateApiTokenDataAttributesResourcesInner addIdsItem(String idsItem) { + if (this.ids == null) { + this.ids = new ArrayList<>(); + } + this.ids.add(idsItem); + return this; + } + + /** + * Get ids + * @return ids + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getIds() { + return ids; + } + + + @JsonProperty(JSON_PROPERTY_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIds(List ids) { + this.ids = ids; + } + + + /** + * Return true if this createApiToken_data_attributes_resources_inner object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateApiTokenDataAttributesResourcesInner createApiTokenDataAttributesResourcesInner = (CreateApiTokenDataAttributesResourcesInner) o; + return Objects.equals(this.type, createApiTokenDataAttributesResourcesInner.type) && + Objects.equals(this.ids, createApiTokenDataAttributesResourcesInner.ids); + } + + @Override + public int hashCode() { + return Objects.hash(type, ids); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateApiTokenDataAttributesResourcesInner {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" ids: ").append(toIndentedString(ids)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ids` to the URL query string + if (getIds() != null) { + for (int i = 0; i < getIds().size(); i++) { + joiner.add(String.format("%sids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getIds().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateApplication.java b/src/main/java/unit/java/sdk/model/CreateApplication.java new file mode 100644 index 00000000..1ce9482a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateApplication.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateApplicationData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateApplication + */ +@JsonPropertyOrder({ + CreateApplication.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateApplication { + public static final String JSON_PROPERTY_DATA = "data"; + private CreateApplicationData data; + + public CreateApplication() { + } + + public CreateApplication data(CreateApplicationData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateApplicationData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(CreateApplicationData data) { + this.data = data; + } + + + /** + * Return true if this createApplication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateApplication createApplication = (CreateApplication) o; + return Objects.equals(this.data, createApplication.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateApplication {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateApplicationData.java b/src/main/java/unit/java/sdk/model/CreateApplicationData.java new file mode 100644 index 00000000..17415045 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateApplicationData.java @@ -0,0 +1,407 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBusinessApplication; +import unit.java.sdk.model.CreateIndividualApplication; +import unit.java.sdk.model.CreateSoleProprietorApplication; +import unit.java.sdk.model.CreateTrustApplication; +import unit.java.sdk.model.CreateTrustApplicationAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import unit.java.sdk.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = CreateApplicationData.CreateApplicationDataDeserializer.class) +@JsonSerialize(using = CreateApplicationData.CreateApplicationDataSerializer.class) +public class CreateApplicationData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreateApplicationData.class.getName()); + + public static class CreateApplicationDataSerializer extends StdSerializer { + public CreateApplicationDataSerializer(Class t) { + super(t); + } + + public CreateApplicationDataSerializer() { + this(null); + } + + @Override + public void serialize(CreateApplicationData value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class CreateApplicationDataDeserializer extends StdDeserializer { + public CreateApplicationDataDeserializer() { + this(CreateApplicationData.class); + } + + public CreateApplicationDataDeserializer(Class vc) { + super(vc); + } + + @Override + public CreateApplicationData deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize CreateBusinessApplication + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateBusinessApplication.class.equals(Integer.class) || CreateBusinessApplication.class.equals(Long.class) || CreateBusinessApplication.class.equals(Float.class) || CreateBusinessApplication.class.equals(Double.class) || CreateBusinessApplication.class.equals(Boolean.class) || CreateBusinessApplication.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateBusinessApplication.class.equals(Integer.class) || CreateBusinessApplication.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateBusinessApplication.class.equals(Float.class) || CreateBusinessApplication.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateBusinessApplication.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateBusinessApplication.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateBusinessApplication.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateBusinessApplication'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateBusinessApplication'", e); + } + + // deserialize CreateIndividualApplication + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateIndividualApplication.class.equals(Integer.class) || CreateIndividualApplication.class.equals(Long.class) || CreateIndividualApplication.class.equals(Float.class) || CreateIndividualApplication.class.equals(Double.class) || CreateIndividualApplication.class.equals(Boolean.class) || CreateIndividualApplication.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateIndividualApplication.class.equals(Integer.class) || CreateIndividualApplication.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateIndividualApplication.class.equals(Float.class) || CreateIndividualApplication.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateIndividualApplication.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateIndividualApplication.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateIndividualApplication.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateIndividualApplication'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateIndividualApplication'", e); + } + + // deserialize CreateSoleProprietorApplication + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateSoleProprietorApplication.class.equals(Integer.class) || CreateSoleProprietorApplication.class.equals(Long.class) || CreateSoleProprietorApplication.class.equals(Float.class) || CreateSoleProprietorApplication.class.equals(Double.class) || CreateSoleProprietorApplication.class.equals(Boolean.class) || CreateSoleProprietorApplication.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateSoleProprietorApplication.class.equals(Integer.class) || CreateSoleProprietorApplication.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateSoleProprietorApplication.class.equals(Float.class) || CreateSoleProprietorApplication.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateSoleProprietorApplication.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateSoleProprietorApplication.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateSoleProprietorApplication.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateSoleProprietorApplication'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateSoleProprietorApplication'", e); + } + + // deserialize CreateTrustApplication + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateTrustApplication.class.equals(Integer.class) || CreateTrustApplication.class.equals(Long.class) || CreateTrustApplication.class.equals(Float.class) || CreateTrustApplication.class.equals(Double.class) || CreateTrustApplication.class.equals(Boolean.class) || CreateTrustApplication.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateTrustApplication.class.equals(Integer.class) || CreateTrustApplication.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateTrustApplication.class.equals(Float.class) || CreateTrustApplication.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateTrustApplication.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateTrustApplication.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateTrustApplication.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateTrustApplication'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateTrustApplication'", e); + } + + if (match == 1) { + CreateApplicationData ret = new CreateApplicationData(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for CreateApplicationData: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public CreateApplicationData getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "CreateApplicationData cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public CreateApplicationData() { + super("oneOf", Boolean.FALSE); + } + + public CreateApplicationData(CreateBusinessApplication o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateApplicationData(CreateIndividualApplication o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateApplicationData(CreateSoleProprietorApplication o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateApplicationData(CreateTrustApplication o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("CreateBusinessApplication", CreateBusinessApplication.class); + schemas.put("CreateIndividualApplication", CreateIndividualApplication.class); + schemas.put("CreateSoleProprietorApplication", CreateSoleProprietorApplication.class); + schemas.put("CreateTrustApplication", CreateTrustApplication.class); + JSON.registerDescendants(CreateApplicationData.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return CreateApplicationData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * CreateBusinessApplication, CreateIndividualApplication, CreateSoleProprietorApplication, CreateTrustApplication + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(CreateBusinessApplication.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreateIndividualApplication.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreateSoleProprietorApplication.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreateTrustApplication.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be CreateBusinessApplication, CreateIndividualApplication, CreateSoleProprietorApplication, CreateTrustApplication"); + } + + /** + * Get the actual instance, which can be the following: + * CreateBusinessApplication, CreateIndividualApplication, CreateSoleProprietorApplication, CreateTrustApplication + * + * @return The actual instance (CreateBusinessApplication, CreateIndividualApplication, CreateSoleProprietorApplication, CreateTrustApplication) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateBusinessApplication`. If the actual instance is not `CreateBusinessApplication`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateBusinessApplication` + * @throws ClassCastException if the instance is not `CreateBusinessApplication` + */ + public CreateBusinessApplication getCreateBusinessApplication() throws ClassCastException { + return (CreateBusinessApplication)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateIndividualApplication`. If the actual instance is not `CreateIndividualApplication`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateIndividualApplication` + * @throws ClassCastException if the instance is not `CreateIndividualApplication` + */ + public CreateIndividualApplication getCreateIndividualApplication() throws ClassCastException { + return (CreateIndividualApplication)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateSoleProprietorApplication`. If the actual instance is not `CreateSoleProprietorApplication`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateSoleProprietorApplication` + * @throws ClassCastException if the instance is not `CreateSoleProprietorApplication` + */ + public CreateSoleProprietorApplication getCreateSoleProprietorApplication() throws ClassCastException { + return (CreateSoleProprietorApplication)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateTrustApplication`. If the actual instance is not `CreateTrustApplication`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateTrustApplication` + * @throws ClassCastException if the instance is not `CreateTrustApplication` + */ + public CreateTrustApplication getCreateTrustApplication() throws ClassCastException { + return (CreateTrustApplication)super.getActualInstance(); + } + + + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof CreateIndividualApplication) { + if (getActualInstance() != null) { + joiner.add(((CreateIndividualApplication)getActualInstance()).toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateSoleProprietorApplication) { + if (getActualInstance() != null) { + joiner.add(((CreateSoleProprietorApplication)getActualInstance()).toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateBusinessApplication) { + if (getActualInstance() != null) { + joiner.add(((CreateBusinessApplication)getActualInstance()).toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateTrustApplication) { + if (getActualInstance() != null) { + joiner.add(((CreateTrustApplication)getActualInstance()).toUrlQueryString(prefix + "one_of_3" + suffix)); + } + return joiner.toString(); + } + return null; + } + +} + diff --git a/src/main/java/unit/java/sdk/model/CreateApplicationForm.java b/src/main/java/unit/java/sdk/model/CreateApplicationForm.java new file mode 100644 index 00000000..a223d1f6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateApplicationForm.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateApplicationFormData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateApplicationForm + */ +@JsonPropertyOrder({ + CreateApplicationForm.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateApplicationForm { + public static final String JSON_PROPERTY_DATA = "data"; + private CreateApplicationFormData data; + + public CreateApplicationForm() { + } + + public CreateApplicationForm data(CreateApplicationFormData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateApplicationFormData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(CreateApplicationFormData data) { + this.data = data; + } + + + /** + * Return true if this createApplicationForm object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateApplicationForm createApplicationForm = (CreateApplicationForm) o; + return Objects.equals(this.data, createApplicationForm.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateApplicationForm {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateApplicationFormData.java b/src/main/java/unit/java/sdk/model/CreateApplicationFormData.java new file mode 100644 index 00000000..2932c324 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateApplicationFormData.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateApplicationFormDataAttributes; +import unit.java.sdk.model.CreateApplicationFormRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateApplicationFormData + */ +@JsonPropertyOrder({ + CreateApplicationFormData.JSON_PROPERTY_TYPE, + CreateApplicationFormData.JSON_PROPERTY_ATTRIBUTES, + CreateApplicationFormData.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateApplicationFormData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "applicationForm"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateApplicationFormDataAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateApplicationFormRelationships relationships; + + public CreateApplicationFormData() { + } + + public CreateApplicationFormData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CreateApplicationFormData attributes(CreateApplicationFormDataAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateApplicationFormDataAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(CreateApplicationFormDataAttributes attributes) { + this.attributes = attributes; + } + + + public CreateApplicationFormData relationships(CreateApplicationFormRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateApplicationFormRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(CreateApplicationFormRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this createApplicationForm_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateApplicationFormData createApplicationFormData = (CreateApplicationFormData) o; + return Objects.equals(this.type, createApplicationFormData.type) && + Objects.equals(this.attributes, createApplicationFormData.attributes) && + Objects.equals(this.relationships, createApplicationFormData.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateApplicationFormData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateApplicationFormDataAttributes.java b/src/main/java/unit/java/sdk/model/CreateApplicationFormDataAttributes.java new file mode 100644 index 00000000..0dafa1a9 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateApplicationFormDataAttributes.java @@ -0,0 +1,455 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.ApplicationFormPrefill; +import unit.java.sdk.model.ApplicationFormSettingsOverride; +import unit.java.sdk.model.RequireIdVerification; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateApplicationFormDataAttributes + */ +@JsonPropertyOrder({ + CreateApplicationFormDataAttributes.JSON_PROPERTY_TAGS, + CreateApplicationFormDataAttributes.JSON_PROPERTY_APPLICANT_DETAILS, + CreateApplicationFormDataAttributes.JSON_PROPERTY_SETTINGS_OVERRIDE, + CreateApplicationFormDataAttributes.JSON_PROPERTY_REQUIRE_ID_VERIFICATION, + CreateApplicationFormDataAttributes.JSON_PROPERTY_ALLOWED_APPLICATION_TYPES, + CreateApplicationFormDataAttributes.JSON_PROPERTY_LANG, + CreateApplicationFormDataAttributes.JSON_PROPERTY_HIDE_APPLICATION_PROGRESS_TRACKER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateApplicationFormDataAttributes { + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_APPLICANT_DETAILS = "applicantDetails"; + private ApplicationFormPrefill applicantDetails; + + public static final String JSON_PROPERTY_SETTINGS_OVERRIDE = "settingsOverride"; + private ApplicationFormSettingsOverride settingsOverride; + + public static final String JSON_PROPERTY_REQUIRE_ID_VERIFICATION = "requireIdVerification"; + private RequireIdVerification requireIdVerification; + + /** + * Gets or Sets allowedApplicationTypes + */ + public enum AllowedApplicationTypesEnum { + INDIVIDUAL("Individual"), + + BUSINESS("Business"), + + SOLEPROPRIETORSHIP("SoleProprietorship"); + + private String value; + + AllowedApplicationTypesEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AllowedApplicationTypesEnum fromValue(String value) { + for (AllowedApplicationTypesEnum b : AllowedApplicationTypesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ALLOWED_APPLICATION_TYPES = "allowedApplicationTypes"; + private List allowedApplicationTypes; + + /** + * Gets or Sets lang + */ + public enum LangEnum { + EN("en"), + + ES("es"); + + private String value; + + LangEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LangEnum fromValue(String value) { + for (LangEnum b : LangEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_LANG = "lang"; + private LangEnum lang; + + public static final String JSON_PROPERTY_HIDE_APPLICATION_PROGRESS_TRACKER = "hideApplicationProgressTracker"; + private Boolean hideApplicationProgressTracker; + + public CreateApplicationFormDataAttributes() { + } + + public CreateApplicationFormDataAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateApplicationFormDataAttributes applicantDetails(ApplicationFormPrefill applicantDetails) { + this.applicantDetails = applicantDetails; + return this; + } + + /** + * Get applicantDetails + * @return applicantDetails + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLICANT_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApplicationFormPrefill getApplicantDetails() { + return applicantDetails; + } + + + @JsonProperty(JSON_PROPERTY_APPLICANT_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setApplicantDetails(ApplicationFormPrefill applicantDetails) { + this.applicantDetails = applicantDetails; + } + + + public CreateApplicationFormDataAttributes settingsOverride(ApplicationFormSettingsOverride settingsOverride) { + this.settingsOverride = settingsOverride; + return this; + } + + /** + * Get settingsOverride + * @return settingsOverride + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApplicationFormSettingsOverride getSettingsOverride() { + return settingsOverride; + } + + + @JsonProperty(JSON_PROPERTY_SETTINGS_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSettingsOverride(ApplicationFormSettingsOverride settingsOverride) { + this.settingsOverride = settingsOverride; + } + + + public CreateApplicationFormDataAttributes requireIdVerification(RequireIdVerification requireIdVerification) { + this.requireIdVerification = requireIdVerification; + return this; + } + + /** + * Get requireIdVerification + * @return requireIdVerification + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRE_ID_VERIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RequireIdVerification getRequireIdVerification() { + return requireIdVerification; + } + + + @JsonProperty(JSON_PROPERTY_REQUIRE_ID_VERIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequireIdVerification(RequireIdVerification requireIdVerification) { + this.requireIdVerification = requireIdVerification; + } + + + public CreateApplicationFormDataAttributes allowedApplicationTypes(List allowedApplicationTypes) { + this.allowedApplicationTypes = allowedApplicationTypes; + return this; + } + + public CreateApplicationFormDataAttributes addAllowedApplicationTypesItem(AllowedApplicationTypesEnum allowedApplicationTypesItem) { + if (this.allowedApplicationTypes == null) { + this.allowedApplicationTypes = new ArrayList<>(); + } + this.allowedApplicationTypes.add(allowedApplicationTypesItem); + return this; + } + + /** + * Get allowedApplicationTypes + * @return allowedApplicationTypes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOWED_APPLICATION_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getAllowedApplicationTypes() { + return allowedApplicationTypes; + } + + + @JsonProperty(JSON_PROPERTY_ALLOWED_APPLICATION_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowedApplicationTypes(List allowedApplicationTypes) { + this.allowedApplicationTypes = allowedApplicationTypes; + } + + + public CreateApplicationFormDataAttributes lang(LangEnum lang) { + this.lang = lang; + return this; + } + + /** + * Get lang + * @return lang + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LANG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LangEnum getLang() { + return lang; + } + + + @JsonProperty(JSON_PROPERTY_LANG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLang(LangEnum lang) { + this.lang = lang; + } + + + public CreateApplicationFormDataAttributes hideApplicationProgressTracker(Boolean hideApplicationProgressTracker) { + this.hideApplicationProgressTracker = hideApplicationProgressTracker; + return this; + } + + /** + * Get hideApplicationProgressTracker + * @return hideApplicationProgressTracker + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HIDE_APPLICATION_PROGRESS_TRACKER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getHideApplicationProgressTracker() { + return hideApplicationProgressTracker; + } + + + @JsonProperty(JSON_PROPERTY_HIDE_APPLICATION_PROGRESS_TRACKER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHideApplicationProgressTracker(Boolean hideApplicationProgressTracker) { + this.hideApplicationProgressTracker = hideApplicationProgressTracker; + } + + + /** + * Return true if this createApplicationForm_data_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateApplicationFormDataAttributes createApplicationFormDataAttributes = (CreateApplicationFormDataAttributes) o; + return Objects.equals(this.tags, createApplicationFormDataAttributes.tags) && + Objects.equals(this.applicantDetails, createApplicationFormDataAttributes.applicantDetails) && + Objects.equals(this.settingsOverride, createApplicationFormDataAttributes.settingsOverride) && + Objects.equals(this.requireIdVerification, createApplicationFormDataAttributes.requireIdVerification) && + Objects.equals(this.allowedApplicationTypes, createApplicationFormDataAttributes.allowedApplicationTypes) && + Objects.equals(this.lang, createApplicationFormDataAttributes.lang) && + Objects.equals(this.hideApplicationProgressTracker, createApplicationFormDataAttributes.hideApplicationProgressTracker); + } + + @Override + public int hashCode() { + return Objects.hash(tags, applicantDetails, settingsOverride, requireIdVerification, allowedApplicationTypes, lang, hideApplicationProgressTracker); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateApplicationFormDataAttributes {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" applicantDetails: ").append(toIndentedString(applicantDetails)).append("\n"); + sb.append(" settingsOverride: ").append(toIndentedString(settingsOverride)).append("\n"); + sb.append(" requireIdVerification: ").append(toIndentedString(requireIdVerification)).append("\n"); + sb.append(" allowedApplicationTypes: ").append(toIndentedString(allowedApplicationTypes)).append("\n"); + sb.append(" lang: ").append(toIndentedString(lang)).append("\n"); + sb.append(" hideApplicationProgressTracker: ").append(toIndentedString(hideApplicationProgressTracker)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `applicantDetails` to the URL query string + if (getApplicantDetails() != null) { + joiner.add(getApplicantDetails().toUrlQueryString(prefix + "applicantDetails" + suffix)); + } + + // add `settingsOverride` to the URL query string + if (getSettingsOverride() != null) { + joiner.add(getSettingsOverride().toUrlQueryString(prefix + "settingsOverride" + suffix)); + } + + // add `requireIdVerification` to the URL query string + if (getRequireIdVerification() != null) { + joiner.add(getRequireIdVerification().toUrlQueryString(prefix + "requireIdVerification" + suffix)); + } + + // add `allowedApplicationTypes` to the URL query string + if (getAllowedApplicationTypes() != null) { + for (int i = 0; i < getAllowedApplicationTypes().size(); i++) { + joiner.add(String.format("%sallowedApplicationTypes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getAllowedApplicationTypes().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `lang` to the URL query string + if (getLang() != null) { + joiner.add(String.format("%slang%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLang()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `hideApplicationProgressTracker` to the URL query string + if (getHideApplicationProgressTracker() != null) { + joiner.add(String.format("%shideApplicationProgressTracker%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getHideApplicationProgressTracker()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateApplicationFormRelationships.java b/src/main/java/unit/java/sdk/model/CreateApplicationFormRelationships.java new file mode 100644 index 00000000..e42802da --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateApplicationFormRelationships.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateApplicationFormRelationships + */ +@JsonPropertyOrder({ + CreateApplicationFormRelationships.JSON_PROPERTY_APPLICATION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateApplicationFormRelationships { + public static final String JSON_PROPERTY_APPLICATION = "application"; + private Relationship application; + + public CreateApplicationFormRelationships() { + } + + public CreateApplicationFormRelationships application(Relationship application) { + this.application = application; + return this; + } + + /** + * Get application + * @return application + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Relationship getApplication() { + return application; + } + + + @JsonProperty(JSON_PROPERTY_APPLICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setApplication(Relationship application) { + this.application = application; + } + + + /** + * Return true if this createApplicationFormRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateApplicationFormRelationships createApplicationFormRelationships = (CreateApplicationFormRelationships) o; + return Objects.equals(this.application, createApplicationFormRelationships.application); + } + + @Override + public int hashCode() { + return Objects.hash(application); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateApplicationFormRelationships {\n"); + sb.append(" application: ").append(toIndentedString(application)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `application` to the URL query string + if (getApplication() != null) { + joiner.add(getApplication().toUrlQueryString(prefix + "application" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateBeneficialOwner.java b/src/main/java/unit/java/sdk/model/CreateBeneficialOwner.java new file mode 100644 index 00000000..3588df4c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateBeneficialOwner.java @@ -0,0 +1,628 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.EvaluationParams; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.SourceOfIncome; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateBeneficialOwner + */ +@JsonPropertyOrder({ + CreateBeneficialOwner.JSON_PROPERTY_FULL_NAME, + CreateBeneficialOwner.JSON_PROPERTY_EMAIL, + CreateBeneficialOwner.JSON_PROPERTY_PHONE, + CreateBeneficialOwner.JSON_PROPERTY_SSN, + CreateBeneficialOwner.JSON_PROPERTY_PASSPORT, + CreateBeneficialOwner.JSON_PROPERTY_NATIONALITY, + CreateBeneficialOwner.JSON_PROPERTY_MATRICULA_CONSULAR, + CreateBeneficialOwner.JSON_PROPERTY_ADDRESS, + CreateBeneficialOwner.JSON_PROPERTY_DATE_OF_BIRTH, + CreateBeneficialOwner.JSON_PROPERTY_PERCENTAGE, + CreateBeneficialOwner.JSON_PROPERTY_EVALUATION_PARAMS, + CreateBeneficialOwner.JSON_PROPERTY_OCCUPATION, + CreateBeneficialOwner.JSON_PROPERTY_ANNUAL_INCOME, + CreateBeneficialOwner.JSON_PROPERTY_SOURCE_OF_INCOME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBeneficialOwner { + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_SSN = "ssn"; + private String ssn; + + public static final String JSON_PROPERTY_PASSPORT = "passport"; + private String passport; + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public static final String JSON_PROPERTY_MATRICULA_CONSULAR = "matriculaConsular"; + private String matriculaConsular; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public static final String JSON_PROPERTY_PERCENTAGE = "percentage"; + private Integer percentage; + + public static final String JSON_PROPERTY_EVALUATION_PARAMS = "evaluationParams"; + private EvaluationParams evaluationParams; + + public static final String JSON_PROPERTY_OCCUPATION = "occupation"; + private Occupation occupation; + + public static final String JSON_PROPERTY_ANNUAL_INCOME = "annualIncome"; + private AnnualIncome annualIncome; + + public static final String JSON_PROPERTY_SOURCE_OF_INCOME = "sourceOfIncome"; + private SourceOfIncome sourceOfIncome; + + public CreateBeneficialOwner() { + } + + public CreateBeneficialOwner fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public CreateBeneficialOwner email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEmail(String email) { + this.email = email; + } + + + public CreateBeneficialOwner phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public CreateBeneficialOwner ssn(String ssn) { + this.ssn = ssn; + return this; + } + + /** + * Get ssn + * @return ssn + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSsn() { + return ssn; + } + + + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSsn(String ssn) { + this.ssn = ssn; + } + + + public CreateBeneficialOwner passport(String passport) { + this.passport = passport; + return this; + } + + /** + * Get passport + * @return passport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassport() { + return passport; + } + + + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassport(String passport) { + this.passport = passport; + } + + + public CreateBeneficialOwner nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * Get nationality + * @return nationality + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + public CreateBeneficialOwner matriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + return this; + } + + /** + * Get matriculaConsular + * @return matriculaConsular + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMatriculaConsular() { + return matriculaConsular; + } + + + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMatriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + } + + + public CreateBeneficialOwner address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(Address address) { + this.address = address; + } + + + public CreateBeneficialOwner dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + public CreateBeneficialOwner percentage(Integer percentage) { + this.percentage = percentage; + return this; + } + + /** + * Get percentage + * minimum: 0 + * maximum: 100 + * @return percentage + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERCENTAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getPercentage() { + return percentage; + } + + + @JsonProperty(JSON_PROPERTY_PERCENTAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPercentage(Integer percentage) { + this.percentage = percentage; + } + + + public CreateBeneficialOwner evaluationParams(EvaluationParams evaluationParams) { + this.evaluationParams = evaluationParams; + return this; + } + + /** + * Get evaluationParams + * @return evaluationParams + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EvaluationParams getEvaluationParams() { + return evaluationParams; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationParams(EvaluationParams evaluationParams) { + this.evaluationParams = evaluationParams; + } + + + public CreateBeneficialOwner occupation(Occupation occupation) { + this.occupation = occupation; + return this; + } + + /** + * Get occupation + * @return occupation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Occupation getOccupation() { + return occupation; + } + + + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOccupation(Occupation occupation) { + this.occupation = occupation; + } + + + public CreateBeneficialOwner annualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + return this; + } + + /** + * Get annualIncome + * @return annualIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnnualIncome getAnnualIncome() { + return annualIncome; + } + + + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + } + + + public CreateBeneficialOwner sourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + return this; + } + + /** + * Get sourceOfIncome + * @return sourceOfIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SourceOfIncome getSourceOfIncome() { + return sourceOfIncome; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + } + + + /** + * Return true if this createBeneficialOwner object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBeneficialOwner createBeneficialOwner = (CreateBeneficialOwner) o; + return Objects.equals(this.fullName, createBeneficialOwner.fullName) && + Objects.equals(this.email, createBeneficialOwner.email) && + Objects.equals(this.phone, createBeneficialOwner.phone) && + Objects.equals(this.ssn, createBeneficialOwner.ssn) && + Objects.equals(this.passport, createBeneficialOwner.passport) && + Objects.equals(this.nationality, createBeneficialOwner.nationality) && + Objects.equals(this.matriculaConsular, createBeneficialOwner.matriculaConsular) && + Objects.equals(this.address, createBeneficialOwner.address) && + Objects.equals(this.dateOfBirth, createBeneficialOwner.dateOfBirth) && + Objects.equals(this.percentage, createBeneficialOwner.percentage) && + Objects.equals(this.evaluationParams, createBeneficialOwner.evaluationParams) && + Objects.equals(this.occupation, createBeneficialOwner.occupation) && + Objects.equals(this.annualIncome, createBeneficialOwner.annualIncome) && + Objects.equals(this.sourceOfIncome, createBeneficialOwner.sourceOfIncome); + } + + @Override + public int hashCode() { + return Objects.hash(fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, percentage, evaluationParams, occupation, annualIncome, sourceOfIncome); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBeneficialOwner {\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); + sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" percentage: ").append(toIndentedString(percentage)).append("\n"); + sb.append(" evaluationParams: ").append(toIndentedString(evaluationParams)).append("\n"); + sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); + sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); + sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `ssn` to the URL query string + if (getSsn() != null) { + joiner.add(String.format("%sssn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSsn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `passport` to the URL query string + if (getPassport() != null) { + joiner.add(String.format("%spassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nationality` to the URL query string + if (getNationality() != null) { + joiner.add(String.format("%snationality%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNationality()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `matriculaConsular` to the URL query string + if (getMatriculaConsular() != null) { + joiner.add(String.format("%smatriculaConsular%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMatriculaConsular()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `percentage` to the URL query string + if (getPercentage() != null) { + joiner.add(String.format("%spercentage%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPercentage()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationParams` to the URL query string + if (getEvaluationParams() != null) { + joiner.add(getEvaluationParams().toUrlQueryString(prefix + "evaluationParams" + suffix)); + } + + // add `occupation` to the URL query string + if (getOccupation() != null) { + joiner.add(String.format("%soccupation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOccupation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `annualIncome` to the URL query string + if (getAnnualIncome() != null) { + joiner.add(String.format("%sannualIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAnnualIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sourceOfIncome` to the URL query string + if (getSourceOfIncome() != null) { + joiner.add(String.format("%ssourceOfIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSourceOfIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateBillPayment.java b/src/main/java/unit/java/sdk/model/CreateBillPayment.java new file mode 100644 index 00000000..2c4e6b8d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateBillPayment.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchPaymentRelationships; +import unit.java.sdk.model.CreateBillPaymentAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateBillPayment + */ +@JsonPropertyOrder({ + CreateBillPayment.JSON_PROPERTY_TYPE, + CreateBillPayment.JSON_PROPERTY_ATTRIBUTES, + CreateBillPayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBillPayment { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "billPayment"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateBillPaymentAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateAchPaymentRelationships relationships; + + public CreateBillPayment() { + } + + public CreateBillPayment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public CreateBillPayment attributes(CreateBillPaymentAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateBillPaymentAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateBillPaymentAttributes attributes) { + this.attributes = attributes; + } + + + public CreateBillPayment relationships(CreateAchPaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateAchPaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateAchPaymentRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreateBillPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBillPayment createBillPayment = (CreateBillPayment) o; + return Objects.equals(this.type, createBillPayment.type) && + Objects.equals(this.attributes, createBillPayment.attributes) && + Objects.equals(this.relationships, createBillPayment.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBillPayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateBillPaymentAttributes.java b/src/main/java/unit/java/sdk/model/CreateBillPaymentAttributes.java new file mode 100644 index 00000000..2f433ca7 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateBillPaymentAttributes.java @@ -0,0 +1,404 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import unit.java.sdk.model.FullName; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateBillPaymentAttributes + */ +@JsonPropertyOrder({ + CreateBillPaymentAttributes.JSON_PROPERTY_BILLER_ID, + CreateBillPaymentAttributes.JSON_PROPERTY_ACCOUNT_NUMBER, + CreateBillPaymentAttributes.JSON_PROPERTY_AMOUNT, + CreateBillPaymentAttributes.JSON_PROPERTY_DESCRIPTION, + CreateBillPaymentAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateBillPaymentAttributes.JSON_PROPERTY_TAGS, + CreateBillPaymentAttributes.JSON_PROPERTY_FULL_NAME, + CreateBillPaymentAttributes.JSON_PROPERTY_DATE_OF_BIRTH +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBillPaymentAttributes { + public static final String JSON_PROPERTY_BILLER_ID = "billerId"; + private String billerId; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + private String accountNumber; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public CreateBillPaymentAttributes() { + } + + public CreateBillPaymentAttributes billerId(String billerId) { + this.billerId = billerId; + return this; + } + + /** + * Get billerId + * @return billerId + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BILLER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getBillerId() { + return billerId; + } + + + @JsonProperty(JSON_PROPERTY_BILLER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBillerId(String billerId) { + this.billerId = billerId; + } + + + public CreateBillPaymentAttributes accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getAccountNumber() { + return accountNumber; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public CreateBillPaymentAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CreateBillPaymentAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public CreateBillPaymentAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateBillPaymentAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateBillPaymentAttributes fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public CreateBillPaymentAttributes dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + /** + * Return true if this CreateBillPayment_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBillPaymentAttributes createBillPaymentAttributes = (CreateBillPaymentAttributes) o; + return Objects.equals(this.billerId, createBillPaymentAttributes.billerId) && + Objects.equals(this.accountNumber, createBillPaymentAttributes.accountNumber) && + Objects.equals(this.amount, createBillPaymentAttributes.amount) && + Objects.equals(this.description, createBillPaymentAttributes.description) && + Objects.equals(this.idempotencyKey, createBillPaymentAttributes.idempotencyKey) && + Objects.equals(this.tags, createBillPaymentAttributes.tags) && + Objects.equals(this.fullName, createBillPaymentAttributes.fullName) && + Objects.equals(this.dateOfBirth, createBillPaymentAttributes.dateOfBirth); + } + + @Override + public int hashCode() { + return Objects.hash(billerId, accountNumber, amount, description, idempotencyKey, tags, fullName, dateOfBirth); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBillPaymentAttributes {\n"); + sb.append(" billerId: ").append(toIndentedString(billerId)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `billerId` to the URL query string + if (getBillerId() != null) { + joiner.add(String.format("%sbillerId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBillerId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add(String.format("%saccountNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateBookPayment.java b/src/main/java/unit/java/sdk/model/CreateBookPayment.java new file mode 100644 index 00000000..de8758d7 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateBookPayment.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBookPaymentAttributes; +import unit.java.sdk.model.CreateBookPaymentRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateBookPayment + */ +@JsonPropertyOrder({ + CreateBookPayment.JSON_PROPERTY_TYPE, + CreateBookPayment.JSON_PROPERTY_ATTRIBUTES, + CreateBookPayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBookPayment { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "bookPayment"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateBookPaymentAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateBookPaymentRelationships relationships; + + public CreateBookPayment() { + } + + public CreateBookPayment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public CreateBookPayment attributes(CreateBookPaymentAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateBookPaymentAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateBookPaymentAttributes attributes) { + this.attributes = attributes; + } + + + public CreateBookPayment relationships(CreateBookPaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateBookPaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateBookPaymentRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreateBookPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBookPayment createBookPayment = (CreateBookPayment) o; + return Objects.equals(this.type, createBookPayment.type) && + Objects.equals(this.attributes, createBookPayment.attributes) && + Objects.equals(this.relationships, createBookPayment.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBookPayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateBookPaymentAttributes.java b/src/main/java/unit/java/sdk/model/CreateBookPaymentAttributes.java new file mode 100644 index 00000000..cf0bee43 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateBookPaymentAttributes.java @@ -0,0 +1,294 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateBookPaymentAttributes + */ +@JsonPropertyOrder({ + CreateBookPaymentAttributes.JSON_PROPERTY_AMOUNT, + CreateBookPaymentAttributes.JSON_PROPERTY_DESCRIPTION, + CreateBookPaymentAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateBookPaymentAttributes.JSON_PROPERTY_TAGS, + CreateBookPaymentAttributes.JSON_PROPERTY_TRANSACTION_SUMMARY_OVERRIDE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBookPaymentAttributes { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_TRANSACTION_SUMMARY_OVERRIDE = "transactionSummaryOverride"; + private String transactionSummaryOverride; + + public CreateBookPaymentAttributes() { + } + + public CreateBookPaymentAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CreateBookPaymentAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public CreateBookPaymentAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateBookPaymentAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateBookPaymentAttributes transactionSummaryOverride(String transactionSummaryOverride) { + this.transactionSummaryOverride = transactionSummaryOverride; + return this; + } + + /** + * Get transactionSummaryOverride + * @return transactionSummaryOverride + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRANSACTION_SUMMARY_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTransactionSummaryOverride() { + return transactionSummaryOverride; + } + + + @JsonProperty(JSON_PROPERTY_TRANSACTION_SUMMARY_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransactionSummaryOverride(String transactionSummaryOverride) { + this.transactionSummaryOverride = transactionSummaryOverride; + } + + + /** + * Return true if this CreateBookPayment_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBookPaymentAttributes createBookPaymentAttributes = (CreateBookPaymentAttributes) o; + return Objects.equals(this.amount, createBookPaymentAttributes.amount) && + Objects.equals(this.description, createBookPaymentAttributes.description) && + Objects.equals(this.idempotencyKey, createBookPaymentAttributes.idempotencyKey) && + Objects.equals(this.tags, createBookPaymentAttributes.tags) && + Objects.equals(this.transactionSummaryOverride, createBookPaymentAttributes.transactionSummaryOverride); + } + + @Override + public int hashCode() { + return Objects.hash(amount, description, idempotencyKey, tags, transactionSummaryOverride); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBookPaymentAttributes {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" transactionSummaryOverride: ").append(toIndentedString(transactionSummaryOverride)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `transactionSummaryOverride` to the URL query string + if (getTransactionSummaryOverride() != null) { + joiner.add(String.format("%stransactionSummaryOverride%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTransactionSummaryOverride()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateBookPaymentRelationships.java b/src/main/java/unit/java/sdk/model/CreateBookPaymentRelationships.java new file mode 100644 index 00000000..3339d712 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateBookPaymentRelationships.java @@ -0,0 +1,188 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountRelationship; +import unit.java.sdk.model.CounterpartyAccountRelationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateBookPaymentRelationships + */ +@JsonPropertyOrder({ + CreateBookPaymentRelationships.JSON_PROPERTY_ACCOUNT, + CreateBookPaymentRelationships.JSON_PROPERTY_COUNTERPARTY_ACCOUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBookPaymentRelationships { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private AccountRelationship account; + + public static final String JSON_PROPERTY_COUNTERPARTY_ACCOUNT = "counterpartyAccount"; + private CounterpartyAccountRelationship counterpartyAccount; + + public CreateBookPaymentRelationships() { + } + + public CreateBookPaymentRelationships account(AccountRelationship account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AccountRelationship getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(AccountRelationship account) { + this.account = account; + } + + + public CreateBookPaymentRelationships counterpartyAccount(CounterpartyAccountRelationship counterpartyAccount) { + this.counterpartyAccount = counterpartyAccount; + return this; + } + + /** + * Get counterpartyAccount + * @return counterpartyAccount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CounterpartyAccountRelationship getCounterpartyAccount() { + return counterpartyAccount; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCounterpartyAccount(CounterpartyAccountRelationship counterpartyAccount) { + this.counterpartyAccount = counterpartyAccount; + } + + + /** + * Return true if this CreateBookPayment_relationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBookPaymentRelationships createBookPaymentRelationships = (CreateBookPaymentRelationships) o; + return Objects.equals(this.account, createBookPaymentRelationships.account) && + Objects.equals(this.counterpartyAccount, createBookPaymentRelationships.counterpartyAccount); + } + + @Override + public int hashCode() { + return Objects.hash(account, counterpartyAccount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBookPaymentRelationships {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" counterpartyAccount: ").append(toIndentedString(counterpartyAccount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `counterpartyAccount` to the URL query string + if (getCounterpartyAccount() != null) { + joiner.add(getCounterpartyAccount().toUrlQueryString(prefix + "counterpartyAccount" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateBookRepayment.java b/src/main/java/unit/java/sdk/model/CreateBookRepayment.java new file mode 100644 index 00000000..717f292c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateBookRepayment.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBookRepaymentAttributes; +import unit.java.sdk.model.CreateBookRepaymentRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateBookRepayment + */ +@JsonPropertyOrder({ + CreateBookRepayment.JSON_PROPERTY_TYPE, + CreateBookRepayment.JSON_PROPERTY_ATTRIBUTES, + CreateBookRepayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBookRepayment { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "bookRepayment"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateBookRepaymentAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateBookRepaymentRelationships relationships; + + public CreateBookRepayment() { + } + + public CreateBookRepayment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CreateBookRepayment attributes(CreateBookRepaymentAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateBookRepaymentAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateBookRepaymentAttributes attributes) { + this.attributes = attributes; + } + + + public CreateBookRepayment relationships(CreateBookRepaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateBookRepaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateBookRepaymentRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreateBookRepayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBookRepayment createBookRepayment = (CreateBookRepayment) o; + return Objects.equals(this.type, createBookRepayment.type) && + Objects.equals(this.attributes, createBookRepayment.attributes) && + Objects.equals(this.relationships, createBookRepayment.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBookRepayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateBookRepaymentAttributes.java b/src/main/java/unit/java/sdk/model/CreateBookRepaymentAttributes.java new file mode 100644 index 00000000..523c0961 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateBookRepaymentAttributes.java @@ -0,0 +1,295 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateBookRepaymentAttributes + */ +@JsonPropertyOrder({ + CreateBookRepaymentAttributes.JSON_PROPERTY_AMOUNT, + CreateBookRepaymentAttributes.JSON_PROPERTY_DESCRIPTION, + CreateBookRepaymentAttributes.JSON_PROPERTY_TRANSACTION_SUMMARY_OVERRIDE, + CreateBookRepaymentAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateBookRepaymentAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBookRepaymentAttributes { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_TRANSACTION_SUMMARY_OVERRIDE = "transactionSummaryOverride"; + private String transactionSummaryOverride; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public CreateBookRepaymentAttributes() { + } + + public CreateBookRepaymentAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CreateBookRepaymentAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public CreateBookRepaymentAttributes transactionSummaryOverride(String transactionSummaryOverride) { + this.transactionSummaryOverride = transactionSummaryOverride; + return this; + } + + /** + * Get transactionSummaryOverride + * @return transactionSummaryOverride + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRANSACTION_SUMMARY_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTransactionSummaryOverride() { + return transactionSummaryOverride; + } + + + @JsonProperty(JSON_PROPERTY_TRANSACTION_SUMMARY_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransactionSummaryOverride(String transactionSummaryOverride) { + this.transactionSummaryOverride = transactionSummaryOverride; + } + + + public CreateBookRepaymentAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateBookRepaymentAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this CreateBookRepayment_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBookRepaymentAttributes createBookRepaymentAttributes = (CreateBookRepaymentAttributes) o; + return Objects.equals(this.amount, createBookRepaymentAttributes.amount) && + Objects.equals(this.description, createBookRepaymentAttributes.description) && + Objects.equals(this.transactionSummaryOverride, createBookRepaymentAttributes.transactionSummaryOverride) && + Objects.equals(this.idempotencyKey, createBookRepaymentAttributes.idempotencyKey) && + Objects.equals(this.tags, createBookRepaymentAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(amount, description, transactionSummaryOverride, idempotencyKey, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBookRepaymentAttributes {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" transactionSummaryOverride: ").append(toIndentedString(transactionSummaryOverride)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `transactionSummaryOverride` to the URL query string + if (getTransactionSummaryOverride() != null) { + joiner.add(String.format("%stransactionSummaryOverride%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTransactionSummaryOverride()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateBookRepaymentRelationships.java b/src/main/java/unit/java/sdk/model/CreateBookRepaymentRelationships.java new file mode 100644 index 00000000..8d85c70b --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateBookRepaymentRelationships.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateBookRepaymentRelationships + */ +@JsonPropertyOrder({ + CreateBookRepaymentRelationships.JSON_PROPERTY_ACCOUNT, + CreateBookRepaymentRelationships.JSON_PROPERTY_CREDIT_ACCOUNT, + CreateBookRepaymentRelationships.JSON_PROPERTY_COUNTERPARTY_ACCOUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBookRepaymentRelationships { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private Relationship account; + + public static final String JSON_PROPERTY_CREDIT_ACCOUNT = "creditAccount"; + private Relationship creditAccount; + + public static final String JSON_PROPERTY_COUNTERPARTY_ACCOUNT = "counterpartyAccount"; + private Relationship counterpartyAccount; + + public CreateBookRepaymentRelationships() { + } + + public CreateBookRepaymentRelationships account(Relationship account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationship getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(Relationship account) { + this.account = account; + } + + + public CreateBookRepaymentRelationships creditAccount(Relationship creditAccount) { + this.creditAccount = creditAccount; + return this; + } + + /** + * Get creditAccount + * @return creditAccount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREDIT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationship getCreditAccount() { + return creditAccount; + } + + + @JsonProperty(JSON_PROPERTY_CREDIT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreditAccount(Relationship creditAccount) { + this.creditAccount = creditAccount; + } + + + public CreateBookRepaymentRelationships counterpartyAccount(Relationship counterpartyAccount) { + this.counterpartyAccount = counterpartyAccount; + return this; + } + + /** + * Get counterpartyAccount + * @return counterpartyAccount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationship getCounterpartyAccount() { + return counterpartyAccount; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCounterpartyAccount(Relationship counterpartyAccount) { + this.counterpartyAccount = counterpartyAccount; + } + + + /** + * Return true if this CreateBookRepayment_relationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBookRepaymentRelationships createBookRepaymentRelationships = (CreateBookRepaymentRelationships) o; + return Objects.equals(this.account, createBookRepaymentRelationships.account) && + Objects.equals(this.creditAccount, createBookRepaymentRelationships.creditAccount) && + Objects.equals(this.counterpartyAccount, createBookRepaymentRelationships.counterpartyAccount); + } + + @Override + public int hashCode() { + return Objects.hash(account, creditAccount, counterpartyAccount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBookRepaymentRelationships {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" creditAccount: ").append(toIndentedString(creditAccount)).append("\n"); + sb.append(" counterpartyAccount: ").append(toIndentedString(counterpartyAccount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `creditAccount` to the URL query string + if (getCreditAccount() != null) { + joiner.add(getCreditAccount().toUrlQueryString(prefix + "creditAccount" + suffix)); + } + + // add `counterpartyAccount` to the URL query string + if (getCounterpartyAccount() != null) { + joiner.add(getCounterpartyAccount().toUrlQueryString(prefix + "counterpartyAccount" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateBusinessApplication.java b/src/main/java/unit/java/sdk/model/CreateBusinessApplication.java new file mode 100644 index 00000000..91c21500 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateBusinessApplication.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBusinessApplicationAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateBusinessApplication + */ +@JsonPropertyOrder({ + CreateBusinessApplication.JSON_PROPERTY_TYPE, + CreateBusinessApplication.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBusinessApplication { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "businessApplication"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateBusinessApplicationAttributes attributes; + + public CreateBusinessApplication() { + } + + public CreateBusinessApplication type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CreateBusinessApplication attributes(CreateBusinessApplicationAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateBusinessApplicationAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateBusinessApplicationAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this CreateBusinessApplication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBusinessApplication createBusinessApplication = (CreateBusinessApplication) o; + return Objects.equals(this.type, createBusinessApplication.type) && + Objects.equals(this.attributes, createBusinessApplication.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBusinessApplication {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateBusinessApplicationAttributes.java b/src/main/java/unit/java/sdk/model/CreateBusinessApplicationAttributes.java new file mode 100644 index 00000000..1067feea --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateBusinessApplicationAttributes.java @@ -0,0 +1,1067 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.BusinessAnnualRevenue; +import unit.java.sdk.model.BusinessNumberOfEmployees; +import unit.java.sdk.model.BusinessVertical; +import unit.java.sdk.model.CashFlow; +import unit.java.sdk.model.Contact; +import unit.java.sdk.model.CreateBeneficialOwner; +import unit.java.sdk.model.CreateOfficer; +import unit.java.sdk.model.DeviceFingerprint; +import unit.java.sdk.model.EntityType; +import unit.java.sdk.model.Industry; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateBusinessApplicationAttributes + */ +@JsonPropertyOrder({ + CreateBusinessApplicationAttributes.JSON_PROPERTY_NAME, + CreateBusinessApplicationAttributes.JSON_PROPERTY_DBA, + CreateBusinessApplicationAttributes.JSON_PROPERTY_EIN, + CreateBusinessApplicationAttributes.JSON_PROPERTY_ENTITY_TYPE, + CreateBusinessApplicationAttributes.JSON_PROPERTY_DATE_OF_INCORPORATION, + CreateBusinessApplicationAttributes.JSON_PROPERTY_STATE_OF_INCORPORATION, + CreateBusinessApplicationAttributes.JSON_PROPERTY_PURPOSE, + CreateBusinessApplicationAttributes.JSON_PROPERTY_PHONE, + CreateBusinessApplicationAttributes.JSON_PROPERTY_ADDRESS, + CreateBusinessApplicationAttributes.JSON_PROPERTY_CONTACT, + CreateBusinessApplicationAttributes.JSON_PROPERTY_OFFICER, + CreateBusinessApplicationAttributes.JSON_PROPERTY_IP, + CreateBusinessApplicationAttributes.JSON_PROPERTY_WEBSITE, + CreateBusinessApplicationAttributes.JSON_PROPERTY_BENEFICIAL_OWNERS, + CreateBusinessApplicationAttributes.JSON_PROPERTY_TAGS, + CreateBusinessApplicationAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateBusinessApplicationAttributes.JSON_PROPERTY_DEVICE_FINGERPRINTS, + CreateBusinessApplicationAttributes.JSON_PROPERTY_INDUSTRY, + CreateBusinessApplicationAttributes.JSON_PROPERTY_ANNUAL_REVENUE, + CreateBusinessApplicationAttributes.JSON_PROPERTY_NUMBER_OF_EMPLOYEES, + CreateBusinessApplicationAttributes.JSON_PROPERTY_CASH_FLOW, + CreateBusinessApplicationAttributes.JSON_PROPERTY_YEAR_OF_INCORPORATION, + CreateBusinessApplicationAttributes.JSON_PROPERTY_COUNTRIES_OF_OPERATION, + CreateBusinessApplicationAttributes.JSON_PROPERTY_STOCK_SYMBOL, + CreateBusinessApplicationAttributes.JSON_PROPERTY_BUSINESS_VERTICAL +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBusinessApplicationAttributes { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_DBA = "dba"; + private String dba; + + public static final String JSON_PROPERTY_EIN = "ein"; + private String ein; + + public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; + private EntityType entityType; + + public static final String JSON_PROPERTY_DATE_OF_INCORPORATION = "dateOfIncorporation"; + private LocalDate dateOfIncorporation; + + public static final String JSON_PROPERTY_STATE_OF_INCORPORATION = "stateOfIncorporation"; + private String stateOfIncorporation; + + public static final String JSON_PROPERTY_PURPOSE = "purpose"; + private String purpose; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_CONTACT = "contact"; + private Contact contact; + + public static final String JSON_PROPERTY_OFFICER = "officer"; + private CreateOfficer officer; + + public static final String JSON_PROPERTY_IP = "ip"; + private String ip; + + public static final String JSON_PROPERTY_WEBSITE = "website"; + private String website; + + public static final String JSON_PROPERTY_BENEFICIAL_OWNERS = "beneficialOwners"; + private List beneficialOwners = new ArrayList<>(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_DEVICE_FINGERPRINTS = "deviceFingerprints"; + private List deviceFingerprints; + + public static final String JSON_PROPERTY_INDUSTRY = "industry"; + private Industry industry; + + public static final String JSON_PROPERTY_ANNUAL_REVENUE = "annualRevenue"; + private BusinessAnnualRevenue annualRevenue; + + public static final String JSON_PROPERTY_NUMBER_OF_EMPLOYEES = "numberOfEmployees"; + private BusinessNumberOfEmployees numberOfEmployees; + + public static final String JSON_PROPERTY_CASH_FLOW = "cashFlow"; + private CashFlow cashFlow; + + public static final String JSON_PROPERTY_YEAR_OF_INCORPORATION = "yearOfIncorporation"; + private String yearOfIncorporation; + + public static final String JSON_PROPERTY_COUNTRIES_OF_OPERATION = "countriesOfOperation"; + private List countriesOfOperation; + + public static final String JSON_PROPERTY_STOCK_SYMBOL = "stockSymbol"; + private String stockSymbol; + + public static final String JSON_PROPERTY_BUSINESS_VERTICAL = "businessVertical"; + private BusinessVertical businessVertical; + + public CreateBusinessApplicationAttributes() { + } + + public CreateBusinessApplicationAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public CreateBusinessApplicationAttributes dba(String dba) { + this.dba = dba; + return this; + } + + /** + * Get dba + * @return dba + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDba() { + return dba; + } + + + @JsonProperty(JSON_PROPERTY_DBA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDba(String dba) { + this.dba = dba; + } + + + public CreateBusinessApplicationAttributes ein(String ein) { + this.ein = ein; + return this; + } + + /** + * Get ein + * @return ein + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getEin() { + return ein; + } + + + @JsonProperty(JSON_PROPERTY_EIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEin(String ein) { + this.ein = ein; + } + + + public CreateBusinessApplicationAttributes entityType(EntityType entityType) { + this.entityType = entityType; + return this; + } + + /** + * Get entityType + * @return entityType + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public EntityType getEntityType() { + return entityType; + } + + + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEntityType(EntityType entityType) { + this.entityType = entityType; + } + + + public CreateBusinessApplicationAttributes dateOfIncorporation(LocalDate dateOfIncorporation) { + this.dateOfIncorporation = dateOfIncorporation; + return this; + } + + /** + * Get dateOfIncorporation + * @return dateOfIncorporation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getDateOfIncorporation() { + return dateOfIncorporation; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfIncorporation(LocalDate dateOfIncorporation) { + this.dateOfIncorporation = dateOfIncorporation; + } + + + public CreateBusinessApplicationAttributes stateOfIncorporation(String stateOfIncorporation) { + this.stateOfIncorporation = stateOfIncorporation; + return this; + } + + /** + * Get stateOfIncorporation + * @return stateOfIncorporation + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getStateOfIncorporation() { + return stateOfIncorporation; + } + + + @JsonProperty(JSON_PROPERTY_STATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStateOfIncorporation(String stateOfIncorporation) { + this.stateOfIncorporation = stateOfIncorporation; + } + + + public CreateBusinessApplicationAttributes purpose(String purpose) { + this.purpose = purpose; + return this; + } + + /** + * Get purpose + * @return purpose + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PURPOSE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPurpose() { + return purpose; + } + + + @JsonProperty(JSON_PROPERTY_PURPOSE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPurpose(String purpose) { + this.purpose = purpose; + } + + + public CreateBusinessApplicationAttributes phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public CreateBusinessApplicationAttributes address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(Address address) { + this.address = address; + } + + + public CreateBusinessApplicationAttributes contact(Contact contact) { + this.contact = contact; + return this; + } + + /** + * Get contact + * @return contact + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Contact getContact() { + return contact; + } + + + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setContact(Contact contact) { + this.contact = contact; + } + + + public CreateBusinessApplicationAttributes officer(CreateOfficer officer) { + this.officer = officer; + return this; + } + + /** + * Get officer + * @return officer + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OFFICER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateOfficer getOfficer() { + return officer; + } + + + @JsonProperty(JSON_PROPERTY_OFFICER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOfficer(CreateOfficer officer) { + this.officer = officer; + } + + + public CreateBusinessApplicationAttributes ip(String ip) { + this.ip = ip; + return this; + } + + /** + * Get ip + * @return ip + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIp() { + return ip; + } + + + @JsonProperty(JSON_PROPERTY_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIp(String ip) { + this.ip = ip; + } + + + public CreateBusinessApplicationAttributes website(String website) { + this.website = website; + return this; + } + + /** + * Get website + * @return website + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEBSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebsite() { + return website; + } + + + @JsonProperty(JSON_PROPERTY_WEBSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWebsite(String website) { + this.website = website; + } + + + public CreateBusinessApplicationAttributes beneficialOwners(List beneficialOwners) { + this.beneficialOwners = beneficialOwners; + return this; + } + + public CreateBusinessApplicationAttributes addBeneficialOwnersItem(CreateBeneficialOwner beneficialOwnersItem) { + if (this.beneficialOwners == null) { + this.beneficialOwners = new ArrayList<>(); + } + this.beneficialOwners.add(beneficialOwnersItem); + return this; + } + + /** + * Get beneficialOwners + * @return beneficialOwners + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BENEFICIAL_OWNERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getBeneficialOwners() { + return beneficialOwners; + } + + + @JsonProperty(JSON_PROPERTY_BENEFICIAL_OWNERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBeneficialOwners(List beneficialOwners) { + this.beneficialOwners = beneficialOwners; + } + + + public CreateBusinessApplicationAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateBusinessApplicationAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateBusinessApplicationAttributes deviceFingerprints(List deviceFingerprints) { + this.deviceFingerprints = deviceFingerprints; + return this; + } + + public CreateBusinessApplicationAttributes addDeviceFingerprintsItem(DeviceFingerprint deviceFingerprintsItem) { + if (this.deviceFingerprints == null) { + this.deviceFingerprints = new ArrayList<>(); + } + this.deviceFingerprints.add(deviceFingerprintsItem); + return this; + } + + /** + * Get deviceFingerprints + * @return deviceFingerprints + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEVICE_FINGERPRINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getDeviceFingerprints() { + return deviceFingerprints; + } + + + @JsonProperty(JSON_PROPERTY_DEVICE_FINGERPRINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeviceFingerprints(List deviceFingerprints) { + this.deviceFingerprints = deviceFingerprints; + } + + + public CreateBusinessApplicationAttributes industry(Industry industry) { + this.industry = industry; + return this; + } + + /** + * Get industry + * @return industry + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDUSTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Industry getIndustry() { + return industry; + } + + + @JsonProperty(JSON_PROPERTY_INDUSTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIndustry(Industry industry) { + this.industry = industry; + } + + + public CreateBusinessApplicationAttributes annualRevenue(BusinessAnnualRevenue annualRevenue) { + this.annualRevenue = annualRevenue; + return this; + } + + /** + * Get annualRevenue + * @return annualRevenue + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNUAL_REVENUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BusinessAnnualRevenue getAnnualRevenue() { + return annualRevenue; + } + + + @JsonProperty(JSON_PROPERTY_ANNUAL_REVENUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnualRevenue(BusinessAnnualRevenue annualRevenue) { + this.annualRevenue = annualRevenue; + } + + + public CreateBusinessApplicationAttributes numberOfEmployees(BusinessNumberOfEmployees numberOfEmployees) { + this.numberOfEmployees = numberOfEmployees; + return this; + } + + /** + * Get numberOfEmployees + * @return numberOfEmployees + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUMBER_OF_EMPLOYEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BusinessNumberOfEmployees getNumberOfEmployees() { + return numberOfEmployees; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER_OF_EMPLOYEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumberOfEmployees(BusinessNumberOfEmployees numberOfEmployees) { + this.numberOfEmployees = numberOfEmployees; + } + + + public CreateBusinessApplicationAttributes cashFlow(CashFlow cashFlow) { + this.cashFlow = cashFlow; + return this; + } + + /** + * Get cashFlow + * @return cashFlow + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CASH_FLOW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CashFlow getCashFlow() { + return cashFlow; + } + + + @JsonProperty(JSON_PROPERTY_CASH_FLOW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCashFlow(CashFlow cashFlow) { + this.cashFlow = cashFlow; + } + + + public CreateBusinessApplicationAttributes yearOfIncorporation(String yearOfIncorporation) { + this.yearOfIncorporation = yearOfIncorporation; + return this; + } + + /** + * Get yearOfIncorporation + * @return yearOfIncorporation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_YEAR_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getYearOfIncorporation() { + return yearOfIncorporation; + } + + + @JsonProperty(JSON_PROPERTY_YEAR_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setYearOfIncorporation(String yearOfIncorporation) { + this.yearOfIncorporation = yearOfIncorporation; + } + + + public CreateBusinessApplicationAttributes countriesOfOperation(List countriesOfOperation) { + this.countriesOfOperation = countriesOfOperation; + return this; + } + + public CreateBusinessApplicationAttributes addCountriesOfOperationItem(String countriesOfOperationItem) { + if (this.countriesOfOperation == null) { + this.countriesOfOperation = new ArrayList<>(); + } + this.countriesOfOperation.add(countriesOfOperationItem); + return this; + } + + /** + * Get countriesOfOperation + * @return countriesOfOperation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTRIES_OF_OPERATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getCountriesOfOperation() { + return countriesOfOperation; + } + + + @JsonProperty(JSON_PROPERTY_COUNTRIES_OF_OPERATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCountriesOfOperation(List countriesOfOperation) { + this.countriesOfOperation = countriesOfOperation; + } + + + public CreateBusinessApplicationAttributes stockSymbol(String stockSymbol) { + this.stockSymbol = stockSymbol; + return this; + } + + /** + * Get stockSymbol + * @return stockSymbol + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STOCK_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStockSymbol() { + return stockSymbol; + } + + + @JsonProperty(JSON_PROPERTY_STOCK_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStockSymbol(String stockSymbol) { + this.stockSymbol = stockSymbol; + } + + + public CreateBusinessApplicationAttributes businessVertical(BusinessVertical businessVertical) { + this.businessVertical = businessVertical; + return this; + } + + /** + * Get businessVertical + * @return businessVertical + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUSINESS_VERTICAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BusinessVertical getBusinessVertical() { + return businessVertical; + } + + + @JsonProperty(JSON_PROPERTY_BUSINESS_VERTICAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBusinessVertical(BusinessVertical businessVertical) { + this.businessVertical = businessVertical; + } + + + /** + * Return true if this CreateBusinessApplication_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBusinessApplicationAttributes createBusinessApplicationAttributes = (CreateBusinessApplicationAttributes) o; + return Objects.equals(this.name, createBusinessApplicationAttributes.name) && + Objects.equals(this.dba, createBusinessApplicationAttributes.dba) && + Objects.equals(this.ein, createBusinessApplicationAttributes.ein) && + Objects.equals(this.entityType, createBusinessApplicationAttributes.entityType) && + Objects.equals(this.dateOfIncorporation, createBusinessApplicationAttributes.dateOfIncorporation) && + Objects.equals(this.stateOfIncorporation, createBusinessApplicationAttributes.stateOfIncorporation) && + Objects.equals(this.purpose, createBusinessApplicationAttributes.purpose) && + Objects.equals(this.phone, createBusinessApplicationAttributes.phone) && + Objects.equals(this.address, createBusinessApplicationAttributes.address) && + Objects.equals(this.contact, createBusinessApplicationAttributes.contact) && + Objects.equals(this.officer, createBusinessApplicationAttributes.officer) && + Objects.equals(this.ip, createBusinessApplicationAttributes.ip) && + Objects.equals(this.website, createBusinessApplicationAttributes.website) && + Objects.equals(this.beneficialOwners, createBusinessApplicationAttributes.beneficialOwners) && + Objects.equals(this.tags, createBusinessApplicationAttributes.tags) && + Objects.equals(this.idempotencyKey, createBusinessApplicationAttributes.idempotencyKey) && + Objects.equals(this.deviceFingerprints, createBusinessApplicationAttributes.deviceFingerprints) && + Objects.equals(this.industry, createBusinessApplicationAttributes.industry) && + Objects.equals(this.annualRevenue, createBusinessApplicationAttributes.annualRevenue) && + Objects.equals(this.numberOfEmployees, createBusinessApplicationAttributes.numberOfEmployees) && + Objects.equals(this.cashFlow, createBusinessApplicationAttributes.cashFlow) && + Objects.equals(this.yearOfIncorporation, createBusinessApplicationAttributes.yearOfIncorporation) && + Objects.equals(this.countriesOfOperation, createBusinessApplicationAttributes.countriesOfOperation) && + Objects.equals(this.stockSymbol, createBusinessApplicationAttributes.stockSymbol) && + Objects.equals(this.businessVertical, createBusinessApplicationAttributes.businessVertical); + } + + @Override + public int hashCode() { + return Objects.hash(name, dba, ein, entityType, dateOfIncorporation, stateOfIncorporation, purpose, phone, address, contact, officer, ip, website, beneficialOwners, tags, idempotencyKey, deviceFingerprints, industry, annualRevenue, numberOfEmployees, cashFlow, yearOfIncorporation, countriesOfOperation, stockSymbol, businessVertical); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBusinessApplicationAttributes {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" dba: ").append(toIndentedString(dba)).append("\n"); + sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); + sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" dateOfIncorporation: ").append(toIndentedString(dateOfIncorporation)).append("\n"); + sb.append(" stateOfIncorporation: ").append(toIndentedString(stateOfIncorporation)).append("\n"); + sb.append(" purpose: ").append(toIndentedString(purpose)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" officer: ").append(toIndentedString(officer)).append("\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append(" website: ").append(toIndentedString(website)).append("\n"); + sb.append(" beneficialOwners: ").append(toIndentedString(beneficialOwners)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" deviceFingerprints: ").append(toIndentedString(deviceFingerprints)).append("\n"); + sb.append(" industry: ").append(toIndentedString(industry)).append("\n"); + sb.append(" annualRevenue: ").append(toIndentedString(annualRevenue)).append("\n"); + sb.append(" numberOfEmployees: ").append(toIndentedString(numberOfEmployees)).append("\n"); + sb.append(" cashFlow: ").append(toIndentedString(cashFlow)).append("\n"); + sb.append(" yearOfIncorporation: ").append(toIndentedString(yearOfIncorporation)).append("\n"); + sb.append(" countriesOfOperation: ").append(toIndentedString(countriesOfOperation)).append("\n"); + sb.append(" stockSymbol: ").append(toIndentedString(stockSymbol)).append("\n"); + sb.append(" businessVertical: ").append(toIndentedString(businessVertical)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dba` to the URL query string + if (getDba() != null) { + joiner.add(String.format("%sdba%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDba()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ein` to the URL query string + if (getEin() != null) { + joiner.add(String.format("%sein%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEin()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format("%sentityType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEntityType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dateOfIncorporation` to the URL query string + if (getDateOfIncorporation() != null) { + joiner.add(String.format("%sdateOfIncorporation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfIncorporation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `stateOfIncorporation` to the URL query string + if (getStateOfIncorporation() != null) { + joiner.add(String.format("%sstateOfIncorporation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStateOfIncorporation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `purpose` to the URL query string + if (getPurpose() != null) { + joiner.add(String.format("%spurpose%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPurpose()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `contact` to the URL query string + if (getContact() != null) { + joiner.add(getContact().toUrlQueryString(prefix + "contact" + suffix)); + } + + // add `officer` to the URL query string + if (getOfficer() != null) { + joiner.add(getOfficer().toUrlQueryString(prefix + "officer" + suffix)); + } + + // add `ip` to the URL query string + if (getIp() != null) { + joiner.add(String.format("%sip%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIp()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `website` to the URL query string + if (getWebsite() != null) { + joiner.add(String.format("%swebsite%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getWebsite()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `beneficialOwners` to the URL query string + if (getBeneficialOwners() != null) { + for (int i = 0; i < getBeneficialOwners().size(); i++) { + if (getBeneficialOwners().get(i) != null) { + joiner.add(getBeneficialOwners().get(i).toUrlQueryString(String.format("%sbeneficialOwners%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `deviceFingerprints` to the URL query string + if (getDeviceFingerprints() != null) { + for (int i = 0; i < getDeviceFingerprints().size(); i++) { + if (getDeviceFingerprints().get(i) != null) { + joiner.add(getDeviceFingerprints().get(i).toUrlQueryString(String.format("%sdeviceFingerprints%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `industry` to the URL query string + if (getIndustry() != null) { + joiner.add(String.format("%sindustry%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIndustry()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `annualRevenue` to the URL query string + if (getAnnualRevenue() != null) { + joiner.add(String.format("%sannualRevenue%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAnnualRevenue()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `numberOfEmployees` to the URL query string + if (getNumberOfEmployees() != null) { + joiner.add(String.format("%snumberOfEmployees%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNumberOfEmployees()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cashFlow` to the URL query string + if (getCashFlow() != null) { + joiner.add(String.format("%scashFlow%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCashFlow()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `yearOfIncorporation` to the URL query string + if (getYearOfIncorporation() != null) { + joiner.add(String.format("%syearOfIncorporation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getYearOfIncorporation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `countriesOfOperation` to the URL query string + if (getCountriesOfOperation() != null) { + for (int i = 0; i < getCountriesOfOperation().size(); i++) { + joiner.add(String.format("%scountriesOfOperation%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getCountriesOfOperation().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `stockSymbol` to the URL query string + if (getStockSymbol() != null) { + joiner.add(String.format("%sstockSymbol%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStockSymbol()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `businessVertical` to the URL query string + if (getBusinessVertical() != null) { + joiner.add(String.format("%sbusinessVertical%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBusinessVertical()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateBusinessCreditCard.java b/src/main/java/unit/java/sdk/model/CreateBusinessCreditCard.java new file mode 100644 index 00000000..6e26b786 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateBusinessCreditCard.java @@ -0,0 +1,257 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBusinessDebitCardAttributes; +import unit.java.sdk.model.CreateCardRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateBusinessCreditCard + */ +@JsonPropertyOrder({ + CreateBusinessCreditCard.JSON_PROPERTY_TYPE, + CreateBusinessCreditCard.JSON_PROPERTY_ATTRIBUTES, + CreateBusinessCreditCard.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBusinessCreditCard { + /** + * Gets or Sets type + */ + public enum TypeEnum { + BUSINESSCREDITCARD("businessCreditCard"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type = TypeEnum.BUSINESSCREDITCARD; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateBusinessDebitCardAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateCardRelationships relationships; + + public CreateBusinessCreditCard() { + } + + public CreateBusinessCreditCard type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public CreateBusinessCreditCard attributes(CreateBusinessDebitCardAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateBusinessDebitCardAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateBusinessDebitCardAttributes attributes) { + this.attributes = attributes; + } + + + public CreateBusinessCreditCard relationships(CreateCardRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateCardRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateCardRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreateBusinessCreditCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBusinessCreditCard createBusinessCreditCard = (CreateBusinessCreditCard) o; + return Objects.equals(this.type, createBusinessCreditCard.type) && + Objects.equals(this.attributes, createBusinessCreditCard.attributes) && + Objects.equals(this.relationships, createBusinessCreditCard.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBusinessCreditCard {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateBusinessDebitCard.java b/src/main/java/unit/java/sdk/model/CreateBusinessDebitCard.java new file mode 100644 index 00000000..aec26796 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateBusinessDebitCard.java @@ -0,0 +1,257 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBusinessDebitCardAttributes; +import unit.java.sdk.model.CreateCardRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateBusinessDebitCard + */ +@JsonPropertyOrder({ + CreateBusinessDebitCard.JSON_PROPERTY_TYPE, + CreateBusinessDebitCard.JSON_PROPERTY_ATTRIBUTES, + CreateBusinessDebitCard.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBusinessDebitCard { + /** + * Gets or Sets type + */ + public enum TypeEnum { + BUSINESSDEBITCARD("businessDebitCard"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type = TypeEnum.BUSINESSDEBITCARD; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateBusinessDebitCardAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateCardRelationships relationships; + + public CreateBusinessDebitCard() { + } + + public CreateBusinessDebitCard type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public CreateBusinessDebitCard attributes(CreateBusinessDebitCardAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateBusinessDebitCardAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateBusinessDebitCardAttributes attributes) { + this.attributes = attributes; + } + + + public CreateBusinessDebitCard relationships(CreateCardRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateCardRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateCardRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreateBusinessDebitCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBusinessDebitCard createBusinessDebitCard = (CreateBusinessDebitCard) o; + return Objects.equals(this.type, createBusinessDebitCard.type) && + Objects.equals(this.attributes, createBusinessDebitCard.attributes) && + Objects.equals(this.relationships, createBusinessDebitCard.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBusinessDebitCard {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateBusinessDebitCardAttributes.java b/src/main/java/unit/java/sdk/model/CreateBusinessDebitCardAttributes.java new file mode 100644 index 00000000..1785379a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateBusinessDebitCardAttributes.java @@ -0,0 +1,731 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.CardLevelLimits; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateBusinessDebitCardAttributes + */ +@JsonPropertyOrder({ + CreateBusinessDebitCardAttributes.JSON_PROPERTY_SHIPPING_ADDRESS, + CreateBusinessDebitCardAttributes.JSON_PROPERTY_ADDRESS, + CreateBusinessDebitCardAttributes.JSON_PROPERTY_FULL_NAME, + CreateBusinessDebitCardAttributes.JSON_PROPERTY_PHONE, + CreateBusinessDebitCardAttributes.JSON_PROPERTY_EMAIL, + CreateBusinessDebitCardAttributes.JSON_PROPERTY_DATE_OF_BIRTH, + CreateBusinessDebitCardAttributes.JSON_PROPERTY_NATIONALITY, + CreateBusinessDebitCardAttributes.JSON_PROPERTY_SSN, + CreateBusinessDebitCardAttributes.JSON_PROPERTY_PASSPORT, + CreateBusinessDebitCardAttributes.JSON_PROPERTY_DESIGN, + CreateBusinessDebitCardAttributes.JSON_PROPERTY_ADDITIONAL_EMBOSSED_TEXT, + CreateBusinessDebitCardAttributes.JSON_PROPERTY_TAGS, + CreateBusinessDebitCardAttributes.JSON_PROPERTY_LIMITS, + CreateBusinessDebitCardAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateBusinessDebitCardAttributes.JSON_PROPERTY_ACTIVE_FOR_ONLINE_USE, + CreateBusinessDebitCardAttributes.JSON_PROPERTY_PRINT_ONLY_BUSINESS_NAME, + CreateBusinessDebitCardAttributes.JSON_PROPERTY_EXPIRY_DATE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBusinessDebitCardAttributes { + public static final String JSON_PROPERTY_SHIPPING_ADDRESS = "shippingAddress"; + private Address shippingAddress; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public static final String JSON_PROPERTY_SSN = "ssn"; + private String ssn; + + public static final String JSON_PROPERTY_PASSPORT = "passport"; + private String passport; + + public static final String JSON_PROPERTY_DESIGN = "design"; + private String design; + + public static final String JSON_PROPERTY_ADDITIONAL_EMBOSSED_TEXT = "additionalEmbossedText"; + private String additionalEmbossedText; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_LIMITS = "limits"; + private CardLevelLimits limits; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_ACTIVE_FOR_ONLINE_USE = "activeForOnlineUse"; + private Boolean activeForOnlineUse; + + public static final String JSON_PROPERTY_PRINT_ONLY_BUSINESS_NAME = "printOnlyBusinessName"; + private Boolean printOnlyBusinessName; + + public static final String JSON_PROPERTY_EXPIRY_DATE = "expiryDate"; + private String expiryDate; + + public CreateBusinessDebitCardAttributes() { + } + + public CreateBusinessDebitCardAttributes shippingAddress(Address shippingAddress) { + this.shippingAddress = shippingAddress; + return this; + } + + /** + * Get shippingAddress + * @return shippingAddress + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHIPPING_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Address getShippingAddress() { + return shippingAddress; + } + + + @JsonProperty(JSON_PROPERTY_SHIPPING_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShippingAddress(Address shippingAddress) { + this.shippingAddress = shippingAddress; + } + + + public CreateBusinessDebitCardAttributes address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(Address address) { + this.address = address; + } + + + public CreateBusinessDebitCardAttributes fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public CreateBusinessDebitCardAttributes phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public CreateBusinessDebitCardAttributes email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEmail(String email) { + this.email = email; + } + + + public CreateBusinessDebitCardAttributes dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + public CreateBusinessDebitCardAttributes nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * Get nationality + * @return nationality + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + public CreateBusinessDebitCardAttributes ssn(String ssn) { + this.ssn = ssn; + return this; + } + + /** + * Get ssn + * @return ssn + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSsn() { + return ssn; + } + + + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSsn(String ssn) { + this.ssn = ssn; + } + + + public CreateBusinessDebitCardAttributes passport(String passport) { + this.passport = passport; + return this; + } + + /** + * Get passport + * @return passport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassport() { + return passport; + } + + + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassport(String passport) { + this.passport = passport; + } + + + public CreateBusinessDebitCardAttributes design(String design) { + this.design = design; + return this; + } + + /** + * Get design + * @return design + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDesign() { + return design; + } + + + @JsonProperty(JSON_PROPERTY_DESIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDesign(String design) { + this.design = design; + } + + + public CreateBusinessDebitCardAttributes additionalEmbossedText(String additionalEmbossedText) { + this.additionalEmbossedText = additionalEmbossedText; + return this; + } + + /** + * Get additionalEmbossedText + * @return additionalEmbossedText + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDITIONAL_EMBOSSED_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAdditionalEmbossedText() { + return additionalEmbossedText; + } + + + @JsonProperty(JSON_PROPERTY_ADDITIONAL_EMBOSSED_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdditionalEmbossedText(String additionalEmbossedText) { + this.additionalEmbossedText = additionalEmbossedText; + } + + + public CreateBusinessDebitCardAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateBusinessDebitCardAttributes limits(CardLevelLimits limits) { + this.limits = limits; + return this; + } + + /** + * Get limits + * @return limits + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CardLevelLimits getLimits() { + return limits; + } + + + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLimits(CardLevelLimits limits) { + this.limits = limits; + } + + + public CreateBusinessDebitCardAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateBusinessDebitCardAttributes activeForOnlineUse(Boolean activeForOnlineUse) { + this.activeForOnlineUse = activeForOnlineUse; + return this; + } + + /** + * Get activeForOnlineUse + * @return activeForOnlineUse + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACTIVE_FOR_ONLINE_USE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActiveForOnlineUse() { + return activeForOnlineUse; + } + + + @JsonProperty(JSON_PROPERTY_ACTIVE_FOR_ONLINE_USE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setActiveForOnlineUse(Boolean activeForOnlineUse) { + this.activeForOnlineUse = activeForOnlineUse; + } + + + public CreateBusinessDebitCardAttributes printOnlyBusinessName(Boolean printOnlyBusinessName) { + this.printOnlyBusinessName = printOnlyBusinessName; + return this; + } + + /** + * Get printOnlyBusinessName + * @return printOnlyBusinessName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRINT_ONLY_BUSINESS_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getPrintOnlyBusinessName() { + return printOnlyBusinessName; + } + + + @JsonProperty(JSON_PROPERTY_PRINT_ONLY_BUSINESS_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrintOnlyBusinessName(Boolean printOnlyBusinessName) { + this.printOnlyBusinessName = printOnlyBusinessName; + } + + + public CreateBusinessDebitCardAttributes expiryDate(String expiryDate) { + this.expiryDate = expiryDate; + return this; + } + + /** + * Get expiryDate + * @return expiryDate + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPIRY_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExpiryDate() { + return expiryDate; + } + + + @JsonProperty(JSON_PROPERTY_EXPIRY_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpiryDate(String expiryDate) { + this.expiryDate = expiryDate; + } + + + /** + * Return true if this CreateBusinessDebitCard_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBusinessDebitCardAttributes createBusinessDebitCardAttributes = (CreateBusinessDebitCardAttributes) o; + return Objects.equals(this.shippingAddress, createBusinessDebitCardAttributes.shippingAddress) && + Objects.equals(this.address, createBusinessDebitCardAttributes.address) && + Objects.equals(this.fullName, createBusinessDebitCardAttributes.fullName) && + Objects.equals(this.phone, createBusinessDebitCardAttributes.phone) && + Objects.equals(this.email, createBusinessDebitCardAttributes.email) && + Objects.equals(this.dateOfBirth, createBusinessDebitCardAttributes.dateOfBirth) && + Objects.equals(this.nationality, createBusinessDebitCardAttributes.nationality) && + Objects.equals(this.ssn, createBusinessDebitCardAttributes.ssn) && + Objects.equals(this.passport, createBusinessDebitCardAttributes.passport) && + Objects.equals(this.design, createBusinessDebitCardAttributes.design) && + Objects.equals(this.additionalEmbossedText, createBusinessDebitCardAttributes.additionalEmbossedText) && + Objects.equals(this.tags, createBusinessDebitCardAttributes.tags) && + Objects.equals(this.limits, createBusinessDebitCardAttributes.limits) && + Objects.equals(this.idempotencyKey, createBusinessDebitCardAttributes.idempotencyKey) && + Objects.equals(this.activeForOnlineUse, createBusinessDebitCardAttributes.activeForOnlineUse) && + Objects.equals(this.printOnlyBusinessName, createBusinessDebitCardAttributes.printOnlyBusinessName) && + Objects.equals(this.expiryDate, createBusinessDebitCardAttributes.expiryDate); + } + + @Override + public int hashCode() { + return Objects.hash(shippingAddress, address, fullName, phone, email, dateOfBirth, nationality, ssn, passport, design, additionalEmbossedText, tags, limits, idempotencyKey, activeForOnlineUse, printOnlyBusinessName, expiryDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBusinessDebitCardAttributes {\n"); + sb.append(" shippingAddress: ").append(toIndentedString(shippingAddress)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); + sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); + sb.append(" design: ").append(toIndentedString(design)).append("\n"); + sb.append(" additionalEmbossedText: ").append(toIndentedString(additionalEmbossedText)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" activeForOnlineUse: ").append(toIndentedString(activeForOnlineUse)).append("\n"); + sb.append(" printOnlyBusinessName: ").append(toIndentedString(printOnlyBusinessName)).append("\n"); + sb.append(" expiryDate: ").append(toIndentedString(expiryDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `shippingAddress` to the URL query string + if (getShippingAddress() != null) { + joiner.add(getShippingAddress().toUrlQueryString(prefix + "shippingAddress" + suffix)); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nationality` to the URL query string + if (getNationality() != null) { + joiner.add(String.format("%snationality%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNationality()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ssn` to the URL query string + if (getSsn() != null) { + joiner.add(String.format("%sssn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSsn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `passport` to the URL query string + if (getPassport() != null) { + joiner.add(String.format("%spassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `design` to the URL query string + if (getDesign() != null) { + joiner.add(String.format("%sdesign%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDesign()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `additionalEmbossedText` to the URL query string + if (getAdditionalEmbossedText() != null) { + joiner.add(String.format("%sadditionalEmbossedText%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAdditionalEmbossedText()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `limits` to the URL query string + if (getLimits() != null) { + joiner.add(getLimits().toUrlQueryString(prefix + "limits" + suffix)); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `activeForOnlineUse` to the URL query string + if (getActiveForOnlineUse() != null) { + joiner.add(String.format("%sactiveForOnlineUse%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActiveForOnlineUse()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `printOnlyBusinessName` to the URL query string + if (getPrintOnlyBusinessName() != null) { + joiner.add(String.format("%sprintOnlyBusinessName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPrintOnlyBusinessName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `expiryDate` to the URL query string + if (getExpiryDate() != null) { + joiner.add(String.format("%sexpiryDate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getExpiryDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateBusinessVirtualCreditCard.java b/src/main/java/unit/java/sdk/model/CreateBusinessVirtualCreditCard.java new file mode 100644 index 00000000..1045cc49 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateBusinessVirtualCreditCard.java @@ -0,0 +1,257 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBusinessVirtualDebitCardAttributes; +import unit.java.sdk.model.CreateCardRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateBusinessVirtualCreditCard + */ +@JsonPropertyOrder({ + CreateBusinessVirtualCreditCard.JSON_PROPERTY_TYPE, + CreateBusinessVirtualCreditCard.JSON_PROPERTY_ATTRIBUTES, + CreateBusinessVirtualCreditCard.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBusinessVirtualCreditCard { + /** + * Gets or Sets type + */ + public enum TypeEnum { + BUSINESSVIRTUALCREDITCARD("businessVirtualCreditCard"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type = TypeEnum.BUSINESSVIRTUALCREDITCARD; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateBusinessVirtualDebitCardAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateCardRelationships relationships; + + public CreateBusinessVirtualCreditCard() { + } + + public CreateBusinessVirtualCreditCard type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public CreateBusinessVirtualCreditCard attributes(CreateBusinessVirtualDebitCardAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateBusinessVirtualDebitCardAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateBusinessVirtualDebitCardAttributes attributes) { + this.attributes = attributes; + } + + + public CreateBusinessVirtualCreditCard relationships(CreateCardRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateCardRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateCardRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreateBusinessVirtualCreditCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBusinessVirtualCreditCard createBusinessVirtualCreditCard = (CreateBusinessVirtualCreditCard) o; + return Objects.equals(this.type, createBusinessVirtualCreditCard.type) && + Objects.equals(this.attributes, createBusinessVirtualCreditCard.attributes) && + Objects.equals(this.relationships, createBusinessVirtualCreditCard.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBusinessVirtualCreditCard {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateBusinessVirtualDebitCard.java b/src/main/java/unit/java/sdk/model/CreateBusinessVirtualDebitCard.java new file mode 100644 index 00000000..14e92a3e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateBusinessVirtualDebitCard.java @@ -0,0 +1,257 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBusinessVirtualDebitCardAttributes; +import unit.java.sdk.model.CreateCardRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateBusinessVirtualDebitCard + */ +@JsonPropertyOrder({ + CreateBusinessVirtualDebitCard.JSON_PROPERTY_TYPE, + CreateBusinessVirtualDebitCard.JSON_PROPERTY_ATTRIBUTES, + CreateBusinessVirtualDebitCard.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBusinessVirtualDebitCard { + /** + * Gets or Sets type + */ + public enum TypeEnum { + BUSINESSVIRTUALDEBITCARD("businessVirtualDebitCard"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type = TypeEnum.BUSINESSVIRTUALDEBITCARD; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateBusinessVirtualDebitCardAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateCardRelationships relationships; + + public CreateBusinessVirtualDebitCard() { + } + + public CreateBusinessVirtualDebitCard type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public CreateBusinessVirtualDebitCard attributes(CreateBusinessVirtualDebitCardAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateBusinessVirtualDebitCardAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateBusinessVirtualDebitCardAttributes attributes) { + this.attributes = attributes; + } + + + public CreateBusinessVirtualDebitCard relationships(CreateCardRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateCardRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateCardRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreateBusinessVirtualDebitCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBusinessVirtualDebitCard createBusinessVirtualDebitCard = (CreateBusinessVirtualDebitCard) o; + return Objects.equals(this.type, createBusinessVirtualDebitCard.type) && + Objects.equals(this.attributes, createBusinessVirtualDebitCard.attributes) && + Objects.equals(this.relationships, createBusinessVirtualDebitCard.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBusinessVirtualDebitCard {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateBusinessVirtualDebitCardAttributes.java b/src/main/java/unit/java/sdk/model/CreateBusinessVirtualDebitCardAttributes.java new file mode 100644 index 00000000..94a700ef --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateBusinessVirtualDebitCardAttributes.java @@ -0,0 +1,551 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.CardLevelLimits; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateBusinessVirtualDebitCardAttributes + */ +@JsonPropertyOrder({ + CreateBusinessVirtualDebitCardAttributes.JSON_PROPERTY_ADDRESS, + CreateBusinessVirtualDebitCardAttributes.JSON_PROPERTY_FULL_NAME, + CreateBusinessVirtualDebitCardAttributes.JSON_PROPERTY_PHONE, + CreateBusinessVirtualDebitCardAttributes.JSON_PROPERTY_EMAIL, + CreateBusinessVirtualDebitCardAttributes.JSON_PROPERTY_DATE_OF_BIRTH, + CreateBusinessVirtualDebitCardAttributes.JSON_PROPERTY_NATIONALITY, + CreateBusinessVirtualDebitCardAttributes.JSON_PROPERTY_SSN, + CreateBusinessVirtualDebitCardAttributes.JSON_PROPERTY_PASSPORT, + CreateBusinessVirtualDebitCardAttributes.JSON_PROPERTY_TAGS, + CreateBusinessVirtualDebitCardAttributes.JSON_PROPERTY_LIMITS, + CreateBusinessVirtualDebitCardAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateBusinessVirtualDebitCardAttributes.JSON_PROPERTY_EXPIRY_DATE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBusinessVirtualDebitCardAttributes { + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public static final String JSON_PROPERTY_SSN = "ssn"; + private String ssn; + + public static final String JSON_PROPERTY_PASSPORT = "passport"; + private String passport; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_LIMITS = "limits"; + private CardLevelLimits limits; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_EXPIRY_DATE = "expiryDate"; + private String expiryDate; + + public CreateBusinessVirtualDebitCardAttributes() { + } + + public CreateBusinessVirtualDebitCardAttributes address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(Address address) { + this.address = address; + } + + + public CreateBusinessVirtualDebitCardAttributes fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public CreateBusinessVirtualDebitCardAttributes phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public CreateBusinessVirtualDebitCardAttributes email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEmail(String email) { + this.email = email; + } + + + public CreateBusinessVirtualDebitCardAttributes dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + public CreateBusinessVirtualDebitCardAttributes nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * Get nationality + * @return nationality + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + public CreateBusinessVirtualDebitCardAttributes ssn(String ssn) { + this.ssn = ssn; + return this; + } + + /** + * Get ssn + * @return ssn + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSsn() { + return ssn; + } + + + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSsn(String ssn) { + this.ssn = ssn; + } + + + public CreateBusinessVirtualDebitCardAttributes passport(String passport) { + this.passport = passport; + return this; + } + + /** + * Get passport + * @return passport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassport() { + return passport; + } + + + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassport(String passport) { + this.passport = passport; + } + + + public CreateBusinessVirtualDebitCardAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateBusinessVirtualDebitCardAttributes limits(CardLevelLimits limits) { + this.limits = limits; + return this; + } + + /** + * Get limits + * @return limits + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CardLevelLimits getLimits() { + return limits; + } + + + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLimits(CardLevelLimits limits) { + this.limits = limits; + } + + + public CreateBusinessVirtualDebitCardAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateBusinessVirtualDebitCardAttributes expiryDate(String expiryDate) { + this.expiryDate = expiryDate; + return this; + } + + /** + * Get expiryDate + * @return expiryDate + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPIRY_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExpiryDate() { + return expiryDate; + } + + + @JsonProperty(JSON_PROPERTY_EXPIRY_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpiryDate(String expiryDate) { + this.expiryDate = expiryDate; + } + + + /** + * Return true if this CreateBusinessVirtualDebitCard_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBusinessVirtualDebitCardAttributes createBusinessVirtualDebitCardAttributes = (CreateBusinessVirtualDebitCardAttributes) o; + return Objects.equals(this.address, createBusinessVirtualDebitCardAttributes.address) && + Objects.equals(this.fullName, createBusinessVirtualDebitCardAttributes.fullName) && + Objects.equals(this.phone, createBusinessVirtualDebitCardAttributes.phone) && + Objects.equals(this.email, createBusinessVirtualDebitCardAttributes.email) && + Objects.equals(this.dateOfBirth, createBusinessVirtualDebitCardAttributes.dateOfBirth) && + Objects.equals(this.nationality, createBusinessVirtualDebitCardAttributes.nationality) && + Objects.equals(this.ssn, createBusinessVirtualDebitCardAttributes.ssn) && + Objects.equals(this.passport, createBusinessVirtualDebitCardAttributes.passport) && + Objects.equals(this.tags, createBusinessVirtualDebitCardAttributes.tags) && + Objects.equals(this.limits, createBusinessVirtualDebitCardAttributes.limits) && + Objects.equals(this.idempotencyKey, createBusinessVirtualDebitCardAttributes.idempotencyKey) && + Objects.equals(this.expiryDate, createBusinessVirtualDebitCardAttributes.expiryDate); + } + + @Override + public int hashCode() { + return Objects.hash(address, fullName, phone, email, dateOfBirth, nationality, ssn, passport, tags, limits, idempotencyKey, expiryDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBusinessVirtualDebitCardAttributes {\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); + sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" expiryDate: ").append(toIndentedString(expiryDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nationality` to the URL query string + if (getNationality() != null) { + joiner.add(String.format("%snationality%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNationality()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ssn` to the URL query string + if (getSsn() != null) { + joiner.add(String.format("%sssn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSsn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `passport` to the URL query string + if (getPassport() != null) { + joiner.add(String.format("%spassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `limits` to the URL query string + if (getLimits() != null) { + joiner.add(getLimits().toUrlQueryString(prefix + "limits" + suffix)); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `expiryDate` to the URL query string + if (getExpiryDate() != null) { + joiner.add(String.format("%sexpiryDate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getExpiryDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCard.java b/src/main/java/unit/java/sdk/model/CreateCard.java new file mode 100644 index 00000000..dcc98ef6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCard.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCardData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateCard + */ +@JsonPropertyOrder({ + CreateCard.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCard { + public static final String JSON_PROPERTY_DATA = "data"; + private CreateCardData data; + + public CreateCard() { + } + + public CreateCard data(CreateCardData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateCardData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(CreateCardData data) { + this.data = data; + } + + + /** + * Return true if this createCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCard createCard = (CreateCard) o; + return Objects.equals(this.data, createCard.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCard {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCardData.java b/src/main/java/unit/java/sdk/model/CreateCardData.java new file mode 100644 index 00000000..516f5e2e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCardData.java @@ -0,0 +1,518 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBusinessCreditCard; +import unit.java.sdk.model.CreateBusinessDebitCard; +import unit.java.sdk.model.CreateBusinessVirtualCreditCard; +import unit.java.sdk.model.CreateBusinessVirtualDebitCard; +import unit.java.sdk.model.CreateBusinessVirtualDebitCardAttributes; +import unit.java.sdk.model.CreateCardRelationships; +import unit.java.sdk.model.CreateIndividualDebitCard; +import unit.java.sdk.model.CreateIndividualVirtualDebitCard; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import unit.java.sdk.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = CreateCardData.CreateCardDataDeserializer.class) +@JsonSerialize(using = CreateCardData.CreateCardDataSerializer.class) +public class CreateCardData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreateCardData.class.getName()); + + public static class CreateCardDataSerializer extends StdSerializer { + public CreateCardDataSerializer(Class t) { + super(t); + } + + public CreateCardDataSerializer() { + this(null); + } + + @Override + public void serialize(CreateCardData value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class CreateCardDataDeserializer extends StdDeserializer { + public CreateCardDataDeserializer() { + this(CreateCardData.class); + } + + public CreateCardDataDeserializer(Class vc) { + super(vc); + } + + @Override + public CreateCardData deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize CreateBusinessCreditCard + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateBusinessCreditCard.class.equals(Integer.class) || CreateBusinessCreditCard.class.equals(Long.class) || CreateBusinessCreditCard.class.equals(Float.class) || CreateBusinessCreditCard.class.equals(Double.class) || CreateBusinessCreditCard.class.equals(Boolean.class) || CreateBusinessCreditCard.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateBusinessCreditCard.class.equals(Integer.class) || CreateBusinessCreditCard.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateBusinessCreditCard.class.equals(Float.class) || CreateBusinessCreditCard.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateBusinessCreditCard.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateBusinessCreditCard.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateBusinessCreditCard.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateBusinessCreditCard'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateBusinessCreditCard'", e); + } + + // deserialize CreateBusinessDebitCard + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateBusinessDebitCard.class.equals(Integer.class) || CreateBusinessDebitCard.class.equals(Long.class) || CreateBusinessDebitCard.class.equals(Float.class) || CreateBusinessDebitCard.class.equals(Double.class) || CreateBusinessDebitCard.class.equals(Boolean.class) || CreateBusinessDebitCard.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateBusinessDebitCard.class.equals(Integer.class) || CreateBusinessDebitCard.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateBusinessDebitCard.class.equals(Float.class) || CreateBusinessDebitCard.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateBusinessDebitCard.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateBusinessDebitCard.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateBusinessDebitCard.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateBusinessDebitCard'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateBusinessDebitCard'", e); + } + + // deserialize CreateBusinessVirtualCreditCard + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateBusinessVirtualCreditCard.class.equals(Integer.class) || CreateBusinessVirtualCreditCard.class.equals(Long.class) || CreateBusinessVirtualCreditCard.class.equals(Float.class) || CreateBusinessVirtualCreditCard.class.equals(Double.class) || CreateBusinessVirtualCreditCard.class.equals(Boolean.class) || CreateBusinessVirtualCreditCard.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateBusinessVirtualCreditCard.class.equals(Integer.class) || CreateBusinessVirtualCreditCard.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateBusinessVirtualCreditCard.class.equals(Float.class) || CreateBusinessVirtualCreditCard.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateBusinessVirtualCreditCard.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateBusinessVirtualCreditCard.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateBusinessVirtualCreditCard.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateBusinessVirtualCreditCard'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateBusinessVirtualCreditCard'", e); + } + + // deserialize CreateBusinessVirtualDebitCard + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateBusinessVirtualDebitCard.class.equals(Integer.class) || CreateBusinessVirtualDebitCard.class.equals(Long.class) || CreateBusinessVirtualDebitCard.class.equals(Float.class) || CreateBusinessVirtualDebitCard.class.equals(Double.class) || CreateBusinessVirtualDebitCard.class.equals(Boolean.class) || CreateBusinessVirtualDebitCard.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateBusinessVirtualDebitCard.class.equals(Integer.class) || CreateBusinessVirtualDebitCard.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateBusinessVirtualDebitCard.class.equals(Float.class) || CreateBusinessVirtualDebitCard.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateBusinessVirtualDebitCard.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateBusinessVirtualDebitCard.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateBusinessVirtualDebitCard.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateBusinessVirtualDebitCard'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateBusinessVirtualDebitCard'", e); + } + + // deserialize CreateIndividualDebitCard + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateIndividualDebitCard.class.equals(Integer.class) || CreateIndividualDebitCard.class.equals(Long.class) || CreateIndividualDebitCard.class.equals(Float.class) || CreateIndividualDebitCard.class.equals(Double.class) || CreateIndividualDebitCard.class.equals(Boolean.class) || CreateIndividualDebitCard.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateIndividualDebitCard.class.equals(Integer.class) || CreateIndividualDebitCard.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateIndividualDebitCard.class.equals(Float.class) || CreateIndividualDebitCard.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateIndividualDebitCard.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateIndividualDebitCard.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateIndividualDebitCard.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateIndividualDebitCard'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateIndividualDebitCard'", e); + } + + // deserialize CreateIndividualVirtualDebitCard + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateIndividualVirtualDebitCard.class.equals(Integer.class) || CreateIndividualVirtualDebitCard.class.equals(Long.class) || CreateIndividualVirtualDebitCard.class.equals(Float.class) || CreateIndividualVirtualDebitCard.class.equals(Double.class) || CreateIndividualVirtualDebitCard.class.equals(Boolean.class) || CreateIndividualVirtualDebitCard.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateIndividualVirtualDebitCard.class.equals(Integer.class) || CreateIndividualVirtualDebitCard.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateIndividualVirtualDebitCard.class.equals(Float.class) || CreateIndividualVirtualDebitCard.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateIndividualVirtualDebitCard.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateIndividualVirtualDebitCard.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateIndividualVirtualDebitCard.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateIndividualVirtualDebitCard'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateIndividualVirtualDebitCard'", e); + } + + if (match == 1) { + CreateCardData ret = new CreateCardData(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for CreateCardData: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public CreateCardData getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "CreateCardData cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public CreateCardData() { + super("oneOf", Boolean.FALSE); + } + + public CreateCardData(CreateBusinessCreditCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateCardData(CreateBusinessDebitCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateCardData(CreateBusinessVirtualCreditCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateCardData(CreateBusinessVirtualDebitCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateCardData(CreateIndividualDebitCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateCardData(CreateIndividualVirtualDebitCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("CreateBusinessCreditCard", CreateBusinessCreditCard.class); + schemas.put("CreateBusinessDebitCard", CreateBusinessDebitCard.class); + schemas.put("CreateBusinessVirtualCreditCard", CreateBusinessVirtualCreditCard.class); + schemas.put("CreateBusinessVirtualDebitCard", CreateBusinessVirtualDebitCard.class); + schemas.put("CreateIndividualDebitCard", CreateIndividualDebitCard.class); + schemas.put("CreateIndividualVirtualDebitCard", CreateIndividualVirtualDebitCard.class); + JSON.registerDescendants(CreateCardData.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return CreateCardData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(CreateBusinessCreditCard.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreateBusinessDebitCard.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreateBusinessVirtualCreditCard.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreateBusinessVirtualDebitCard.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreateIndividualDebitCard.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreateIndividualVirtualDebitCard.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard"); + } + + /** + * Get the actual instance, which can be the following: + * CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard + * + * @return The actual instance (CreateBusinessCreditCard, CreateBusinessDebitCard, CreateBusinessVirtualCreditCard, CreateBusinessVirtualDebitCard, CreateIndividualDebitCard, CreateIndividualVirtualDebitCard) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateBusinessCreditCard`. If the actual instance is not `CreateBusinessCreditCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateBusinessCreditCard` + * @throws ClassCastException if the instance is not `CreateBusinessCreditCard` + */ + public CreateBusinessCreditCard getCreateBusinessCreditCard() throws ClassCastException { + return (CreateBusinessCreditCard)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateBusinessDebitCard`. If the actual instance is not `CreateBusinessDebitCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateBusinessDebitCard` + * @throws ClassCastException if the instance is not `CreateBusinessDebitCard` + */ + public CreateBusinessDebitCard getCreateBusinessDebitCard() throws ClassCastException { + return (CreateBusinessDebitCard)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateBusinessVirtualCreditCard`. If the actual instance is not `CreateBusinessVirtualCreditCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateBusinessVirtualCreditCard` + * @throws ClassCastException if the instance is not `CreateBusinessVirtualCreditCard` + */ + public CreateBusinessVirtualCreditCard getCreateBusinessVirtualCreditCard() throws ClassCastException { + return (CreateBusinessVirtualCreditCard)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateBusinessVirtualDebitCard`. If the actual instance is not `CreateBusinessVirtualDebitCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateBusinessVirtualDebitCard` + * @throws ClassCastException if the instance is not `CreateBusinessVirtualDebitCard` + */ + public CreateBusinessVirtualDebitCard getCreateBusinessVirtualDebitCard() throws ClassCastException { + return (CreateBusinessVirtualDebitCard)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateIndividualDebitCard`. If the actual instance is not `CreateIndividualDebitCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateIndividualDebitCard` + * @throws ClassCastException if the instance is not `CreateIndividualDebitCard` + */ + public CreateIndividualDebitCard getCreateIndividualDebitCard() throws ClassCastException { + return (CreateIndividualDebitCard)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateIndividualVirtualDebitCard`. If the actual instance is not `CreateIndividualVirtualDebitCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateIndividualVirtualDebitCard` + * @throws ClassCastException if the instance is not `CreateIndividualVirtualDebitCard` + */ + public CreateIndividualVirtualDebitCard getCreateIndividualVirtualDebitCard() throws ClassCastException { + return (CreateIndividualVirtualDebitCard)super.getActualInstance(); + } + + + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof CreateIndividualDebitCard) { + if (getActualInstance() != null) { + joiner.add(((CreateIndividualDebitCard)getActualInstance()).toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateBusinessDebitCard) { + if (getActualInstance() != null) { + joiner.add(((CreateBusinessDebitCard)getActualInstance()).toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateBusinessCreditCard) { + if (getActualInstance() != null) { + joiner.add(((CreateBusinessCreditCard)getActualInstance()).toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateIndividualVirtualDebitCard) { + if (getActualInstance() != null) { + joiner.add(((CreateIndividualVirtualDebitCard)getActualInstance()).toUrlQueryString(prefix + "one_of_3" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateBusinessVirtualDebitCard) { + if (getActualInstance() != null) { + joiner.add(((CreateBusinessVirtualDebitCard)getActualInstance()).toUrlQueryString(prefix + "one_of_4" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateBusinessVirtualCreditCard) { + if (getActualInstance() != null) { + joiner.add(((CreateBusinessVirtualCreditCard)getActualInstance()).toUrlQueryString(prefix + "one_of_5" + suffix)); + } + return joiner.toString(); + } + return null; + } + +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCardRelationships.java b/src/main/java/unit/java/sdk/model/CreateCardRelationships.java new file mode 100644 index 00000000..4e853530 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCardRelationships.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateCardRelationships + */ +@JsonPropertyOrder({ + CreateCardRelationships.JSON_PROPERTY_ACCOUNT, + CreateCardRelationships.JSON_PROPERTY_CUSTOMER, + CreateCardRelationships.JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCardRelationships { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private Relationship account; + + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private Relationship customer; + + public static final String JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT = "defaultFundingAccount"; + private Relationship defaultFundingAccount; + + public CreateCardRelationships() { + } + + public CreateCardRelationships account(Relationship account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationship getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(Relationship account) { + this.account = account; + } + + + public CreateCardRelationships customer(Relationship customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Relationship getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomer(Relationship customer) { + this.customer = customer; + } + + + public CreateCardRelationships defaultFundingAccount(Relationship defaultFundingAccount) { + this.defaultFundingAccount = defaultFundingAccount; + return this; + } + + /** + * Get defaultFundingAccount + * @return defaultFundingAccount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Relationship getDefaultFundingAccount() { + return defaultFundingAccount; + } + + + @JsonProperty(JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefaultFundingAccount(Relationship defaultFundingAccount) { + this.defaultFundingAccount = defaultFundingAccount; + } + + + /** + * Return true if this createCardRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCardRelationships createCardRelationships = (CreateCardRelationships) o; + return Objects.equals(this.account, createCardRelationships.account) && + Objects.equals(this.customer, createCardRelationships.customer) && + Objects.equals(this.defaultFundingAccount, createCardRelationships.defaultFundingAccount); + } + + @Override + public int hashCode() { + return Objects.hash(account, customer, defaultFundingAccount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCardRelationships {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" defaultFundingAccount: ").append(toIndentedString(defaultFundingAccount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + // add `defaultFundingAccount` to the URL query string + if (getDefaultFundingAccount() != null) { + joiner.add(getDefaultFundingAccount().toUrlQueryString(prefix + "defaultFundingAccount" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCheckDeposit.java b/src/main/java/unit/java/sdk/model/CreateCheckDeposit.java new file mode 100644 index 00000000..aa6d2499 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCheckDeposit.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCheckDepositData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateCheckDeposit + */ +@JsonPropertyOrder({ + CreateCheckDeposit.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCheckDeposit { + public static final String JSON_PROPERTY_DATA = "data"; + private CreateCheckDepositData data; + + public CreateCheckDeposit() { + } + + public CreateCheckDeposit data(CreateCheckDepositData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateCheckDepositData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(CreateCheckDepositData data) { + this.data = data; + } + + + /** + * Return true if this createCheckDeposit object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCheckDeposit createCheckDeposit = (CreateCheckDeposit) o; + return Objects.equals(this.data, createCheckDeposit.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCheckDeposit {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCheckDepositData.java b/src/main/java/unit/java/sdk/model/CreateCheckDepositData.java new file mode 100644 index 00000000..5230a212 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCheckDepositData.java @@ -0,0 +1,257 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCheckDepositDataAttributes; +import unit.java.sdk.model.CreateCheckDepositRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateCheckDepositData + */ +@JsonPropertyOrder({ + CreateCheckDepositData.JSON_PROPERTY_TYPE, + CreateCheckDepositData.JSON_PROPERTY_ATTRIBUTES, + CreateCheckDepositData.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCheckDepositData { + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHECKDEPOSIT("checkDeposit"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type = TypeEnum.CHECKDEPOSIT; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateCheckDepositDataAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateCheckDepositRelationships relationships; + + public CreateCheckDepositData() { + } + + public CreateCheckDepositData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public CreateCheckDepositData attributes(CreateCheckDepositDataAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateCheckDepositDataAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateCheckDepositDataAttributes attributes) { + this.attributes = attributes; + } + + + public CreateCheckDepositData relationships(CreateCheckDepositRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateCheckDepositRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateCheckDepositRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this createCheckDeposit_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCheckDepositData createCheckDepositData = (CreateCheckDepositData) o; + return Objects.equals(this.type, createCheckDepositData.type) && + Objects.equals(this.attributes, createCheckDepositData.attributes) && + Objects.equals(this.relationships, createCheckDepositData.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCheckDepositData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCheckDepositDataAttributes.java b/src/main/java/unit/java/sdk/model/CreateCheckDepositDataAttributes.java new file mode 100644 index 00000000..1e2d5649 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCheckDepositDataAttributes.java @@ -0,0 +1,259 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateCheckDepositDataAttributes + */ +@JsonPropertyOrder({ + CreateCheckDepositDataAttributes.JSON_PROPERTY_AMOUNT, + CreateCheckDepositDataAttributes.JSON_PROPERTY_DESCRIPTION, + CreateCheckDepositDataAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateCheckDepositDataAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCheckDepositDataAttributes { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public CreateCheckDepositDataAttributes() { + } + + public CreateCheckDepositDataAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CreateCheckDepositDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public CreateCheckDepositDataAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateCheckDepositDataAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this createCheckDeposit_data_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCheckDepositDataAttributes createCheckDepositDataAttributes = (CreateCheckDepositDataAttributes) o; + return Objects.equals(this.amount, createCheckDepositDataAttributes.amount) && + Objects.equals(this.description, createCheckDepositDataAttributes.description) && + Objects.equals(this.idempotencyKey, createCheckDepositDataAttributes.idempotencyKey) && + Objects.equals(this.tags, createCheckDepositDataAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(amount, description, idempotencyKey, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCheckDepositDataAttributes {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCheckDepositRelationships.java b/src/main/java/unit/java/sdk/model/CreateCheckDepositRelationships.java new file mode 100644 index 00000000..6df00389 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCheckDepositRelationships.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateCheckDepositRelationships + */ +@JsonPropertyOrder({ + CreateCheckDepositRelationships.JSON_PROPERTY_ACCOUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCheckDepositRelationships { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private Relationship account; + + public CreateCheckDepositRelationships() { + } + + public CreateCheckDepositRelationships account(Relationship account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationship getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(Relationship account) { + this.account = account; + } + + + /** + * Return true if this createCheckDepositRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCheckDepositRelationships createCheckDepositRelationships = (CreateCheckDepositRelationships) o; + return Objects.equals(this.account, createCheckDepositRelationships.account); + } + + @Override + public int hashCode() { + return Objects.hash(account); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCheckDepositRelationships {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCheckPayment.java b/src/main/java/unit/java/sdk/model/CreateCheckPayment.java new file mode 100644 index 00000000..e1cdae9f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCheckPayment.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckPayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateCheckPayment + */ +@JsonPropertyOrder({ + CreateCheckPayment.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCheckPayment { + public static final String JSON_PROPERTY_DATA = "data"; + private CheckPayment data; + + public CreateCheckPayment() { + } + + public CreateCheckPayment data(CheckPayment data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CheckPayment getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(CheckPayment data) { + this.data = data; + } + + + /** + * Return true if this createCheckPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCheckPayment createCheckPayment = (CreateCheckPayment) o; + return Objects.equals(this.data, createCheckPayment.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCheckPayment {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCounterparty.java b/src/main/java/unit/java/sdk/model/CreateCounterparty.java new file mode 100644 index 00000000..220d987c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCounterparty.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCounterpartyData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateCounterparty + */ +@JsonPropertyOrder({ + CreateCounterparty.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCounterparty { + public static final String JSON_PROPERTY_DATA = "data"; + private CreateCounterpartyData data; + + public CreateCounterparty() { + } + + public CreateCounterparty data(CreateCounterpartyData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateCounterpartyData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(CreateCounterpartyData data) { + this.data = data; + } + + + /** + * Return true if this createCounterparty object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCounterparty createCounterparty = (CreateCounterparty) o; + return Objects.equals(this.data, createCounterparty.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCounterparty {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCounterpartyData.java b/src/main/java/unit/java/sdk/model/CreateCounterpartyData.java new file mode 100644 index 00000000..15e774fa --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCounterpartyData.java @@ -0,0 +1,298 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchCounterparty; +import unit.java.sdk.model.CreateCounterpartyRelationships; +import unit.java.sdk.model.CreatePlaidCounterparty; +import unit.java.sdk.model.CreatePlaidCounterpartyAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import unit.java.sdk.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = CreateCounterpartyData.CreateCounterpartyDataDeserializer.class) +@JsonSerialize(using = CreateCounterpartyData.CreateCounterpartyDataSerializer.class) +public class CreateCounterpartyData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreateCounterpartyData.class.getName()); + + public static class CreateCounterpartyDataSerializer extends StdSerializer { + public CreateCounterpartyDataSerializer(Class t) { + super(t); + } + + public CreateCounterpartyDataSerializer() { + this(null); + } + + @Override + public void serialize(CreateCounterpartyData value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class CreateCounterpartyDataDeserializer extends StdDeserializer { + public CreateCounterpartyDataDeserializer() { + this(CreateCounterpartyData.class); + } + + public CreateCounterpartyDataDeserializer(Class vc) { + super(vc); + } + + @Override + public CreateCounterpartyData deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize CreateAchCounterparty + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateAchCounterparty.class.equals(Integer.class) || CreateAchCounterparty.class.equals(Long.class) || CreateAchCounterparty.class.equals(Float.class) || CreateAchCounterparty.class.equals(Double.class) || CreateAchCounterparty.class.equals(Boolean.class) || CreateAchCounterparty.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateAchCounterparty.class.equals(Integer.class) || CreateAchCounterparty.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateAchCounterparty.class.equals(Float.class) || CreateAchCounterparty.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateAchCounterparty.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateAchCounterparty.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateAchCounterparty.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateAchCounterparty'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateAchCounterparty'", e); + } + + // deserialize CreatePlaidCounterparty + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreatePlaidCounterparty.class.equals(Integer.class) || CreatePlaidCounterparty.class.equals(Long.class) || CreatePlaidCounterparty.class.equals(Float.class) || CreatePlaidCounterparty.class.equals(Double.class) || CreatePlaidCounterparty.class.equals(Boolean.class) || CreatePlaidCounterparty.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreatePlaidCounterparty.class.equals(Integer.class) || CreatePlaidCounterparty.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreatePlaidCounterparty.class.equals(Float.class) || CreatePlaidCounterparty.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreatePlaidCounterparty.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreatePlaidCounterparty.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreatePlaidCounterparty.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreatePlaidCounterparty'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreatePlaidCounterparty'", e); + } + + if (match == 1) { + CreateCounterpartyData ret = new CreateCounterpartyData(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for CreateCounterpartyData: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public CreateCounterpartyData getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "CreateCounterpartyData cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public CreateCounterpartyData() { + super("oneOf", Boolean.FALSE); + } + + public CreateCounterpartyData(CreateAchCounterparty o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateCounterpartyData(CreatePlaidCounterparty o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("CreateAchCounterparty", CreateAchCounterparty.class); + schemas.put("CreatePlaidCounterparty", CreatePlaidCounterparty.class); + JSON.registerDescendants(CreateCounterpartyData.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return CreateCounterpartyData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * CreateAchCounterparty, CreatePlaidCounterparty + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(CreateAchCounterparty.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreatePlaidCounterparty.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be CreateAchCounterparty, CreatePlaidCounterparty"); + } + + /** + * Get the actual instance, which can be the following: + * CreateAchCounterparty, CreatePlaidCounterparty + * + * @return The actual instance (CreateAchCounterparty, CreatePlaidCounterparty) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateAchCounterparty`. If the actual instance is not `CreateAchCounterparty`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateAchCounterparty` + * @throws ClassCastException if the instance is not `CreateAchCounterparty` + */ + public CreateAchCounterparty getCreateAchCounterparty() throws ClassCastException { + return (CreateAchCounterparty)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreatePlaidCounterparty`. If the actual instance is not `CreatePlaidCounterparty`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreatePlaidCounterparty` + * @throws ClassCastException if the instance is not `CreatePlaidCounterparty` + */ + public CreatePlaidCounterparty getCreatePlaidCounterparty() throws ClassCastException { + return (CreatePlaidCounterparty)super.getActualInstance(); + } + + + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof CreateAchCounterparty) { + if (getActualInstance() != null) { + joiner.add(((CreateAchCounterparty)getActualInstance()).toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreatePlaidCounterparty) { + if (getActualInstance() != null) { + joiner.add(((CreatePlaidCounterparty)getActualInstance()).toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } + +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCounterpartyRelationships.java b/src/main/java/unit/java/sdk/model/CreateCounterpartyRelationships.java new file mode 100644 index 00000000..44011f7a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCounterpartyRelationships.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateCounterpartyRelationships + */ +@JsonPropertyOrder({ + CreateCounterpartyRelationships.JSON_PROPERTY_CUSTOMER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCounterpartyRelationships { + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private Relationship customer; + + public CreateCounterpartyRelationships() { + } + + public CreateCounterpartyRelationships customer(Relationship customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationship getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomer(Relationship customer) { + this.customer = customer; + } + + + /** + * Return true if this createCounterpartyRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCounterpartyRelationships createCounterpartyRelationships = (CreateCounterpartyRelationships) o; + return Objects.equals(this.customer, createCounterpartyRelationships.customer); + } + + @Override + public int hashCode() { + return Objects.hash(customer); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCounterpartyRelationships {\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCreditAccount.java b/src/main/java/unit/java/sdk/model/CreateCreditAccount.java new file mode 100644 index 00000000..a633f121 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCreditAccount.java @@ -0,0 +1,257 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCreditAccountAttributes; +import unit.java.sdk.model.CreateCreditAccountRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateCreditAccount + */ +@JsonPropertyOrder({ + CreateCreditAccount.JSON_PROPERTY_TYPE, + CreateCreditAccount.JSON_PROPERTY_ATTRIBUTES, + CreateCreditAccount.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCreditAccount { + /** + * Gets or Sets type + */ + public enum TypeEnum { + CREDITACCOUNT("creditAccount"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type = TypeEnum.CREDITACCOUNT; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateCreditAccountAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateCreditAccountRelationships relationships; + + public CreateCreditAccount() { + } + + public CreateCreditAccount type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public CreateCreditAccount attributes(CreateCreditAccountAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateCreditAccountAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(CreateCreditAccountAttributes attributes) { + this.attributes = attributes; + } + + + public CreateCreditAccount relationships(CreateCreditAccountRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateCreditAccountRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(CreateCreditAccountRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreateCreditAccount object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCreditAccount createCreditAccount = (CreateCreditAccount) o; + return Objects.equals(this.type, createCreditAccount.type) && + Objects.equals(this.attributes, createCreditAccount.attributes) && + Objects.equals(this.relationships, createCreditAccount.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCreditAccount {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCreditAccountAttributes.java b/src/main/java/unit/java/sdk/model/CreateCreditAccountAttributes.java new file mode 100644 index 00000000..df4d0c2e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCreditAccountAttributes.java @@ -0,0 +1,289 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateCreditAccountAttributes + */ +@JsonPropertyOrder({ + CreateCreditAccountAttributes.JSON_PROPERTY_CREDIT_TERMS, + CreateCreditAccountAttributes.JSON_PROPERTY_CREDIT_LIMIT, + CreateCreditAccountAttributes.JSON_PROPERTY_TAGS, + CreateCreditAccountAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCreditAccountAttributes { + public static final String JSON_PROPERTY_CREDIT_TERMS = "creditTerms"; + private String creditTerms; + + public static final String JSON_PROPERTY_CREDIT_LIMIT = "creditLimit"; + private Integer creditLimit; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private JsonNullable tags = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private JsonNullable idempotencyKey = JsonNullable.undefined(); + + public CreateCreditAccountAttributes() { + } + + public CreateCreditAccountAttributes creditTerms(String creditTerms) { + this.creditTerms = creditTerms; + return this; + } + + /** + * Get creditTerms + * @return creditTerms + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREDIT_TERMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCreditTerms() { + return creditTerms; + } + + + @JsonProperty(JSON_PROPERTY_CREDIT_TERMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreditTerms(String creditTerms) { + this.creditTerms = creditTerms; + } + + + public CreateCreditAccountAttributes creditLimit(Integer creditLimit) { + this.creditLimit = creditLimit; + return this; + } + + /** + * Get creditLimit + * @return creditLimit + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREDIT_LIMIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getCreditLimit() { + return creditLimit; + } + + + @JsonProperty(JSON_PROPERTY_CREDIT_LIMIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreditLimit(Integer creditLimit) { + this.creditLimit = creditLimit; + } + + + public CreateCreditAccountAttributes tags(Object tags) { + this.tags = JsonNullable.of(tags); + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public Object getTags() { + return tags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTags_JsonNullable() { + return tags; + } + + @JsonProperty(JSON_PROPERTY_TAGS) + public void setTags_JsonNullable(JsonNullable tags) { + this.tags = tags; + } + + public void setTags(Object tags) { + this.tags = JsonNullable.of(tags); + } + + + public CreateCreditAccountAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = JsonNullable.of(idempotencyKey); + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getIdempotencyKey() { + return idempotencyKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIdempotencyKey_JsonNullable() { + return idempotencyKey; + } + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + public void setIdempotencyKey_JsonNullable(JsonNullable idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = JsonNullable.of(idempotencyKey); + } + + + /** + * Return true if this CreateCreditAccount_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCreditAccountAttributes createCreditAccountAttributes = (CreateCreditAccountAttributes) o; + return Objects.equals(this.creditTerms, createCreditAccountAttributes.creditTerms) && + Objects.equals(this.creditLimit, createCreditAccountAttributes.creditLimit) && + equalsNullable(this.tags, createCreditAccountAttributes.tags) && + equalsNullable(this.idempotencyKey, createCreditAccountAttributes.idempotencyKey); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(creditTerms, creditLimit, hashCodeNullable(tags), hashCodeNullable(idempotencyKey)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCreditAccountAttributes {\n"); + sb.append(" creditTerms: ").append(toIndentedString(creditTerms)).append("\n"); + sb.append(" creditLimit: ").append(toIndentedString(creditLimit)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `creditTerms` to the URL query string + if (getCreditTerms() != null) { + joiner.add(String.format("%screditTerms%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreditTerms()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `creditLimit` to the URL query string + if (getCreditLimit() != null) { + joiner.add(String.format("%screditLimit%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreditLimit()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCreditAccountRelationships.java b/src/main/java/unit/java/sdk/model/CreateCreditAccountRelationships.java new file mode 100644 index 00000000..2daac01b --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCreditAccountRelationships.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomerLinkage; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateCreditAccountRelationships + */ +@JsonPropertyOrder({ + CreateCreditAccountRelationships.JSON_PROPERTY_CUSTOMER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCreditAccountRelationships { + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private CustomerLinkage customer; + + public CreateCreditAccountRelationships() { + } + + public CreateCreditAccountRelationships customer(CustomerLinkage customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CustomerLinkage getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomer(CustomerLinkage customer) { + this.customer = customer; + } + + + /** + * Return true if this CreateCreditAccount_relationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCreditAccountRelationships createCreditAccountRelationships = (CreateCreditAccountRelationships) o; + return Objects.equals(this.customer, createCreditAccountRelationships.customer); + } + + @Override + public int hashCode() { + return Objects.hash(customer); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCreditAccountRelationships {\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCustomerToken.java b/src/main/java/unit/java/sdk/model/CreateCustomerToken.java new file mode 100644 index 00000000..b91df9c4 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCustomerToken.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCustomerTokenData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateCustomerToken + */ +@JsonPropertyOrder({ + CreateCustomerToken.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCustomerToken { + public static final String JSON_PROPERTY_DATA = "data"; + private CreateCustomerTokenData data; + + public CreateCustomerToken() { + } + + public CreateCustomerToken data(CreateCustomerTokenData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateCustomerTokenData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(CreateCustomerTokenData data) { + this.data = data; + } + + + /** + * Return true if this createCustomerToken object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCustomerToken createCustomerToken = (CreateCustomerToken) o; + return Objects.equals(this.data, createCustomerToken.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCustomerToken {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCustomerTokenData.java b/src/main/java/unit/java/sdk/model/CreateCustomerTokenData.java new file mode 100644 index 00000000..bd317ddd --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCustomerTokenData.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCustomerTokenDataAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateCustomerTokenData + */ +@JsonPropertyOrder({ + CreateCustomerTokenData.JSON_PROPERTY_TYPE, + CreateCustomerTokenData.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCustomerTokenData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "customerToken"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateCustomerTokenDataAttributes attributes; + + public CreateCustomerTokenData() { + } + + public CreateCustomerTokenData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public CreateCustomerTokenData attributes(CreateCustomerTokenDataAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateCustomerTokenDataAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(CreateCustomerTokenDataAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this createCustomerToken_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCustomerTokenData createCustomerTokenData = (CreateCustomerTokenData) o; + return Objects.equals(this.type, createCustomerTokenData.type) && + Objects.equals(this.attributes, createCustomerTokenData.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCustomerTokenData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCustomerTokenDataAttributes.java b/src/main/java/unit/java/sdk/model/CreateCustomerTokenDataAttributes.java new file mode 100644 index 00000000..8a493ccf --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCustomerTokenDataAttributes.java @@ -0,0 +1,382 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.CreateApiTokenDataAttributesResourcesInner; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateCustomerTokenDataAttributes + */ +@JsonPropertyOrder({ + CreateCustomerTokenDataAttributes.JSON_PROPERTY_SCOPE, + CreateCustomerTokenDataAttributes.JSON_PROPERTY_VERIFICATION_TOKEN, + CreateCustomerTokenDataAttributes.JSON_PROPERTY_JWT_TOKEN, + CreateCustomerTokenDataAttributes.JSON_PROPERTY_EXPIRES_IN, + CreateCustomerTokenDataAttributes.JSON_PROPERTY_VERIFICATION_CODE, + CreateCustomerTokenDataAttributes.JSON_PROPERTY_RESOURCES, + CreateCustomerTokenDataAttributes.JSON_PROPERTY_UPGRADABLE_SCOPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCustomerTokenDataAttributes { + public static final String JSON_PROPERTY_SCOPE = "scope"; + private String scope; + + public static final String JSON_PROPERTY_VERIFICATION_TOKEN = "verificationToken"; + private String verificationToken; + + public static final String JSON_PROPERTY_JWT_TOKEN = "jwtToken"; + private String jwtToken; + + public static final String JSON_PROPERTY_EXPIRES_IN = "expiresIn"; + private Integer expiresIn; + + public static final String JSON_PROPERTY_VERIFICATION_CODE = "verificationCode"; + private String verificationCode; + + public static final String JSON_PROPERTY_RESOURCES = "resources"; + private List resources; + + public static final String JSON_PROPERTY_UPGRADABLE_SCOPE = "upgradableScope"; + private String upgradableScope; + + public CreateCustomerTokenDataAttributes() { + } + + public CreateCustomerTokenDataAttributes scope(String scope) { + this.scope = scope; + return this; + } + + /** + * Get scope + * @return scope + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getScope() { + return scope; + } + + + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScope(String scope) { + this.scope = scope; + } + + + public CreateCustomerTokenDataAttributes verificationToken(String verificationToken) { + this.verificationToken = verificationToken; + return this; + } + + /** + * Get verificationToken + * @return verificationToken + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERIFICATION_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getVerificationToken() { + return verificationToken; + } + + + @JsonProperty(JSON_PROPERTY_VERIFICATION_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVerificationToken(String verificationToken) { + this.verificationToken = verificationToken; + } + + + public CreateCustomerTokenDataAttributes jwtToken(String jwtToken) { + this.jwtToken = jwtToken; + return this; + } + + /** + * Get jwtToken + * @return jwtToken + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_JWT_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getJwtToken() { + return jwtToken; + } + + + @JsonProperty(JSON_PROPERTY_JWT_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setJwtToken(String jwtToken) { + this.jwtToken = jwtToken; + } + + + public CreateCustomerTokenDataAttributes expiresIn(Integer expiresIn) { + this.expiresIn = expiresIn; + return this; + } + + /** + * Get expiresIn + * @return expiresIn + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPIRES_IN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getExpiresIn() { + return expiresIn; + } + + + @JsonProperty(JSON_PROPERTY_EXPIRES_IN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpiresIn(Integer expiresIn) { + this.expiresIn = expiresIn; + } + + + public CreateCustomerTokenDataAttributes verificationCode(String verificationCode) { + this.verificationCode = verificationCode; + return this; + } + + /** + * Get verificationCode + * @return verificationCode + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERIFICATION_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getVerificationCode() { + return verificationCode; + } + + + @JsonProperty(JSON_PROPERTY_VERIFICATION_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVerificationCode(String verificationCode) { + this.verificationCode = verificationCode; + } + + + public CreateCustomerTokenDataAttributes resources(List resources) { + this.resources = resources; + return this; + } + + public CreateCustomerTokenDataAttributes addResourcesItem(CreateApiTokenDataAttributesResourcesInner resourcesItem) { + if (this.resources == null) { + this.resources = new ArrayList<>(); + } + this.resources.add(resourcesItem); + return this; + } + + /** + * Get resources + * @return resources + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getResources() { + return resources; + } + + + @JsonProperty(JSON_PROPERTY_RESOURCES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResources(List resources) { + this.resources = resources; + } + + + public CreateCustomerTokenDataAttributes upgradableScope(String upgradableScope) { + this.upgradableScope = upgradableScope; + return this; + } + + /** + * Get upgradableScope + * @return upgradableScope + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPGRADABLE_SCOPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUpgradableScope() { + return upgradableScope; + } + + + @JsonProperty(JSON_PROPERTY_UPGRADABLE_SCOPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpgradableScope(String upgradableScope) { + this.upgradableScope = upgradableScope; + } + + + /** + * Return true if this createCustomerToken_data_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCustomerTokenDataAttributes createCustomerTokenDataAttributes = (CreateCustomerTokenDataAttributes) o; + return Objects.equals(this.scope, createCustomerTokenDataAttributes.scope) && + Objects.equals(this.verificationToken, createCustomerTokenDataAttributes.verificationToken) && + Objects.equals(this.jwtToken, createCustomerTokenDataAttributes.jwtToken) && + Objects.equals(this.expiresIn, createCustomerTokenDataAttributes.expiresIn) && + Objects.equals(this.verificationCode, createCustomerTokenDataAttributes.verificationCode) && + Objects.equals(this.resources, createCustomerTokenDataAttributes.resources) && + Objects.equals(this.upgradableScope, createCustomerTokenDataAttributes.upgradableScope); + } + + @Override + public int hashCode() { + return Objects.hash(scope, verificationToken, jwtToken, expiresIn, verificationCode, resources, upgradableScope); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCustomerTokenDataAttributes {\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" verificationToken: ").append(toIndentedString(verificationToken)).append("\n"); + sb.append(" jwtToken: ").append(toIndentedString(jwtToken)).append("\n"); + sb.append(" expiresIn: ").append(toIndentedString(expiresIn)).append("\n"); + sb.append(" verificationCode: ").append(toIndentedString(verificationCode)).append("\n"); + sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); + sb.append(" upgradableScope: ").append(toIndentedString(upgradableScope)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `scope` to the URL query string + if (getScope() != null) { + joiner.add(String.format("%sscope%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getScope()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `verificationToken` to the URL query string + if (getVerificationToken() != null) { + joiner.add(String.format("%sverificationToken%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVerificationToken()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `jwtToken` to the URL query string + if (getJwtToken() != null) { + joiner.add(String.format("%sjwtToken%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getJwtToken()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `expiresIn` to the URL query string + if (getExpiresIn() != null) { + joiner.add(String.format("%sexpiresIn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getExpiresIn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `verificationCode` to the URL query string + if (getVerificationCode() != null) { + joiner.add(String.format("%sverificationCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVerificationCode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `resources` to the URL query string + if (getResources() != null) { + for (int i = 0; i < getResources().size(); i++) { + if (getResources().get(i) != null) { + joiner.add(getResources().get(i).toUrlQueryString(String.format("%sresources%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `upgradableScope` to the URL query string + if (getUpgradableScope() != null) { + joiner.add(String.format("%supgradableScope%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpgradableScope()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCustomerTokenVerification.java b/src/main/java/unit/java/sdk/model/CreateCustomerTokenVerification.java new file mode 100644 index 00000000..0b4d7164 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCustomerTokenVerification.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCustomerTokenVerificationData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateCustomerTokenVerification + */ +@JsonPropertyOrder({ + CreateCustomerTokenVerification.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCustomerTokenVerification { + public static final String JSON_PROPERTY_DATA = "data"; + private CreateCustomerTokenVerificationData data; + + public CreateCustomerTokenVerification() { + } + + public CreateCustomerTokenVerification data(CreateCustomerTokenVerificationData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateCustomerTokenVerificationData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(CreateCustomerTokenVerificationData data) { + this.data = data; + } + + + /** + * Return true if this createCustomerTokenVerification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCustomerTokenVerification createCustomerTokenVerification = (CreateCustomerTokenVerification) o; + return Objects.equals(this.data, createCustomerTokenVerification.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCustomerTokenVerification {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCustomerTokenVerificationData.java b/src/main/java/unit/java/sdk/model/CreateCustomerTokenVerificationData.java new file mode 100644 index 00000000..f3255d09 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCustomerTokenVerificationData.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCustomerTokenVerificationDataAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateCustomerTokenVerificationData + */ +@JsonPropertyOrder({ + CreateCustomerTokenVerificationData.JSON_PROPERTY_TYPE, + CreateCustomerTokenVerificationData.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCustomerTokenVerificationData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "customerTokenVerification"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateCustomerTokenVerificationDataAttributes attributes; + + public CreateCustomerTokenVerificationData() { + } + + public CreateCustomerTokenVerificationData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CreateCustomerTokenVerificationData attributes(CreateCustomerTokenVerificationDataAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateCustomerTokenVerificationDataAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateCustomerTokenVerificationDataAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this createCustomerTokenVerification_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCustomerTokenVerificationData createCustomerTokenVerificationData = (CreateCustomerTokenVerificationData) o; + return Objects.equals(this.type, createCustomerTokenVerificationData.type) && + Objects.equals(this.attributes, createCustomerTokenVerificationData.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCustomerTokenVerificationData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateCustomerTokenVerificationDataAttributes.java b/src/main/java/unit/java/sdk/model/CreateCustomerTokenVerificationDataAttributes.java new file mode 100644 index 00000000..7a4e9992 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateCustomerTokenVerificationDataAttributes.java @@ -0,0 +1,407 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateCustomerTokenVerificationDataAttributes + */ +@JsonPropertyOrder({ + CreateCustomerTokenVerificationDataAttributes.JSON_PROPERTY_CHANNEL, + CreateCustomerTokenVerificationDataAttributes.JSON_PROPERTY_PHONE, + CreateCustomerTokenVerificationDataAttributes.JSON_PROPERTY_APP_HASH, + CreateCustomerTokenVerificationDataAttributes.JSON_PROPERTY_LANGUAGE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCustomerTokenVerificationDataAttributes { + /** + * Gets or Sets channel + */ + public enum ChannelEnum { + SMS("sms"), + + CALL("call"); + + private String value; + + ChannelEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ChannelEnum fromValue(String value) { + for (ChannelEnum b : ChannelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_CHANNEL = "channel"; + private ChannelEnum channel; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_APP_HASH = "appHash"; + private String appHash; + + /** + * Gets or Sets language + */ + public enum LanguageEnum { + EN("en"), + + AF("af"), + + AR("ar"), + + CA("ca"), + + ZH("zh"), + + ZH_CN("zh-CN"), + + ZH_HK("zh-HK"), + + HR("hr"), + + CS("cs"), + + DA("da"), + + NL("nl"), + + EN_GB("en-GB"), + + ET("et"), + + FI("fi"), + + FR("fr"), + + DE("de"), + + EL("el"), + + HE("he"), + + HI("hi"), + + HU("hu"), + + ID("id"), + + IT("it"), + + JA("ja"), + + KN("kn"), + + KO("ko"), + + MS("ms"), + + MR("mr"), + + NB("nb"), + + PL("pl"), + + PT_BR("pt-BR"), + + PT("pt"), + + RO("ro"), + + RU("ru"), + + SK("sk"), + + ES("es"), + + SV("sv"), + + TL("tl"), + + TE("te"), + + TH("th"), + + TR("tr"), + + VI("vi"); + + private String value; + + LanguageEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LanguageEnum fromValue(String value) { + for (LanguageEnum b : LanguageEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_LANGUAGE = "language"; + private LanguageEnum language; + + public CreateCustomerTokenVerificationDataAttributes() { + } + + public CreateCustomerTokenVerificationDataAttributes channel(ChannelEnum channel) { + this.channel = channel; + return this; + } + + /** + * Get channel + * @return channel + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHANNEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ChannelEnum getChannel() { + return channel; + } + + + @JsonProperty(JSON_PROPERTY_CHANNEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChannel(ChannelEnum channel) { + this.channel = channel; + } + + + public CreateCustomerTokenVerificationDataAttributes phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public CreateCustomerTokenVerificationDataAttributes appHash(String appHash) { + this.appHash = appHash; + return this; + } + + /** + * Get appHash + * @return appHash + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APP_HASH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAppHash() { + return appHash; + } + + + @JsonProperty(JSON_PROPERTY_APP_HASH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAppHash(String appHash) { + this.appHash = appHash; + } + + + public CreateCustomerTokenVerificationDataAttributes language(LanguageEnum language) { + this.language = language; + return this; + } + + /** + * Get language + * @return language + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LANGUAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LanguageEnum getLanguage() { + return language; + } + + + @JsonProperty(JSON_PROPERTY_LANGUAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLanguage(LanguageEnum language) { + this.language = language; + } + + + /** + * Return true if this createCustomerTokenVerification_data_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCustomerTokenVerificationDataAttributes createCustomerTokenVerificationDataAttributes = (CreateCustomerTokenVerificationDataAttributes) o; + return Objects.equals(this.channel, createCustomerTokenVerificationDataAttributes.channel) && + Objects.equals(this.phone, createCustomerTokenVerificationDataAttributes.phone) && + Objects.equals(this.appHash, createCustomerTokenVerificationDataAttributes.appHash) && + Objects.equals(this.language, createCustomerTokenVerificationDataAttributes.language); + } + + @Override + public int hashCode() { + return Objects.hash(channel, phone, appHash, language); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCustomerTokenVerificationDataAttributes {\n"); + sb.append(" channel: ").append(toIndentedString(channel)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" appHash: ").append(toIndentedString(appHash)).append("\n"); + sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `channel` to the URL query string + if (getChannel() != null) { + joiner.add(String.format("%schannel%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getChannel()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `appHash` to the URL query string + if (getAppHash() != null) { + joiner.add(String.format("%sappHash%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAppHash()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `language` to the URL query string + if (getLanguage() != null) { + joiner.add(String.format("%slanguage%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLanguage()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateDepositAccount.java b/src/main/java/unit/java/sdk/model/CreateDepositAccount.java new file mode 100644 index 00000000..c7bd1200 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateDepositAccount.java @@ -0,0 +1,257 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateDepositAccountAttributes; +import unit.java.sdk.model.CreateDepositAccountRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateDepositAccount + */ +@JsonPropertyOrder({ + CreateDepositAccount.JSON_PROPERTY_TYPE, + CreateDepositAccount.JSON_PROPERTY_ATTRIBUTES, + CreateDepositAccount.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateDepositAccount { + /** + * Gets or Sets type + */ + public enum TypeEnum { + DEPOSITACCOUNT("depositAccount"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type = TypeEnum.DEPOSITACCOUNT; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateDepositAccountAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateDepositAccountRelationships relationships; + + public CreateDepositAccount() { + } + + public CreateDepositAccount type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public CreateDepositAccount attributes(CreateDepositAccountAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateDepositAccountAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(CreateDepositAccountAttributes attributes) { + this.attributes = attributes; + } + + + public CreateDepositAccount relationships(CreateDepositAccountRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateDepositAccountRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(CreateDepositAccountRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreateDepositAccount object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateDepositAccount createDepositAccount = (CreateDepositAccount) o; + return Objects.equals(this.type, createDepositAccount.type) && + Objects.equals(this.attributes, createDepositAccount.attributes) && + Objects.equals(this.relationships, createDepositAccount.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateDepositAccount {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateDepositAccountAttributes.java b/src/main/java/unit/java/sdk/model/CreateDepositAccountAttributes.java new file mode 100644 index 00000000..d6bcbdad --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateDepositAccountAttributes.java @@ -0,0 +1,253 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateDepositAccountAttributes + */ +@JsonPropertyOrder({ + CreateDepositAccountAttributes.JSON_PROPERTY_DEPOSIT_PRODUCT, + CreateDepositAccountAttributes.JSON_PROPERTY_TAGS, + CreateDepositAccountAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateDepositAccountAttributes { + public static final String JSON_PROPERTY_DEPOSIT_PRODUCT = "depositProduct"; + private String depositProduct; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private JsonNullable tags = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private JsonNullable idempotencyKey = JsonNullable.undefined(); + + public CreateDepositAccountAttributes() { + } + + public CreateDepositAccountAttributes depositProduct(String depositProduct) { + this.depositProduct = depositProduct; + return this; + } + + /** + * Get depositProduct + * @return depositProduct + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DEPOSIT_PRODUCT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDepositProduct() { + return depositProduct; + } + + + @JsonProperty(JSON_PROPERTY_DEPOSIT_PRODUCT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDepositProduct(String depositProduct) { + this.depositProduct = depositProduct; + } + + + public CreateDepositAccountAttributes tags(Object tags) { + this.tags = JsonNullable.of(tags); + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public Object getTags() { + return tags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTags_JsonNullable() { + return tags; + } + + @JsonProperty(JSON_PROPERTY_TAGS) + public void setTags_JsonNullable(JsonNullable tags) { + this.tags = tags; + } + + public void setTags(Object tags) { + this.tags = JsonNullable.of(tags); + } + + + public CreateDepositAccountAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = JsonNullable.of(idempotencyKey); + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getIdempotencyKey() { + return idempotencyKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIdempotencyKey_JsonNullable() { + return idempotencyKey; + } + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + public void setIdempotencyKey_JsonNullable(JsonNullable idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = JsonNullable.of(idempotencyKey); + } + + + /** + * Return true if this CreateDepositAccount_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateDepositAccountAttributes createDepositAccountAttributes = (CreateDepositAccountAttributes) o; + return Objects.equals(this.depositProduct, createDepositAccountAttributes.depositProduct) && + equalsNullable(this.tags, createDepositAccountAttributes.tags) && + equalsNullable(this.idempotencyKey, createDepositAccountAttributes.idempotencyKey); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(depositProduct, hashCodeNullable(tags), hashCodeNullable(idempotencyKey)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateDepositAccountAttributes {\n"); + sb.append(" depositProduct: ").append(toIndentedString(depositProduct)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `depositProduct` to the URL query string + if (getDepositProduct() != null) { + joiner.add(String.format("%sdepositProduct%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDepositProduct()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateDepositAccountRelationships.java b/src/main/java/unit/java/sdk/model/CreateDepositAccountRelationships.java new file mode 100644 index 00000000..fe2e6090 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateDepositAccountRelationships.java @@ -0,0 +1,188 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomerLinkage; +import unit.java.sdk.model.CustomersRelationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateDepositAccountRelationships + */ +@JsonPropertyOrder({ + CreateDepositAccountRelationships.JSON_PROPERTY_CUSTOMER, + CreateDepositAccountRelationships.JSON_PROPERTY_CUSTOMERS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateDepositAccountRelationships { + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private CustomerLinkage customer; + + public static final String JSON_PROPERTY_CUSTOMERS = "customers"; + private CustomersRelationship customers; + + public CreateDepositAccountRelationships() { + } + + public CreateDepositAccountRelationships customer(CustomerLinkage customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CustomerLinkage getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomer(CustomerLinkage customer) { + this.customer = customer; + } + + + public CreateDepositAccountRelationships customers(CustomersRelationship customers) { + this.customers = customers; + return this; + } + + /** + * Get customers + * @return customers + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CustomersRelationship getCustomers() { + return customers; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomers(CustomersRelationship customers) { + this.customers = customers; + } + + + /** + * Return true if this CreateDepositAccount_relationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateDepositAccountRelationships createDepositAccountRelationships = (CreateDepositAccountRelationships) o; + return Objects.equals(this.customer, createDepositAccountRelationships.customer) && + Objects.equals(this.customers, createDepositAccountRelationships.customers); + } + + @Override + public int hashCode() { + return Objects.hash(customer, customers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateDepositAccountRelationships {\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" customers: ").append(toIndentedString(customers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + // add `customers` to the URL query string + if (getCustomers() != null) { + joiner.add(getCustomers().toUrlQueryString(prefix + "customers" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateIndividualApplication.java b/src/main/java/unit/java/sdk/model/CreateIndividualApplication.java new file mode 100644 index 00000000..0f2e7c59 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateIndividualApplication.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateIndividualApplicationAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateIndividualApplication + */ +@JsonPropertyOrder({ + CreateIndividualApplication.JSON_PROPERTY_TYPE, + CreateIndividualApplication.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateIndividualApplication { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "individualApplication"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateIndividualApplicationAttributes attributes; + + public CreateIndividualApplication() { + } + + public CreateIndividualApplication type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CreateIndividualApplication attributes(CreateIndividualApplicationAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateIndividualApplicationAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateIndividualApplicationAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this CreateIndividualApplication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateIndividualApplication createIndividualApplication = (CreateIndividualApplication) o; + return Objects.equals(this.type, createIndividualApplication.type) && + Objects.equals(this.attributes, createIndividualApplication.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateIndividualApplication {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateIndividualApplicationAttributes.java b/src/main/java/unit/java/sdk/model/CreateIndividualApplicationAttributes.java new file mode 100644 index 00000000..e1742172 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateIndividualApplicationAttributes.java @@ -0,0 +1,863 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.CreatePowerOfAttorneyAgent; +import unit.java.sdk.model.DeviceFingerprint; +import unit.java.sdk.model.EvaluationParams; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Industry; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.SourceOfIncome; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateIndividualApplicationAttributes + */ +@JsonPropertyOrder({ + CreateIndividualApplicationAttributes.JSON_PROPERTY_FULL_NAME, + CreateIndividualApplicationAttributes.JSON_PROPERTY_EMAIL, + CreateIndividualApplicationAttributes.JSON_PROPERTY_PHONE, + CreateIndividualApplicationAttributes.JSON_PROPERTY_SSN, + CreateIndividualApplicationAttributes.JSON_PROPERTY_PASSPORT, + CreateIndividualApplicationAttributes.JSON_PROPERTY_NATIONALITY, + CreateIndividualApplicationAttributes.JSON_PROPERTY_ADDRESS, + CreateIndividualApplicationAttributes.JSON_PROPERTY_DATE_OF_BIRTH, + CreateIndividualApplicationAttributes.JSON_PROPERTY_IP, + CreateIndividualApplicationAttributes.JSON_PROPERTY_TAGS, + CreateIndividualApplicationAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateIndividualApplicationAttributes.JSON_PROPERTY_DEVICE_FINGERPRINTS, + CreateIndividualApplicationAttributes.JSON_PROPERTY_JWT_SUBJECT, + CreateIndividualApplicationAttributes.JSON_PROPERTY_POWER_OF_ATTORNEY_AGENT, + CreateIndividualApplicationAttributes.JSON_PROPERTY_INDUSTRY, + CreateIndividualApplicationAttributes.JSON_PROPERTY_EVALUATION_PARAMS, + CreateIndividualApplicationAttributes.JSON_PROPERTY_OCCUPATION, + CreateIndividualApplicationAttributes.JSON_PROPERTY_ANNUAL_INCOME, + CreateIndividualApplicationAttributes.JSON_PROPERTY_SOURCE_OF_INCOME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateIndividualApplicationAttributes { + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_SSN = "ssn"; + private JsonNullable ssn = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PASSPORT = "passport"; + private JsonNullable passport = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public static final String JSON_PROPERTY_IP = "ip"; + private String ip; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_DEVICE_FINGERPRINTS = "deviceFingerprints"; + private List deviceFingerprints; + + public static final String JSON_PROPERTY_JWT_SUBJECT = "jwtSubject"; + private JsonNullable jwtSubject = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_POWER_OF_ATTORNEY_AGENT = "powerOfAttorneyAgent"; + private CreatePowerOfAttorneyAgent powerOfAttorneyAgent; + + public static final String JSON_PROPERTY_INDUSTRY = "industry"; + private Industry industry; + + public static final String JSON_PROPERTY_EVALUATION_PARAMS = "evaluationParams"; + private EvaluationParams evaluationParams; + + public static final String JSON_PROPERTY_OCCUPATION = "occupation"; + private Occupation occupation; + + public static final String JSON_PROPERTY_ANNUAL_INCOME = "annualIncome"; + private AnnualIncome annualIncome; + + public static final String JSON_PROPERTY_SOURCE_OF_INCOME = "sourceOfIncome"; + private SourceOfIncome sourceOfIncome; + + public CreateIndividualApplicationAttributes() { + } + + public CreateIndividualApplicationAttributes fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public CreateIndividualApplicationAttributes email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEmail(String email) { + this.email = email; + } + + + public CreateIndividualApplicationAttributes phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public CreateIndividualApplicationAttributes ssn(String ssn) { + this.ssn = JsonNullable.of(ssn); + return this; + } + + /** + * Get ssn + * @return ssn + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getSsn() { + return ssn.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSsn_JsonNullable() { + return ssn; + } + + @JsonProperty(JSON_PROPERTY_SSN) + public void setSsn_JsonNullable(JsonNullable ssn) { + this.ssn = ssn; + } + + public void setSsn(String ssn) { + this.ssn = JsonNullable.of(ssn); + } + + + public CreateIndividualApplicationAttributes passport(String passport) { + this.passport = JsonNullable.of(passport); + return this; + } + + /** + * Get passport + * @return passport + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getPassport() { + return passport.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPassport_JsonNullable() { + return passport; + } + + @JsonProperty(JSON_PROPERTY_PASSPORT) + public void setPassport_JsonNullable(JsonNullable passport) { + this.passport = passport; + } + + public void setPassport(String passport) { + this.passport = JsonNullable.of(passport); + } + + + public CreateIndividualApplicationAttributes nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * Get nationality + * @return nationality + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + public CreateIndividualApplicationAttributes address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(Address address) { + this.address = address; + } + + + public CreateIndividualApplicationAttributes dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + public CreateIndividualApplicationAttributes ip(String ip) { + this.ip = ip; + return this; + } + + /** + * Get ip + * @return ip + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIp() { + return ip; + } + + + @JsonProperty(JSON_PROPERTY_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIp(String ip) { + this.ip = ip; + } + + + public CreateIndividualApplicationAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateIndividualApplicationAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateIndividualApplicationAttributes deviceFingerprints(List deviceFingerprints) { + this.deviceFingerprints = deviceFingerprints; + return this; + } + + public CreateIndividualApplicationAttributes addDeviceFingerprintsItem(DeviceFingerprint deviceFingerprintsItem) { + if (this.deviceFingerprints == null) { + this.deviceFingerprints = new ArrayList<>(); + } + this.deviceFingerprints.add(deviceFingerprintsItem); + return this; + } + + /** + * Get deviceFingerprints + * @return deviceFingerprints + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEVICE_FINGERPRINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getDeviceFingerprints() { + return deviceFingerprints; + } + + + @JsonProperty(JSON_PROPERTY_DEVICE_FINGERPRINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeviceFingerprints(List deviceFingerprints) { + this.deviceFingerprints = deviceFingerprints; + } + + + public CreateIndividualApplicationAttributes jwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + return this; + } + + /** + * Get jwtSubject + * @return jwtSubject + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getJwtSubject() { + return jwtSubject.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getJwtSubject_JsonNullable() { + return jwtSubject; + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + public void setJwtSubject_JsonNullable(JsonNullable jwtSubject) { + this.jwtSubject = jwtSubject; + } + + public void setJwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + } + + + public CreateIndividualApplicationAttributes powerOfAttorneyAgent(CreatePowerOfAttorneyAgent powerOfAttorneyAgent) { + this.powerOfAttorneyAgent = powerOfAttorneyAgent; + return this; + } + + /** + * Get powerOfAttorneyAgent + * @return powerOfAttorneyAgent + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POWER_OF_ATTORNEY_AGENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreatePowerOfAttorneyAgent getPowerOfAttorneyAgent() { + return powerOfAttorneyAgent; + } + + + @JsonProperty(JSON_PROPERTY_POWER_OF_ATTORNEY_AGENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPowerOfAttorneyAgent(CreatePowerOfAttorneyAgent powerOfAttorneyAgent) { + this.powerOfAttorneyAgent = powerOfAttorneyAgent; + } + + + public CreateIndividualApplicationAttributes industry(Industry industry) { + this.industry = industry; + return this; + } + + /** + * Get industry + * @return industry + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDUSTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Industry getIndustry() { + return industry; + } + + + @JsonProperty(JSON_PROPERTY_INDUSTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIndustry(Industry industry) { + this.industry = industry; + } + + + public CreateIndividualApplicationAttributes evaluationParams(EvaluationParams evaluationParams) { + this.evaluationParams = evaluationParams; + return this; + } + + /** + * Get evaluationParams + * @return evaluationParams + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EvaluationParams getEvaluationParams() { + return evaluationParams; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationParams(EvaluationParams evaluationParams) { + this.evaluationParams = evaluationParams; + } + + + public CreateIndividualApplicationAttributes occupation(Occupation occupation) { + this.occupation = occupation; + return this; + } + + /** + * Get occupation + * @return occupation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Occupation getOccupation() { + return occupation; + } + + + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOccupation(Occupation occupation) { + this.occupation = occupation; + } + + + public CreateIndividualApplicationAttributes annualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + return this; + } + + /** + * Get annualIncome + * @return annualIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnnualIncome getAnnualIncome() { + return annualIncome; + } + + + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + } + + + public CreateIndividualApplicationAttributes sourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + return this; + } + + /** + * Get sourceOfIncome + * @return sourceOfIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SourceOfIncome getSourceOfIncome() { + return sourceOfIncome; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + } + + + /** + * Return true if this CreateIndividualApplication_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateIndividualApplicationAttributes createIndividualApplicationAttributes = (CreateIndividualApplicationAttributes) o; + return Objects.equals(this.fullName, createIndividualApplicationAttributes.fullName) && + Objects.equals(this.email, createIndividualApplicationAttributes.email) && + Objects.equals(this.phone, createIndividualApplicationAttributes.phone) && + equalsNullable(this.ssn, createIndividualApplicationAttributes.ssn) && + equalsNullable(this.passport, createIndividualApplicationAttributes.passport) && + Objects.equals(this.nationality, createIndividualApplicationAttributes.nationality) && + Objects.equals(this.address, createIndividualApplicationAttributes.address) && + Objects.equals(this.dateOfBirth, createIndividualApplicationAttributes.dateOfBirth) && + Objects.equals(this.ip, createIndividualApplicationAttributes.ip) && + Objects.equals(this.tags, createIndividualApplicationAttributes.tags) && + Objects.equals(this.idempotencyKey, createIndividualApplicationAttributes.idempotencyKey) && + Objects.equals(this.deviceFingerprints, createIndividualApplicationAttributes.deviceFingerprints) && + equalsNullable(this.jwtSubject, createIndividualApplicationAttributes.jwtSubject) && + Objects.equals(this.powerOfAttorneyAgent, createIndividualApplicationAttributes.powerOfAttorneyAgent) && + Objects.equals(this.industry, createIndividualApplicationAttributes.industry) && + Objects.equals(this.evaluationParams, createIndividualApplicationAttributes.evaluationParams) && + Objects.equals(this.occupation, createIndividualApplicationAttributes.occupation) && + Objects.equals(this.annualIncome, createIndividualApplicationAttributes.annualIncome) && + Objects.equals(this.sourceOfIncome, createIndividualApplicationAttributes.sourceOfIncome); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(fullName, email, phone, hashCodeNullable(ssn), hashCodeNullable(passport), nationality, address, dateOfBirth, ip, tags, idempotencyKey, deviceFingerprints, hashCodeNullable(jwtSubject), powerOfAttorneyAgent, industry, evaluationParams, occupation, annualIncome, sourceOfIncome); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateIndividualApplicationAttributes {\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); + sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" deviceFingerprints: ").append(toIndentedString(deviceFingerprints)).append("\n"); + sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); + sb.append(" powerOfAttorneyAgent: ").append(toIndentedString(powerOfAttorneyAgent)).append("\n"); + sb.append(" industry: ").append(toIndentedString(industry)).append("\n"); + sb.append(" evaluationParams: ").append(toIndentedString(evaluationParams)).append("\n"); + sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); + sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); + sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `ssn` to the URL query string + if (getSsn() != null) { + joiner.add(String.format("%sssn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSsn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `passport` to the URL query string + if (getPassport() != null) { + joiner.add(String.format("%spassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nationality` to the URL query string + if (getNationality() != null) { + joiner.add(String.format("%snationality%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNationality()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ip` to the URL query string + if (getIp() != null) { + joiner.add(String.format("%sip%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIp()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `deviceFingerprints` to the URL query string + if (getDeviceFingerprints() != null) { + for (int i = 0; i < getDeviceFingerprints().size(); i++) { + if (getDeviceFingerprints().get(i) != null) { + joiner.add(getDeviceFingerprints().get(i).toUrlQueryString(String.format("%sdeviceFingerprints%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `jwtSubject` to the URL query string + if (getJwtSubject() != null) { + joiner.add(String.format("%sjwtSubject%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getJwtSubject()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `powerOfAttorneyAgent` to the URL query string + if (getPowerOfAttorneyAgent() != null) { + joiner.add(getPowerOfAttorneyAgent().toUrlQueryString(prefix + "powerOfAttorneyAgent" + suffix)); + } + + // add `industry` to the URL query string + if (getIndustry() != null) { + joiner.add(String.format("%sindustry%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIndustry()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationParams` to the URL query string + if (getEvaluationParams() != null) { + joiner.add(getEvaluationParams().toUrlQueryString(prefix + "evaluationParams" + suffix)); + } + + // add `occupation` to the URL query string + if (getOccupation() != null) { + joiner.add(String.format("%soccupation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOccupation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `annualIncome` to the URL query string + if (getAnnualIncome() != null) { + joiner.add(String.format("%sannualIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAnnualIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sourceOfIncome` to the URL query string + if (getSourceOfIncome() != null) { + joiner.add(String.format("%ssourceOfIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSourceOfIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateIndividualDebitCard.java b/src/main/java/unit/java/sdk/model/CreateIndividualDebitCard.java new file mode 100644 index 00000000..80534a87 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateIndividualDebitCard.java @@ -0,0 +1,257 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCardRelationships; +import unit.java.sdk.model.CreateIndividualDebitCardAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateIndividualDebitCard + */ +@JsonPropertyOrder({ + CreateIndividualDebitCard.JSON_PROPERTY_TYPE, + CreateIndividualDebitCard.JSON_PROPERTY_ATTRIBUTES, + CreateIndividualDebitCard.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateIndividualDebitCard { + /** + * Gets or Sets type + */ + public enum TypeEnum { + INDIVIDUALDEBITCARD("individualDebitCard"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type = TypeEnum.INDIVIDUALDEBITCARD; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateIndividualDebitCardAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateCardRelationships relationships; + + public CreateIndividualDebitCard() { + } + + public CreateIndividualDebitCard type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public CreateIndividualDebitCard attributes(CreateIndividualDebitCardAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateIndividualDebitCardAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateIndividualDebitCardAttributes attributes) { + this.attributes = attributes; + } + + + public CreateIndividualDebitCard relationships(CreateCardRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateCardRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateCardRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreateIndividualDebitCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateIndividualDebitCard createIndividualDebitCard = (CreateIndividualDebitCard) o; + return Objects.equals(this.type, createIndividualDebitCard.type) && + Objects.equals(this.attributes, createIndividualDebitCard.attributes) && + Objects.equals(this.relationships, createIndividualDebitCard.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateIndividualDebitCard {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateIndividualDebitCardAttributes.java b/src/main/java/unit/java/sdk/model/CreateIndividualDebitCardAttributes.java new file mode 100644 index 00000000..df0f6b99 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateIndividualDebitCardAttributes.java @@ -0,0 +1,549 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.BIN; +import unit.java.sdk.model.CardLevelLimits; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateIndividualDebitCardAttributes + */ +@JsonPropertyOrder({ + CreateIndividualDebitCardAttributes.JSON_PROPERTY_SHIPPING_ADDRESS, + CreateIndividualDebitCardAttributes.JSON_PROPERTY_DESIGN, + CreateIndividualDebitCardAttributes.JSON_PROPERTY_TAGS, + CreateIndividualDebitCardAttributes.JSON_PROPERTY_LIMITS, + CreateIndividualDebitCardAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateIndividualDebitCardAttributes.JSON_PROPERTY_BIN, + CreateIndividualDebitCardAttributes.JSON_PROPERTY_CARD_QUALIFIER, + CreateIndividualDebitCardAttributes.JSON_PROPERTY_CARD_DESIGN_ID, + CreateIndividualDebitCardAttributes.JSON_PROPERTY_ADDITIONAL_EMBOSSED_TEXT, + CreateIndividualDebitCardAttributes.JSON_PROPERTY_ACTIVE_FOR_ONLINE_USE, + CreateIndividualDebitCardAttributes.JSON_PROPERTY_PRINT_ONLY_BUSINESS_NAME, + CreateIndividualDebitCardAttributes.JSON_PROPERTY_EXPIRY_DATE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateIndividualDebitCardAttributes { + public static final String JSON_PROPERTY_SHIPPING_ADDRESS = "shippingAddress"; + private Address shippingAddress; + + public static final String JSON_PROPERTY_DESIGN = "design"; + private String design; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_LIMITS = "limits"; + private CardLevelLimits limits; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_BIN = "bin"; + private BIN bin; + + public static final String JSON_PROPERTY_CARD_QUALIFIER = "cardQualifier"; + private String cardQualifier; + + public static final String JSON_PROPERTY_CARD_DESIGN_ID = "cardDesignId"; + private String cardDesignId; + + public static final String JSON_PROPERTY_ADDITIONAL_EMBOSSED_TEXT = "additionalEmbossedText"; + private String additionalEmbossedText; + + public static final String JSON_PROPERTY_ACTIVE_FOR_ONLINE_USE = "activeForOnlineUse"; + private Boolean activeForOnlineUse; + + public static final String JSON_PROPERTY_PRINT_ONLY_BUSINESS_NAME = "printOnlyBusinessName"; + private Boolean printOnlyBusinessName; + + public static final String JSON_PROPERTY_EXPIRY_DATE = "expiryDate"; + private String expiryDate; + + public CreateIndividualDebitCardAttributes() { + } + + public CreateIndividualDebitCardAttributes shippingAddress(Address shippingAddress) { + this.shippingAddress = shippingAddress; + return this; + } + + /** + * Get shippingAddress + * @return shippingAddress + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHIPPING_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Address getShippingAddress() { + return shippingAddress; + } + + + @JsonProperty(JSON_PROPERTY_SHIPPING_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShippingAddress(Address shippingAddress) { + this.shippingAddress = shippingAddress; + } + + + public CreateIndividualDebitCardAttributes design(String design) { + this.design = design; + return this; + } + + /** + * Get design + * @return design + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDesign() { + return design; + } + + + @JsonProperty(JSON_PROPERTY_DESIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDesign(String design) { + this.design = design; + } + + + public CreateIndividualDebitCardAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateIndividualDebitCardAttributes limits(CardLevelLimits limits) { + this.limits = limits; + return this; + } + + /** + * Get limits + * @return limits + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CardLevelLimits getLimits() { + return limits; + } + + + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLimits(CardLevelLimits limits) { + this.limits = limits; + } + + + public CreateIndividualDebitCardAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateIndividualDebitCardAttributes bin(BIN bin) { + this.bin = bin; + return this; + } + + /** + * Get bin + * @return bin + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BIN getBin() { + return bin; + } + + + @JsonProperty(JSON_PROPERTY_BIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBin(BIN bin) { + this.bin = bin; + } + + + public CreateIndividualDebitCardAttributes cardQualifier(String cardQualifier) { + this.cardQualifier = cardQualifier; + return this; + } + + /** + * Get cardQualifier + * @return cardQualifier + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_QUALIFIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCardQualifier() { + return cardQualifier; + } + + + @JsonProperty(JSON_PROPERTY_CARD_QUALIFIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardQualifier(String cardQualifier) { + this.cardQualifier = cardQualifier; + } + + + public CreateIndividualDebitCardAttributes cardDesignId(String cardDesignId) { + this.cardDesignId = cardDesignId; + return this; + } + + /** + * Get cardDesignId + * @return cardDesignId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_DESIGN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCardDesignId() { + return cardDesignId; + } + + + @JsonProperty(JSON_PROPERTY_CARD_DESIGN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardDesignId(String cardDesignId) { + this.cardDesignId = cardDesignId; + } + + + public CreateIndividualDebitCardAttributes additionalEmbossedText(String additionalEmbossedText) { + this.additionalEmbossedText = additionalEmbossedText; + return this; + } + + /** + * Get additionalEmbossedText + * @return additionalEmbossedText + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDITIONAL_EMBOSSED_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAdditionalEmbossedText() { + return additionalEmbossedText; + } + + + @JsonProperty(JSON_PROPERTY_ADDITIONAL_EMBOSSED_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdditionalEmbossedText(String additionalEmbossedText) { + this.additionalEmbossedText = additionalEmbossedText; + } + + + public CreateIndividualDebitCardAttributes activeForOnlineUse(Boolean activeForOnlineUse) { + this.activeForOnlineUse = activeForOnlineUse; + return this; + } + + /** + * Get activeForOnlineUse + * @return activeForOnlineUse + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACTIVE_FOR_ONLINE_USE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActiveForOnlineUse() { + return activeForOnlineUse; + } + + + @JsonProperty(JSON_PROPERTY_ACTIVE_FOR_ONLINE_USE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setActiveForOnlineUse(Boolean activeForOnlineUse) { + this.activeForOnlineUse = activeForOnlineUse; + } + + + public CreateIndividualDebitCardAttributes printOnlyBusinessName(Boolean printOnlyBusinessName) { + this.printOnlyBusinessName = printOnlyBusinessName; + return this; + } + + /** + * Get printOnlyBusinessName + * @return printOnlyBusinessName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRINT_ONLY_BUSINESS_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getPrintOnlyBusinessName() { + return printOnlyBusinessName; + } + + + @JsonProperty(JSON_PROPERTY_PRINT_ONLY_BUSINESS_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrintOnlyBusinessName(Boolean printOnlyBusinessName) { + this.printOnlyBusinessName = printOnlyBusinessName; + } + + + public CreateIndividualDebitCardAttributes expiryDate(String expiryDate) { + this.expiryDate = expiryDate; + return this; + } + + /** + * Get expiryDate + * @return expiryDate + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPIRY_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExpiryDate() { + return expiryDate; + } + + + @JsonProperty(JSON_PROPERTY_EXPIRY_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpiryDate(String expiryDate) { + this.expiryDate = expiryDate; + } + + + /** + * Return true if this CreateIndividualDebitCard_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateIndividualDebitCardAttributes createIndividualDebitCardAttributes = (CreateIndividualDebitCardAttributes) o; + return Objects.equals(this.shippingAddress, createIndividualDebitCardAttributes.shippingAddress) && + Objects.equals(this.design, createIndividualDebitCardAttributes.design) && + Objects.equals(this.tags, createIndividualDebitCardAttributes.tags) && + Objects.equals(this.limits, createIndividualDebitCardAttributes.limits) && + Objects.equals(this.idempotencyKey, createIndividualDebitCardAttributes.idempotencyKey) && + Objects.equals(this.bin, createIndividualDebitCardAttributes.bin) && + Objects.equals(this.cardQualifier, createIndividualDebitCardAttributes.cardQualifier) && + Objects.equals(this.cardDesignId, createIndividualDebitCardAttributes.cardDesignId) && + Objects.equals(this.additionalEmbossedText, createIndividualDebitCardAttributes.additionalEmbossedText) && + Objects.equals(this.activeForOnlineUse, createIndividualDebitCardAttributes.activeForOnlineUse) && + Objects.equals(this.printOnlyBusinessName, createIndividualDebitCardAttributes.printOnlyBusinessName) && + Objects.equals(this.expiryDate, createIndividualDebitCardAttributes.expiryDate); + } + + @Override + public int hashCode() { + return Objects.hash(shippingAddress, design, tags, limits, idempotencyKey, bin, cardQualifier, cardDesignId, additionalEmbossedText, activeForOnlineUse, printOnlyBusinessName, expiryDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateIndividualDebitCardAttributes {\n"); + sb.append(" shippingAddress: ").append(toIndentedString(shippingAddress)).append("\n"); + sb.append(" design: ").append(toIndentedString(design)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" bin: ").append(toIndentedString(bin)).append("\n"); + sb.append(" cardQualifier: ").append(toIndentedString(cardQualifier)).append("\n"); + sb.append(" cardDesignId: ").append(toIndentedString(cardDesignId)).append("\n"); + sb.append(" additionalEmbossedText: ").append(toIndentedString(additionalEmbossedText)).append("\n"); + sb.append(" activeForOnlineUse: ").append(toIndentedString(activeForOnlineUse)).append("\n"); + sb.append(" printOnlyBusinessName: ").append(toIndentedString(printOnlyBusinessName)).append("\n"); + sb.append(" expiryDate: ").append(toIndentedString(expiryDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `shippingAddress` to the URL query string + if (getShippingAddress() != null) { + joiner.add(getShippingAddress().toUrlQueryString(prefix + "shippingAddress" + suffix)); + } + + // add `design` to the URL query string + if (getDesign() != null) { + joiner.add(String.format("%sdesign%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDesign()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `limits` to the URL query string + if (getLimits() != null) { + joiner.add(getLimits().toUrlQueryString(prefix + "limits" + suffix)); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `bin` to the URL query string + if (getBin() != null) { + joiner.add(getBin().toUrlQueryString(prefix + "bin" + suffix)); + } + + // add `cardQualifier` to the URL query string + if (getCardQualifier() != null) { + joiner.add(String.format("%scardQualifier%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardQualifier()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardDesignId` to the URL query string + if (getCardDesignId() != null) { + joiner.add(String.format("%scardDesignId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardDesignId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `additionalEmbossedText` to the URL query string + if (getAdditionalEmbossedText() != null) { + joiner.add(String.format("%sadditionalEmbossedText%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAdditionalEmbossedText()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `activeForOnlineUse` to the URL query string + if (getActiveForOnlineUse() != null) { + joiner.add(String.format("%sactiveForOnlineUse%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActiveForOnlineUse()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `printOnlyBusinessName` to the URL query string + if (getPrintOnlyBusinessName() != null) { + joiner.add(String.format("%sprintOnlyBusinessName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPrintOnlyBusinessName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `expiryDate` to the URL query string + if (getExpiryDate() != null) { + joiner.add(String.format("%sexpiryDate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getExpiryDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateIndividualVirtualDebitCard.java b/src/main/java/unit/java/sdk/model/CreateIndividualVirtualDebitCard.java new file mode 100644 index 00000000..3d1c8dee --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateIndividualVirtualDebitCard.java @@ -0,0 +1,257 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCardRelationships; +import unit.java.sdk.model.CreateIndividualVirtualDebitCardAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateIndividualVirtualDebitCard + */ +@JsonPropertyOrder({ + CreateIndividualVirtualDebitCard.JSON_PROPERTY_TYPE, + CreateIndividualVirtualDebitCard.JSON_PROPERTY_ATTRIBUTES, + CreateIndividualVirtualDebitCard.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateIndividualVirtualDebitCard { + /** + * Gets or Sets type + */ + public enum TypeEnum { + INDIVIDUALVIRTUALDEBITCARD("individualVirtualDebitCard"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type = TypeEnum.INDIVIDUALVIRTUALDEBITCARD; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateIndividualVirtualDebitCardAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateCardRelationships relationships; + + public CreateIndividualVirtualDebitCard() { + } + + public CreateIndividualVirtualDebitCard type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public CreateIndividualVirtualDebitCard attributes(CreateIndividualVirtualDebitCardAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateIndividualVirtualDebitCardAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateIndividualVirtualDebitCardAttributes attributes) { + this.attributes = attributes; + } + + + public CreateIndividualVirtualDebitCard relationships(CreateCardRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateCardRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateCardRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreateIndividualVirtualDebitCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateIndividualVirtualDebitCard createIndividualVirtualDebitCard = (CreateIndividualVirtualDebitCard) o; + return Objects.equals(this.type, createIndividualVirtualDebitCard.type) && + Objects.equals(this.attributes, createIndividualVirtualDebitCard.attributes) && + Objects.equals(this.relationships, createIndividualVirtualDebitCard.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateIndividualVirtualDebitCard {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateIndividualVirtualDebitCardAttributes.java b/src/main/java/unit/java/sdk/model/CreateIndividualVirtualDebitCardAttributes.java new file mode 100644 index 00000000..4dd617bb --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateIndividualVirtualDebitCardAttributes.java @@ -0,0 +1,332 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BIN; +import unit.java.sdk.model.CardLevelLimits; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateIndividualVirtualDebitCardAttributes + */ +@JsonPropertyOrder({ + CreateIndividualVirtualDebitCardAttributes.JSON_PROPERTY_TAGS, + CreateIndividualVirtualDebitCardAttributes.JSON_PROPERTY_LIMITS, + CreateIndividualVirtualDebitCardAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateIndividualVirtualDebitCardAttributes.JSON_PROPERTY_BIN, + CreateIndividualVirtualDebitCardAttributes.JSON_PROPERTY_CARD_QUALIFIER, + CreateIndividualVirtualDebitCardAttributes.JSON_PROPERTY_EXPIRY_DATE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateIndividualVirtualDebitCardAttributes { + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_LIMITS = "limits"; + private CardLevelLimits limits; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_BIN = "bin"; + private BIN bin; + + public static final String JSON_PROPERTY_CARD_QUALIFIER = "cardQualifier"; + private String cardQualifier; + + public static final String JSON_PROPERTY_EXPIRY_DATE = "expiryDate"; + private String expiryDate; + + public CreateIndividualVirtualDebitCardAttributes() { + } + + public CreateIndividualVirtualDebitCardAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateIndividualVirtualDebitCardAttributes limits(CardLevelLimits limits) { + this.limits = limits; + return this; + } + + /** + * Get limits + * @return limits + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CardLevelLimits getLimits() { + return limits; + } + + + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLimits(CardLevelLimits limits) { + this.limits = limits; + } + + + public CreateIndividualVirtualDebitCardAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateIndividualVirtualDebitCardAttributes bin(BIN bin) { + this.bin = bin; + return this; + } + + /** + * Get bin + * @return bin + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BIN getBin() { + return bin; + } + + + @JsonProperty(JSON_PROPERTY_BIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBin(BIN bin) { + this.bin = bin; + } + + + public CreateIndividualVirtualDebitCardAttributes cardQualifier(String cardQualifier) { + this.cardQualifier = cardQualifier; + return this; + } + + /** + * Get cardQualifier + * @return cardQualifier + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_QUALIFIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCardQualifier() { + return cardQualifier; + } + + + @JsonProperty(JSON_PROPERTY_CARD_QUALIFIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardQualifier(String cardQualifier) { + this.cardQualifier = cardQualifier; + } + + + public CreateIndividualVirtualDebitCardAttributes expiryDate(String expiryDate) { + this.expiryDate = expiryDate; + return this; + } + + /** + * Get expiryDate + * @return expiryDate + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPIRY_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExpiryDate() { + return expiryDate; + } + + + @JsonProperty(JSON_PROPERTY_EXPIRY_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpiryDate(String expiryDate) { + this.expiryDate = expiryDate; + } + + + /** + * Return true if this CreateIndividualVirtualDebitCard_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateIndividualVirtualDebitCardAttributes createIndividualVirtualDebitCardAttributes = (CreateIndividualVirtualDebitCardAttributes) o; + return Objects.equals(this.tags, createIndividualVirtualDebitCardAttributes.tags) && + Objects.equals(this.limits, createIndividualVirtualDebitCardAttributes.limits) && + Objects.equals(this.idempotencyKey, createIndividualVirtualDebitCardAttributes.idempotencyKey) && + Objects.equals(this.bin, createIndividualVirtualDebitCardAttributes.bin) && + Objects.equals(this.cardQualifier, createIndividualVirtualDebitCardAttributes.cardQualifier) && + Objects.equals(this.expiryDate, createIndividualVirtualDebitCardAttributes.expiryDate); + } + + @Override + public int hashCode() { + return Objects.hash(tags, limits, idempotencyKey, bin, cardQualifier, expiryDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateIndividualVirtualDebitCardAttributes {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" bin: ").append(toIndentedString(bin)).append("\n"); + sb.append(" cardQualifier: ").append(toIndentedString(cardQualifier)).append("\n"); + sb.append(" expiryDate: ").append(toIndentedString(expiryDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `limits` to the URL query string + if (getLimits() != null) { + joiner.add(getLimits().toUrlQueryString(prefix + "limits" + suffix)); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `bin` to the URL query string + if (getBin() != null) { + joiner.add(getBin().toUrlQueryString(prefix + "bin" + suffix)); + } + + // add `cardQualifier` to the URL query string + if (getCardQualifier() != null) { + joiner.add(String.format("%scardQualifier%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardQualifier()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `expiryDate` to the URL query string + if (getExpiryDate() != null) { + joiner.add(String.format("%sexpiryDate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getExpiryDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateOfficer.java b/src/main/java/unit/java/sdk/model/CreateOfficer.java new file mode 100644 index 00000000..ba89e15a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateOfficer.java @@ -0,0 +1,685 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.EvaluationParams; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.SourceOfIncome; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateOfficer + */ +@JsonPropertyOrder({ + CreateOfficer.JSON_PROPERTY_FULL_NAME, + CreateOfficer.JSON_PROPERTY_EMAIL, + CreateOfficer.JSON_PROPERTY_PHONE, + CreateOfficer.JSON_PROPERTY_SSN, + CreateOfficer.JSON_PROPERTY_PASSPORT, + CreateOfficer.JSON_PROPERTY_NATIONALITY, + CreateOfficer.JSON_PROPERTY_MATRICULA_CONSULAR, + CreateOfficer.JSON_PROPERTY_ADDRESS, + CreateOfficer.JSON_PROPERTY_DATE_OF_BIRTH, + CreateOfficer.JSON_PROPERTY_TITLE, + CreateOfficer.JSON_PROPERTY_EVALUATION_PARAMS, + CreateOfficer.JSON_PROPERTY_OCCUPATION, + CreateOfficer.JSON_PROPERTY_ANNUAL_INCOME, + CreateOfficer.JSON_PROPERTY_SOURCE_OF_INCOME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateOfficer { + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_SSN = "ssn"; + private String ssn; + + public static final String JSON_PROPERTY_PASSPORT = "passport"; + private String passport; + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public static final String JSON_PROPERTY_MATRICULA_CONSULAR = "matriculaConsular"; + private String matriculaConsular; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + /** + * Gets or Sets title + */ + public enum TitleEnum { + PRESIDENT("President"), + + CEO("CEO"), + + COO("COO"), + + CFO("CFO"), + + BENEFITSADMINISTRATIONOFFICER("BenefitsAdministrationOfficer"), + + CIO("CIO"), + + VP("VP"), + + AVP("AVP"), + + TREASURER("Treasurer"), + + SECRETARY("Secretary"), + + CONTROLLER("Controller"), + + MANAGER("Manager"), + + PARTNER("Partner"), + + MEMBER("Member"); + + private String value; + + TitleEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TitleEnum fromValue(String value) { + for (TitleEnum b : TitleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TITLE = "title"; + private TitleEnum title; + + public static final String JSON_PROPERTY_EVALUATION_PARAMS = "evaluationParams"; + private EvaluationParams evaluationParams; + + public static final String JSON_PROPERTY_OCCUPATION = "occupation"; + private Occupation occupation; + + public static final String JSON_PROPERTY_ANNUAL_INCOME = "annualIncome"; + private AnnualIncome annualIncome; + + public static final String JSON_PROPERTY_SOURCE_OF_INCOME = "sourceOfIncome"; + private SourceOfIncome sourceOfIncome; + + public CreateOfficer() { + } + + public CreateOfficer fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public CreateOfficer email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEmail(String email) { + this.email = email; + } + + + public CreateOfficer phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public CreateOfficer ssn(String ssn) { + this.ssn = ssn; + return this; + } + + /** + * Get ssn + * @return ssn + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSsn() { + return ssn; + } + + + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSsn(String ssn) { + this.ssn = ssn; + } + + + public CreateOfficer passport(String passport) { + this.passport = passport; + return this; + } + + /** + * Get passport + * @return passport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassport() { + return passport; + } + + + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassport(String passport) { + this.passport = passport; + } + + + public CreateOfficer nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * Get nationality + * @return nationality + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + public CreateOfficer matriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + return this; + } + + /** + * Get matriculaConsular + * @return matriculaConsular + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMatriculaConsular() { + return matriculaConsular; + } + + + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMatriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + } + + + public CreateOfficer address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(Address address) { + this.address = address; + } + + + public CreateOfficer dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + public CreateOfficer title(TitleEnum title) { + this.title = title; + return this; + } + + /** + * Get title + * @return title + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TitleEnum getTitle() { + return title; + } + + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTitle(TitleEnum title) { + this.title = title; + } + + + public CreateOfficer evaluationParams(EvaluationParams evaluationParams) { + this.evaluationParams = evaluationParams; + return this; + } + + /** + * Get evaluationParams + * @return evaluationParams + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EvaluationParams getEvaluationParams() { + return evaluationParams; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationParams(EvaluationParams evaluationParams) { + this.evaluationParams = evaluationParams; + } + + + public CreateOfficer occupation(Occupation occupation) { + this.occupation = occupation; + return this; + } + + /** + * Get occupation + * @return occupation + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Occupation getOccupation() { + return occupation; + } + + + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOccupation(Occupation occupation) { + this.occupation = occupation; + } + + + public CreateOfficer annualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + return this; + } + + /** + * Get annualIncome + * @return annualIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnnualIncome getAnnualIncome() { + return annualIncome; + } + + + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + } + + + public CreateOfficer sourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + return this; + } + + /** + * Get sourceOfIncome + * @return sourceOfIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SourceOfIncome getSourceOfIncome() { + return sourceOfIncome; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + } + + + /** + * Return true if this createOfficer object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateOfficer createOfficer = (CreateOfficer) o; + return Objects.equals(this.fullName, createOfficer.fullName) && + Objects.equals(this.email, createOfficer.email) && + Objects.equals(this.phone, createOfficer.phone) && + Objects.equals(this.ssn, createOfficer.ssn) && + Objects.equals(this.passport, createOfficer.passport) && + Objects.equals(this.nationality, createOfficer.nationality) && + Objects.equals(this.matriculaConsular, createOfficer.matriculaConsular) && + Objects.equals(this.address, createOfficer.address) && + Objects.equals(this.dateOfBirth, createOfficer.dateOfBirth) && + Objects.equals(this.title, createOfficer.title) && + Objects.equals(this.evaluationParams, createOfficer.evaluationParams) && + Objects.equals(this.occupation, createOfficer.occupation) && + Objects.equals(this.annualIncome, createOfficer.annualIncome) && + Objects.equals(this.sourceOfIncome, createOfficer.sourceOfIncome); + } + + @Override + public int hashCode() { + return Objects.hash(fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, title, evaluationParams, occupation, annualIncome, sourceOfIncome); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateOfficer {\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); + sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" evaluationParams: ").append(toIndentedString(evaluationParams)).append("\n"); + sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); + sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); + sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `ssn` to the URL query string + if (getSsn() != null) { + joiner.add(String.format("%sssn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSsn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `passport` to the URL query string + if (getPassport() != null) { + joiner.add(String.format("%spassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nationality` to the URL query string + if (getNationality() != null) { + joiner.add(String.format("%snationality%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNationality()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `matriculaConsular` to the URL query string + if (getMatriculaConsular() != null) { + joiner.add(String.format("%smatriculaConsular%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMatriculaConsular()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `title` to the URL query string + if (getTitle() != null) { + joiner.add(String.format("%stitle%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTitle()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationParams` to the URL query string + if (getEvaluationParams() != null) { + joiner.add(getEvaluationParams().toUrlQueryString(prefix + "evaluationParams" + suffix)); + } + + // add `occupation` to the URL query string + if (getOccupation() != null) { + joiner.add(String.format("%soccupation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOccupation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `annualIncome` to the URL query string + if (getAnnualIncome() != null) { + joiner.add(String.format("%sannualIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAnnualIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sourceOfIncome` to the URL query string + if (getSourceOfIncome() != null) { + joiner.add(String.format("%ssourceOfIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSourceOfIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreatePayment.java b/src/main/java/unit/java/sdk/model/CreatePayment.java new file mode 100644 index 00000000..d165e364 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreatePayment.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreatePaymentData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreatePayment + */ +@JsonPropertyOrder({ + CreatePayment.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreatePayment { + public static final String JSON_PROPERTY_DATA = "data"; + private CreatePaymentData data; + + public CreatePayment() { + } + + public CreatePayment data(CreatePaymentData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreatePaymentData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(CreatePaymentData data) { + this.data = data; + } + + + /** + * Return true if this createPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePayment createPayment = (CreatePayment) o; + return Objects.equals(this.data, createPayment.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatePayment {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreatePaymentData.java b/src/main/java/unit/java/sdk/model/CreatePaymentData.java new file mode 100644 index 00000000..39e21c49 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreatePaymentData.java @@ -0,0 +1,573 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchPayment; +import unit.java.sdk.model.CreateAchPaymentCounterparty; +import unit.java.sdk.model.CreateAchPaymentPlaid; +import unit.java.sdk.model.CreateAchPaymentRelationships; +import unit.java.sdk.model.CreateBillPayment; +import unit.java.sdk.model.CreateBookPayment; +import unit.java.sdk.model.CreatePushToCardPayment; +import unit.java.sdk.model.CreatePushToCardPaymentAttributes; +import unit.java.sdk.model.CreateWirePayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import unit.java.sdk.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = CreatePaymentData.CreatePaymentDataDeserializer.class) +@JsonSerialize(using = CreatePaymentData.CreatePaymentDataSerializer.class) +public class CreatePaymentData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreatePaymentData.class.getName()); + + public static class CreatePaymentDataSerializer extends StdSerializer { + public CreatePaymentDataSerializer(Class t) { + super(t); + } + + public CreatePaymentDataSerializer() { + this(null); + } + + @Override + public void serialize(CreatePaymentData value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class CreatePaymentDataDeserializer extends StdDeserializer { + public CreatePaymentDataDeserializer() { + this(CreatePaymentData.class); + } + + public CreatePaymentDataDeserializer(Class vc) { + super(vc); + } + + @Override + public CreatePaymentData deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize CreateAchPayment + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateAchPayment.class.equals(Integer.class) || CreateAchPayment.class.equals(Long.class) || CreateAchPayment.class.equals(Float.class) || CreateAchPayment.class.equals(Double.class) || CreateAchPayment.class.equals(Boolean.class) || CreateAchPayment.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateAchPayment.class.equals(Integer.class) || CreateAchPayment.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateAchPayment.class.equals(Float.class) || CreateAchPayment.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateAchPayment.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateAchPayment.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateAchPayment.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateAchPayment'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateAchPayment'", e); + } + + // deserialize CreateAchPaymentCounterparty + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateAchPaymentCounterparty.class.equals(Integer.class) || CreateAchPaymentCounterparty.class.equals(Long.class) || CreateAchPaymentCounterparty.class.equals(Float.class) || CreateAchPaymentCounterparty.class.equals(Double.class) || CreateAchPaymentCounterparty.class.equals(Boolean.class) || CreateAchPaymentCounterparty.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateAchPaymentCounterparty.class.equals(Integer.class) || CreateAchPaymentCounterparty.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateAchPaymentCounterparty.class.equals(Float.class) || CreateAchPaymentCounterparty.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateAchPaymentCounterparty.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateAchPaymentCounterparty.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateAchPaymentCounterparty.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateAchPaymentCounterparty'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateAchPaymentCounterparty'", e); + } + + // deserialize CreateAchPaymentPlaid + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateAchPaymentPlaid.class.equals(Integer.class) || CreateAchPaymentPlaid.class.equals(Long.class) || CreateAchPaymentPlaid.class.equals(Float.class) || CreateAchPaymentPlaid.class.equals(Double.class) || CreateAchPaymentPlaid.class.equals(Boolean.class) || CreateAchPaymentPlaid.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateAchPaymentPlaid.class.equals(Integer.class) || CreateAchPaymentPlaid.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateAchPaymentPlaid.class.equals(Float.class) || CreateAchPaymentPlaid.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateAchPaymentPlaid.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateAchPaymentPlaid.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateAchPaymentPlaid.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateAchPaymentPlaid'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateAchPaymentPlaid'", e); + } + + // deserialize CreateBillPayment + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateBillPayment.class.equals(Integer.class) || CreateBillPayment.class.equals(Long.class) || CreateBillPayment.class.equals(Float.class) || CreateBillPayment.class.equals(Double.class) || CreateBillPayment.class.equals(Boolean.class) || CreateBillPayment.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateBillPayment.class.equals(Integer.class) || CreateBillPayment.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateBillPayment.class.equals(Float.class) || CreateBillPayment.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateBillPayment.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateBillPayment.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateBillPayment.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateBillPayment'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateBillPayment'", e); + } + + // deserialize CreateBookPayment + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateBookPayment.class.equals(Integer.class) || CreateBookPayment.class.equals(Long.class) || CreateBookPayment.class.equals(Float.class) || CreateBookPayment.class.equals(Double.class) || CreateBookPayment.class.equals(Boolean.class) || CreateBookPayment.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateBookPayment.class.equals(Integer.class) || CreateBookPayment.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateBookPayment.class.equals(Float.class) || CreateBookPayment.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateBookPayment.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateBookPayment.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateBookPayment.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateBookPayment'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateBookPayment'", e); + } + + // deserialize CreatePushToCardPayment + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreatePushToCardPayment.class.equals(Integer.class) || CreatePushToCardPayment.class.equals(Long.class) || CreatePushToCardPayment.class.equals(Float.class) || CreatePushToCardPayment.class.equals(Double.class) || CreatePushToCardPayment.class.equals(Boolean.class) || CreatePushToCardPayment.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreatePushToCardPayment.class.equals(Integer.class) || CreatePushToCardPayment.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreatePushToCardPayment.class.equals(Float.class) || CreatePushToCardPayment.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreatePushToCardPayment.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreatePushToCardPayment.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreatePushToCardPayment.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreatePushToCardPayment'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreatePushToCardPayment'", e); + } + + // deserialize CreateWirePayment + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateWirePayment.class.equals(Integer.class) || CreateWirePayment.class.equals(Long.class) || CreateWirePayment.class.equals(Float.class) || CreateWirePayment.class.equals(Double.class) || CreateWirePayment.class.equals(Boolean.class) || CreateWirePayment.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateWirePayment.class.equals(Integer.class) || CreateWirePayment.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateWirePayment.class.equals(Float.class) || CreateWirePayment.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateWirePayment.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateWirePayment.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateWirePayment.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateWirePayment'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateWirePayment'", e); + } + + if (match == 1) { + CreatePaymentData ret = new CreatePaymentData(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for CreatePaymentData: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public CreatePaymentData getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "CreatePaymentData cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public CreatePaymentData() { + super("oneOf", Boolean.FALSE); + } + + public CreatePaymentData(CreateAchPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreatePaymentData(CreateAchPaymentCounterparty o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreatePaymentData(CreateAchPaymentPlaid o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreatePaymentData(CreateBillPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreatePaymentData(CreateBookPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreatePaymentData(CreatePushToCardPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreatePaymentData(CreateWirePayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("CreateAchPayment", CreateAchPayment.class); + schemas.put("CreateAchPaymentCounterparty", CreateAchPaymentCounterparty.class); + schemas.put("CreateAchPaymentPlaid", CreateAchPaymentPlaid.class); + schemas.put("CreateBillPayment", CreateBillPayment.class); + schemas.put("CreateBookPayment", CreateBookPayment.class); + schemas.put("CreatePushToCardPayment", CreatePushToCardPayment.class); + schemas.put("CreateWirePayment", CreateWirePayment.class); + JSON.registerDescendants(CreatePaymentData.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return CreatePaymentData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(CreateAchPayment.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreateAchPaymentCounterparty.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreateAchPaymentPlaid.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreateBillPayment.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreateBookPayment.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreatePushToCardPayment.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreateWirePayment.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment"); + } + + /** + * Get the actual instance, which can be the following: + * CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment + * + * @return The actual instance (CreateAchPayment, CreateAchPaymentCounterparty, CreateAchPaymentPlaid, CreateBillPayment, CreateBookPayment, CreatePushToCardPayment, CreateWirePayment) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateAchPayment`. If the actual instance is not `CreateAchPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateAchPayment` + * @throws ClassCastException if the instance is not `CreateAchPayment` + */ + public CreateAchPayment getCreateAchPayment() throws ClassCastException { + return (CreateAchPayment)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateAchPaymentCounterparty`. If the actual instance is not `CreateAchPaymentCounterparty`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateAchPaymentCounterparty` + * @throws ClassCastException if the instance is not `CreateAchPaymentCounterparty` + */ + public CreateAchPaymentCounterparty getCreateAchPaymentCounterparty() throws ClassCastException { + return (CreateAchPaymentCounterparty)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateAchPaymentPlaid`. If the actual instance is not `CreateAchPaymentPlaid`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateAchPaymentPlaid` + * @throws ClassCastException if the instance is not `CreateAchPaymentPlaid` + */ + public CreateAchPaymentPlaid getCreateAchPaymentPlaid() throws ClassCastException { + return (CreateAchPaymentPlaid)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateBillPayment`. If the actual instance is not `CreateBillPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateBillPayment` + * @throws ClassCastException if the instance is not `CreateBillPayment` + */ + public CreateBillPayment getCreateBillPayment() throws ClassCastException { + return (CreateBillPayment)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateBookPayment`. If the actual instance is not `CreateBookPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateBookPayment` + * @throws ClassCastException if the instance is not `CreateBookPayment` + */ + public CreateBookPayment getCreateBookPayment() throws ClassCastException { + return (CreateBookPayment)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreatePushToCardPayment`. If the actual instance is not `CreatePushToCardPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreatePushToCardPayment` + * @throws ClassCastException if the instance is not `CreatePushToCardPayment` + */ + public CreatePushToCardPayment getCreatePushToCardPayment() throws ClassCastException { + return (CreatePushToCardPayment)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateWirePayment`. If the actual instance is not `CreateWirePayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateWirePayment` + * @throws ClassCastException if the instance is not `CreateWirePayment` + */ + public CreateWirePayment getCreateWirePayment() throws ClassCastException { + return (CreateWirePayment)super.getActualInstance(); + } + + + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof CreateAchPayment) { + if (getActualInstance() != null) { + joiner.add(((CreateAchPayment)getActualInstance()).toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateAchPaymentCounterparty) { + if (getActualInstance() != null) { + joiner.add(((CreateAchPaymentCounterparty)getActualInstance()).toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateAchPaymentPlaid) { + if (getActualInstance() != null) { + joiner.add(((CreateAchPaymentPlaid)getActualInstance()).toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateBookPayment) { + if (getActualInstance() != null) { + joiner.add(((CreateBookPayment)getActualInstance()).toUrlQueryString(prefix + "one_of_3" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateWirePayment) { + if (getActualInstance() != null) { + joiner.add(((CreateWirePayment)getActualInstance()).toUrlQueryString(prefix + "one_of_4" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateBillPayment) { + if (getActualInstance() != null) { + joiner.add(((CreateBillPayment)getActualInstance()).toUrlQueryString(prefix + "one_of_5" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreatePushToCardPayment) { + if (getActualInstance() != null) { + joiner.add(((CreatePushToCardPayment)getActualInstance()).toUrlQueryString(prefix + "one_of_6" + suffix)); + } + return joiner.toString(); + } + return null; + } + +} + diff --git a/src/main/java/unit/java/sdk/model/CreatePlaidCounterparty.java b/src/main/java/unit/java/sdk/model/CreatePlaidCounterparty.java new file mode 100644 index 00000000..621cdc90 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreatePlaidCounterparty.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCounterpartyRelationships; +import unit.java.sdk.model.CreatePlaidCounterpartyAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreatePlaidCounterparty + */ +@JsonPropertyOrder({ + CreatePlaidCounterparty.JSON_PROPERTY_TYPE, + CreatePlaidCounterparty.JSON_PROPERTY_ATTRIBUTES, + CreatePlaidCounterparty.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreatePlaidCounterparty { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreatePlaidCounterpartyAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateCounterpartyRelationships relationships; + + public CreatePlaidCounterparty() { + } + + public CreatePlaidCounterparty type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CreatePlaidCounterparty attributes(CreatePlaidCounterpartyAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreatePlaidCounterpartyAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreatePlaidCounterpartyAttributes attributes) { + this.attributes = attributes; + } + + + public CreatePlaidCounterparty relationships(CreateCounterpartyRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateCounterpartyRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateCounterpartyRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreatePlaidCounterparty object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePlaidCounterparty createPlaidCounterparty = (CreatePlaidCounterparty) o; + return Objects.equals(this.type, createPlaidCounterparty.type) && + Objects.equals(this.attributes, createPlaidCounterparty.attributes) && + Objects.equals(this.relationships, createPlaidCounterparty.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatePlaidCounterparty {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreatePlaidCounterpartyAttributes.java b/src/main/java/unit/java/sdk/model/CreatePlaidCounterpartyAttributes.java new file mode 100644 index 00000000..144d2fcd --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreatePlaidCounterpartyAttributes.java @@ -0,0 +1,440 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreatePlaidCounterpartyAttributes + */ +@JsonPropertyOrder({ + CreatePlaidCounterpartyAttributes.JSON_PROPERTY_TYPE, + CreatePlaidCounterpartyAttributes.JSON_PROPERTY_NAME, + CreatePlaidCounterpartyAttributes.JSON_PROPERTY_VERIFY_NAME, + CreatePlaidCounterpartyAttributes.JSON_PROPERTY_PLAID_PROCESSOR_TOKEN, + CreatePlaidCounterpartyAttributes.JSON_PROPERTY_PERMISSIONS, + CreatePlaidCounterpartyAttributes.JSON_PROPERTY_TAGS, + CreatePlaidCounterpartyAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreatePlaidCounterpartyAttributes { + /** + * Gets or Sets type + */ + public enum TypeEnum { + BUSINESS("Business"), + + PERSON("Person"), + + UNKNOWN("Unknown"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_VERIFY_NAME = "verifyName"; + private Boolean verifyName = false; + + public static final String JSON_PROPERTY_PLAID_PROCESSOR_TOKEN = "plaidProcessorToken"; + private String plaidProcessorToken; + + /** + * Gets or Sets permissions + */ + public enum PermissionsEnum { + CREDITONLY("CreditOnly"), + + DEBITONLY("DebitOnly"), + + CREDITANDDEBIT("CreditAndDebit"); + + private String value; + + PermissionsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PermissionsEnum fromValue(String value) { + for (PermissionsEnum b : PermissionsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PERMISSIONS = "permissions"; + private PermissionsEnum permissions; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public CreatePlaidCounterpartyAttributes() { + } + + public CreatePlaidCounterpartyAttributes type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public CreatePlaidCounterpartyAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + public CreatePlaidCounterpartyAttributes verifyName(Boolean verifyName) { + this.verifyName = verifyName; + return this; + } + + /** + * Get verifyName + * @return verifyName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERIFY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getVerifyName() { + return verifyName; + } + + + @JsonProperty(JSON_PROPERTY_VERIFY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVerifyName(Boolean verifyName) { + this.verifyName = verifyName; + } + + + public CreatePlaidCounterpartyAttributes plaidProcessorToken(String plaidProcessorToken) { + this.plaidProcessorToken = plaidProcessorToken; + return this; + } + + /** + * Get plaidProcessorToken + * @return plaidProcessorToken + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PLAID_PROCESSOR_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getPlaidProcessorToken() { + return plaidProcessorToken; + } + + + @JsonProperty(JSON_PROPERTY_PLAID_PROCESSOR_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPlaidProcessorToken(String plaidProcessorToken) { + this.plaidProcessorToken = plaidProcessorToken; + } + + + public CreatePlaidCounterpartyAttributes permissions(PermissionsEnum permissions) { + this.permissions = permissions; + return this; + } + + /** + * Get permissions + * @return permissions + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERMISSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PermissionsEnum getPermissions() { + return permissions; + } + + + @JsonProperty(JSON_PROPERTY_PERMISSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPermissions(PermissionsEnum permissions) { + this.permissions = permissions; + } + + + public CreatePlaidCounterpartyAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreatePlaidCounterpartyAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + /** + * Return true if this CreatePlaidCounterparty_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePlaidCounterpartyAttributes createPlaidCounterpartyAttributes = (CreatePlaidCounterpartyAttributes) o; + return Objects.equals(this.type, createPlaidCounterpartyAttributes.type) && + Objects.equals(this.name, createPlaidCounterpartyAttributes.name) && + Objects.equals(this.verifyName, createPlaidCounterpartyAttributes.verifyName) && + Objects.equals(this.plaidProcessorToken, createPlaidCounterpartyAttributes.plaidProcessorToken) && + Objects.equals(this.permissions, createPlaidCounterpartyAttributes.permissions) && + Objects.equals(this.tags, createPlaidCounterpartyAttributes.tags) && + Objects.equals(this.idempotencyKey, createPlaidCounterpartyAttributes.idempotencyKey); + } + + @Override + public int hashCode() { + return Objects.hash(type, name, verifyName, plaidProcessorToken, permissions, tags, idempotencyKey); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatePlaidCounterpartyAttributes {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" verifyName: ").append(toIndentedString(verifyName)).append("\n"); + sb.append(" plaidProcessorToken: ").append(toIndentedString(plaidProcessorToken)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `verifyName` to the URL query string + if (getVerifyName() != null) { + joiner.add(String.format("%sverifyName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVerifyName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `plaidProcessorToken` to the URL query string + if (getPlaidProcessorToken() != null) { + joiner.add(String.format("%splaidProcessorToken%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPlaidProcessorToken()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `permissions` to the URL query string + if (getPermissions() != null) { + joiner.add(String.format("%spermissions%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPermissions()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreatePowerOfAttorneyAgent.java b/src/main/java/unit/java/sdk/model/CreatePowerOfAttorneyAgent.java new file mode 100644 index 00000000..35ff5aeb --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreatePowerOfAttorneyAgent.java @@ -0,0 +1,538 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.EvaluationParams; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreatePowerOfAttorneyAgent + */ +@JsonPropertyOrder({ + CreatePowerOfAttorneyAgent.JSON_PROPERTY_FULL_NAME, + CreatePowerOfAttorneyAgent.JSON_PROPERTY_EMAIL, + CreatePowerOfAttorneyAgent.JSON_PROPERTY_PHONE, + CreatePowerOfAttorneyAgent.JSON_PROPERTY_SSN, + CreatePowerOfAttorneyAgent.JSON_PROPERTY_PASSPORT, + CreatePowerOfAttorneyAgent.JSON_PROPERTY_NATIONALITY, + CreatePowerOfAttorneyAgent.JSON_PROPERTY_MATRICULA_CONSULAR, + CreatePowerOfAttorneyAgent.JSON_PROPERTY_ADDRESS, + CreatePowerOfAttorneyAgent.JSON_PROPERTY_DATE_OF_BIRTH, + CreatePowerOfAttorneyAgent.JSON_PROPERTY_JWT_SUBJECT, + CreatePowerOfAttorneyAgent.JSON_PROPERTY_EVALUATION_PARAMS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreatePowerOfAttorneyAgent { + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_SSN = "ssn"; + private String ssn; + + public static final String JSON_PROPERTY_PASSPORT = "passport"; + private String passport; + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public static final String JSON_PROPERTY_MATRICULA_CONSULAR = "matriculaConsular"; + private String matriculaConsular; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public static final String JSON_PROPERTY_JWT_SUBJECT = "jwtSubject"; + private JsonNullable jwtSubject = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EVALUATION_PARAMS = "evaluationParams"; + private EvaluationParams evaluationParams; + + public CreatePowerOfAttorneyAgent() { + } + + public CreatePowerOfAttorneyAgent fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public CreatePowerOfAttorneyAgent email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEmail(String email) { + this.email = email; + } + + + public CreatePowerOfAttorneyAgent phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public CreatePowerOfAttorneyAgent ssn(String ssn) { + this.ssn = ssn; + return this; + } + + /** + * Get ssn + * @return ssn + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSsn() { + return ssn; + } + + + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSsn(String ssn) { + this.ssn = ssn; + } + + + public CreatePowerOfAttorneyAgent passport(String passport) { + this.passport = passport; + return this; + } + + /** + * Get passport + * @return passport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassport() { + return passport; + } + + + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassport(String passport) { + this.passport = passport; + } + + + public CreatePowerOfAttorneyAgent nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * Get nationality + * @return nationality + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + public CreatePowerOfAttorneyAgent matriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + return this; + } + + /** + * Get matriculaConsular + * @return matriculaConsular + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMatriculaConsular() { + return matriculaConsular; + } + + + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMatriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + } + + + public CreatePowerOfAttorneyAgent address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(Address address) { + this.address = address; + } + + + public CreatePowerOfAttorneyAgent dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + public CreatePowerOfAttorneyAgent jwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + return this; + } + + /** + * Get jwtSubject + * @return jwtSubject + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getJwtSubject() { + return jwtSubject.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getJwtSubject_JsonNullable() { + return jwtSubject; + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + public void setJwtSubject_JsonNullable(JsonNullable jwtSubject) { + this.jwtSubject = jwtSubject; + } + + public void setJwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + } + + + public CreatePowerOfAttorneyAgent evaluationParams(EvaluationParams evaluationParams) { + this.evaluationParams = evaluationParams; + return this; + } + + /** + * Get evaluationParams + * @return evaluationParams + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EvaluationParams getEvaluationParams() { + return evaluationParams; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationParams(EvaluationParams evaluationParams) { + this.evaluationParams = evaluationParams; + } + + + /** + * Return true if this createPowerOfAttorneyAgent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePowerOfAttorneyAgent createPowerOfAttorneyAgent = (CreatePowerOfAttorneyAgent) o; + return Objects.equals(this.fullName, createPowerOfAttorneyAgent.fullName) && + Objects.equals(this.email, createPowerOfAttorneyAgent.email) && + Objects.equals(this.phone, createPowerOfAttorneyAgent.phone) && + Objects.equals(this.ssn, createPowerOfAttorneyAgent.ssn) && + Objects.equals(this.passport, createPowerOfAttorneyAgent.passport) && + Objects.equals(this.nationality, createPowerOfAttorneyAgent.nationality) && + Objects.equals(this.matriculaConsular, createPowerOfAttorneyAgent.matriculaConsular) && + Objects.equals(this.address, createPowerOfAttorneyAgent.address) && + Objects.equals(this.dateOfBirth, createPowerOfAttorneyAgent.dateOfBirth) && + equalsNullable(this.jwtSubject, createPowerOfAttorneyAgent.jwtSubject) && + Objects.equals(this.evaluationParams, createPowerOfAttorneyAgent.evaluationParams); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, hashCodeNullable(jwtSubject), evaluationParams); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatePowerOfAttorneyAgent {\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); + sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); + sb.append(" evaluationParams: ").append(toIndentedString(evaluationParams)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `ssn` to the URL query string + if (getSsn() != null) { + joiner.add(String.format("%sssn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSsn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `passport` to the URL query string + if (getPassport() != null) { + joiner.add(String.format("%spassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nationality` to the URL query string + if (getNationality() != null) { + joiner.add(String.format("%snationality%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNationality()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `matriculaConsular` to the URL query string + if (getMatriculaConsular() != null) { + joiner.add(String.format("%smatriculaConsular%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMatriculaConsular()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `jwtSubject` to the URL query string + if (getJwtSubject() != null) { + joiner.add(String.format("%sjwtSubject%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getJwtSubject()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationParams` to the URL query string + if (getEvaluationParams() != null) { + joiner.add(getEvaluationParams().toUrlQueryString(prefix + "evaluationParams" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreatePushToCardPayment.java b/src/main/java/unit/java/sdk/model/CreatePushToCardPayment.java new file mode 100644 index 00000000..0ffc77b2 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreatePushToCardPayment.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchPaymentRelationships; +import unit.java.sdk.model.CreatePushToCardPaymentAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreatePushToCardPayment + */ +@JsonPropertyOrder({ + CreatePushToCardPayment.JSON_PROPERTY_TYPE, + CreatePushToCardPayment.JSON_PROPERTY_ATTRIBUTES, + CreatePushToCardPayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreatePushToCardPayment { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "pushToCardPayment"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreatePushToCardPaymentAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateAchPaymentRelationships relationships; + + public CreatePushToCardPayment() { + } + + public CreatePushToCardPayment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public CreatePushToCardPayment attributes(CreatePushToCardPaymentAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreatePushToCardPaymentAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreatePushToCardPaymentAttributes attributes) { + this.attributes = attributes; + } + + + public CreatePushToCardPayment relationships(CreateAchPaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateAchPaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateAchPaymentRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreatePushToCardPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePushToCardPayment createPushToCardPayment = (CreatePushToCardPayment) o; + return Objects.equals(this.type, createPushToCardPayment.type) && + Objects.equals(this.attributes, createPushToCardPayment.attributes) && + Objects.equals(this.relationships, createPushToCardPayment.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatePushToCardPayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreatePushToCardPaymentAttributes.java b/src/main/java/unit/java/sdk/model/CreatePushToCardPaymentAttributes.java new file mode 100644 index 00000000..63ff030e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreatePushToCardPaymentAttributes.java @@ -0,0 +1,295 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreatePushToCardPaymentAttributesConfiguration; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreatePushToCardPaymentAttributes + */ +@JsonPropertyOrder({ + CreatePushToCardPaymentAttributes.JSON_PROPERTY_AMOUNT, + CreatePushToCardPaymentAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreatePushToCardPaymentAttributes.JSON_PROPERTY_TAGS, + CreatePushToCardPaymentAttributes.JSON_PROPERTY_DESCRIPTION, + CreatePushToCardPaymentAttributes.JSON_PROPERTY_CONFIGURATION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreatePushToCardPaymentAttributes { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; + private CreatePushToCardPaymentAttributesConfiguration _configuration; + + public CreatePushToCardPaymentAttributes() { + } + + public CreatePushToCardPaymentAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CreatePushToCardPaymentAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreatePushToCardPaymentAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreatePushToCardPaymentAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public CreatePushToCardPaymentAttributes _configuration(CreatePushToCardPaymentAttributesConfiguration _configuration) { + this._configuration = _configuration; + return this; + } + + /** + * Get _configuration + * @return _configuration + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIGURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreatePushToCardPaymentAttributesConfiguration getConfiguration() { + return _configuration; + } + + + @JsonProperty(JSON_PROPERTY_CONFIGURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setConfiguration(CreatePushToCardPaymentAttributesConfiguration _configuration) { + this._configuration = _configuration; + } + + + /** + * Return true if this CreatePushToCardPayment_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePushToCardPaymentAttributes createPushToCardPaymentAttributes = (CreatePushToCardPaymentAttributes) o; + return Objects.equals(this.amount, createPushToCardPaymentAttributes.amount) && + Objects.equals(this.idempotencyKey, createPushToCardPaymentAttributes.idempotencyKey) && + Objects.equals(this.tags, createPushToCardPaymentAttributes.tags) && + Objects.equals(this.description, createPushToCardPaymentAttributes.description) && + Objects.equals(this._configuration, createPushToCardPaymentAttributes._configuration); + } + + @Override + public int hashCode() { + return Objects.hash(amount, idempotencyKey, tags, description, _configuration); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatePushToCardPaymentAttributes {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `configuration` to the URL query string + if (getConfiguration() != null) { + joiner.add(getConfiguration().toUrlQueryString(prefix + "configuration" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreatePushToCardPaymentAttributesConfiguration.java b/src/main/java/unit/java/sdk/model/CreatePushToCardPaymentAttributesConfiguration.java new file mode 100644 index 00000000..e03a4090 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreatePushToCardPaymentAttributesConfiguration.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Astra; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreatePushToCardPaymentAttributesConfiguration + */ +@JsonPropertyOrder({ + CreatePushToCardPaymentAttributesConfiguration.JSON_PROPERTY_ASTRA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreatePushToCardPaymentAttributesConfiguration { + public static final String JSON_PROPERTY_ASTRA = "astra"; + private Astra astra; + + public CreatePushToCardPaymentAttributesConfiguration() { + } + + public CreatePushToCardPaymentAttributesConfiguration astra(Astra astra) { + this.astra = astra; + return this; + } + + /** + * Get astra + * @return astra + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASTRA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Astra getAstra() { + return astra; + } + + + @JsonProperty(JSON_PROPERTY_ASTRA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAstra(Astra astra) { + this.astra = astra; + } + + + /** + * Return true if this CreatePushToCardPayment_attributes_configuration object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePushToCardPaymentAttributesConfiguration createPushToCardPaymentAttributesConfiguration = (CreatePushToCardPaymentAttributesConfiguration) o; + return Objects.equals(this.astra, createPushToCardPaymentAttributesConfiguration.astra); + } + + @Override + public int hashCode() { + return Objects.hash(astra); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatePushToCardPaymentAttributesConfiguration {\n"); + sb.append(" astra: ").append(toIndentedString(astra)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `astra` to the URL query string + if (getAstra() != null) { + joiner.add(getAstra().toUrlQueryString(prefix + "astra" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateRecurringCreditAchPayment.java b/src/main/java/unit/java/sdk/model/CreateRecurringCreditAchPayment.java new file mode 100644 index 00000000..edfd75b2 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateRecurringCreditAchPayment.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchPaymentCounterpartyRelationships; +import unit.java.sdk.model.CreateRecurringCreditAchPaymentAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateRecurringCreditAchPayment + */ +@JsonPropertyOrder({ + CreateRecurringCreditAchPayment.JSON_PROPERTY_TYPE, + CreateRecurringCreditAchPayment.JSON_PROPERTY_ATTRIBUTES, + CreateRecurringCreditAchPayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRecurringCreditAchPayment { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "recurringCreditAchPayment"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateRecurringCreditAchPaymentAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateAchPaymentCounterpartyRelationships relationships; + + public CreateRecurringCreditAchPayment() { + } + + public CreateRecurringCreditAchPayment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CreateRecurringCreditAchPayment attributes(CreateRecurringCreditAchPaymentAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateRecurringCreditAchPaymentAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateRecurringCreditAchPaymentAttributes attributes) { + this.attributes = attributes; + } + + + public CreateRecurringCreditAchPayment relationships(CreateAchPaymentCounterpartyRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateAchPaymentCounterpartyRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateAchPaymentCounterpartyRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this createRecurringCreditAchPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRecurringCreditAchPayment createRecurringCreditAchPayment = (CreateRecurringCreditAchPayment) o; + return Objects.equals(this.type, createRecurringCreditAchPayment.type) && + Objects.equals(this.attributes, createRecurringCreditAchPayment.attributes) && + Objects.equals(this.relationships, createRecurringCreditAchPayment.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRecurringCreditAchPayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateRecurringCreditAchPaymentAttributes.java b/src/main/java/unit/java/sdk/model/CreateRecurringCreditAchPaymentAttributes.java new file mode 100644 index 00000000..29a4a2cb --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateRecurringCreditAchPaymentAttributes.java @@ -0,0 +1,332 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Schedule1; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateRecurringCreditAchPaymentAttributes + */ +@JsonPropertyOrder({ + CreateRecurringCreditAchPaymentAttributes.JSON_PROPERTY_AMOUNT, + CreateRecurringCreditAchPaymentAttributes.JSON_PROPERTY_DESCRIPTION, + CreateRecurringCreditAchPaymentAttributes.JSON_PROPERTY_ADDENDA, + CreateRecurringCreditAchPaymentAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateRecurringCreditAchPaymentAttributes.JSON_PROPERTY_TAGS, + CreateRecurringCreditAchPaymentAttributes.JSON_PROPERTY_SCHEDULE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRecurringCreditAchPaymentAttributes { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ADDENDA = "addenda"; + private String addenda; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_SCHEDULE = "schedule"; + private Schedule1 schedule; + + public CreateRecurringCreditAchPaymentAttributes() { + } + + public CreateRecurringCreditAchPaymentAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CreateRecurringCreditAchPaymentAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public CreateRecurringCreditAchPaymentAttributes addenda(String addenda) { + this.addenda = addenda; + return this; + } + + /** + * Get addenda + * @return addenda + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAddenda() { + return addenda; + } + + + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddenda(String addenda) { + this.addenda = addenda; + } + + + public CreateRecurringCreditAchPaymentAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateRecurringCreditAchPaymentAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateRecurringCreditAchPaymentAttributes schedule(Schedule1 schedule) { + this.schedule = schedule; + return this; + } + + /** + * Get schedule + * @return schedule + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Schedule1 getSchedule() { + return schedule; + } + + + @JsonProperty(JSON_PROPERTY_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSchedule(Schedule1 schedule) { + this.schedule = schedule; + } + + + /** + * Return true if this createRecurringCreditAchPayment_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRecurringCreditAchPaymentAttributes createRecurringCreditAchPaymentAttributes = (CreateRecurringCreditAchPaymentAttributes) o; + return Objects.equals(this.amount, createRecurringCreditAchPaymentAttributes.amount) && + Objects.equals(this.description, createRecurringCreditAchPaymentAttributes.description) && + Objects.equals(this.addenda, createRecurringCreditAchPaymentAttributes.addenda) && + Objects.equals(this.idempotencyKey, createRecurringCreditAchPaymentAttributes.idempotencyKey) && + Objects.equals(this.tags, createRecurringCreditAchPaymentAttributes.tags) && + Objects.equals(this.schedule, createRecurringCreditAchPaymentAttributes.schedule); + } + + @Override + public int hashCode() { + return Objects.hash(amount, description, addenda, idempotencyKey, tags, schedule); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRecurringCreditAchPaymentAttributes {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `addenda` to the URL query string + if (getAddenda() != null) { + joiner.add(String.format("%saddenda%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAddenda()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `schedule` to the URL query string + if (getSchedule() != null) { + joiner.add(getSchedule().toUrlQueryString(prefix + "schedule" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateRecurringCreditBookPayment.java b/src/main/java/unit/java/sdk/model/CreateRecurringCreditBookPayment.java new file mode 100644 index 00000000..6df451bd --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateRecurringCreditBookPayment.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBookPaymentRelationships; +import unit.java.sdk.model.CreateRecurringCreditBookPaymentAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateRecurringCreditBookPayment + */ +@JsonPropertyOrder({ + CreateRecurringCreditBookPayment.JSON_PROPERTY_TYPE, + CreateRecurringCreditBookPayment.JSON_PROPERTY_ATTRIBUTES, + CreateRecurringCreditBookPayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRecurringCreditBookPayment { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "recurringCreditBookPayment"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateRecurringCreditBookPaymentAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateBookPaymentRelationships relationships; + + public CreateRecurringCreditBookPayment() { + } + + public CreateRecurringCreditBookPayment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CreateRecurringCreditBookPayment attributes(CreateRecurringCreditBookPaymentAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateRecurringCreditBookPaymentAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateRecurringCreditBookPaymentAttributes attributes) { + this.attributes = attributes; + } + + + public CreateRecurringCreditBookPayment relationships(CreateBookPaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateBookPaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateBookPaymentRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this createRecurringCreditBookPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRecurringCreditBookPayment createRecurringCreditBookPayment = (CreateRecurringCreditBookPayment) o; + return Objects.equals(this.type, createRecurringCreditBookPayment.type) && + Objects.equals(this.attributes, createRecurringCreditBookPayment.attributes) && + Objects.equals(this.relationships, createRecurringCreditBookPayment.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRecurringCreditBookPayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateRecurringCreditBookPaymentAttributes.java b/src/main/java/unit/java/sdk/model/CreateRecurringCreditBookPaymentAttributes.java new file mode 100644 index 00000000..3574d881 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateRecurringCreditBookPaymentAttributes.java @@ -0,0 +1,332 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Schedule1; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateRecurringCreditBookPaymentAttributes + */ +@JsonPropertyOrder({ + CreateRecurringCreditBookPaymentAttributes.JSON_PROPERTY_AMOUNT, + CreateRecurringCreditBookPaymentAttributes.JSON_PROPERTY_DESCRIPTION, + CreateRecurringCreditBookPaymentAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateRecurringCreditBookPaymentAttributes.JSON_PROPERTY_TAGS, + CreateRecurringCreditBookPaymentAttributes.JSON_PROPERTY_TRANSACTION_SUMMARY_OVERRIDE, + CreateRecurringCreditBookPaymentAttributes.JSON_PROPERTY_SCHEDULE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRecurringCreditBookPaymentAttributes { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_TRANSACTION_SUMMARY_OVERRIDE = "transactionSummaryOverride"; + private String transactionSummaryOverride; + + public static final String JSON_PROPERTY_SCHEDULE = "schedule"; + private Schedule1 schedule; + + public CreateRecurringCreditBookPaymentAttributes() { + } + + public CreateRecurringCreditBookPaymentAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CreateRecurringCreditBookPaymentAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public CreateRecurringCreditBookPaymentAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateRecurringCreditBookPaymentAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateRecurringCreditBookPaymentAttributes transactionSummaryOverride(String transactionSummaryOverride) { + this.transactionSummaryOverride = transactionSummaryOverride; + return this; + } + + /** + * Get transactionSummaryOverride + * @return transactionSummaryOverride + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRANSACTION_SUMMARY_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTransactionSummaryOverride() { + return transactionSummaryOverride; + } + + + @JsonProperty(JSON_PROPERTY_TRANSACTION_SUMMARY_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransactionSummaryOverride(String transactionSummaryOverride) { + this.transactionSummaryOverride = transactionSummaryOverride; + } + + + public CreateRecurringCreditBookPaymentAttributes schedule(Schedule1 schedule) { + this.schedule = schedule; + return this; + } + + /** + * Get schedule + * @return schedule + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Schedule1 getSchedule() { + return schedule; + } + + + @JsonProperty(JSON_PROPERTY_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSchedule(Schedule1 schedule) { + this.schedule = schedule; + } + + + /** + * Return true if this createRecurringCreditBookPayment_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRecurringCreditBookPaymentAttributes createRecurringCreditBookPaymentAttributes = (CreateRecurringCreditBookPaymentAttributes) o; + return Objects.equals(this.amount, createRecurringCreditBookPaymentAttributes.amount) && + Objects.equals(this.description, createRecurringCreditBookPaymentAttributes.description) && + Objects.equals(this.idempotencyKey, createRecurringCreditBookPaymentAttributes.idempotencyKey) && + Objects.equals(this.tags, createRecurringCreditBookPaymentAttributes.tags) && + Objects.equals(this.transactionSummaryOverride, createRecurringCreditBookPaymentAttributes.transactionSummaryOverride) && + Objects.equals(this.schedule, createRecurringCreditBookPaymentAttributes.schedule); + } + + @Override + public int hashCode() { + return Objects.hash(amount, description, idempotencyKey, tags, transactionSummaryOverride, schedule); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRecurringCreditBookPaymentAttributes {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" transactionSummaryOverride: ").append(toIndentedString(transactionSummaryOverride)).append("\n"); + sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `transactionSummaryOverride` to the URL query string + if (getTransactionSummaryOverride() != null) { + joiner.add(String.format("%stransactionSummaryOverride%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTransactionSummaryOverride()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `schedule` to the URL query string + if (getSchedule() != null) { + joiner.add(getSchedule().toUrlQueryString(prefix + "schedule" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateRecurringDebitAchPayment.java b/src/main/java/unit/java/sdk/model/CreateRecurringDebitAchPayment.java new file mode 100644 index 00000000..a5f5d7bd --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateRecurringDebitAchPayment.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchPaymentCounterpartyRelationships; +import unit.java.sdk.model.CreateRecurringDebitAchPaymentAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateRecurringDebitAchPayment + */ +@JsonPropertyOrder({ + CreateRecurringDebitAchPayment.JSON_PROPERTY_TYPE, + CreateRecurringDebitAchPayment.JSON_PROPERTY_ATTRIBUTES, + CreateRecurringDebitAchPayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRecurringDebitAchPayment { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "recurringDebitAchPayment"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateRecurringDebitAchPaymentAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateAchPaymentCounterpartyRelationships relationships; + + public CreateRecurringDebitAchPayment() { + } + + public CreateRecurringDebitAchPayment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CreateRecurringDebitAchPayment attributes(CreateRecurringDebitAchPaymentAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateRecurringDebitAchPaymentAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateRecurringDebitAchPaymentAttributes attributes) { + this.attributes = attributes; + } + + + public CreateRecurringDebitAchPayment relationships(CreateAchPaymentCounterpartyRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateAchPaymentCounterpartyRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateAchPaymentCounterpartyRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this createRecurringDebitAchPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRecurringDebitAchPayment createRecurringDebitAchPayment = (CreateRecurringDebitAchPayment) o; + return Objects.equals(this.type, createRecurringDebitAchPayment.type) && + Objects.equals(this.attributes, createRecurringDebitAchPayment.attributes) && + Objects.equals(this.relationships, createRecurringDebitAchPayment.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRecurringDebitAchPayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateRecurringDebitAchPaymentAttributes.java b/src/main/java/unit/java/sdk/model/CreateRecurringDebitAchPaymentAttributes.java new file mode 100644 index 00000000..b3d930f8 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateRecurringDebitAchPaymentAttributes.java @@ -0,0 +1,441 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Schedule1; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateRecurringDebitAchPaymentAttributes + */ +@JsonPropertyOrder({ + CreateRecurringDebitAchPaymentAttributes.JSON_PROPERTY_AMOUNT, + CreateRecurringDebitAchPaymentAttributes.JSON_PROPERTY_DESCRIPTION, + CreateRecurringDebitAchPaymentAttributes.JSON_PROPERTY_ADDENDA, + CreateRecurringDebitAchPaymentAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateRecurringDebitAchPaymentAttributes.JSON_PROPERTY_SAME_DAY, + CreateRecurringDebitAchPaymentAttributes.JSON_PROPERTY_VERIFY_COUNTERPARTY_BALANCE, + CreateRecurringDebitAchPaymentAttributes.JSON_PROPERTY_TAGS, + CreateRecurringDebitAchPaymentAttributes.JSON_PROPERTY_SCHEDULE, + CreateRecurringDebitAchPaymentAttributes.JSON_PROPERTY_CLEARING_DAYS_OVERRIDE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRecurringDebitAchPaymentAttributes { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ADDENDA = "addenda"; + private String addenda; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_SAME_DAY = "sameDay"; + private Boolean sameDay = false; + + public static final String JSON_PROPERTY_VERIFY_COUNTERPARTY_BALANCE = "verifyCounterpartyBalance"; + private Boolean verifyCounterpartyBalance = false; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_SCHEDULE = "schedule"; + private Schedule1 schedule; + + public static final String JSON_PROPERTY_CLEARING_DAYS_OVERRIDE = "clearingDaysOverride"; + private Integer clearingDaysOverride; + + public CreateRecurringDebitAchPaymentAttributes() { + } + + public CreateRecurringDebitAchPaymentAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CreateRecurringDebitAchPaymentAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public CreateRecurringDebitAchPaymentAttributes addenda(String addenda) { + this.addenda = addenda; + return this; + } + + /** + * Get addenda + * @return addenda + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAddenda() { + return addenda; + } + + + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddenda(String addenda) { + this.addenda = addenda; + } + + + public CreateRecurringDebitAchPaymentAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateRecurringDebitAchPaymentAttributes sameDay(Boolean sameDay) { + this.sameDay = sameDay; + return this; + } + + /** + * Get sameDay + * @return sameDay + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAME_DAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSameDay() { + return sameDay; + } + + + @JsonProperty(JSON_PROPERTY_SAME_DAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSameDay(Boolean sameDay) { + this.sameDay = sameDay; + } + + + public CreateRecurringDebitAchPaymentAttributes verifyCounterpartyBalance(Boolean verifyCounterpartyBalance) { + this.verifyCounterpartyBalance = verifyCounterpartyBalance; + return this; + } + + /** + * Get verifyCounterpartyBalance + * @return verifyCounterpartyBalance + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERIFY_COUNTERPARTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getVerifyCounterpartyBalance() { + return verifyCounterpartyBalance; + } + + + @JsonProperty(JSON_PROPERTY_VERIFY_COUNTERPARTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVerifyCounterpartyBalance(Boolean verifyCounterpartyBalance) { + this.verifyCounterpartyBalance = verifyCounterpartyBalance; + } + + + public CreateRecurringDebitAchPaymentAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateRecurringDebitAchPaymentAttributes schedule(Schedule1 schedule) { + this.schedule = schedule; + return this; + } + + /** + * Get schedule + * @return schedule + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Schedule1 getSchedule() { + return schedule; + } + + + @JsonProperty(JSON_PROPERTY_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSchedule(Schedule1 schedule) { + this.schedule = schedule; + } + + + public CreateRecurringDebitAchPaymentAttributes clearingDaysOverride(Integer clearingDaysOverride) { + this.clearingDaysOverride = clearingDaysOverride; + return this; + } + + /** + * Get clearingDaysOverride + * minimum: 0 + * @return clearingDaysOverride + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLEARING_DAYS_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getClearingDaysOverride() { + return clearingDaysOverride; + } + + + @JsonProperty(JSON_PROPERTY_CLEARING_DAYS_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setClearingDaysOverride(Integer clearingDaysOverride) { + this.clearingDaysOverride = clearingDaysOverride; + } + + + /** + * Return true if this createRecurringDebitAchPayment_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRecurringDebitAchPaymentAttributes createRecurringDebitAchPaymentAttributes = (CreateRecurringDebitAchPaymentAttributes) o; + return Objects.equals(this.amount, createRecurringDebitAchPaymentAttributes.amount) && + Objects.equals(this.description, createRecurringDebitAchPaymentAttributes.description) && + Objects.equals(this.addenda, createRecurringDebitAchPaymentAttributes.addenda) && + Objects.equals(this.idempotencyKey, createRecurringDebitAchPaymentAttributes.idempotencyKey) && + Objects.equals(this.sameDay, createRecurringDebitAchPaymentAttributes.sameDay) && + Objects.equals(this.verifyCounterpartyBalance, createRecurringDebitAchPaymentAttributes.verifyCounterpartyBalance) && + Objects.equals(this.tags, createRecurringDebitAchPaymentAttributes.tags) && + Objects.equals(this.schedule, createRecurringDebitAchPaymentAttributes.schedule) && + Objects.equals(this.clearingDaysOverride, createRecurringDebitAchPaymentAttributes.clearingDaysOverride); + } + + @Override + public int hashCode() { + return Objects.hash(amount, description, addenda, idempotencyKey, sameDay, verifyCounterpartyBalance, tags, schedule, clearingDaysOverride); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRecurringDebitAchPaymentAttributes {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" sameDay: ").append(toIndentedString(sameDay)).append("\n"); + sb.append(" verifyCounterpartyBalance: ").append(toIndentedString(verifyCounterpartyBalance)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); + sb.append(" clearingDaysOverride: ").append(toIndentedString(clearingDaysOverride)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `addenda` to the URL query string + if (getAddenda() != null) { + joiner.add(String.format("%saddenda%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAddenda()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sameDay` to the URL query string + if (getSameDay() != null) { + joiner.add(String.format("%ssameDay%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSameDay()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `verifyCounterpartyBalance` to the URL query string + if (getVerifyCounterpartyBalance() != null) { + joiner.add(String.format("%sverifyCounterpartyBalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVerifyCounterpartyBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `schedule` to the URL query string + if (getSchedule() != null) { + joiner.add(getSchedule().toUrlQueryString(prefix + "schedule" + suffix)); + } + + // add `clearingDaysOverride` to the URL query string + if (getClearingDaysOverride() != null) { + joiner.add(String.format("%sclearingDaysOverride%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getClearingDaysOverride()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateRecurringPayment.java b/src/main/java/unit/java/sdk/model/CreateRecurringPayment.java new file mode 100644 index 00000000..a0592379 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateRecurringPayment.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateRecurringPaymentData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateRecurringPayment + */ +@JsonPropertyOrder({ + CreateRecurringPayment.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRecurringPayment { + public static final String JSON_PROPERTY_DATA = "data"; + private CreateRecurringPaymentData data; + + public CreateRecurringPayment() { + } + + public CreateRecurringPayment data(CreateRecurringPaymentData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateRecurringPaymentData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(CreateRecurringPaymentData data) { + this.data = data; + } + + + /** + * Return true if this createRecurringPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRecurringPayment createRecurringPayment = (CreateRecurringPayment) o; + return Objects.equals(this.data, createRecurringPayment.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRecurringPayment {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateRecurringPaymentData.java b/src/main/java/unit/java/sdk/model/CreateRecurringPaymentData.java new file mode 100644 index 00000000..abc5b99d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateRecurringPaymentData.java @@ -0,0 +1,353 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBookPaymentRelationships; +import unit.java.sdk.model.CreateRecurringCreditAchPayment; +import unit.java.sdk.model.CreateRecurringCreditBookPayment; +import unit.java.sdk.model.CreateRecurringCreditBookPaymentAttributes; +import unit.java.sdk.model.CreateRecurringDebitAchPayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import unit.java.sdk.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = CreateRecurringPaymentData.CreateRecurringPaymentDataDeserializer.class) +@JsonSerialize(using = CreateRecurringPaymentData.CreateRecurringPaymentDataSerializer.class) +public class CreateRecurringPaymentData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreateRecurringPaymentData.class.getName()); + + public static class CreateRecurringPaymentDataSerializer extends StdSerializer { + public CreateRecurringPaymentDataSerializer(Class t) { + super(t); + } + + public CreateRecurringPaymentDataSerializer() { + this(null); + } + + @Override + public void serialize(CreateRecurringPaymentData value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class CreateRecurringPaymentDataDeserializer extends StdDeserializer { + public CreateRecurringPaymentDataDeserializer() { + this(CreateRecurringPaymentData.class); + } + + public CreateRecurringPaymentDataDeserializer(Class vc) { + super(vc); + } + + @Override + public CreateRecurringPaymentData deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize CreateRecurringCreditAchPayment + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateRecurringCreditAchPayment.class.equals(Integer.class) || CreateRecurringCreditAchPayment.class.equals(Long.class) || CreateRecurringCreditAchPayment.class.equals(Float.class) || CreateRecurringCreditAchPayment.class.equals(Double.class) || CreateRecurringCreditAchPayment.class.equals(Boolean.class) || CreateRecurringCreditAchPayment.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateRecurringCreditAchPayment.class.equals(Integer.class) || CreateRecurringCreditAchPayment.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateRecurringCreditAchPayment.class.equals(Float.class) || CreateRecurringCreditAchPayment.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateRecurringCreditAchPayment.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateRecurringCreditAchPayment.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateRecurringCreditAchPayment.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateRecurringCreditAchPayment'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateRecurringCreditAchPayment'", e); + } + + // deserialize CreateRecurringCreditBookPayment + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateRecurringCreditBookPayment.class.equals(Integer.class) || CreateRecurringCreditBookPayment.class.equals(Long.class) || CreateRecurringCreditBookPayment.class.equals(Float.class) || CreateRecurringCreditBookPayment.class.equals(Double.class) || CreateRecurringCreditBookPayment.class.equals(Boolean.class) || CreateRecurringCreditBookPayment.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateRecurringCreditBookPayment.class.equals(Integer.class) || CreateRecurringCreditBookPayment.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateRecurringCreditBookPayment.class.equals(Float.class) || CreateRecurringCreditBookPayment.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateRecurringCreditBookPayment.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateRecurringCreditBookPayment.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateRecurringCreditBookPayment.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateRecurringCreditBookPayment'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateRecurringCreditBookPayment'", e); + } + + // deserialize CreateRecurringDebitAchPayment + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateRecurringDebitAchPayment.class.equals(Integer.class) || CreateRecurringDebitAchPayment.class.equals(Long.class) || CreateRecurringDebitAchPayment.class.equals(Float.class) || CreateRecurringDebitAchPayment.class.equals(Double.class) || CreateRecurringDebitAchPayment.class.equals(Boolean.class) || CreateRecurringDebitAchPayment.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateRecurringDebitAchPayment.class.equals(Integer.class) || CreateRecurringDebitAchPayment.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateRecurringDebitAchPayment.class.equals(Float.class) || CreateRecurringDebitAchPayment.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateRecurringDebitAchPayment.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateRecurringDebitAchPayment.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateRecurringDebitAchPayment.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateRecurringDebitAchPayment'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateRecurringDebitAchPayment'", e); + } + + if (match == 1) { + CreateRecurringPaymentData ret = new CreateRecurringPaymentData(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for CreateRecurringPaymentData: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public CreateRecurringPaymentData getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "CreateRecurringPaymentData cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public CreateRecurringPaymentData() { + super("oneOf", Boolean.FALSE); + } + + public CreateRecurringPaymentData(CreateRecurringCreditAchPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateRecurringPaymentData(CreateRecurringCreditBookPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateRecurringPaymentData(CreateRecurringDebitAchPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("CreateRecurringCreditAchPayment", CreateRecurringCreditAchPayment.class); + schemas.put("CreateRecurringCreditBookPayment", CreateRecurringCreditBookPayment.class); + schemas.put("CreateRecurringDebitAchPayment", CreateRecurringDebitAchPayment.class); + JSON.registerDescendants(CreateRecurringPaymentData.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return CreateRecurringPaymentData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * CreateRecurringCreditAchPayment, CreateRecurringCreditBookPayment, CreateRecurringDebitAchPayment + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(CreateRecurringCreditAchPayment.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreateRecurringCreditBookPayment.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreateRecurringDebitAchPayment.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be CreateRecurringCreditAchPayment, CreateRecurringCreditBookPayment, CreateRecurringDebitAchPayment"); + } + + /** + * Get the actual instance, which can be the following: + * CreateRecurringCreditAchPayment, CreateRecurringCreditBookPayment, CreateRecurringDebitAchPayment + * + * @return The actual instance (CreateRecurringCreditAchPayment, CreateRecurringCreditBookPayment, CreateRecurringDebitAchPayment) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateRecurringCreditAchPayment`. If the actual instance is not `CreateRecurringCreditAchPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateRecurringCreditAchPayment` + * @throws ClassCastException if the instance is not `CreateRecurringCreditAchPayment` + */ + public CreateRecurringCreditAchPayment getCreateRecurringCreditAchPayment() throws ClassCastException { + return (CreateRecurringCreditAchPayment)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateRecurringCreditBookPayment`. If the actual instance is not `CreateRecurringCreditBookPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateRecurringCreditBookPayment` + * @throws ClassCastException if the instance is not `CreateRecurringCreditBookPayment` + */ + public CreateRecurringCreditBookPayment getCreateRecurringCreditBookPayment() throws ClassCastException { + return (CreateRecurringCreditBookPayment)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateRecurringDebitAchPayment`. If the actual instance is not `CreateRecurringDebitAchPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateRecurringDebitAchPayment` + * @throws ClassCastException if the instance is not `CreateRecurringDebitAchPayment` + */ + public CreateRecurringDebitAchPayment getCreateRecurringDebitAchPayment() throws ClassCastException { + return (CreateRecurringDebitAchPayment)super.getActualInstance(); + } + + + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof CreateRecurringCreditAchPayment) { + if (getActualInstance() != null) { + joiner.add(((CreateRecurringCreditAchPayment)getActualInstance()).toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateRecurringDebitAchPayment) { + if (getActualInstance() != null) { + joiner.add(((CreateRecurringDebitAchPayment)getActualInstance()).toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateRecurringCreditBookPayment) { + if (getActualInstance() != null) { + joiner.add(((CreateRecurringCreditBookPayment)getActualInstance()).toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + return null; + } + +} + diff --git a/src/main/java/unit/java/sdk/model/CreateRepayment.java b/src/main/java/unit/java/sdk/model/CreateRepayment.java new file mode 100644 index 00000000..2271f519 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateRepayment.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateRepaymentData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateRepayment + */ +@JsonPropertyOrder({ + CreateRepayment.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRepayment { + public static final String JSON_PROPERTY_DATA = "data"; + private CreateRepaymentData data; + + public CreateRepayment() { + } + + public CreateRepayment data(CreateRepaymentData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateRepaymentData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(CreateRepaymentData data) { + this.data = data; + } + + + /** + * Return true if this createRepayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRepayment createRepayment = (CreateRepayment) o; + return Objects.equals(this.data, createRepayment.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRepayment {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateRepaymentData.java b/src/main/java/unit/java/sdk/model/CreateRepaymentData.java new file mode 100644 index 00000000..41f267f0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateRepaymentData.java @@ -0,0 +1,298 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchRepayment; +import unit.java.sdk.model.CreateBookRepayment; +import unit.java.sdk.model.CreateBookRepaymentAttributes; +import unit.java.sdk.model.CreateBookRepaymentRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import unit.java.sdk.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = CreateRepaymentData.CreateRepaymentDataDeserializer.class) +@JsonSerialize(using = CreateRepaymentData.CreateRepaymentDataSerializer.class) +public class CreateRepaymentData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreateRepaymentData.class.getName()); + + public static class CreateRepaymentDataSerializer extends StdSerializer { + public CreateRepaymentDataSerializer(Class t) { + super(t); + } + + public CreateRepaymentDataSerializer() { + this(null); + } + + @Override + public void serialize(CreateRepaymentData value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class CreateRepaymentDataDeserializer extends StdDeserializer { + public CreateRepaymentDataDeserializer() { + this(CreateRepaymentData.class); + } + + public CreateRepaymentDataDeserializer(Class vc) { + super(vc); + } + + @Override + public CreateRepaymentData deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize CreateAchRepayment + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateAchRepayment.class.equals(Integer.class) || CreateAchRepayment.class.equals(Long.class) || CreateAchRepayment.class.equals(Float.class) || CreateAchRepayment.class.equals(Double.class) || CreateAchRepayment.class.equals(Boolean.class) || CreateAchRepayment.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateAchRepayment.class.equals(Integer.class) || CreateAchRepayment.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateAchRepayment.class.equals(Float.class) || CreateAchRepayment.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateAchRepayment.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateAchRepayment.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateAchRepayment.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateAchRepayment'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateAchRepayment'", e); + } + + // deserialize CreateBookRepayment + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateBookRepayment.class.equals(Integer.class) || CreateBookRepayment.class.equals(Long.class) || CreateBookRepayment.class.equals(Float.class) || CreateBookRepayment.class.equals(Double.class) || CreateBookRepayment.class.equals(Boolean.class) || CreateBookRepayment.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CreateBookRepayment.class.equals(Integer.class) || CreateBookRepayment.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CreateBookRepayment.class.equals(Float.class) || CreateBookRepayment.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CreateBookRepayment.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CreateBookRepayment.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CreateBookRepayment.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CreateBookRepayment'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CreateBookRepayment'", e); + } + + if (match == 1) { + CreateRepaymentData ret = new CreateRepaymentData(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for CreateRepaymentData: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public CreateRepaymentData getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "CreateRepaymentData cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public CreateRepaymentData() { + super("oneOf", Boolean.FALSE); + } + + public CreateRepaymentData(CreateAchRepayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateRepaymentData(CreateBookRepayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("CreateAchRepayment", CreateAchRepayment.class); + schemas.put("CreateBookRepayment", CreateBookRepayment.class); + JSON.registerDescendants(CreateRepaymentData.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return CreateRepaymentData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * CreateAchRepayment, CreateBookRepayment + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(CreateAchRepayment.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CreateBookRepayment.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be CreateAchRepayment, CreateBookRepayment"); + } + + /** + * Get the actual instance, which can be the following: + * CreateAchRepayment, CreateBookRepayment + * + * @return The actual instance (CreateAchRepayment, CreateBookRepayment) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateAchRepayment`. If the actual instance is not `CreateAchRepayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateAchRepayment` + * @throws ClassCastException if the instance is not `CreateAchRepayment` + */ + public CreateAchRepayment getCreateAchRepayment() throws ClassCastException { + return (CreateAchRepayment)super.getActualInstance(); + } + + /** + * Get the actual instance of `CreateBookRepayment`. If the actual instance is not `CreateBookRepayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CreateBookRepayment` + * @throws ClassCastException if the instance is not `CreateBookRepayment` + */ + public CreateBookRepayment getCreateBookRepayment() throws ClassCastException { + return (CreateBookRepayment)super.getActualInstance(); + } + + + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof CreateAchRepayment) { + if (getActualInstance() != null) { + joiner.add(((CreateAchRepayment)getActualInstance()).toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CreateBookRepayment) { + if (getActualInstance() != null) { + joiner.add(((CreateBookRepayment)getActualInstance()).toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } + +} + diff --git a/src/main/java/unit/java/sdk/model/CreateReward.java b/src/main/java/unit/java/sdk/model/CreateReward.java new file mode 100644 index 00000000..67f81a19 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateReward.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateRewardData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateReward + */ +@JsonPropertyOrder({ + CreateReward.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateReward { + public static final String JSON_PROPERTY_DATA = "data"; + private CreateRewardData data; + + public CreateReward() { + } + + public CreateReward data(CreateRewardData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateRewardData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(CreateRewardData data) { + this.data = data; + } + + + /** + * Return true if this createReward object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateReward createReward = (CreateReward) o; + return Objects.equals(this.data, createReward.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateReward {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateRewardData.java b/src/main/java/unit/java/sdk/model/CreateRewardData.java new file mode 100644 index 00000000..0ffbfe48 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateRewardData.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateRewardDataAttributes; +import unit.java.sdk.model.CreateRewardRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateRewardData + */ +@JsonPropertyOrder({ + CreateRewardData.JSON_PROPERTY_TYPE, + CreateRewardData.JSON_PROPERTY_ATTRIBUTES, + CreateRewardData.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRewardData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "reward"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateRewardDataAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateRewardRelationships relationships; + + public CreateRewardData() { + } + + public CreateRewardData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CreateRewardData attributes(CreateRewardDataAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateRewardDataAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateRewardDataAttributes attributes) { + this.attributes = attributes; + } + + + public CreateRewardData relationships(CreateRewardRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateRewardRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateRewardRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this createReward_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRewardData createRewardData = (CreateRewardData) o; + return Objects.equals(this.type, createRewardData.type) && + Objects.equals(this.attributes, createRewardData.attributes) && + Objects.equals(this.relationships, createRewardData.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRewardData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateRewardDataAttributes.java b/src/main/java/unit/java/sdk/model/CreateRewardDataAttributes.java new file mode 100644 index 00000000..23f5c2f4 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateRewardDataAttributes.java @@ -0,0 +1,259 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateRewardDataAttributes + */ +@JsonPropertyOrder({ + CreateRewardDataAttributes.JSON_PROPERTY_AMOUNT, + CreateRewardDataAttributes.JSON_PROPERTY_DESCRIPTION, + CreateRewardDataAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateRewardDataAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRewardDataAttributes { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public CreateRewardDataAttributes() { + } + + public CreateRewardDataAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CreateRewardDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public CreateRewardDataAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateRewardDataAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this createReward_data_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRewardDataAttributes createRewardDataAttributes = (CreateRewardDataAttributes) o; + return Objects.equals(this.amount, createRewardDataAttributes.amount) && + Objects.equals(this.description, createRewardDataAttributes.description) && + Objects.equals(this.idempotencyKey, createRewardDataAttributes.idempotencyKey) && + Objects.equals(this.tags, createRewardDataAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(amount, description, idempotencyKey, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRewardDataAttributes {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateRewardRelationships.java b/src/main/java/unit/java/sdk/model/CreateRewardRelationships.java new file mode 100644 index 00000000..cd1963c6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateRewardRelationships.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsReceivePaymentTransaction; +import unit.java.sdk.model.Relationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateRewardRelationships + */ +@JsonPropertyOrder({ + CreateRewardRelationships.JSON_PROPERTY_FUNDING_ACCOUNT, + CreateRewardRelationships.JSON_PROPERTY_RECEIVING_ACCOUNT, + CreateRewardRelationships.JSON_PROPERTY_REWARDED_TRANSACTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRewardRelationships { + public static final String JSON_PROPERTY_FUNDING_ACCOUNT = "fundingAccount"; + private Relationship fundingAccount; + + public static final String JSON_PROPERTY_RECEIVING_ACCOUNT = "receivingAccount"; + private Relationship receivingAccount; + + public static final String JSON_PROPERTY_REWARDED_TRANSACTION = "rewardedTransaction"; + private ReceivedPaymentRelationshipsReceivePaymentTransaction rewardedTransaction; + + public CreateRewardRelationships() { + } + + public CreateRewardRelationships fundingAccount(Relationship fundingAccount) { + this.fundingAccount = fundingAccount; + return this; + } + + /** + * Get fundingAccount + * @return fundingAccount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FUNDING_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Relationship getFundingAccount() { + return fundingAccount; + } + + + @JsonProperty(JSON_PROPERTY_FUNDING_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFundingAccount(Relationship fundingAccount) { + this.fundingAccount = fundingAccount; + } + + + public CreateRewardRelationships receivingAccount(Relationship receivingAccount) { + this.receivingAccount = receivingAccount; + return this; + } + + /** + * Get receivingAccount + * @return receivingAccount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECEIVING_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationship getReceivingAccount() { + return receivingAccount; + } + + + @JsonProperty(JSON_PROPERTY_RECEIVING_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReceivingAccount(Relationship receivingAccount) { + this.receivingAccount = receivingAccount; + } + + + public CreateRewardRelationships rewardedTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction rewardedTransaction) { + this.rewardedTransaction = rewardedTransaction; + return this; + } + + /** + * Get rewardedTransaction + * @return rewardedTransaction + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REWARDED_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReceivedPaymentRelationshipsReceivePaymentTransaction getRewardedTransaction() { + return rewardedTransaction; + } + + + @JsonProperty(JSON_PROPERTY_REWARDED_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRewardedTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction rewardedTransaction) { + this.rewardedTransaction = rewardedTransaction; + } + + + /** + * Return true if this createRewardRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRewardRelationships createRewardRelationships = (CreateRewardRelationships) o; + return Objects.equals(this.fundingAccount, createRewardRelationships.fundingAccount) && + Objects.equals(this.receivingAccount, createRewardRelationships.receivingAccount) && + Objects.equals(this.rewardedTransaction, createRewardRelationships.rewardedTransaction); + } + + @Override + public int hashCode() { + return Objects.hash(fundingAccount, receivingAccount, rewardedTransaction); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRewardRelationships {\n"); + sb.append(" fundingAccount: ").append(toIndentedString(fundingAccount)).append("\n"); + sb.append(" receivingAccount: ").append(toIndentedString(receivingAccount)).append("\n"); + sb.append(" rewardedTransaction: ").append(toIndentedString(rewardedTransaction)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `fundingAccount` to the URL query string + if (getFundingAccount() != null) { + joiner.add(getFundingAccount().toUrlQueryString(prefix + "fundingAccount" + suffix)); + } + + // add `receivingAccount` to the URL query string + if (getReceivingAccount() != null) { + joiner.add(getReceivingAccount().toUrlQueryString(prefix + "receivingAccount" + suffix)); + } + + // add `rewardedTransaction` to the URL query string + if (getRewardedTransaction() != null) { + joiner.add(getRewardedTransaction().toUrlQueryString(prefix + "rewardedTransaction" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateSoleProprietorApplication.java b/src/main/java/unit/java/sdk/model/CreateSoleProprietorApplication.java new file mode 100644 index 00000000..cdeb391b --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateSoleProprietorApplication.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateSoleProprietorApplicationAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateSoleProprietorApplication + */ +@JsonPropertyOrder({ + CreateSoleProprietorApplication.JSON_PROPERTY_TYPE, + CreateSoleProprietorApplication.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateSoleProprietorApplication { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "individualApplication"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateSoleProprietorApplicationAttributes attributes; + + public CreateSoleProprietorApplication() { + } + + public CreateSoleProprietorApplication type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CreateSoleProprietorApplication attributes(CreateSoleProprietorApplicationAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateSoleProprietorApplicationAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateSoleProprietorApplicationAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this CreateSoleProprietorApplication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSoleProprietorApplication createSoleProprietorApplication = (CreateSoleProprietorApplication) o; + return Objects.equals(this.type, createSoleProprietorApplication.type) && + Objects.equals(this.attributes, createSoleProprietorApplication.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateSoleProprietorApplication {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateSoleProprietorApplicationAttributes.java b/src/main/java/unit/java/sdk/model/CreateSoleProprietorApplicationAttributes.java new file mode 100644 index 00000000..625c5a73 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateSoleProprietorApplicationAttributes.java @@ -0,0 +1,1178 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.BusinessVertical; +import unit.java.sdk.model.CreatePowerOfAttorneyAgent; +import unit.java.sdk.model.DeviceFingerprint; +import unit.java.sdk.model.EvaluationParams; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Industry; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.SoleProprietorshipAnnualRevenue; +import unit.java.sdk.model.SoleProprietorshipNumberOfEmployees; +import unit.java.sdk.model.SourceOfIncome; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateSoleProprietorApplicationAttributes + */ +@JsonPropertyOrder({ + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_FULL_NAME, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_EMAIL, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_PHONE, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_SSN, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_PASSPORT, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_NATIONALITY, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_MATRICULA_CONSULAR, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_ADDRESS, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_DATE_OF_BIRTH, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_DBA, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_EIN, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_IP, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_SOLE_PROPRIETORSHIP, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_TAGS, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_DEVICE_FINGERPRINTS, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_JWT_SUBJECT, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_POWER_OF_ATTORNEY_AGENT, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_INDUSTRY, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_EVALUATION_PARAMS, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_OCCUPATION, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_ANNUAL_INCOME, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_SOURCE_OF_INCOME, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_ANNUAL_REVENUE, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_NUMBER_OF_EMPLOYEES, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_BUSINESS_VERTICAL, + CreateSoleProprietorApplicationAttributes.JSON_PROPERTY_WEBSITE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateSoleProprietorApplicationAttributes { + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_SSN = "ssn"; + private JsonNullable ssn = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PASSPORT = "passport"; + private JsonNullable passport = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public static final String JSON_PROPERTY_MATRICULA_CONSULAR = "matriculaConsular"; + private JsonNullable matriculaConsular = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public static final String JSON_PROPERTY_DBA = "dba"; + private JsonNullable dba = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EIN = "ein"; + private JsonNullable ein = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IP = "ip"; + private String ip; + + public static final String JSON_PROPERTY_SOLE_PROPRIETORSHIP = "soleProprietorship"; + private Boolean soleProprietorship = false; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_DEVICE_FINGERPRINTS = "deviceFingerprints"; + private List deviceFingerprints; + + public static final String JSON_PROPERTY_JWT_SUBJECT = "jwtSubject"; + private JsonNullable jwtSubject = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_POWER_OF_ATTORNEY_AGENT = "powerOfAttorneyAgent"; + private CreatePowerOfAttorneyAgent powerOfAttorneyAgent; + + public static final String JSON_PROPERTY_INDUSTRY = "industry"; + private Industry industry; + + public static final String JSON_PROPERTY_EVALUATION_PARAMS = "evaluationParams"; + private EvaluationParams evaluationParams; + + public static final String JSON_PROPERTY_OCCUPATION = "occupation"; + private Occupation occupation; + + public static final String JSON_PROPERTY_ANNUAL_INCOME = "annualIncome"; + private AnnualIncome annualIncome; + + public static final String JSON_PROPERTY_SOURCE_OF_INCOME = "sourceOfIncome"; + private SourceOfIncome sourceOfIncome; + + public static final String JSON_PROPERTY_ANNUAL_REVENUE = "annualRevenue"; + private SoleProprietorshipAnnualRevenue annualRevenue; + + public static final String JSON_PROPERTY_NUMBER_OF_EMPLOYEES = "numberOfEmployees"; + private SoleProprietorshipNumberOfEmployees numberOfEmployees; + + public static final String JSON_PROPERTY_BUSINESS_VERTICAL = "businessVertical"; + private BusinessVertical businessVertical; + + public static final String JSON_PROPERTY_WEBSITE = "website"; + private String website; + + public CreateSoleProprietorApplicationAttributes() { + } + + public CreateSoleProprietorApplicationAttributes fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public CreateSoleProprietorApplicationAttributes email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEmail(String email) { + this.email = email; + } + + + public CreateSoleProprietorApplicationAttributes phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public CreateSoleProprietorApplicationAttributes ssn(String ssn) { + this.ssn = JsonNullable.of(ssn); + return this; + } + + /** + * Get ssn + * @return ssn + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getSsn() { + return ssn.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSsn_JsonNullable() { + return ssn; + } + + @JsonProperty(JSON_PROPERTY_SSN) + public void setSsn_JsonNullable(JsonNullable ssn) { + this.ssn = ssn; + } + + public void setSsn(String ssn) { + this.ssn = JsonNullable.of(ssn); + } + + + public CreateSoleProprietorApplicationAttributes passport(String passport) { + this.passport = JsonNullable.of(passport); + return this; + } + + /** + * Get passport + * @return passport + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getPassport() { + return passport.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPassport_JsonNullable() { + return passport; + } + + @JsonProperty(JSON_PROPERTY_PASSPORT) + public void setPassport_JsonNullable(JsonNullable passport) { + this.passport = passport; + } + + public void setPassport(String passport) { + this.passport = JsonNullable.of(passport); + } + + + public CreateSoleProprietorApplicationAttributes nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * Get nationality + * @return nationality + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + public CreateSoleProprietorApplicationAttributes matriculaConsular(String matriculaConsular) { + this.matriculaConsular = JsonNullable.of(matriculaConsular); + return this; + } + + /** + * Get matriculaConsular + * @return matriculaConsular + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getMatriculaConsular() { + return matriculaConsular.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMatriculaConsular_JsonNullable() { + return matriculaConsular; + } + + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + public void setMatriculaConsular_JsonNullable(JsonNullable matriculaConsular) { + this.matriculaConsular = matriculaConsular; + } + + public void setMatriculaConsular(String matriculaConsular) { + this.matriculaConsular = JsonNullable.of(matriculaConsular); + } + + + public CreateSoleProprietorApplicationAttributes address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(Address address) { + this.address = address; + } + + + public CreateSoleProprietorApplicationAttributes dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + public CreateSoleProprietorApplicationAttributes dba(String dba) { + this.dba = JsonNullable.of(dba); + return this; + } + + /** + * Get dba + * @return dba + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDba() { + return dba.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DBA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDba_JsonNullable() { + return dba; + } + + @JsonProperty(JSON_PROPERTY_DBA) + public void setDba_JsonNullable(JsonNullable dba) { + this.dba = dba; + } + + public void setDba(String dba) { + this.dba = JsonNullable.of(dba); + } + + + public CreateSoleProprietorApplicationAttributes ein(String ein) { + this.ein = JsonNullable.of(ein); + return this; + } + + /** + * Get ein + * @return ein + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getEin() { + return ein.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEin_JsonNullable() { + return ein; + } + + @JsonProperty(JSON_PROPERTY_EIN) + public void setEin_JsonNullable(JsonNullable ein) { + this.ein = ein; + } + + public void setEin(String ein) { + this.ein = JsonNullable.of(ein); + } + + + public CreateSoleProprietorApplicationAttributes ip(String ip) { + this.ip = ip; + return this; + } + + /** + * Get ip + * @return ip + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIp() { + return ip; + } + + + @JsonProperty(JSON_PROPERTY_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIp(String ip) { + this.ip = ip; + } + + + public CreateSoleProprietorApplicationAttributes soleProprietorship(Boolean soleProprietorship) { + this.soleProprietorship = soleProprietorship; + return this; + } + + /** + * Get soleProprietorship + * @return soleProprietorship + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOLE_PROPRIETORSHIP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSoleProprietorship() { + return soleProprietorship; + } + + + @JsonProperty(JSON_PROPERTY_SOLE_PROPRIETORSHIP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSoleProprietorship(Boolean soleProprietorship) { + this.soleProprietorship = soleProprietorship; + } + + + public CreateSoleProprietorApplicationAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateSoleProprietorApplicationAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateSoleProprietorApplicationAttributes deviceFingerprints(List deviceFingerprints) { + this.deviceFingerprints = deviceFingerprints; + return this; + } + + public CreateSoleProprietorApplicationAttributes addDeviceFingerprintsItem(DeviceFingerprint deviceFingerprintsItem) { + if (this.deviceFingerprints == null) { + this.deviceFingerprints = new ArrayList<>(); + } + this.deviceFingerprints.add(deviceFingerprintsItem); + return this; + } + + /** + * Get deviceFingerprints + * @return deviceFingerprints + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEVICE_FINGERPRINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getDeviceFingerprints() { + return deviceFingerprints; + } + + + @JsonProperty(JSON_PROPERTY_DEVICE_FINGERPRINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeviceFingerprints(List deviceFingerprints) { + this.deviceFingerprints = deviceFingerprints; + } + + + public CreateSoleProprietorApplicationAttributes jwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + return this; + } + + /** + * Get jwtSubject + * @return jwtSubject + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getJwtSubject() { + return jwtSubject.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getJwtSubject_JsonNullable() { + return jwtSubject; + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + public void setJwtSubject_JsonNullable(JsonNullable jwtSubject) { + this.jwtSubject = jwtSubject; + } + + public void setJwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + } + + + public CreateSoleProprietorApplicationAttributes powerOfAttorneyAgent(CreatePowerOfAttorneyAgent powerOfAttorneyAgent) { + this.powerOfAttorneyAgent = powerOfAttorneyAgent; + return this; + } + + /** + * Get powerOfAttorneyAgent + * @return powerOfAttorneyAgent + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POWER_OF_ATTORNEY_AGENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreatePowerOfAttorneyAgent getPowerOfAttorneyAgent() { + return powerOfAttorneyAgent; + } + + + @JsonProperty(JSON_PROPERTY_POWER_OF_ATTORNEY_AGENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPowerOfAttorneyAgent(CreatePowerOfAttorneyAgent powerOfAttorneyAgent) { + this.powerOfAttorneyAgent = powerOfAttorneyAgent; + } + + + public CreateSoleProprietorApplicationAttributes industry(Industry industry) { + this.industry = industry; + return this; + } + + /** + * Get industry + * @return industry + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDUSTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Industry getIndustry() { + return industry; + } + + + @JsonProperty(JSON_PROPERTY_INDUSTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIndustry(Industry industry) { + this.industry = industry; + } + + + public CreateSoleProprietorApplicationAttributes evaluationParams(EvaluationParams evaluationParams) { + this.evaluationParams = evaluationParams; + return this; + } + + /** + * Get evaluationParams + * @return evaluationParams + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EvaluationParams getEvaluationParams() { + return evaluationParams; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationParams(EvaluationParams evaluationParams) { + this.evaluationParams = evaluationParams; + } + + + public CreateSoleProprietorApplicationAttributes occupation(Occupation occupation) { + this.occupation = occupation; + return this; + } + + /** + * Get occupation + * @return occupation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Occupation getOccupation() { + return occupation; + } + + + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOccupation(Occupation occupation) { + this.occupation = occupation; + } + + + public CreateSoleProprietorApplicationAttributes annualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + return this; + } + + /** + * Get annualIncome + * @return annualIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnnualIncome getAnnualIncome() { + return annualIncome; + } + + + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + } + + + public CreateSoleProprietorApplicationAttributes sourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + return this; + } + + /** + * Get sourceOfIncome + * @return sourceOfIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SourceOfIncome getSourceOfIncome() { + return sourceOfIncome; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + } + + + public CreateSoleProprietorApplicationAttributes annualRevenue(SoleProprietorshipAnnualRevenue annualRevenue) { + this.annualRevenue = annualRevenue; + return this; + } + + /** + * Get annualRevenue + * @return annualRevenue + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNUAL_REVENUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SoleProprietorshipAnnualRevenue getAnnualRevenue() { + return annualRevenue; + } + + + @JsonProperty(JSON_PROPERTY_ANNUAL_REVENUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnualRevenue(SoleProprietorshipAnnualRevenue annualRevenue) { + this.annualRevenue = annualRevenue; + } + + + public CreateSoleProprietorApplicationAttributes numberOfEmployees(SoleProprietorshipNumberOfEmployees numberOfEmployees) { + this.numberOfEmployees = numberOfEmployees; + return this; + } + + /** + * Get numberOfEmployees + * @return numberOfEmployees + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUMBER_OF_EMPLOYEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SoleProprietorshipNumberOfEmployees getNumberOfEmployees() { + return numberOfEmployees; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER_OF_EMPLOYEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumberOfEmployees(SoleProprietorshipNumberOfEmployees numberOfEmployees) { + this.numberOfEmployees = numberOfEmployees; + } + + + public CreateSoleProprietorApplicationAttributes businessVertical(BusinessVertical businessVertical) { + this.businessVertical = businessVertical; + return this; + } + + /** + * Get businessVertical + * @return businessVertical + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUSINESS_VERTICAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BusinessVertical getBusinessVertical() { + return businessVertical; + } + + + @JsonProperty(JSON_PROPERTY_BUSINESS_VERTICAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBusinessVertical(BusinessVertical businessVertical) { + this.businessVertical = businessVertical; + } + + + public CreateSoleProprietorApplicationAttributes website(String website) { + this.website = website; + return this; + } + + /** + * Get website + * @return website + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEBSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebsite() { + return website; + } + + + @JsonProperty(JSON_PROPERTY_WEBSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWebsite(String website) { + this.website = website; + } + + + /** + * Return true if this CreateSoleProprietorApplication_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSoleProprietorApplicationAttributes createSoleProprietorApplicationAttributes = (CreateSoleProprietorApplicationAttributes) o; + return Objects.equals(this.fullName, createSoleProprietorApplicationAttributes.fullName) && + Objects.equals(this.email, createSoleProprietorApplicationAttributes.email) && + Objects.equals(this.phone, createSoleProprietorApplicationAttributes.phone) && + equalsNullable(this.ssn, createSoleProprietorApplicationAttributes.ssn) && + equalsNullable(this.passport, createSoleProprietorApplicationAttributes.passport) && + Objects.equals(this.nationality, createSoleProprietorApplicationAttributes.nationality) && + equalsNullable(this.matriculaConsular, createSoleProprietorApplicationAttributes.matriculaConsular) && + Objects.equals(this.address, createSoleProprietorApplicationAttributes.address) && + Objects.equals(this.dateOfBirth, createSoleProprietorApplicationAttributes.dateOfBirth) && + equalsNullable(this.dba, createSoleProprietorApplicationAttributes.dba) && + equalsNullable(this.ein, createSoleProprietorApplicationAttributes.ein) && + Objects.equals(this.ip, createSoleProprietorApplicationAttributes.ip) && + Objects.equals(this.soleProprietorship, createSoleProprietorApplicationAttributes.soleProprietorship) && + Objects.equals(this.tags, createSoleProprietorApplicationAttributes.tags) && + Objects.equals(this.idempotencyKey, createSoleProprietorApplicationAttributes.idempotencyKey) && + Objects.equals(this.deviceFingerprints, createSoleProprietorApplicationAttributes.deviceFingerprints) && + equalsNullable(this.jwtSubject, createSoleProprietorApplicationAttributes.jwtSubject) && + Objects.equals(this.powerOfAttorneyAgent, createSoleProprietorApplicationAttributes.powerOfAttorneyAgent) && + Objects.equals(this.industry, createSoleProprietorApplicationAttributes.industry) && + Objects.equals(this.evaluationParams, createSoleProprietorApplicationAttributes.evaluationParams) && + Objects.equals(this.occupation, createSoleProprietorApplicationAttributes.occupation) && + Objects.equals(this.annualIncome, createSoleProprietorApplicationAttributes.annualIncome) && + Objects.equals(this.sourceOfIncome, createSoleProprietorApplicationAttributes.sourceOfIncome) && + Objects.equals(this.annualRevenue, createSoleProprietorApplicationAttributes.annualRevenue) && + Objects.equals(this.numberOfEmployees, createSoleProprietorApplicationAttributes.numberOfEmployees) && + Objects.equals(this.businessVertical, createSoleProprietorApplicationAttributes.businessVertical) && + Objects.equals(this.website, createSoleProprietorApplicationAttributes.website); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(fullName, email, phone, hashCodeNullable(ssn), hashCodeNullable(passport), nationality, hashCodeNullable(matriculaConsular), address, dateOfBirth, hashCodeNullable(dba), hashCodeNullable(ein), ip, soleProprietorship, tags, idempotencyKey, deviceFingerprints, hashCodeNullable(jwtSubject), powerOfAttorneyAgent, industry, evaluationParams, occupation, annualIncome, sourceOfIncome, annualRevenue, numberOfEmployees, businessVertical, website); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateSoleProprietorApplicationAttributes {\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); + sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" dba: ").append(toIndentedString(dba)).append("\n"); + sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append(" soleProprietorship: ").append(toIndentedString(soleProprietorship)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" deviceFingerprints: ").append(toIndentedString(deviceFingerprints)).append("\n"); + sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); + sb.append(" powerOfAttorneyAgent: ").append(toIndentedString(powerOfAttorneyAgent)).append("\n"); + sb.append(" industry: ").append(toIndentedString(industry)).append("\n"); + sb.append(" evaluationParams: ").append(toIndentedString(evaluationParams)).append("\n"); + sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); + sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); + sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); + sb.append(" annualRevenue: ").append(toIndentedString(annualRevenue)).append("\n"); + sb.append(" numberOfEmployees: ").append(toIndentedString(numberOfEmployees)).append("\n"); + sb.append(" businessVertical: ").append(toIndentedString(businessVertical)).append("\n"); + sb.append(" website: ").append(toIndentedString(website)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `ssn` to the URL query string + if (getSsn() != null) { + joiner.add(String.format("%sssn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSsn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `passport` to the URL query string + if (getPassport() != null) { + joiner.add(String.format("%spassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nationality` to the URL query string + if (getNationality() != null) { + joiner.add(String.format("%snationality%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNationality()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `matriculaConsular` to the URL query string + if (getMatriculaConsular() != null) { + joiner.add(String.format("%smatriculaConsular%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMatriculaConsular()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dba` to the URL query string + if (getDba() != null) { + joiner.add(String.format("%sdba%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDba()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ein` to the URL query string + if (getEin() != null) { + joiner.add(String.format("%sein%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEin()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ip` to the URL query string + if (getIp() != null) { + joiner.add(String.format("%sip%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIp()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `soleProprietorship` to the URL query string + if (getSoleProprietorship() != null) { + joiner.add(String.format("%ssoleProprietorship%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSoleProprietorship()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `deviceFingerprints` to the URL query string + if (getDeviceFingerprints() != null) { + for (int i = 0; i < getDeviceFingerprints().size(); i++) { + if (getDeviceFingerprints().get(i) != null) { + joiner.add(getDeviceFingerprints().get(i).toUrlQueryString(String.format("%sdeviceFingerprints%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `jwtSubject` to the URL query string + if (getJwtSubject() != null) { + joiner.add(String.format("%sjwtSubject%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getJwtSubject()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `powerOfAttorneyAgent` to the URL query string + if (getPowerOfAttorneyAgent() != null) { + joiner.add(getPowerOfAttorneyAgent().toUrlQueryString(prefix + "powerOfAttorneyAgent" + suffix)); + } + + // add `industry` to the URL query string + if (getIndustry() != null) { + joiner.add(String.format("%sindustry%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIndustry()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationParams` to the URL query string + if (getEvaluationParams() != null) { + joiner.add(getEvaluationParams().toUrlQueryString(prefix + "evaluationParams" + suffix)); + } + + // add `occupation` to the URL query string + if (getOccupation() != null) { + joiner.add(String.format("%soccupation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOccupation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `annualIncome` to the URL query string + if (getAnnualIncome() != null) { + joiner.add(String.format("%sannualIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAnnualIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sourceOfIncome` to the URL query string + if (getSourceOfIncome() != null) { + joiner.add(String.format("%ssourceOfIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSourceOfIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `annualRevenue` to the URL query string + if (getAnnualRevenue() != null) { + joiner.add(String.format("%sannualRevenue%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAnnualRevenue()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `numberOfEmployees` to the URL query string + if (getNumberOfEmployees() != null) { + joiner.add(String.format("%snumberOfEmployees%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNumberOfEmployees()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `businessVertical` to the URL query string + if (getBusinessVertical() != null) { + joiner.add(String.format("%sbusinessVertical%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBusinessVertical()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `website` to the URL query string + if (getWebsite() != null) { + joiner.add(String.format("%swebsite%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getWebsite()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateStopPayment.java b/src/main/java/unit/java/sdk/model/CreateStopPayment.java new file mode 100644 index 00000000..96c81f04 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateStopPayment.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.StopPayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateStopPayment + */ +@JsonPropertyOrder({ + CreateStopPayment.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateStopPayment { + public static final String JSON_PROPERTY_DATA = "data"; + private StopPayment data; + + public CreateStopPayment() { + } + + public CreateStopPayment data(StopPayment data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StopPayment getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(StopPayment data) { + this.data = data; + } + + + /** + * Return true if this createStopPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateStopPayment createStopPayment = (CreateStopPayment) o; + return Objects.equals(this.data, createStopPayment.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateStopPayment {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateTrustApplication.java b/src/main/java/unit/java/sdk/model/CreateTrustApplication.java new file mode 100644 index 00000000..edd4f959 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateTrustApplication.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateTrustApplicationAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateTrustApplication + */ +@JsonPropertyOrder({ + CreateTrustApplication.JSON_PROPERTY_TYPE, + CreateTrustApplication.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateTrustApplication { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "trustApplication"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateTrustApplicationAttributes attributes; + + public CreateTrustApplication() { + } + + public CreateTrustApplication type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CreateTrustApplication attributes(CreateTrustApplicationAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateTrustApplicationAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateTrustApplicationAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this CreateTrustApplication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateTrustApplication createTrustApplication = (CreateTrustApplication) o; + return Objects.equals(this.type, createTrustApplication.type) && + Objects.equals(this.attributes, createTrustApplication.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateTrustApplication {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateTrustApplicationAttributes.java b/src/main/java/unit/java/sdk/model/CreateTrustApplicationAttributes.java new file mode 100644 index 00000000..1ab983ea --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateTrustApplicationAttributes.java @@ -0,0 +1,704 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Beneficiary; +import unit.java.sdk.model.DeviceFingerprint; +import unit.java.sdk.model.Grantor; +import unit.java.sdk.model.TrustContact; +import unit.java.sdk.model.Trustee; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateTrustApplicationAttributes + */ +@JsonPropertyOrder({ + CreateTrustApplicationAttributes.JSON_PROPERTY_NAME, + CreateTrustApplicationAttributes.JSON_PROPERTY_STATE_OF_INCORPORATION, + CreateTrustApplicationAttributes.JSON_PROPERTY_REVOCABILITY, + CreateTrustApplicationAttributes.JSON_PROPERTY_SOURCE_OF_FUNDS, + CreateTrustApplicationAttributes.JSON_PROPERTY_TAX_ID, + CreateTrustApplicationAttributes.JSON_PROPERTY_GRANTOR, + CreateTrustApplicationAttributes.JSON_PROPERTY_TRUSTEES, + CreateTrustApplicationAttributes.JSON_PROPERTY_BENEFICIARIES, + CreateTrustApplicationAttributes.JSON_PROPERTY_CONTACT, + CreateTrustApplicationAttributes.JSON_PROPERTY_IP, + CreateTrustApplicationAttributes.JSON_PROPERTY_TAGS, + CreateTrustApplicationAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateTrustApplicationAttributes.JSON_PROPERTY_DEVICE_FINGERPRINTS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateTrustApplicationAttributes { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_STATE_OF_INCORPORATION = "stateOfIncorporation"; + private String stateOfIncorporation; + + /** + * Gets or Sets revocability + */ + public enum RevocabilityEnum { + REVOCABLE("Revocable"), + + IRREVOCABLE("Irrevocable"); + + private String value; + + RevocabilityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RevocabilityEnum fromValue(String value) { + for (RevocabilityEnum b : RevocabilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_REVOCABILITY = "revocability"; + private RevocabilityEnum revocability; + + /** + * Gets or Sets sourceOfFunds + */ + public enum SourceOfFundsEnum { + INHERITANCE("Inheritance"), + + SALARY("Salary"), + + SAVINGS("Savings"), + + INVESTMENTRETURNS("InvestmentReturns"), + + GIFTS("Gifts"); + + private String value; + + SourceOfFundsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceOfFundsEnum fromValue(String value) { + for (SourceOfFundsEnum b : SourceOfFundsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE_OF_FUNDS = "sourceOfFunds"; + private SourceOfFundsEnum sourceOfFunds; + + public static final String JSON_PROPERTY_TAX_ID = "taxId"; + private String taxId; + + public static final String JSON_PROPERTY_GRANTOR = "grantor"; + private Grantor grantor; + + public static final String JSON_PROPERTY_TRUSTEES = "trustees"; + private List trustees = new ArrayList<>(); + + public static final String JSON_PROPERTY_BENEFICIARIES = "beneficiaries"; + private List beneficiaries = new ArrayList<>(); + + public static final String JSON_PROPERTY_CONTACT = "contact"; + private TrustContact contact; + + public static final String JSON_PROPERTY_IP = "ip"; + private String ip; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_DEVICE_FINGERPRINTS = "deviceFingerprints"; + private List deviceFingerprints; + + public CreateTrustApplicationAttributes() { + } + + public CreateTrustApplicationAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public CreateTrustApplicationAttributes stateOfIncorporation(String stateOfIncorporation) { + this.stateOfIncorporation = stateOfIncorporation; + return this; + } + + /** + * Get stateOfIncorporation + * @return stateOfIncorporation + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getStateOfIncorporation() { + return stateOfIncorporation; + } + + + @JsonProperty(JSON_PROPERTY_STATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStateOfIncorporation(String stateOfIncorporation) { + this.stateOfIncorporation = stateOfIncorporation; + } + + + public CreateTrustApplicationAttributes revocability(RevocabilityEnum revocability) { + this.revocability = revocability; + return this; + } + + /** + * Get revocability + * @return revocability + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REVOCABILITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RevocabilityEnum getRevocability() { + return revocability; + } + + + @JsonProperty(JSON_PROPERTY_REVOCABILITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRevocability(RevocabilityEnum revocability) { + this.revocability = revocability; + } + + + public CreateTrustApplicationAttributes sourceOfFunds(SourceOfFundsEnum sourceOfFunds) { + this.sourceOfFunds = sourceOfFunds; + return this; + } + + /** + * Get sourceOfFunds + * @return sourceOfFunds + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_OF_FUNDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SourceOfFundsEnum getSourceOfFunds() { + return sourceOfFunds; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_OF_FUNDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceOfFunds(SourceOfFundsEnum sourceOfFunds) { + this.sourceOfFunds = sourceOfFunds; + } + + + public CreateTrustApplicationAttributes taxId(String taxId) { + this.taxId = taxId; + return this; + } + + /** + * Get taxId + * @return taxId + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TAX_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getTaxId() { + return taxId; + } + + + @JsonProperty(JSON_PROPERTY_TAX_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTaxId(String taxId) { + this.taxId = taxId; + } + + + public CreateTrustApplicationAttributes grantor(Grantor grantor) { + this.grantor = grantor; + return this; + } + + /** + * Get grantor + * @return grantor + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GRANTOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Grantor getGrantor() { + return grantor; + } + + + @JsonProperty(JSON_PROPERTY_GRANTOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGrantor(Grantor grantor) { + this.grantor = grantor; + } + + + public CreateTrustApplicationAttributes trustees(List trustees) { + this.trustees = trustees; + return this; + } + + public CreateTrustApplicationAttributes addTrusteesItem(Trustee trusteesItem) { + if (this.trustees == null) { + this.trustees = new ArrayList<>(); + } + this.trustees.add(trusteesItem); + return this; + } + + /** + * Get trustees + * @return trustees + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRUSTEES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getTrustees() { + return trustees; + } + + + @JsonProperty(JSON_PROPERTY_TRUSTEES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTrustees(List trustees) { + this.trustees = trustees; + } + + + public CreateTrustApplicationAttributes beneficiaries(List beneficiaries) { + this.beneficiaries = beneficiaries; + return this; + } + + public CreateTrustApplicationAttributes addBeneficiariesItem(Beneficiary beneficiariesItem) { + if (this.beneficiaries == null) { + this.beneficiaries = new ArrayList<>(); + } + this.beneficiaries.add(beneficiariesItem); + return this; + } + + /** + * Get beneficiaries + * @return beneficiaries + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BENEFICIARIES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getBeneficiaries() { + return beneficiaries; + } + + + @JsonProperty(JSON_PROPERTY_BENEFICIARIES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBeneficiaries(List beneficiaries) { + this.beneficiaries = beneficiaries; + } + + + public CreateTrustApplicationAttributes contact(TrustContact contact) { + this.contact = contact; + return this; + } + + /** + * Get contact + * @return contact + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TrustContact getContact() { + return contact; + } + + + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setContact(TrustContact contact) { + this.contact = contact; + } + + + public CreateTrustApplicationAttributes ip(String ip) { + this.ip = ip; + return this; + } + + /** + * Get ip + * @return ip + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIp() { + return ip; + } + + + @JsonProperty(JSON_PROPERTY_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIp(String ip) { + this.ip = ip; + } + + + public CreateTrustApplicationAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreateTrustApplicationAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateTrustApplicationAttributes deviceFingerprints(List deviceFingerprints) { + this.deviceFingerprints = deviceFingerprints; + return this; + } + + public CreateTrustApplicationAttributes addDeviceFingerprintsItem(DeviceFingerprint deviceFingerprintsItem) { + if (this.deviceFingerprints == null) { + this.deviceFingerprints = new ArrayList<>(); + } + this.deviceFingerprints.add(deviceFingerprintsItem); + return this; + } + + /** + * Get deviceFingerprints + * @return deviceFingerprints + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEVICE_FINGERPRINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getDeviceFingerprints() { + return deviceFingerprints; + } + + + @JsonProperty(JSON_PROPERTY_DEVICE_FINGERPRINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeviceFingerprints(List deviceFingerprints) { + this.deviceFingerprints = deviceFingerprints; + } + + + /** + * Return true if this CreateTrustApplication_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateTrustApplicationAttributes createTrustApplicationAttributes = (CreateTrustApplicationAttributes) o; + return Objects.equals(this.name, createTrustApplicationAttributes.name) && + Objects.equals(this.stateOfIncorporation, createTrustApplicationAttributes.stateOfIncorporation) && + Objects.equals(this.revocability, createTrustApplicationAttributes.revocability) && + Objects.equals(this.sourceOfFunds, createTrustApplicationAttributes.sourceOfFunds) && + Objects.equals(this.taxId, createTrustApplicationAttributes.taxId) && + Objects.equals(this.grantor, createTrustApplicationAttributes.grantor) && + Objects.equals(this.trustees, createTrustApplicationAttributes.trustees) && + Objects.equals(this.beneficiaries, createTrustApplicationAttributes.beneficiaries) && + Objects.equals(this.contact, createTrustApplicationAttributes.contact) && + Objects.equals(this.ip, createTrustApplicationAttributes.ip) && + Objects.equals(this.tags, createTrustApplicationAttributes.tags) && + Objects.equals(this.idempotencyKey, createTrustApplicationAttributes.idempotencyKey) && + Objects.equals(this.deviceFingerprints, createTrustApplicationAttributes.deviceFingerprints); + } + + @Override + public int hashCode() { + return Objects.hash(name, stateOfIncorporation, revocability, sourceOfFunds, taxId, grantor, trustees, beneficiaries, contact, ip, tags, idempotencyKey, deviceFingerprints); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateTrustApplicationAttributes {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" stateOfIncorporation: ").append(toIndentedString(stateOfIncorporation)).append("\n"); + sb.append(" revocability: ").append(toIndentedString(revocability)).append("\n"); + sb.append(" sourceOfFunds: ").append(toIndentedString(sourceOfFunds)).append("\n"); + sb.append(" taxId: ").append(toIndentedString(taxId)).append("\n"); + sb.append(" grantor: ").append(toIndentedString(grantor)).append("\n"); + sb.append(" trustees: ").append(toIndentedString(trustees)).append("\n"); + sb.append(" beneficiaries: ").append(toIndentedString(beneficiaries)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" deviceFingerprints: ").append(toIndentedString(deviceFingerprints)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `stateOfIncorporation` to the URL query string + if (getStateOfIncorporation() != null) { + joiner.add(String.format("%sstateOfIncorporation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStateOfIncorporation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `revocability` to the URL query string + if (getRevocability() != null) { + joiner.add(String.format("%srevocability%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRevocability()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sourceOfFunds` to the URL query string + if (getSourceOfFunds() != null) { + joiner.add(String.format("%ssourceOfFunds%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSourceOfFunds()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `taxId` to the URL query string + if (getTaxId() != null) { + joiner.add(String.format("%staxId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTaxId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `grantor` to the URL query string + if (getGrantor() != null) { + joiner.add(getGrantor().toUrlQueryString(prefix + "grantor" + suffix)); + } + + // add `trustees` to the URL query string + if (getTrustees() != null) { + for (int i = 0; i < getTrustees().size(); i++) { + if (getTrustees().get(i) != null) { + joiner.add(getTrustees().get(i).toUrlQueryString(String.format("%strustees%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `beneficiaries` to the URL query string + if (getBeneficiaries() != null) { + for (int i = 0; i < getBeneficiaries().size(); i++) { + if (getBeneficiaries().get(i) != null) { + joiner.add(getBeneficiaries().get(i).toUrlQueryString(String.format("%sbeneficiaries%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `contact` to the URL query string + if (getContact() != null) { + joiner.add(getContact().toUrlQueryString(prefix + "contact" + suffix)); + } + + // add `ip` to the URL query string + if (getIp() != null) { + joiner.add(String.format("%sip%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIp()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `deviceFingerprints` to the URL query string + if (getDeviceFingerprints() != null) { + for (int i = 0; i < getDeviceFingerprints().size(); i++) { + if (getDeviceFingerprints().get(i) != null) { + joiner.add(getDeviceFingerprints().get(i).toUrlQueryString(String.format("%sdeviceFingerprints%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateWebhook.java b/src/main/java/unit/java/sdk/model/CreateWebhook.java new file mode 100644 index 00000000..2fadd00a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateWebhook.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateWebhookData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateWebhook + */ +@JsonPropertyOrder({ + CreateWebhook.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateWebhook { + public static final String JSON_PROPERTY_DATA = "data"; + private CreateWebhookData data; + + public CreateWebhook() { + } + + public CreateWebhook data(CreateWebhookData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateWebhookData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(CreateWebhookData data) { + this.data = data; + } + + + /** + * Return true if this createWebhook object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateWebhook createWebhook = (CreateWebhook) o; + return Objects.equals(this.data, createWebhook.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateWebhook {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateWebhookData.java b/src/main/java/unit/java/sdk/model/CreateWebhookData.java new file mode 100644 index 00000000..11483300 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateWebhookData.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateWebhookDataAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateWebhookData + */ +@JsonPropertyOrder({ + CreateWebhookData.JSON_PROPERTY_TYPE, + CreateWebhookData.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateWebhookData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "webhook"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateWebhookDataAttributes attributes; + + public CreateWebhookData() { + } + + public CreateWebhookData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public CreateWebhookData attributes(CreateWebhookDataAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateWebhookDataAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(CreateWebhookDataAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this createWebhook_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateWebhookData createWebhookData = (CreateWebhookData) o; + return Objects.equals(this.type, createWebhookData.type) && + Objects.equals(this.attributes, createWebhookData.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateWebhookData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateWebhookDataAttributes.java b/src/main/java/unit/java/sdk/model/CreateWebhookDataAttributes.java new file mode 100644 index 00000000..0515042e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateWebhookDataAttributes.java @@ -0,0 +1,436 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateWebhookDataAttributes + */ +@JsonPropertyOrder({ + CreateWebhookDataAttributes.JSON_PROPERTY_LABEL, + CreateWebhookDataAttributes.JSON_PROPERTY_URL, + CreateWebhookDataAttributes.JSON_PROPERTY_TOKEN, + CreateWebhookDataAttributes.JSON_PROPERTY_CONTENT_TYPE, + CreateWebhookDataAttributes.JSON_PROPERTY_DELIVERY_MODE, + CreateWebhookDataAttributes.JSON_PROPERTY_INCLUDE_RESOURCES, + CreateWebhookDataAttributes.JSON_PROPERTY_SUBSCRIPTION_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateWebhookDataAttributes { + public static final String JSON_PROPERTY_LABEL = "label"; + private String label; + + public static final String JSON_PROPERTY_URL = "url"; + private String url; + + public static final String JSON_PROPERTY_TOKEN = "token"; + private String token; + + /** + * Gets or Sets contentType + */ + public enum ContentTypeEnum { + JSON("Json"), + + JSONAPI("JsonAPI"); + + private String value; + + ContentTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ContentTypeEnum fromValue(String value) { + for (ContentTypeEnum b : ContentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_CONTENT_TYPE = "contentType"; + private ContentTypeEnum contentType; + + public static final String JSON_PROPERTY_DELIVERY_MODE = "deliveryMode"; + private String deliveryMode; + + public static final String JSON_PROPERTY_INCLUDE_RESOURCES = "includeResources"; + private Boolean includeResources; + + /** + * Gets or Sets subscriptionType + */ + public enum SubscriptionTypeEnum { + ALL("All"), + + ONLYAUTHORIZATIONREQUEST("OnlyAuthorizationRequest"); + + private String value; + + SubscriptionTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SubscriptionTypeEnum fromValue(String value) { + for (SubscriptionTypeEnum b : SubscriptionTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SUBSCRIPTION_TYPE = "subscriptionType"; + private SubscriptionTypeEnum subscriptionType; + + public CreateWebhookDataAttributes() { + } + + public CreateWebhookDataAttributes label(String label) { + this.label = label; + return this; + } + + /** + * Get label + * @return label + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getLabel() { + return label; + } + + + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabel(String label) { + this.label = label; + } + + + public CreateWebhookDataAttributes url(String url) { + this.url = url; + return this; + } + + /** + * Get url + * @return url + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getUrl() { + return url; + } + + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(String url) { + this.url = url; + } + + + public CreateWebhookDataAttributes token(String token) { + this.token = token; + return this; + } + + /** + * Get token + * @return token + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getToken() { + return token; + } + + + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setToken(String token) { + this.token = token; + } + + + public CreateWebhookDataAttributes contentType(ContentTypeEnum contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get contentType + * @return contentType + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ContentTypeEnum getContentType() { + return contentType; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setContentType(ContentTypeEnum contentType) { + this.contentType = contentType; + } + + + public CreateWebhookDataAttributes deliveryMode(String deliveryMode) { + this.deliveryMode = deliveryMode; + return this; + } + + /** + * Get deliveryMode + * @return deliveryMode + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DELIVERY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDeliveryMode() { + return deliveryMode; + } + + + @JsonProperty(JSON_PROPERTY_DELIVERY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDeliveryMode(String deliveryMode) { + this.deliveryMode = deliveryMode; + } + + + public CreateWebhookDataAttributes includeResources(Boolean includeResources) { + this.includeResources = includeResources; + return this; + } + + /** + * Get includeResources + * @return includeResources + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_RESOURCES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIncludeResources() { + return includeResources; + } + + + @JsonProperty(JSON_PROPERTY_INCLUDE_RESOURCES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncludeResources(Boolean includeResources) { + this.includeResources = includeResources; + } + + + public CreateWebhookDataAttributes subscriptionType(SubscriptionTypeEnum subscriptionType) { + this.subscriptionType = subscriptionType; + return this; + } + + /** + * Get subscriptionType + * @return subscriptionType + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBSCRIPTION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SubscriptionTypeEnum getSubscriptionType() { + return subscriptionType; + } + + + @JsonProperty(JSON_PROPERTY_SUBSCRIPTION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubscriptionType(SubscriptionTypeEnum subscriptionType) { + this.subscriptionType = subscriptionType; + } + + + /** + * Return true if this createWebhook_data_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateWebhookDataAttributes createWebhookDataAttributes = (CreateWebhookDataAttributes) o; + return Objects.equals(this.label, createWebhookDataAttributes.label) && + Objects.equals(this.url, createWebhookDataAttributes.url) && + Objects.equals(this.token, createWebhookDataAttributes.token) && + Objects.equals(this.contentType, createWebhookDataAttributes.contentType) && + Objects.equals(this.deliveryMode, createWebhookDataAttributes.deliveryMode) && + Objects.equals(this.includeResources, createWebhookDataAttributes.includeResources) && + Objects.equals(this.subscriptionType, createWebhookDataAttributes.subscriptionType); + } + + @Override + public int hashCode() { + return Objects.hash(label, url, token, contentType, deliveryMode, includeResources, subscriptionType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateWebhookDataAttributes {\n"); + sb.append(" label: ").append(toIndentedString(label)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" contentType: ").append(toIndentedString(contentType)).append("\n"); + sb.append(" deliveryMode: ").append(toIndentedString(deliveryMode)).append("\n"); + sb.append(" includeResources: ").append(toIndentedString(includeResources)).append("\n"); + sb.append(" subscriptionType: ").append(toIndentedString(subscriptionType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `label` to the URL query string + if (getLabel() != null) { + joiner.add(String.format("%slabel%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLabel()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `url` to the URL query string + if (getUrl() != null) { + joiner.add(String.format("%surl%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUrl()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `token` to the URL query string + if (getToken() != null) { + joiner.add(String.format("%stoken%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getToken()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `contentType` to the URL query string + if (getContentType() != null) { + joiner.add(String.format("%scontentType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getContentType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `deliveryMode` to the URL query string + if (getDeliveryMode() != null) { + joiner.add(String.format("%sdeliveryMode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDeliveryMode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `includeResources` to the URL query string + if (getIncludeResources() != null) { + joiner.add(String.format("%sincludeResources%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIncludeResources()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `subscriptionType` to the URL query string + if (getSubscriptionType() != null) { + joiner.add(String.format("%ssubscriptionType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSubscriptionType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateWirePayment.java b/src/main/java/unit/java/sdk/model/CreateWirePayment.java new file mode 100644 index 00000000..f3d5ab0f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateWirePayment.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchPaymentRelationships; +import unit.java.sdk.model.CreateWirePaymentAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateWirePayment + */ +@JsonPropertyOrder({ + CreateWirePayment.JSON_PROPERTY_TYPE, + CreateWirePayment.JSON_PROPERTY_ATTRIBUTES, + CreateWirePayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateWirePayment { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "wirePayment"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateWirePaymentAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateAchPaymentRelationships relationships; + + public CreateWirePayment() { + } + + public CreateWirePayment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public CreateWirePayment attributes(CreateWirePaymentAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateWirePaymentAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreateWirePaymentAttributes attributes) { + this.attributes = attributes; + } + + + public CreateWirePayment relationships(CreateAchPaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreateAchPaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreateAchPaymentRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this CreateWirePayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateWirePayment createWirePayment = (CreateWirePayment) o; + return Objects.equals(this.type, createWirePayment.type) && + Objects.equals(this.attributes, createWirePayment.attributes) && + Objects.equals(this.relationships, createWirePayment.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateWirePayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreateWirePaymentAttributes.java b/src/main/java/unit/java/sdk/model/CreateWirePaymentAttributes.java new file mode 100644 index 00000000..a79957b1 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreateWirePaymentAttributes.java @@ -0,0 +1,364 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.WireCounterparty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreateWirePaymentAttributes + */ +@JsonPropertyOrder({ + CreateWirePaymentAttributes.JSON_PROPERTY_AMOUNT, + CreateWirePaymentAttributes.JSON_PROPERTY_DIRECTION, + CreateWirePaymentAttributes.JSON_PROPERTY_DESCRIPTION, + CreateWirePaymentAttributes.JSON_PROPERTY_COUNTERPARTY, + CreateWirePaymentAttributes.JSON_PROPERTY_IDEMPOTENCY_KEY, + CreateWirePaymentAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateWirePaymentAttributes { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; + private WireCounterparty counterparty; + + public static final String JSON_PROPERTY_IDEMPOTENCY_KEY = "idempotencyKey"; + private String idempotencyKey; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public CreateWirePaymentAttributes() { + } + + public CreateWirePaymentAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public CreateWirePaymentAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public CreateWirePaymentAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public CreateWirePaymentAttributes counterparty(WireCounterparty counterparty) { + this.counterparty = counterparty; + return this; + } + + /** + * Get counterparty + * @return counterparty + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public WireCounterparty getCounterparty() { + return counterparty; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCounterparty(WireCounterparty counterparty) { + this.counterparty = counterparty; + } + + + public CreateWirePaymentAttributes idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Get idempotencyKey + * @return idempotencyKey + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdempotencyKey() { + return idempotencyKey; + } + + + @JsonProperty(JSON_PROPERTY_IDEMPOTENCY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + + public CreateWirePaymentAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this CreateWirePayment_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateWirePaymentAttributes createWirePaymentAttributes = (CreateWirePaymentAttributes) o; + return Objects.equals(this.amount, createWirePaymentAttributes.amount) && + Objects.equals(this.direction, createWirePaymentAttributes.direction) && + Objects.equals(this.description, createWirePaymentAttributes.description) && + Objects.equals(this.counterparty, createWirePaymentAttributes.counterparty) && + Objects.equals(this.idempotencyKey, createWirePaymentAttributes.idempotencyKey) && + Objects.equals(this.tags, createWirePaymentAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(amount, direction, description, counterparty, idempotencyKey, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateWirePaymentAttributes {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); + sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterparty` to the URL query string + if (getCounterparty() != null) { + joiner.add(getCounterparty().toUrlQueryString(prefix + "counterparty" + suffix)); + } + + // add `idempotencyKey` to the URL query string + if (getIdempotencyKey() != null) { + joiner.add(String.format("%sidempotencyKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdempotencyKey()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreditAccount.java b/src/main/java/unit/java/sdk/model/CreditAccount.java new file mode 100644 index 00000000..22265ea6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreditAccount.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Account; +import unit.java.sdk.model.CreditAccountAllOfAttributes; +import unit.java.sdk.model.CreditAccountRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * CreditAccount + */ +@JsonPropertyOrder({ + CreditAccount.JSON_PROPERTY_ATTRIBUTES, + CreditAccount.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class CreditAccount extends Account { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreditAccountAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreditAccountRelationships relationships; + + public CreditAccount() { + } + + public CreditAccount attributes(CreditAccountAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreditAccountAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreditAccountAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public CreditAccount relationships(CreditAccountRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreditAccountRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CreditAccountRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public CreditAccount id(String id) { + this.setId(id); + return this; + } + + @Override + public CreditAccount type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this CreditAccount object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreditAccount creditAccount = (CreditAccount) o; + return Objects.equals(this.attributes, creditAccount.attributes) && + Objects.equals(this.relationships, creditAccount.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreditAccount {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(String.format("%srelationships%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRelationships()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CreditAccount", CreditAccount.class); + JSON.registerDiscriminator(CreditAccount.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/CreditAccountAllOfAttributes.java b/src/main/java/unit/java/sdk/model/CreditAccountAllOfAttributes.java new file mode 100644 index 00000000..ec3a23ff --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreditAccountAllOfAttributes.java @@ -0,0 +1,777 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreditAccountAllOfAttributes + */ +@JsonPropertyOrder({ + CreditAccountAllOfAttributes.JSON_PROPERTY_CREATED_AT, + CreditAccountAllOfAttributes.JSON_PROPERTY_NAME, + CreditAccountAllOfAttributes.JSON_PROPERTY_CREDIT_TERMS, + CreditAccountAllOfAttributes.JSON_PROPERTY_CURRENCY, + CreditAccountAllOfAttributes.JSON_PROPERTY_BALANCE, + CreditAccountAllOfAttributes.JSON_PROPERTY_HOLD, + CreditAccountAllOfAttributes.JSON_PROPERTY_AVAILABLE, + CreditAccountAllOfAttributes.JSON_PROPERTY_TAGS, + CreditAccountAllOfAttributes.JSON_PROPERTY_STATUS, + CreditAccountAllOfAttributes.JSON_PROPERTY_CLOSE_REASON, + CreditAccountAllOfAttributes.JSON_PROPERTY_FRAUD_REASON, + CreditAccountAllOfAttributes.JSON_PROPERTY_CLOSE_REASON_TEXT, + CreditAccountAllOfAttributes.JSON_PROPERTY_FREEZE_REASON, + CreditAccountAllOfAttributes.JSON_PROPERTY_CREDIT_LIMIT, + CreditAccountAllOfAttributes.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreditAccountAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_CREDIT_TERMS = "creditTerms"; + private String creditTerms; + + public static final String JSON_PROPERTY_CURRENCY = "currency"; + private String currency = "USD"; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_HOLD = "hold"; + private Integer hold; + + public static final String JSON_PROPERTY_AVAILABLE = "available"; + private Integer available; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + OPEN("Open"), + + CLOSED("Closed"), + + FROZEN("Frozen"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + /** + * Gets or Sets closeReason + */ + public enum CloseReasonEnum { + BYCUSTOMER("ByCustomer"), + + FRAUD("Fraud"), + + OVERDUE("Overdue"); + + private String value; + + CloseReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CloseReasonEnum fromValue(String value) { + for (CloseReasonEnum b : CloseReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_CLOSE_REASON = "closeReason"; + private CloseReasonEnum closeReason; + + /** + * Gets or Sets fraudReason + */ + public enum FraudReasonEnum { + ACHACTIVITY("ACHActivity"), + + CARDACTIVITY("CardActivity"), + + CHECKACTIVITY("CheckActivity"), + + APPLICATIONHISTORY("ApplicationHistory"), + + ACCOUNTACTIVITY("AccountActivity"), + + CLIENTIDENTIFIED("ClientIdentified"), + + IDENTITYTHEFT("IdentityTheft"), + + LINKEDTOFRAUDULENTCUSTOMER("LinkedToFraudulentCustomer"); + + private String value; + + FraudReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FraudReasonEnum fromValue(String value) { + for (FraudReasonEnum b : FraudReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_FRAUD_REASON = "fraudReason"; + private FraudReasonEnum fraudReason; + + public static final String JSON_PROPERTY_CLOSE_REASON_TEXT = "closeReasonText"; + private String closeReasonText; + + public static final String JSON_PROPERTY_FREEZE_REASON = "freezeReason"; + private String freezeReason; + + public static final String JSON_PROPERTY_CREDIT_LIMIT = "creditLimit"; + private Integer creditLimit; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public CreditAccountAllOfAttributes() { + } + + public CreditAccountAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public CreditAccountAllOfAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public CreditAccountAllOfAttributes creditTerms(String creditTerms) { + this.creditTerms = creditTerms; + return this; + } + + /** + * Get creditTerms + * @return creditTerms + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREDIT_TERMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCreditTerms() { + return creditTerms; + } + + + @JsonProperty(JSON_PROPERTY_CREDIT_TERMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreditTerms(String creditTerms) { + this.creditTerms = creditTerms; + } + + + public CreditAccountAllOfAttributes currency(String currency) { + this.currency = currency; + return this; + } + + /** + * Get currency + * @return currency + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCurrency() { + return currency; + } + + + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCurrency(String currency) { + this.currency = currency; + } + + + public CreditAccountAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public CreditAccountAllOfAttributes hold(Integer hold) { + this.hold = hold; + return this; + } + + /** + * Get hold + * @return hold + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getHold() { + return hold; + } + + + @JsonProperty(JSON_PROPERTY_HOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHold(Integer hold) { + this.hold = hold; + } + + + public CreditAccountAllOfAttributes available(Integer available) { + this.available = available; + return this; + } + + /** + * Get available + * @return available + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAvailable() { + return available; + } + + + @JsonProperty(JSON_PROPERTY_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAvailable(Integer available) { + this.available = available; + } + + + public CreditAccountAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public CreditAccountAllOfAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public CreditAccountAllOfAttributes closeReason(CloseReasonEnum closeReason) { + this.closeReason = closeReason; + return this; + } + + /** + * Get closeReason + * @return closeReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLOSE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CloseReasonEnum getCloseReason() { + return closeReason; + } + + + @JsonProperty(JSON_PROPERTY_CLOSE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCloseReason(CloseReasonEnum closeReason) { + this.closeReason = closeReason; + } + + + public CreditAccountAllOfAttributes fraudReason(FraudReasonEnum fraudReason) { + this.fraudReason = fraudReason; + return this; + } + + /** + * Get fraudReason + * @return fraudReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FRAUD_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FraudReasonEnum getFraudReason() { + return fraudReason; + } + + + @JsonProperty(JSON_PROPERTY_FRAUD_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFraudReason(FraudReasonEnum fraudReason) { + this.fraudReason = fraudReason; + } + + + public CreditAccountAllOfAttributes closeReasonText(String closeReasonText) { + this.closeReasonText = closeReasonText; + return this; + } + + /** + * Get closeReasonText + * @return closeReasonText + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLOSE_REASON_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCloseReasonText() { + return closeReasonText; + } + + + @JsonProperty(JSON_PROPERTY_CLOSE_REASON_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCloseReasonText(String closeReasonText) { + this.closeReasonText = closeReasonText; + } + + + public CreditAccountAllOfAttributes freezeReason(String freezeReason) { + this.freezeReason = freezeReason; + return this; + } + + /** + * Get freezeReason + * @return freezeReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FREEZE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFreezeReason() { + return freezeReason; + } + + + @JsonProperty(JSON_PROPERTY_FREEZE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFreezeReason(String freezeReason) { + this.freezeReason = freezeReason; + } + + + public CreditAccountAllOfAttributes creditLimit(Integer creditLimit) { + this.creditLimit = creditLimit; + return this; + } + + /** + * Get creditLimit + * minimum: 0 + * @return creditLimit + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREDIT_LIMIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getCreditLimit() { + return creditLimit; + } + + + @JsonProperty(JSON_PROPERTY_CREDIT_LIMIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreditLimit(Integer creditLimit) { + this.creditLimit = creditLimit; + } + + + public CreditAccountAllOfAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + /** + * Return true if this CreditAccount_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreditAccountAllOfAttributes creditAccountAllOfAttributes = (CreditAccountAllOfAttributes) o; + return Objects.equals(this.createdAt, creditAccountAllOfAttributes.createdAt) && + Objects.equals(this.name, creditAccountAllOfAttributes.name) && + Objects.equals(this.creditTerms, creditAccountAllOfAttributes.creditTerms) && + Objects.equals(this.currency, creditAccountAllOfAttributes.currency) && + Objects.equals(this.balance, creditAccountAllOfAttributes.balance) && + Objects.equals(this.hold, creditAccountAllOfAttributes.hold) && + Objects.equals(this.available, creditAccountAllOfAttributes.available) && + Objects.equals(this.tags, creditAccountAllOfAttributes.tags) && + Objects.equals(this.status, creditAccountAllOfAttributes.status) && + Objects.equals(this.closeReason, creditAccountAllOfAttributes.closeReason) && + Objects.equals(this.fraudReason, creditAccountAllOfAttributes.fraudReason) && + Objects.equals(this.closeReasonText, creditAccountAllOfAttributes.closeReasonText) && + Objects.equals(this.freezeReason, creditAccountAllOfAttributes.freezeReason) && + Objects.equals(this.creditLimit, creditAccountAllOfAttributes.creditLimit) && + Objects.equals(this.updatedAt, creditAccountAllOfAttributes.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, name, creditTerms, currency, balance, hold, available, tags, status, closeReason, fraudReason, closeReasonText, freezeReason, creditLimit, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreditAccountAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" creditTerms: ").append(toIndentedString(creditTerms)).append("\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" hold: ").append(toIndentedString(hold)).append("\n"); + sb.append(" available: ").append(toIndentedString(available)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" closeReason: ").append(toIndentedString(closeReason)).append("\n"); + sb.append(" fraudReason: ").append(toIndentedString(fraudReason)).append("\n"); + sb.append(" closeReasonText: ").append(toIndentedString(closeReasonText)).append("\n"); + sb.append(" freezeReason: ").append(toIndentedString(freezeReason)).append("\n"); + sb.append(" creditLimit: ").append(toIndentedString(creditLimit)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `creditTerms` to the URL query string + if (getCreditTerms() != null) { + joiner.add(String.format("%screditTerms%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreditTerms()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `currency` to the URL query string + if (getCurrency() != null) { + joiner.add(String.format("%scurrency%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCurrency()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `hold` to the URL query string + if (getHold() != null) { + joiner.add(String.format("%shold%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getHold()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `available` to the URL query string + if (getAvailable() != null) { + joiner.add(String.format("%savailable%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAvailable()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `closeReason` to the URL query string + if (getCloseReason() != null) { + joiner.add(String.format("%scloseReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCloseReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `fraudReason` to the URL query string + if (getFraudReason() != null) { + joiner.add(String.format("%sfraudReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFraudReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `closeReasonText` to the URL query string + if (getCloseReasonText() != null) { + joiner.add(String.format("%scloseReasonText%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCloseReasonText()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `freezeReason` to the URL query string + if (getFreezeReason() != null) { + joiner.add(String.format("%sfreezeReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFreezeReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `creditLimit` to the URL query string + if (getCreditLimit() != null) { + joiner.add(String.format("%screditLimit%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreditLimit()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreditAccountRelationships.java b/src/main/java/unit/java/sdk/model/CreditAccountRelationships.java new file mode 100644 index 00000000..7669f1ab --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreditAccountRelationships.java @@ -0,0 +1,204 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import unit.java.sdk.model.CustomerLinkage; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreditAccountRelationships + */ +@JsonPropertyOrder({ + CreditAccountRelationships.JSON_PROPERTY_CUSTOMER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreditAccountRelationships extends HashMap { + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private CustomerLinkage customer; + + public CreditAccountRelationships() { + } + + public CreditAccountRelationships customer(CustomerLinkage customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CustomerLinkage getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomer(CustomerLinkage customer) { + this.customer = customer; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public CreditAccountRelationships putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this creditAccountRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreditAccountRelationships creditAccountRelationships = (CreditAccountRelationships) o; + return Objects.equals(this.customer, creditAccountRelationships.customer)&& + Objects.equals(this.additionalProperties, creditAccountRelationships.additionalProperties) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(customer, super.hashCode(), additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreditAccountRelationships {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CreditLimits.java b/src/main/java/unit/java/sdk/model/CreditLimits.java new file mode 100644 index 00000000..72261479 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreditLimits.java @@ -0,0 +1,181 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreditLimitsAllOfAttributes; +import unit.java.sdk.model.Limits1; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * CreditLimits + */ +@JsonPropertyOrder({ + CreditLimits.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class CreditLimits extends Limits1 { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreditLimitsAllOfAttributes attributes; + + public CreditLimits() { + } + + public CreditLimits attributes(CreditLimitsAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CreditLimitsAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CreditLimitsAllOfAttributes attributes) { + this.attributes = attributes; + } + + + @Override + public CreditLimits type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this CreditLimits object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreditLimits creditLimits = (CreditLimits) o; + return Objects.equals(this.attributes, creditLimits.attributes) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreditLimits {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CreditLimits", CreditLimits.class); + JSON.registerDiscriminator(CreditLimits.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/CreditLimitsAllOfAttributes.java b/src/main/java/unit/java/sdk/model/CreditLimitsAllOfAttributes.java new file mode 100644 index 00000000..c0e4b32c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CreditLimitsAllOfAttributes.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.DepositLimitsAllOfAttributesCard; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CreditLimitsAllOfAttributes + */ +@JsonPropertyOrder({ + CreditLimitsAllOfAttributes.JSON_PROPERTY_CARD +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreditLimitsAllOfAttributes { + public static final String JSON_PROPERTY_CARD = "card"; + private DepositLimitsAllOfAttributesCard card; + + public CreditLimitsAllOfAttributes() { + } + + public CreditLimitsAllOfAttributes card(DepositLimitsAllOfAttributesCard card) { + this.card = card; + return this; + } + + /** + * Get card + * @return card + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CARD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DepositLimitsAllOfAttributesCard getCard() { + return card; + } + + + @JsonProperty(JSON_PROPERTY_CARD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCard(DepositLimitsAllOfAttributesCard card) { + this.card = card; + } + + + /** + * Return true if this CreditLimits_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreditLimitsAllOfAttributes creditLimitsAllOfAttributes = (CreditLimitsAllOfAttributes) o; + return Objects.equals(this.card, creditLimitsAllOfAttributes.card); + } + + @Override + public int hashCode() { + return Objects.hash(card); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreditLimitsAllOfAttributes {\n"); + sb.append(" card: ").append(toIndentedString(card)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `card` to the URL query string + if (getCard() != null) { + joiner.add(getCard().toUrlQueryString(prefix + "card" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Customer.java b/src/main/java/unit/java/sdk/model/Customer.java new file mode 100644 index 00000000..2a015c0f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Customer.java @@ -0,0 +1,210 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * Customer + */ +@JsonPropertyOrder({ + Customer.JSON_PROPERTY_ID, + Customer.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BusinessCustomer.class, name = "businessCustomer"), + @JsonSubTypes.Type(value = IndividualCustomer.class, name = "individualCustomer"), + @JsonSubTypes.Type(value = TrustCustomer.class, name = "trustCustomer"), +}) + +public class Customer { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public Customer() { + } + + public Customer id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public Customer type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + /** + * Return true if this customer object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Customer customer = (Customer) o; + return Objects.equals(this.id, customer.id) && + Objects.equals(this.type, customer.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Customer {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("businessCustomer", BusinessCustomer.class); + mappings.put("individualCustomer", IndividualCustomer.class); + mappings.put("trustCustomer", TrustCustomer.class); + mappings.put("customer", Customer.class); + JSON.registerDiscriminator(Customer.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/CustomerLinkage.java b/src/main/java/unit/java/sdk/model/CustomerLinkage.java new file mode 100644 index 00000000..c5eac7d4 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CustomerLinkage.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomerLinkageData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CustomerLinkage + */ +@JsonPropertyOrder({ + CustomerLinkage.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CustomerLinkage { + public static final String JSON_PROPERTY_DATA = "data"; + private CustomerLinkageData data; + + public CustomerLinkage() { + } + + public CustomerLinkage data(CustomerLinkageData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CustomerLinkageData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(CustomerLinkageData data) { + this.data = data; + } + + + /** + * Return true if this customerLinkage object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomerLinkage customerLinkage = (CustomerLinkage) o; + return Objects.equals(this.data, customerLinkage.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerLinkage {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CustomerLinkageData.java b/src/main/java/unit/java/sdk/model/CustomerLinkageData.java new file mode 100644 index 00000000..b2bc7e8d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CustomerLinkageData.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CustomerLinkageData + */ +@JsonPropertyOrder({ + CustomerLinkageData.JSON_PROPERTY_TYPE, + CustomerLinkageData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CustomerLinkageData { + /** + * Gets or Sets type + */ + public enum TypeEnum { + CUSTOMER("customer"), + + BUSINESSCUSTOMER("businessCustomer"), + + INDIVIDUALCUSTOMER("individualCustomer"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public CustomerLinkageData() { + } + + public CustomerLinkageData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public CustomerLinkageData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this customerLinkage_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomerLinkageData customerLinkageData = (CustomerLinkageData) o; + return Objects.equals(this.type, customerLinkageData.type) && + Objects.equals(this.id, customerLinkageData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerLinkageData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CustomerRelationship.java b/src/main/java/unit/java/sdk/model/CustomerRelationship.java new file mode 100644 index 00000000..f6ead860 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CustomerRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsCustomerData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CustomerRelationship + */ +@JsonPropertyOrder({ + CustomerRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CustomerRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private ReceivedPaymentRelationshipsCustomerData data; + + public CustomerRelationship() { + } + + public CustomerRelationship data(ReceivedPaymentRelationshipsCustomerData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ReceivedPaymentRelationshipsCustomerData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(ReceivedPaymentRelationshipsCustomerData data) { + this.data = data; + } + + + /** + * Return true if this customerRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomerRelationship customerRelationship = (CustomerRelationship) o; + return Objects.equals(this.data, customerRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CustomerRelationships.java b/src/main/java/unit/java/sdk/model/CustomerRelationships.java new file mode 100644 index 00000000..935177b9 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CustomerRelationships.java @@ -0,0 +1,241 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import unit.java.sdk.model.OrgRelationship; +import unit.java.sdk.model.Relationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CustomerRelationships + */ +@JsonPropertyOrder({ + CustomerRelationships.JSON_PROPERTY_ORG, + CustomerRelationships.JSON_PROPERTY_APPLICATION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CustomerRelationships extends HashMap { + public static final String JSON_PROPERTY_ORG = "org"; + private OrgRelationship org; + + public static final String JSON_PROPERTY_APPLICATION = "application"; + private Relationship application; + + public CustomerRelationships() { + } + + public CustomerRelationships org(OrgRelationship org) { + this.org = org; + return this; + } + + /** + * Get org + * @return org + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OrgRelationship getOrg() { + return org; + } + + + @JsonProperty(JSON_PROPERTY_ORG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOrg(OrgRelationship org) { + this.org = org; + } + + + public CustomerRelationships application(Relationship application) { + this.application = application; + return this; + } + + /** + * Get application + * @return application + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Relationship getApplication() { + return application; + } + + + @JsonProperty(JSON_PROPERTY_APPLICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setApplication(Relationship application) { + this.application = application; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public CustomerRelationships putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this customerRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomerRelationships customerRelationships = (CustomerRelationships) o; + return Objects.equals(this.org, customerRelationships.org) && + Objects.equals(this.application, customerRelationships.application)&& + Objects.equals(this.additionalProperties, customerRelationships.additionalProperties) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(org, application, super.hashCode(), additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerRelationships {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append(" application: ").append(toIndentedString(application)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `org` to the URL query string + if (getOrg() != null) { + joiner.add(getOrg().toUrlQueryString(prefix + "org" + suffix)); + } + + // add `application` to the URL query string + if (getApplication() != null) { + joiner.add(getApplication().toUrlQueryString(prefix + "application" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CustomerRepaymentReturnedTransaction.java b/src/main/java/unit/java/sdk/model/CustomerRepaymentReturnedTransaction.java new file mode 100644 index 00000000..de7affdc --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CustomerRepaymentReturnedTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.FeeTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * CustomerRepaymentReturnedTransaction + */ +@JsonPropertyOrder({ + CustomerRepaymentReturnedTransaction.JSON_PROPERTY_ATTRIBUTES, + CustomerRepaymentReturnedTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class CustomerRepaymentReturnedTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FeeTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public CustomerRepaymentReturnedTransaction() { + } + + public CustomerRepaymentReturnedTransaction attributes(FeeTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FeeTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(FeeTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public CustomerRepaymentReturnedTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public CustomerRepaymentReturnedTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public CustomerRepaymentReturnedTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this CustomerRepaymentReturnedTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomerRepaymentReturnedTransaction customerRepaymentReturnedTransaction = (CustomerRepaymentReturnedTransaction) o; + return Objects.equals(this.attributes, customerRepaymentReturnedTransaction.attributes) && + Objects.equals(this.relationships, customerRepaymentReturnedTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerRepaymentReturnedTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CustomerRepaymentReturnedTransaction", CustomerRepaymentReturnedTransaction.class); + JSON.registerDiscriminator(CustomerRepaymentReturnedTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/CustomerRepaymentTransaction.java b/src/main/java/unit/java/sdk/model/CustomerRepaymentTransaction.java new file mode 100644 index 00000000..4b62f638 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CustomerRepaymentTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.FeeTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * CustomerRepaymentTransaction + */ +@JsonPropertyOrder({ + CustomerRepaymentTransaction.JSON_PROPERTY_ATTRIBUTES, + CustomerRepaymentTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class CustomerRepaymentTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FeeTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public CustomerRepaymentTransaction() { + } + + public CustomerRepaymentTransaction attributes(FeeTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FeeTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(FeeTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public CustomerRepaymentTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public CustomerRepaymentTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public CustomerRepaymentTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this CustomerRepaymentTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomerRepaymentTransaction customerRepaymentTransaction = (CustomerRepaymentTransaction) o; + return Objects.equals(this.attributes, customerRepaymentTransaction.attributes) && + Objects.equals(this.relationships, customerRepaymentTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerRepaymentTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CustomerRepaymentTransaction", CustomerRepaymentTransaction.class); + JSON.registerDiscriminator(CustomerRepaymentTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/CustomerToken.java b/src/main/java/unit/java/sdk/model/CustomerToken.java new file mode 100644 index 00000000..43380f0b --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CustomerToken.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomerTokenAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CustomerToken + */ +@JsonPropertyOrder({ + CustomerToken.JSON_PROPERTY_TYPE, + CustomerToken.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CustomerToken { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "customerToken"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CustomerTokenAttributes attributes; + + public CustomerToken() { + } + + public CustomerToken type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CustomerToken attributes(CustomerTokenAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CustomerTokenAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CustomerTokenAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this customer_token object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomerToken customerToken = (CustomerToken) o; + return Objects.equals(this.type, customerToken.type) && + Objects.equals(this.attributes, customerToken.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerToken {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CustomerTokenAttributes.java b/src/main/java/unit/java/sdk/model/CustomerTokenAttributes.java new file mode 100644 index 00000000..e199d792 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CustomerTokenAttributes.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CustomerTokenAttributes + */ +@JsonPropertyOrder({ + CustomerTokenAttributes.JSON_PROPERTY_TOKEN, + CustomerTokenAttributes.JSON_PROPERTY_EXPIRES_IN +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CustomerTokenAttributes { + public static final String JSON_PROPERTY_TOKEN = "token"; + private String token; + + public static final String JSON_PROPERTY_EXPIRES_IN = "expiresIn"; + private Integer expiresIn; + + public CustomerTokenAttributes() { + } + + public CustomerTokenAttributes token(String token) { + this.token = token; + return this; + } + + /** + * Get token + * @return token + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getToken() { + return token; + } + + + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setToken(String token) { + this.token = token; + } + + + public CustomerTokenAttributes expiresIn(Integer expiresIn) { + this.expiresIn = expiresIn; + return this; + } + + /** + * Get expiresIn + * @return expiresIn + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPIRES_IN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getExpiresIn() { + return expiresIn; + } + + + @JsonProperty(JSON_PROPERTY_EXPIRES_IN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpiresIn(Integer expiresIn) { + this.expiresIn = expiresIn; + } + + + /** + * Return true if this customer_token_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomerTokenAttributes customerTokenAttributes = (CustomerTokenAttributes) o; + return Objects.equals(this.token, customerTokenAttributes.token) && + Objects.equals(this.expiresIn, customerTokenAttributes.expiresIn); + } + + @Override + public int hashCode() { + return Objects.hash(token, expiresIn); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerTokenAttributes {\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" expiresIn: ").append(toIndentedString(expiresIn)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `token` to the URL query string + if (getToken() != null) { + joiner.add(String.format("%stoken%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getToken()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `expiresIn` to the URL query string + if (getExpiresIn() != null) { + joiner.add(String.format("%sexpiresIn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getExpiresIn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CustomerTokenVerification.java b/src/main/java/unit/java/sdk/model/CustomerTokenVerification.java new file mode 100644 index 00000000..0f048f22 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CustomerTokenVerification.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomerTokenVerificationAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CustomerTokenVerification + */ +@JsonPropertyOrder({ + CustomerTokenVerification.JSON_PROPERTY_TYPE, + CustomerTokenVerification.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CustomerTokenVerification { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "customerTokenVerification"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CustomerTokenVerificationAttributes attributes; + + public CustomerTokenVerification() { + } + + public CustomerTokenVerification type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public CustomerTokenVerification attributes(CustomerTokenVerificationAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CustomerTokenVerificationAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CustomerTokenVerificationAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this customer_token_verification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomerTokenVerification customerTokenVerification = (CustomerTokenVerification) o; + return Objects.equals(this.type, customerTokenVerification.type) && + Objects.equals(this.attributes, customerTokenVerification.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerTokenVerification {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CustomerTokenVerificationAttributes.java b/src/main/java/unit/java/sdk/model/CustomerTokenVerificationAttributes.java new file mode 100644 index 00000000..1d8f462f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CustomerTokenVerificationAttributes.java @@ -0,0 +1,150 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CustomerTokenVerificationAttributes + */ +@JsonPropertyOrder({ + CustomerTokenVerificationAttributes.JSON_PROPERTY_VERIFICATION_TOKEN +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CustomerTokenVerificationAttributes { + public static final String JSON_PROPERTY_VERIFICATION_TOKEN = "verificationToken"; + private String verificationToken; + + public CustomerTokenVerificationAttributes() { + } + + public CustomerTokenVerificationAttributes verificationToken(String verificationToken) { + this.verificationToken = verificationToken; + return this; + } + + /** + * Get verificationToken + * @return verificationToken + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERIFICATION_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getVerificationToken() { + return verificationToken; + } + + + @JsonProperty(JSON_PROPERTY_VERIFICATION_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVerificationToken(String verificationToken) { + this.verificationToken = verificationToken; + } + + + /** + * Return true if this customer_token_verification_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomerTokenVerificationAttributes customerTokenVerificationAttributes = (CustomerTokenVerificationAttributes) o; + return Objects.equals(this.verificationToken, customerTokenVerificationAttributes.verificationToken); + } + + @Override + public int hashCode() { + return Objects.hash(verificationToken); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerTokenVerificationAttributes {\n"); + sb.append(" verificationToken: ").append(toIndentedString(verificationToken)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `verificationToken` to the URL query string + if (getVerificationToken() != null) { + joiner.add(String.format("%sverificationToken%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVerificationToken()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CustomersRelationship.java b/src/main/java/unit/java/sdk/model/CustomersRelationship.java new file mode 100644 index 00000000..9b7e1265 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CustomersRelationship.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.CustomersRelationshipDataInner; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CustomersRelationship + */ +@JsonPropertyOrder({ + CustomersRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CustomersRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public CustomersRelationship() { + } + + public CustomersRelationship data(List data) { + this.data = data; + return this; + } + + public CustomersRelationship addDataItem(CustomersRelationshipDataInner dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this customersRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomersRelationship customersRelationship = (CustomersRelationship) o; + return Objects.equals(this.data, customersRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomersRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/CustomersRelationshipDataInner.java b/src/main/java/unit/java/sdk/model/CustomersRelationshipDataInner.java new file mode 100644 index 00000000..d89c92f3 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/CustomersRelationshipDataInner.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * CustomersRelationshipDataInner + */ +@JsonPropertyOrder({ + CustomersRelationshipDataInner.JSON_PROPERTY_ID, + CustomersRelationshipDataInner.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CustomersRelationshipDataInner { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "customer"; + + public CustomersRelationshipDataInner() { + } + + public CustomersRelationshipDataInner id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public CustomersRelationshipDataInner type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + /** + * Return true if this customersRelationship_data_inner object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomersRelationshipDataInner customersRelationshipDataInner = (CustomersRelationshipDataInner) o; + return Objects.equals(this.id, customersRelationshipDataInner.id) && + Objects.equals(this.type, customersRelationshipDataInner.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomersRelationshipDataInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DeclineAuthorizationRequest.java b/src/main/java/unit/java/sdk/model/DeclineAuthorizationRequest.java new file mode 100644 index 00000000..3e27e5ff --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DeclineAuthorizationRequest.java @@ -0,0 +1,150 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DeclineAuthorizationRequest + */ +@JsonPropertyOrder({ + DeclineAuthorizationRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeclineAuthorizationRequest { + public static final String JSON_PROPERTY_DATA = "data"; + private DeclineAuthorizationRequest data; + + public DeclineAuthorizationRequest() { + } + + public DeclineAuthorizationRequest data(DeclineAuthorizationRequest data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DeclineAuthorizationRequest getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(DeclineAuthorizationRequest data) { + this.data = data; + } + + + /** + * Return true if this DeclineAuthorizationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeclineAuthorizationRequest declineAuthorizationRequest = (DeclineAuthorizationRequest) o; + return Objects.equals(this.data, declineAuthorizationRequest.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeclineAuthorizationRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DeclineAuthorizationRequestAttributes.java b/src/main/java/unit/java/sdk/model/DeclineAuthorizationRequestAttributes.java new file mode 100644 index 00000000..c9f42bc6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DeclineAuthorizationRequestAttributes.java @@ -0,0 +1,197 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DeclineAuthorizationRequestAttributes + */ +@JsonPropertyOrder({ + DeclineAuthorizationRequestAttributes.JSON_PROPERTY_REASON +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeclineAuthorizationRequestAttributes { + /** + * Gets or Sets reason + */ + public enum ReasonEnum { + ACCOUNTCLOSED("AccountClosed"), + + CARDEXCEEDSAMOUNTLIMIT("CardExceedsAmountLimit"), + + DONOTHONOR("DoNotHonor"), + + INSUFFICIENTFUNDS("InsufficientFunds"), + + INVALIDMERCHANT("InvalidMerchant"), + + REFERTOCARDISSUER("ReferToCardIssuer"), + + RESTRICTEDCARD("RestrictedCard"), + + TRANSACTIONNOTPERMITTEDTOCARDHOLDER("TransactionNotPermittedToCardholder"); + + private String value; + + ReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ReasonEnum fromValue(String value) { + for (ReasonEnum b : ReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_REASON = "reason"; + private ReasonEnum reason; + + public DeclineAuthorizationRequestAttributes() { + } + + public DeclineAuthorizationRequestAttributes reason(ReasonEnum reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReasonEnum getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(ReasonEnum reason) { + this.reason = reason; + } + + + /** + * Return true if this declineAuthorizationRequest_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeclineAuthorizationRequestAttributes declineAuthorizationRequestAttributes = (DeclineAuthorizationRequestAttributes) o; + return Objects.equals(this.reason, declineAuthorizationRequestAttributes.reason); + } + + @Override + public int hashCode() { + return Objects.hash(reason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeclineAuthorizationRequestAttributes {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DepositAccount.java b/src/main/java/unit/java/sdk/model/DepositAccount.java new file mode 100644 index 00000000..7b9a55d4 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DepositAccount.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Account; +import unit.java.sdk.model.DepositAccountAllOfAttributes; +import unit.java.sdk.model.DepositAccountRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * DepositAccount + */ +@JsonPropertyOrder({ + DepositAccount.JSON_PROPERTY_ATTRIBUTES, + DepositAccount.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class DepositAccount extends Account { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DepositAccountAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private DepositAccountRelationships relationships; + + public DepositAccount() { + } + + public DepositAccount attributes(DepositAccountAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DepositAccountAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(DepositAccountAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public DepositAccount relationships(DepositAccountRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DepositAccountRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(DepositAccountRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public DepositAccount id(String id) { + this.setId(id); + return this; + } + + @Override + public DepositAccount type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this DepositAccount object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DepositAccount depositAccount = (DepositAccount) o; + return Objects.equals(this.attributes, depositAccount.attributes) && + Objects.equals(this.relationships, depositAccount.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DepositAccount {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(String.format("%srelationships%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRelationships()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DepositAccount", DepositAccount.class); + JSON.registerDiscriminator(DepositAccount.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/DepositAccountAllOfAttributes.java b/src/main/java/unit/java/sdk/model/DepositAccountAllOfAttributes.java new file mode 100644 index 00000000..d3514564 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DepositAccountAllOfAttributes.java @@ -0,0 +1,1027 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.DepositAccountAllOfAttributesSecondaryAccountNumber; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DepositAccountAllOfAttributes + */ +@JsonPropertyOrder({ + DepositAccountAllOfAttributes.JSON_PROPERTY_CREATED_AT, + DepositAccountAllOfAttributes.JSON_PROPERTY_NAME, + DepositAccountAllOfAttributes.JSON_PROPERTY_DEPOSIT_PRODUCT, + DepositAccountAllOfAttributes.JSON_PROPERTY_ROUTING_NUMBER, + DepositAccountAllOfAttributes.JSON_PROPERTY_ACCOUNT_NUMBER, + DepositAccountAllOfAttributes.JSON_PROPERTY_SECONDARY_ACCOUNT_NUMBER, + DepositAccountAllOfAttributes.JSON_PROPERTY_CURRENCY, + DepositAccountAllOfAttributes.JSON_PROPERTY_BALANCE, + DepositAccountAllOfAttributes.JSON_PROPERTY_OVERDRAFT_LIMIT, + DepositAccountAllOfAttributes.JSON_PROPERTY_HOLD, + DepositAccountAllOfAttributes.JSON_PROPERTY_AVAILABLE, + DepositAccountAllOfAttributes.JSON_PROPERTY_TAGS, + DepositAccountAllOfAttributes.JSON_PROPERTY_STATUS, + DepositAccountAllOfAttributes.JSON_PROPERTY_CLOSE_REASON, + DepositAccountAllOfAttributes.JSON_PROPERTY_FRAUD_REASON, + DepositAccountAllOfAttributes.JSON_PROPERTY_CLOSE_REASON_TEXT, + DepositAccountAllOfAttributes.JSON_PROPERTY_FREEZE_REASON, + DepositAccountAllOfAttributes.JSON_PROPERTY_MASKED_ACCOUNT_NUMBER, + DepositAccountAllOfAttributes.JSON_PROPERTY_IS_OVERDRAWN_WITHIN_LIMIT, + DepositAccountAllOfAttributes.JSON_PROPERTY_DACA_STATUS, + DepositAccountAllOfAttributes.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DepositAccountAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_DEPOSIT_PRODUCT = "depositProduct"; + private String depositProduct; + + public static final String JSON_PROPERTY_ROUTING_NUMBER = "routingNumber"; + private String routingNumber; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + private String accountNumber; + + public static final String JSON_PROPERTY_SECONDARY_ACCOUNT_NUMBER = "secondaryAccountNumber"; + private DepositAccountAllOfAttributesSecondaryAccountNumber secondaryAccountNumber; + + public static final String JSON_PROPERTY_CURRENCY = "currency"; + private String currency = "USD"; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_OVERDRAFT_LIMIT = "overdraftLimit"; + private Integer overdraftLimit; + + public static final String JSON_PROPERTY_HOLD = "hold"; + private Integer hold; + + public static final String JSON_PROPERTY_AVAILABLE = "available"; + private Integer available; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + OPEN("Open"), + + CLOSED("Closed"), + + FROZEN("Frozen"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + /** + * Gets or Sets closeReason + */ + public enum CloseReasonEnum { + BYCUSTOMER("ByCustomer"), + + FRAUD("Fraud"); + + private String value; + + CloseReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CloseReasonEnum fromValue(String value) { + for (CloseReasonEnum b : CloseReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_CLOSE_REASON = "closeReason"; + private CloseReasonEnum closeReason; + + /** + * Gets or Sets fraudReason + */ + public enum FraudReasonEnum { + ACHACTIVITY("ACHActivity"), + + CARDACTIVITY("CardActivity"), + + CHECKACTIVITY("CheckActivity"), + + APPLICATIONHISTORY("ApplicationHistory"), + + ACCOUNTACTIVITY("AccountActivity"), + + CLIENTIDENTIFIED("ClientIdentified"), + + IDENTITYTHEFT("IdentityTheft"), + + LINKEDTOFRAUDULENTCUSTOMER("LinkedToFraudulentCustomer"); + + private String value; + + FraudReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FraudReasonEnum fromValue(String value) { + for (FraudReasonEnum b : FraudReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_FRAUD_REASON = "fraudReason"; + private FraudReasonEnum fraudReason; + + public static final String JSON_PROPERTY_CLOSE_REASON_TEXT = "closeReasonText"; + private String closeReasonText; + + public static final String JSON_PROPERTY_FREEZE_REASON = "freezeReason"; + private String freezeReason; + + public static final String JSON_PROPERTY_MASKED_ACCOUNT_NUMBER = "maskedAccountNumber"; + private String maskedAccountNumber; + + public static final String JSON_PROPERTY_IS_OVERDRAWN_WITHIN_LIMIT = "isOverdrawnWithinLimit"; + private Boolean isOverdrawnWithinLimit; + + /** + * Gets or Sets dacaStatus + */ + public enum DacaStatusEnum { + ACTIVATED("Activated"), + + ENTERED("Entered"); + + private String value; + + DacaStatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DacaStatusEnum fromValue(String value) { + for (DacaStatusEnum b : DacaStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DACA_STATUS = "dacaStatus"; + private DacaStatusEnum dacaStatus; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public DepositAccountAllOfAttributes() { + } + + public DepositAccountAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public DepositAccountAllOfAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public DepositAccountAllOfAttributes depositProduct(String depositProduct) { + this.depositProduct = depositProduct; + return this; + } + + /** + * Get depositProduct + * @return depositProduct + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DEPOSIT_PRODUCT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDepositProduct() { + return depositProduct; + } + + + @JsonProperty(JSON_PROPERTY_DEPOSIT_PRODUCT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDepositProduct(String depositProduct) { + this.depositProduct = depositProduct; + } + + + public DepositAccountAllOfAttributes routingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; + } + + /** + * Get routingNumber + * @return routingNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getRoutingNumber() { + return routingNumber; + } + + + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + } + + + public DepositAccountAllOfAttributes accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountNumber() { + return accountNumber; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public DepositAccountAllOfAttributes secondaryAccountNumber(DepositAccountAllOfAttributesSecondaryAccountNumber secondaryAccountNumber) { + this.secondaryAccountNumber = secondaryAccountNumber; + return this; + } + + /** + * Get secondaryAccountNumber + * @return secondaryAccountNumber + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECONDARY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DepositAccountAllOfAttributesSecondaryAccountNumber getSecondaryAccountNumber() { + return secondaryAccountNumber; + } + + + @JsonProperty(JSON_PROPERTY_SECONDARY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSecondaryAccountNumber(DepositAccountAllOfAttributesSecondaryAccountNumber secondaryAccountNumber) { + this.secondaryAccountNumber = secondaryAccountNumber; + } + + + public DepositAccountAllOfAttributes currency(String currency) { + this.currency = currency; + return this; + } + + /** + * Get currency + * @return currency + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCurrency() { + return currency; + } + + + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCurrency(String currency) { + this.currency = currency; + } + + + public DepositAccountAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public DepositAccountAllOfAttributes overdraftLimit(Integer overdraftLimit) { + this.overdraftLimit = overdraftLimit; + return this; + } + + /** + * Get overdraftLimit + * minimum: 0 + * @return overdraftLimit + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OVERDRAFT_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getOverdraftLimit() { + return overdraftLimit; + } + + + @JsonProperty(JSON_PROPERTY_OVERDRAFT_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOverdraftLimit(Integer overdraftLimit) { + this.overdraftLimit = overdraftLimit; + } + + + public DepositAccountAllOfAttributes hold(Integer hold) { + this.hold = hold; + return this; + } + + /** + * Get hold + * @return hold + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getHold() { + return hold; + } + + + @JsonProperty(JSON_PROPERTY_HOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHold(Integer hold) { + this.hold = hold; + } + + + public DepositAccountAllOfAttributes available(Integer available) { + this.available = available; + return this; + } + + /** + * Get available + * @return available + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAvailable() { + return available; + } + + + @JsonProperty(JSON_PROPERTY_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAvailable(Integer available) { + this.available = available; + } + + + public DepositAccountAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public DepositAccountAllOfAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public DepositAccountAllOfAttributes closeReason(CloseReasonEnum closeReason) { + this.closeReason = closeReason; + return this; + } + + /** + * Get closeReason + * @return closeReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLOSE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CloseReasonEnum getCloseReason() { + return closeReason; + } + + + @JsonProperty(JSON_PROPERTY_CLOSE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCloseReason(CloseReasonEnum closeReason) { + this.closeReason = closeReason; + } + + + public DepositAccountAllOfAttributes fraudReason(FraudReasonEnum fraudReason) { + this.fraudReason = fraudReason; + return this; + } + + /** + * Get fraudReason + * @return fraudReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FRAUD_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FraudReasonEnum getFraudReason() { + return fraudReason; + } + + + @JsonProperty(JSON_PROPERTY_FRAUD_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFraudReason(FraudReasonEnum fraudReason) { + this.fraudReason = fraudReason; + } + + + public DepositAccountAllOfAttributes closeReasonText(String closeReasonText) { + this.closeReasonText = closeReasonText; + return this; + } + + /** + * Get closeReasonText + * @return closeReasonText + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLOSE_REASON_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCloseReasonText() { + return closeReasonText; + } + + + @JsonProperty(JSON_PROPERTY_CLOSE_REASON_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCloseReasonText(String closeReasonText) { + this.closeReasonText = closeReasonText; + } + + + public DepositAccountAllOfAttributes freezeReason(String freezeReason) { + this.freezeReason = freezeReason; + return this; + } + + /** + * Get freezeReason + * @return freezeReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FREEZE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFreezeReason() { + return freezeReason; + } + + + @JsonProperty(JSON_PROPERTY_FREEZE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFreezeReason(String freezeReason) { + this.freezeReason = freezeReason; + } + + + public DepositAccountAllOfAttributes maskedAccountNumber(String maskedAccountNumber) { + this.maskedAccountNumber = maskedAccountNumber; + return this; + } + + /** + * Get maskedAccountNumber + * @return maskedAccountNumber + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MASKED_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMaskedAccountNumber() { + return maskedAccountNumber; + } + + + @JsonProperty(JSON_PROPERTY_MASKED_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaskedAccountNumber(String maskedAccountNumber) { + this.maskedAccountNumber = maskedAccountNumber; + } + + + public DepositAccountAllOfAttributes isOverdrawnWithinLimit(Boolean isOverdrawnWithinLimit) { + this.isOverdrawnWithinLimit = isOverdrawnWithinLimit; + return this; + } + + /** + * Get isOverdrawnWithinLimit + * @return isOverdrawnWithinLimit + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_OVERDRAWN_WITHIN_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIsOverdrawnWithinLimit() { + return isOverdrawnWithinLimit; + } + + + @JsonProperty(JSON_PROPERTY_IS_OVERDRAWN_WITHIN_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsOverdrawnWithinLimit(Boolean isOverdrawnWithinLimit) { + this.isOverdrawnWithinLimit = isOverdrawnWithinLimit; + } + + + public DepositAccountAllOfAttributes dacaStatus(DacaStatusEnum dacaStatus) { + this.dacaStatus = dacaStatus; + return this; + } + + /** + * Get dacaStatus + * @return dacaStatus + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DACA_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DacaStatusEnum getDacaStatus() { + return dacaStatus; + } + + + @JsonProperty(JSON_PROPERTY_DACA_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDacaStatus(DacaStatusEnum dacaStatus) { + this.dacaStatus = dacaStatus; + } + + + public DepositAccountAllOfAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + /** + * Return true if this DepositAccount_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DepositAccountAllOfAttributes depositAccountAllOfAttributes = (DepositAccountAllOfAttributes) o; + return Objects.equals(this.createdAt, depositAccountAllOfAttributes.createdAt) && + Objects.equals(this.name, depositAccountAllOfAttributes.name) && + Objects.equals(this.depositProduct, depositAccountAllOfAttributes.depositProduct) && + Objects.equals(this.routingNumber, depositAccountAllOfAttributes.routingNumber) && + Objects.equals(this.accountNumber, depositAccountAllOfAttributes.accountNumber) && + Objects.equals(this.secondaryAccountNumber, depositAccountAllOfAttributes.secondaryAccountNumber) && + Objects.equals(this.currency, depositAccountAllOfAttributes.currency) && + Objects.equals(this.balance, depositAccountAllOfAttributes.balance) && + Objects.equals(this.overdraftLimit, depositAccountAllOfAttributes.overdraftLimit) && + Objects.equals(this.hold, depositAccountAllOfAttributes.hold) && + Objects.equals(this.available, depositAccountAllOfAttributes.available) && + Objects.equals(this.tags, depositAccountAllOfAttributes.tags) && + Objects.equals(this.status, depositAccountAllOfAttributes.status) && + Objects.equals(this.closeReason, depositAccountAllOfAttributes.closeReason) && + Objects.equals(this.fraudReason, depositAccountAllOfAttributes.fraudReason) && + Objects.equals(this.closeReasonText, depositAccountAllOfAttributes.closeReasonText) && + Objects.equals(this.freezeReason, depositAccountAllOfAttributes.freezeReason) && + Objects.equals(this.maskedAccountNumber, depositAccountAllOfAttributes.maskedAccountNumber) && + Objects.equals(this.isOverdrawnWithinLimit, depositAccountAllOfAttributes.isOverdrawnWithinLimit) && + Objects.equals(this.dacaStatus, depositAccountAllOfAttributes.dacaStatus) && + Objects.equals(this.updatedAt, depositAccountAllOfAttributes.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, name, depositProduct, routingNumber, accountNumber, secondaryAccountNumber, currency, balance, overdraftLimit, hold, available, tags, status, closeReason, fraudReason, closeReasonText, freezeReason, maskedAccountNumber, isOverdrawnWithinLimit, dacaStatus, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DepositAccountAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" depositProduct: ").append(toIndentedString(depositProduct)).append("\n"); + sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" secondaryAccountNumber: ").append(toIndentedString(secondaryAccountNumber)).append("\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" overdraftLimit: ").append(toIndentedString(overdraftLimit)).append("\n"); + sb.append(" hold: ").append(toIndentedString(hold)).append("\n"); + sb.append(" available: ").append(toIndentedString(available)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" closeReason: ").append(toIndentedString(closeReason)).append("\n"); + sb.append(" fraudReason: ").append(toIndentedString(fraudReason)).append("\n"); + sb.append(" closeReasonText: ").append(toIndentedString(closeReasonText)).append("\n"); + sb.append(" freezeReason: ").append(toIndentedString(freezeReason)).append("\n"); + sb.append(" maskedAccountNumber: ").append(toIndentedString(maskedAccountNumber)).append("\n"); + sb.append(" isOverdrawnWithinLimit: ").append(toIndentedString(isOverdrawnWithinLimit)).append("\n"); + sb.append(" dacaStatus: ").append(toIndentedString(dacaStatus)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `depositProduct` to the URL query string + if (getDepositProduct() != null) { + joiner.add(String.format("%sdepositProduct%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDepositProduct()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `routingNumber` to the URL query string + if (getRoutingNumber() != null) { + joiner.add(String.format("%sroutingNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRoutingNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add(String.format("%saccountNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `secondaryAccountNumber` to the URL query string + if (getSecondaryAccountNumber() != null) { + joiner.add(getSecondaryAccountNumber().toUrlQueryString(prefix + "secondaryAccountNumber" + suffix)); + } + + // add `currency` to the URL query string + if (getCurrency() != null) { + joiner.add(String.format("%scurrency%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCurrency()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `overdraftLimit` to the URL query string + if (getOverdraftLimit() != null) { + joiner.add(String.format("%soverdraftLimit%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOverdraftLimit()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `hold` to the URL query string + if (getHold() != null) { + joiner.add(String.format("%shold%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getHold()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `available` to the URL query string + if (getAvailable() != null) { + joiner.add(String.format("%savailable%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAvailable()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `closeReason` to the URL query string + if (getCloseReason() != null) { + joiner.add(String.format("%scloseReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCloseReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `fraudReason` to the URL query string + if (getFraudReason() != null) { + joiner.add(String.format("%sfraudReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFraudReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `closeReasonText` to the URL query string + if (getCloseReasonText() != null) { + joiner.add(String.format("%scloseReasonText%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCloseReasonText()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `freezeReason` to the URL query string + if (getFreezeReason() != null) { + joiner.add(String.format("%sfreezeReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFreezeReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `maskedAccountNumber` to the URL query string + if (getMaskedAccountNumber() != null) { + joiner.add(String.format("%smaskedAccountNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMaskedAccountNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `isOverdrawnWithinLimit` to the URL query string + if (getIsOverdrawnWithinLimit() != null) { + joiner.add(String.format("%sisOverdrawnWithinLimit%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIsOverdrawnWithinLimit()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dacaStatus` to the URL query string + if (getDacaStatus() != null) { + joiner.add(String.format("%sdacaStatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDacaStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DepositAccountAllOfAttributesSecondaryAccountNumber.java b/src/main/java/unit/java/sdk/model/DepositAccountAllOfAttributesSecondaryAccountNumber.java new file mode 100644 index 00000000..d9ed7836 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DepositAccountAllOfAttributesSecondaryAccountNumber.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DepositAccountAllOfAttributesSecondaryAccountNumber + */ +@JsonPropertyOrder({ + DepositAccountAllOfAttributesSecondaryAccountNumber.JSON_PROPERTY_ROUTING_NUMBER, + DepositAccountAllOfAttributesSecondaryAccountNumber.JSON_PROPERTY_ACCOUNT_NUMBER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DepositAccountAllOfAttributesSecondaryAccountNumber { + public static final String JSON_PROPERTY_ROUTING_NUMBER = "routingNumber"; + private String routingNumber; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + private String accountNumber; + + public DepositAccountAllOfAttributesSecondaryAccountNumber() { + } + + public DepositAccountAllOfAttributesSecondaryAccountNumber routingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; + } + + /** + * Get routingNumber + * @return routingNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getRoutingNumber() { + return routingNumber; + } + + + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + } + + + public DepositAccountAllOfAttributesSecondaryAccountNumber accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getAccountNumber() { + return accountNumber; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + /** + * Return true if this DepositAccount_allOf_attributes_secondaryAccountNumber object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DepositAccountAllOfAttributesSecondaryAccountNumber depositAccountAllOfAttributesSecondaryAccountNumber = (DepositAccountAllOfAttributesSecondaryAccountNumber) o; + return Objects.equals(this.routingNumber, depositAccountAllOfAttributesSecondaryAccountNumber.routingNumber) && + Objects.equals(this.accountNumber, depositAccountAllOfAttributesSecondaryAccountNumber.accountNumber); + } + + @Override + public int hashCode() { + return Objects.hash(routingNumber, accountNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DepositAccountAllOfAttributesSecondaryAccountNumber {\n"); + sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `routingNumber` to the URL query string + if (getRoutingNumber() != null) { + joiner.add(String.format("%sroutingNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRoutingNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add(String.format("%saccountNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DepositAccountRelationships.java b/src/main/java/unit/java/sdk/model/DepositAccountRelationships.java new file mode 100644 index 00000000..be690af5 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DepositAccountRelationships.java @@ -0,0 +1,204 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import unit.java.sdk.model.CustomerLinkage; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DepositAccountRelationships + */ +@JsonPropertyOrder({ + DepositAccountRelationships.JSON_PROPERTY_CUSTOMER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DepositAccountRelationships extends HashMap { + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private CustomerLinkage customer; + + public DepositAccountRelationships() { + } + + public DepositAccountRelationships customer(CustomerLinkage customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CustomerLinkage getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomer(CustomerLinkage customer) { + this.customer = customer; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public DepositAccountRelationships putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this depositAccountRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DepositAccountRelationships depositAccountRelationships = (DepositAccountRelationships) o; + return Objects.equals(this.customer, depositAccountRelationships.customer)&& + Objects.equals(this.additionalProperties, depositAccountRelationships.additionalProperties) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(customer, super.hashCode(), additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DepositAccountRelationships {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DepositLimits.java b/src/main/java/unit/java/sdk/model/DepositLimits.java new file mode 100644 index 00000000..ab6fb8fb --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DepositLimits.java @@ -0,0 +1,181 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.DepositLimitsAllOfAttributes; +import unit.java.sdk.model.Limits1; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * DepositLimits + */ +@JsonPropertyOrder({ + DepositLimits.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class DepositLimits extends Limits1 { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DepositLimitsAllOfAttributes attributes; + + public DepositLimits() { + } + + public DepositLimits attributes(DepositLimitsAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DepositLimitsAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(DepositLimitsAllOfAttributes attributes) { + this.attributes = attributes; + } + + + @Override + public DepositLimits type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this DepositLimits object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DepositLimits depositLimits = (DepositLimits) o; + return Objects.equals(this.attributes, depositLimits.attributes) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DepositLimits {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DepositLimits", DepositLimits.class); + JSON.registerDiscriminator(DepositLimits.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributes.java b/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributes.java new file mode 100644 index 00000000..9ef6c521 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributes.java @@ -0,0 +1,225 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.DepositLimitsAllOfAttributesAch; +import unit.java.sdk.model.DepositLimitsAllOfAttributesCard; +import unit.java.sdk.model.DepositLimitsAllOfAttributesCheckDeposit; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DepositLimitsAllOfAttributes + */ +@JsonPropertyOrder({ + DepositLimitsAllOfAttributes.JSON_PROPERTY_ACH, + DepositLimitsAllOfAttributes.JSON_PROPERTY_CARD, + DepositLimitsAllOfAttributes.JSON_PROPERTY_CHECK_DEPOSIT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DepositLimitsAllOfAttributes { + public static final String JSON_PROPERTY_ACH = "ach"; + private DepositLimitsAllOfAttributesAch ach; + + public static final String JSON_PROPERTY_CARD = "card"; + private DepositLimitsAllOfAttributesCard card; + + public static final String JSON_PROPERTY_CHECK_DEPOSIT = "checkDeposit"; + private DepositLimitsAllOfAttributesCheckDeposit checkDeposit; + + public DepositLimitsAllOfAttributes() { + } + + public DepositLimitsAllOfAttributes ach(DepositLimitsAllOfAttributesAch ach) { + this.ach = ach; + return this; + } + + /** + * Get ach + * @return ach + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DepositLimitsAllOfAttributesAch getAch() { + return ach; + } + + + @JsonProperty(JSON_PROPERTY_ACH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAch(DepositLimitsAllOfAttributesAch ach) { + this.ach = ach; + } + + + public DepositLimitsAllOfAttributes card(DepositLimitsAllOfAttributesCard card) { + this.card = card; + return this; + } + + /** + * Get card + * @return card + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CARD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DepositLimitsAllOfAttributesCard getCard() { + return card; + } + + + @JsonProperty(JSON_PROPERTY_CARD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCard(DepositLimitsAllOfAttributesCard card) { + this.card = card; + } + + + public DepositLimitsAllOfAttributes checkDeposit(DepositLimitsAllOfAttributesCheckDeposit checkDeposit) { + this.checkDeposit = checkDeposit; + return this; + } + + /** + * Get checkDeposit + * @return checkDeposit + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHECK_DEPOSIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DepositLimitsAllOfAttributesCheckDeposit getCheckDeposit() { + return checkDeposit; + } + + + @JsonProperty(JSON_PROPERTY_CHECK_DEPOSIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCheckDeposit(DepositLimitsAllOfAttributesCheckDeposit checkDeposit) { + this.checkDeposit = checkDeposit; + } + + + /** + * Return true if this DepositLimits_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DepositLimitsAllOfAttributes depositLimitsAllOfAttributes = (DepositLimitsAllOfAttributes) o; + return Objects.equals(this.ach, depositLimitsAllOfAttributes.ach) && + Objects.equals(this.card, depositLimitsAllOfAttributes.card) && + Objects.equals(this.checkDeposit, depositLimitsAllOfAttributes.checkDeposit); + } + + @Override + public int hashCode() { + return Objects.hash(ach, card, checkDeposit); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DepositLimitsAllOfAttributes {\n"); + sb.append(" ach: ").append(toIndentedString(ach)).append("\n"); + sb.append(" card: ").append(toIndentedString(card)).append("\n"); + sb.append(" checkDeposit: ").append(toIndentedString(checkDeposit)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `ach` to the URL query string + if (getAch() != null) { + joiner.add(getAch().toUrlQueryString(prefix + "ach" + suffix)); + } + + // add `card` to the URL query string + if (getCard() != null) { + joiner.add(getCard().toUrlQueryString(prefix + "card" + suffix)); + } + + // add `checkDeposit` to the URL query string + if (getCheckDeposit() != null) { + joiner.add(getCheckDeposit().toUrlQueryString(prefix + "checkDeposit" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesAch.java b/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesAch.java new file mode 100644 index 00000000..944de985 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesAch.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.DepositLimitsAllOfAttributesAchLimits; +import unit.java.sdk.model.DepositLimitsAllOfAttributesAchTotalsDaily; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DepositLimitsAllOfAttributesAch + */ +@JsonPropertyOrder({ + DepositLimitsAllOfAttributesAch.JSON_PROPERTY_LIMITS, + DepositLimitsAllOfAttributesAch.JSON_PROPERTY_TOTALS_DAILY, + DepositLimitsAllOfAttributesAch.JSON_PROPERTY_TOTALS_MONTHLY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DepositLimitsAllOfAttributesAch { + public static final String JSON_PROPERTY_LIMITS = "limits"; + private DepositLimitsAllOfAttributesAchLimits limits; + + public static final String JSON_PROPERTY_TOTALS_DAILY = "totalsDaily"; + private DepositLimitsAllOfAttributesAchTotalsDaily totalsDaily; + + public static final String JSON_PROPERTY_TOTALS_MONTHLY = "totalsMonthly"; + private DepositLimitsAllOfAttributesAchTotalsDaily totalsMonthly; + + public DepositLimitsAllOfAttributesAch() { + } + + public DepositLimitsAllOfAttributesAch limits(DepositLimitsAllOfAttributesAchLimits limits) { + this.limits = limits; + return this; + } + + /** + * Get limits + * @return limits + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DepositLimitsAllOfAttributesAchLimits getLimits() { + return limits; + } + + + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLimits(DepositLimitsAllOfAttributesAchLimits limits) { + this.limits = limits; + } + + + public DepositLimitsAllOfAttributesAch totalsDaily(DepositLimitsAllOfAttributesAchTotalsDaily totalsDaily) { + this.totalsDaily = totalsDaily; + return this; + } + + /** + * Get totalsDaily + * @return totalsDaily + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTALS_DAILY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DepositLimitsAllOfAttributesAchTotalsDaily getTotalsDaily() { + return totalsDaily; + } + + + @JsonProperty(JSON_PROPERTY_TOTALS_DAILY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalsDaily(DepositLimitsAllOfAttributesAchTotalsDaily totalsDaily) { + this.totalsDaily = totalsDaily; + } + + + public DepositLimitsAllOfAttributesAch totalsMonthly(DepositLimitsAllOfAttributesAchTotalsDaily totalsMonthly) { + this.totalsMonthly = totalsMonthly; + return this; + } + + /** + * Get totalsMonthly + * @return totalsMonthly + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTALS_MONTHLY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DepositLimitsAllOfAttributesAchTotalsDaily getTotalsMonthly() { + return totalsMonthly; + } + + + @JsonProperty(JSON_PROPERTY_TOTALS_MONTHLY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalsMonthly(DepositLimitsAllOfAttributesAchTotalsDaily totalsMonthly) { + this.totalsMonthly = totalsMonthly; + } + + + /** + * Return true if this DepositLimits_allOf_attributes_ach object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DepositLimitsAllOfAttributesAch depositLimitsAllOfAttributesAch = (DepositLimitsAllOfAttributesAch) o; + return Objects.equals(this.limits, depositLimitsAllOfAttributesAch.limits) && + Objects.equals(this.totalsDaily, depositLimitsAllOfAttributesAch.totalsDaily) && + Objects.equals(this.totalsMonthly, depositLimitsAllOfAttributesAch.totalsMonthly); + } + + @Override + public int hashCode() { + return Objects.hash(limits, totalsDaily, totalsMonthly); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DepositLimitsAllOfAttributesAch {\n"); + sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); + sb.append(" totalsDaily: ").append(toIndentedString(totalsDaily)).append("\n"); + sb.append(" totalsMonthly: ").append(toIndentedString(totalsMonthly)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `limits` to the URL query string + if (getLimits() != null) { + joiner.add(getLimits().toUrlQueryString(prefix + "limits" + suffix)); + } + + // add `totalsDaily` to the URL query string + if (getTotalsDaily() != null) { + joiner.add(getTotalsDaily().toUrlQueryString(prefix + "totalsDaily" + suffix)); + } + + // add `totalsMonthly` to the URL query string + if (getTotalsMonthly() != null) { + joiner.add(getTotalsMonthly().toUrlQueryString(prefix + "totalsMonthly" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesAchLimits.java b/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesAchLimits.java new file mode 100644 index 00000000..0f810aa3 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesAchLimits.java @@ -0,0 +1,331 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DepositLimitsAllOfAttributesAchLimits + */ +@JsonPropertyOrder({ + DepositLimitsAllOfAttributesAchLimits.JSON_PROPERTY_DAILY_DEBIT, + DepositLimitsAllOfAttributesAchLimits.JSON_PROPERTY_DAILY_CREDIT, + DepositLimitsAllOfAttributesAchLimits.JSON_PROPERTY_MONTHLY_DEBIT, + DepositLimitsAllOfAttributesAchLimits.JSON_PROPERTY_MONTHLY_DEBIT_SOFT, + DepositLimitsAllOfAttributesAchLimits.JSON_PROPERTY_DAILY_DEBIT_SOFT, + DepositLimitsAllOfAttributesAchLimits.JSON_PROPERTY_MONTHLY_CREDIT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DepositLimitsAllOfAttributesAchLimits { + public static final String JSON_PROPERTY_DAILY_DEBIT = "dailyDebit"; + private BigDecimal dailyDebit; + + public static final String JSON_PROPERTY_DAILY_CREDIT = "dailyCredit"; + private BigDecimal dailyCredit; + + public static final String JSON_PROPERTY_MONTHLY_DEBIT = "monthlyDebit"; + private BigDecimal monthlyDebit; + + public static final String JSON_PROPERTY_MONTHLY_DEBIT_SOFT = "monthlyDebitSoft"; + private BigDecimal monthlyDebitSoft; + + public static final String JSON_PROPERTY_DAILY_DEBIT_SOFT = "dailyDebitSoft"; + private BigDecimal dailyDebitSoft; + + public static final String JSON_PROPERTY_MONTHLY_CREDIT = "monthlyCredit"; + private BigDecimal monthlyCredit; + + public DepositLimitsAllOfAttributesAchLimits() { + } + + public DepositLimitsAllOfAttributesAchLimits dailyDebit(BigDecimal dailyDebit) { + this.dailyDebit = dailyDebit; + return this; + } + + /** + * Get dailyDebit + * @return dailyDebit + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DAILY_DEBIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getDailyDebit() { + return dailyDebit; + } + + + @JsonProperty(JSON_PROPERTY_DAILY_DEBIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDailyDebit(BigDecimal dailyDebit) { + this.dailyDebit = dailyDebit; + } + + + public DepositLimitsAllOfAttributesAchLimits dailyCredit(BigDecimal dailyCredit) { + this.dailyCredit = dailyCredit; + return this; + } + + /** + * Get dailyCredit + * @return dailyCredit + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DAILY_CREDIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getDailyCredit() { + return dailyCredit; + } + + + @JsonProperty(JSON_PROPERTY_DAILY_CREDIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDailyCredit(BigDecimal dailyCredit) { + this.dailyCredit = dailyCredit; + } + + + public DepositLimitsAllOfAttributesAchLimits monthlyDebit(BigDecimal monthlyDebit) { + this.monthlyDebit = monthlyDebit; + return this; + } + + /** + * Get monthlyDebit + * @return monthlyDebit + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MONTHLY_DEBIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getMonthlyDebit() { + return monthlyDebit; + } + + + @JsonProperty(JSON_PROPERTY_MONTHLY_DEBIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMonthlyDebit(BigDecimal monthlyDebit) { + this.monthlyDebit = monthlyDebit; + } + + + public DepositLimitsAllOfAttributesAchLimits monthlyDebitSoft(BigDecimal monthlyDebitSoft) { + this.monthlyDebitSoft = monthlyDebitSoft; + return this; + } + + /** + * Get monthlyDebitSoft + * @return monthlyDebitSoft + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONTHLY_DEBIT_SOFT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getMonthlyDebitSoft() { + return monthlyDebitSoft; + } + + + @JsonProperty(JSON_PROPERTY_MONTHLY_DEBIT_SOFT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMonthlyDebitSoft(BigDecimal monthlyDebitSoft) { + this.monthlyDebitSoft = monthlyDebitSoft; + } + + + public DepositLimitsAllOfAttributesAchLimits dailyDebitSoft(BigDecimal dailyDebitSoft) { + this.dailyDebitSoft = dailyDebitSoft; + return this; + } + + /** + * Get dailyDebitSoft + * @return dailyDebitSoft + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DAILY_DEBIT_SOFT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getDailyDebitSoft() { + return dailyDebitSoft; + } + + + @JsonProperty(JSON_PROPERTY_DAILY_DEBIT_SOFT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDailyDebitSoft(BigDecimal dailyDebitSoft) { + this.dailyDebitSoft = dailyDebitSoft; + } + + + public DepositLimitsAllOfAttributesAchLimits monthlyCredit(BigDecimal monthlyCredit) { + this.monthlyCredit = monthlyCredit; + return this; + } + + /** + * Get monthlyCredit + * @return monthlyCredit + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MONTHLY_CREDIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getMonthlyCredit() { + return monthlyCredit; + } + + + @JsonProperty(JSON_PROPERTY_MONTHLY_CREDIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMonthlyCredit(BigDecimal monthlyCredit) { + this.monthlyCredit = monthlyCredit; + } + + + /** + * Return true if this DepositLimits_allOf_attributes_ach_limits object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DepositLimitsAllOfAttributesAchLimits depositLimitsAllOfAttributesAchLimits = (DepositLimitsAllOfAttributesAchLimits) o; + return Objects.equals(this.dailyDebit, depositLimitsAllOfAttributesAchLimits.dailyDebit) && + Objects.equals(this.dailyCredit, depositLimitsAllOfAttributesAchLimits.dailyCredit) && + Objects.equals(this.monthlyDebit, depositLimitsAllOfAttributesAchLimits.monthlyDebit) && + Objects.equals(this.monthlyDebitSoft, depositLimitsAllOfAttributesAchLimits.monthlyDebitSoft) && + Objects.equals(this.dailyDebitSoft, depositLimitsAllOfAttributesAchLimits.dailyDebitSoft) && + Objects.equals(this.monthlyCredit, depositLimitsAllOfAttributesAchLimits.monthlyCredit); + } + + @Override + public int hashCode() { + return Objects.hash(dailyDebit, dailyCredit, monthlyDebit, monthlyDebitSoft, dailyDebitSoft, monthlyCredit); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DepositLimitsAllOfAttributesAchLimits {\n"); + sb.append(" dailyDebit: ").append(toIndentedString(dailyDebit)).append("\n"); + sb.append(" dailyCredit: ").append(toIndentedString(dailyCredit)).append("\n"); + sb.append(" monthlyDebit: ").append(toIndentedString(monthlyDebit)).append("\n"); + sb.append(" monthlyDebitSoft: ").append(toIndentedString(monthlyDebitSoft)).append("\n"); + sb.append(" dailyDebitSoft: ").append(toIndentedString(dailyDebitSoft)).append("\n"); + sb.append(" monthlyCredit: ").append(toIndentedString(monthlyCredit)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dailyDebit` to the URL query string + if (getDailyDebit() != null) { + joiner.add(String.format("%sdailyDebit%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDailyDebit()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dailyCredit` to the URL query string + if (getDailyCredit() != null) { + joiner.add(String.format("%sdailyCredit%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDailyCredit()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `monthlyDebit` to the URL query string + if (getMonthlyDebit() != null) { + joiner.add(String.format("%smonthlyDebit%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMonthlyDebit()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `monthlyDebitSoft` to the URL query string + if (getMonthlyDebitSoft() != null) { + joiner.add(String.format("%smonthlyDebitSoft%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMonthlyDebitSoft()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dailyDebitSoft` to the URL query string + if (getDailyDebitSoft() != null) { + joiner.add(String.format("%sdailyDebitSoft%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDailyDebitSoft()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `monthlyCredit` to the URL query string + if (getMonthlyCredit() != null) { + joiner.add(String.format("%smonthlyCredit%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMonthlyCredit()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesAchTotalsDaily.java b/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesAchTotalsDaily.java new file mode 100644 index 00000000..50a10e16 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesAchTotalsDaily.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DepositLimitsAllOfAttributesAchTotalsDaily + */ +@JsonPropertyOrder({ + DepositLimitsAllOfAttributesAchTotalsDaily.JSON_PROPERTY_DEBITS, + DepositLimitsAllOfAttributesAchTotalsDaily.JSON_PROPERTY_CREDITS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DepositLimitsAllOfAttributesAchTotalsDaily { + public static final String JSON_PROPERTY_DEBITS = "debits"; + private BigDecimal debits; + + public static final String JSON_PROPERTY_CREDITS = "credits"; + private BigDecimal credits; + + public DepositLimitsAllOfAttributesAchTotalsDaily() { + } + + public DepositLimitsAllOfAttributesAchTotalsDaily debits(BigDecimal debits) { + this.debits = debits; + return this; + } + + /** + * Get debits + * @return debits + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DEBITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getDebits() { + return debits; + } + + + @JsonProperty(JSON_PROPERTY_DEBITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDebits(BigDecimal debits) { + this.debits = debits; + } + + + public DepositLimitsAllOfAttributesAchTotalsDaily credits(BigDecimal credits) { + this.credits = credits; + return this; + } + + /** + * Get credits + * @return credits + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREDITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getCredits() { + return credits; + } + + + @JsonProperty(JSON_PROPERTY_CREDITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCredits(BigDecimal credits) { + this.credits = credits; + } + + + /** + * Return true if this DepositLimits_allOf_attributes_ach_totalsDaily object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DepositLimitsAllOfAttributesAchTotalsDaily depositLimitsAllOfAttributesAchTotalsDaily = (DepositLimitsAllOfAttributesAchTotalsDaily) o; + return Objects.equals(this.debits, depositLimitsAllOfAttributesAchTotalsDaily.debits) && + Objects.equals(this.credits, depositLimitsAllOfAttributesAchTotalsDaily.credits); + } + + @Override + public int hashCode() { + return Objects.hash(debits, credits); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DepositLimitsAllOfAttributesAchTotalsDaily {\n"); + sb.append(" debits: ").append(toIndentedString(debits)).append("\n"); + sb.append(" credits: ").append(toIndentedString(credits)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `debits` to the URL query string + if (getDebits() != null) { + joiner.add(String.format("%sdebits%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDebits()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `credits` to the URL query string + if (getCredits() != null) { + joiner.add(String.format("%scredits%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCredits()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCard.java b/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCard.java new file mode 100644 index 00000000..7a5ddb8f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCard.java @@ -0,0 +1,188 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.DepositLimitsAllOfAttributesCardLimits; +import unit.java.sdk.model.DepositLimitsAllOfAttributesCardTotalsDaily; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DepositLimitsAllOfAttributesCard + */ +@JsonPropertyOrder({ + DepositLimitsAllOfAttributesCard.JSON_PROPERTY_LIMITS, + DepositLimitsAllOfAttributesCard.JSON_PROPERTY_TOTALS_DAILY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DepositLimitsAllOfAttributesCard { + public static final String JSON_PROPERTY_LIMITS = "limits"; + private DepositLimitsAllOfAttributesCardLimits limits; + + public static final String JSON_PROPERTY_TOTALS_DAILY = "totalsDaily"; + private DepositLimitsAllOfAttributesCardTotalsDaily totalsDaily; + + public DepositLimitsAllOfAttributesCard() { + } + + public DepositLimitsAllOfAttributesCard limits(DepositLimitsAllOfAttributesCardLimits limits) { + this.limits = limits; + return this; + } + + /** + * Get limits + * @return limits + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DepositLimitsAllOfAttributesCardLimits getLimits() { + return limits; + } + + + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLimits(DepositLimitsAllOfAttributesCardLimits limits) { + this.limits = limits; + } + + + public DepositLimitsAllOfAttributesCard totalsDaily(DepositLimitsAllOfAttributesCardTotalsDaily totalsDaily) { + this.totalsDaily = totalsDaily; + return this; + } + + /** + * Get totalsDaily + * @return totalsDaily + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTALS_DAILY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DepositLimitsAllOfAttributesCardTotalsDaily getTotalsDaily() { + return totalsDaily; + } + + + @JsonProperty(JSON_PROPERTY_TOTALS_DAILY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalsDaily(DepositLimitsAllOfAttributesCardTotalsDaily totalsDaily) { + this.totalsDaily = totalsDaily; + } + + + /** + * Return true if this DepositLimits_allOf_attributes_card object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DepositLimitsAllOfAttributesCard depositLimitsAllOfAttributesCard = (DepositLimitsAllOfAttributesCard) o; + return Objects.equals(this.limits, depositLimitsAllOfAttributesCard.limits) && + Objects.equals(this.totalsDaily, depositLimitsAllOfAttributesCard.totalsDaily); + } + + @Override + public int hashCode() { + return Objects.hash(limits, totalsDaily); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DepositLimitsAllOfAttributesCard {\n"); + sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); + sb.append(" totalsDaily: ").append(toIndentedString(totalsDaily)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `limits` to the URL query string + if (getLimits() != null) { + joiner.add(getLimits().toUrlQueryString(prefix + "limits" + suffix)); + } + + // add `totalsDaily` to the URL query string + if (getTotalsDaily() != null) { + joiner.add(getTotalsDaily().toUrlQueryString(prefix + "totalsDaily" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCardLimits.java b/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCardLimits.java new file mode 100644 index 00000000..50bbbf94 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCardLimits.java @@ -0,0 +1,259 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DepositLimitsAllOfAttributesCardLimits + */ +@JsonPropertyOrder({ + DepositLimitsAllOfAttributesCardLimits.JSON_PROPERTY_DAILY_WITHDRAWAL, + DepositLimitsAllOfAttributesCardLimits.JSON_PROPERTY_DAILY_DEPOSIT, + DepositLimitsAllOfAttributesCardLimits.JSON_PROPERTY_DAILY_PURCHASE, + DepositLimitsAllOfAttributesCardLimits.JSON_PROPERTY_DAILY_CARD_TRANSACTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DepositLimitsAllOfAttributesCardLimits { + public static final String JSON_PROPERTY_DAILY_WITHDRAWAL = "dailyWithdrawal"; + private BigDecimal dailyWithdrawal; + + public static final String JSON_PROPERTY_DAILY_DEPOSIT = "dailyDeposit"; + private BigDecimal dailyDeposit; + + public static final String JSON_PROPERTY_DAILY_PURCHASE = "dailyPurchase"; + private BigDecimal dailyPurchase; + + public static final String JSON_PROPERTY_DAILY_CARD_TRANSACTION = "dailyCardTransaction"; + private BigDecimal dailyCardTransaction; + + public DepositLimitsAllOfAttributesCardLimits() { + } + + public DepositLimitsAllOfAttributesCardLimits dailyWithdrawal(BigDecimal dailyWithdrawal) { + this.dailyWithdrawal = dailyWithdrawal; + return this; + } + + /** + * Get dailyWithdrawal + * @return dailyWithdrawal + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DAILY_WITHDRAWAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getDailyWithdrawal() { + return dailyWithdrawal; + } + + + @JsonProperty(JSON_PROPERTY_DAILY_WITHDRAWAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDailyWithdrawal(BigDecimal dailyWithdrawal) { + this.dailyWithdrawal = dailyWithdrawal; + } + + + public DepositLimitsAllOfAttributesCardLimits dailyDeposit(BigDecimal dailyDeposit) { + this.dailyDeposit = dailyDeposit; + return this; + } + + /** + * Get dailyDeposit + * @return dailyDeposit + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DAILY_DEPOSIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getDailyDeposit() { + return dailyDeposit; + } + + + @JsonProperty(JSON_PROPERTY_DAILY_DEPOSIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDailyDeposit(BigDecimal dailyDeposit) { + this.dailyDeposit = dailyDeposit; + } + + + public DepositLimitsAllOfAttributesCardLimits dailyPurchase(BigDecimal dailyPurchase) { + this.dailyPurchase = dailyPurchase; + return this; + } + + /** + * Get dailyPurchase + * @return dailyPurchase + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DAILY_PURCHASE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getDailyPurchase() { + return dailyPurchase; + } + + + @JsonProperty(JSON_PROPERTY_DAILY_PURCHASE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDailyPurchase(BigDecimal dailyPurchase) { + this.dailyPurchase = dailyPurchase; + } + + + public DepositLimitsAllOfAttributesCardLimits dailyCardTransaction(BigDecimal dailyCardTransaction) { + this.dailyCardTransaction = dailyCardTransaction; + return this; + } + + /** + * Get dailyCardTransaction + * @return dailyCardTransaction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DAILY_CARD_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getDailyCardTransaction() { + return dailyCardTransaction; + } + + + @JsonProperty(JSON_PROPERTY_DAILY_CARD_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDailyCardTransaction(BigDecimal dailyCardTransaction) { + this.dailyCardTransaction = dailyCardTransaction; + } + + + /** + * Return true if this DepositLimits_allOf_attributes_card_limits object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DepositLimitsAllOfAttributesCardLimits depositLimitsAllOfAttributesCardLimits = (DepositLimitsAllOfAttributesCardLimits) o; + return Objects.equals(this.dailyWithdrawal, depositLimitsAllOfAttributesCardLimits.dailyWithdrawal) && + Objects.equals(this.dailyDeposit, depositLimitsAllOfAttributesCardLimits.dailyDeposit) && + Objects.equals(this.dailyPurchase, depositLimitsAllOfAttributesCardLimits.dailyPurchase) && + Objects.equals(this.dailyCardTransaction, depositLimitsAllOfAttributesCardLimits.dailyCardTransaction); + } + + @Override + public int hashCode() { + return Objects.hash(dailyWithdrawal, dailyDeposit, dailyPurchase, dailyCardTransaction); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DepositLimitsAllOfAttributesCardLimits {\n"); + sb.append(" dailyWithdrawal: ").append(toIndentedString(dailyWithdrawal)).append("\n"); + sb.append(" dailyDeposit: ").append(toIndentedString(dailyDeposit)).append("\n"); + sb.append(" dailyPurchase: ").append(toIndentedString(dailyPurchase)).append("\n"); + sb.append(" dailyCardTransaction: ").append(toIndentedString(dailyCardTransaction)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dailyWithdrawal` to the URL query string + if (getDailyWithdrawal() != null) { + joiner.add(String.format("%sdailyWithdrawal%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDailyWithdrawal()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dailyDeposit` to the URL query string + if (getDailyDeposit() != null) { + joiner.add(String.format("%sdailyDeposit%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDailyDeposit()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dailyPurchase` to the URL query string + if (getDailyPurchase() != null) { + joiner.add(String.format("%sdailyPurchase%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDailyPurchase()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dailyCardTransaction` to the URL query string + if (getDailyCardTransaction() != null) { + joiner.add(String.format("%sdailyCardTransaction%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDailyCardTransaction()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCardTotalsDaily.java b/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCardTotalsDaily.java new file mode 100644 index 00000000..e0a9d763 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCardTotalsDaily.java @@ -0,0 +1,259 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DepositLimitsAllOfAttributesCardTotalsDaily + */ +@JsonPropertyOrder({ + DepositLimitsAllOfAttributesCardTotalsDaily.JSON_PROPERTY_WITHDRAWALS, + DepositLimitsAllOfAttributesCardTotalsDaily.JSON_PROPERTY_DEPOSITS, + DepositLimitsAllOfAttributesCardTotalsDaily.JSON_PROPERTY_PURCHASES, + DepositLimitsAllOfAttributesCardTotalsDaily.JSON_PROPERTY_CARD_TRANSACTIONS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DepositLimitsAllOfAttributesCardTotalsDaily { + public static final String JSON_PROPERTY_WITHDRAWALS = "withdrawals"; + private BigDecimal withdrawals; + + public static final String JSON_PROPERTY_DEPOSITS = "deposits"; + private BigDecimal deposits; + + public static final String JSON_PROPERTY_PURCHASES = "purchases"; + private BigDecimal purchases; + + public static final String JSON_PROPERTY_CARD_TRANSACTIONS = "cardTransactions"; + private BigDecimal cardTransactions; + + public DepositLimitsAllOfAttributesCardTotalsDaily() { + } + + public DepositLimitsAllOfAttributesCardTotalsDaily withdrawals(BigDecimal withdrawals) { + this.withdrawals = withdrawals; + return this; + } + + /** + * Get withdrawals + * @return withdrawals + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WITHDRAWALS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getWithdrawals() { + return withdrawals; + } + + + @JsonProperty(JSON_PROPERTY_WITHDRAWALS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWithdrawals(BigDecimal withdrawals) { + this.withdrawals = withdrawals; + } + + + public DepositLimitsAllOfAttributesCardTotalsDaily deposits(BigDecimal deposits) { + this.deposits = deposits; + return this; + } + + /** + * Get deposits + * @return deposits + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DEPOSITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getDeposits() { + return deposits; + } + + + @JsonProperty(JSON_PROPERTY_DEPOSITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDeposits(BigDecimal deposits) { + this.deposits = deposits; + } + + + public DepositLimitsAllOfAttributesCardTotalsDaily purchases(BigDecimal purchases) { + this.purchases = purchases; + return this; + } + + /** + * Get purchases + * @return purchases + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PURCHASES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getPurchases() { + return purchases; + } + + + @JsonProperty(JSON_PROPERTY_PURCHASES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPurchases(BigDecimal purchases) { + this.purchases = purchases; + } + + + public DepositLimitsAllOfAttributesCardTotalsDaily cardTransactions(BigDecimal cardTransactions) { + this.cardTransactions = cardTransactions; + return this; + } + + /** + * Get cardTransactions + * @return cardTransactions + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CARD_TRANSACTIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getCardTransactions() { + return cardTransactions; + } + + + @JsonProperty(JSON_PROPERTY_CARD_TRANSACTIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCardTransactions(BigDecimal cardTransactions) { + this.cardTransactions = cardTransactions; + } + + + /** + * Return true if this DepositLimits_allOf_attributes_card_totalsDaily object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DepositLimitsAllOfAttributesCardTotalsDaily depositLimitsAllOfAttributesCardTotalsDaily = (DepositLimitsAllOfAttributesCardTotalsDaily) o; + return Objects.equals(this.withdrawals, depositLimitsAllOfAttributesCardTotalsDaily.withdrawals) && + Objects.equals(this.deposits, depositLimitsAllOfAttributesCardTotalsDaily.deposits) && + Objects.equals(this.purchases, depositLimitsAllOfAttributesCardTotalsDaily.purchases) && + Objects.equals(this.cardTransactions, depositLimitsAllOfAttributesCardTotalsDaily.cardTransactions); + } + + @Override + public int hashCode() { + return Objects.hash(withdrawals, deposits, purchases, cardTransactions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DepositLimitsAllOfAttributesCardTotalsDaily {\n"); + sb.append(" withdrawals: ").append(toIndentedString(withdrawals)).append("\n"); + sb.append(" deposits: ").append(toIndentedString(deposits)).append("\n"); + sb.append(" purchases: ").append(toIndentedString(purchases)).append("\n"); + sb.append(" cardTransactions: ").append(toIndentedString(cardTransactions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `withdrawals` to the URL query string + if (getWithdrawals() != null) { + joiner.add(String.format("%swithdrawals%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getWithdrawals()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `deposits` to the URL query string + if (getDeposits() != null) { + joiner.add(String.format("%sdeposits%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDeposits()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `purchases` to the URL query string + if (getPurchases() != null) { + joiner.add(String.format("%spurchases%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPurchases()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardTransactions` to the URL query string + if (getCardTransactions() != null) { + joiner.add(String.format("%scardTransactions%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardTransactions()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCheckDeposit.java b/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCheckDeposit.java new file mode 100644 index 00000000..e2fa9f04 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCheckDeposit.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import unit.java.sdk.model.DepositLimitsAllOfAttributesCheckDepositLimits; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DepositLimitsAllOfAttributesCheckDeposit + */ +@JsonPropertyOrder({ + DepositLimitsAllOfAttributesCheckDeposit.JSON_PROPERTY_LIMITS, + DepositLimitsAllOfAttributesCheckDeposit.JSON_PROPERTY_TOTALS_DAILY, + DepositLimitsAllOfAttributesCheckDeposit.JSON_PROPERTY_TOTALS_MONTHLY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DepositLimitsAllOfAttributesCheckDeposit { + public static final String JSON_PROPERTY_LIMITS = "limits"; + private DepositLimitsAllOfAttributesCheckDepositLimits limits; + + public static final String JSON_PROPERTY_TOTALS_DAILY = "totalsDaily"; + private BigDecimal totalsDaily; + + public static final String JSON_PROPERTY_TOTALS_MONTHLY = "totalsMonthly"; + private BigDecimal totalsMonthly; + + public DepositLimitsAllOfAttributesCheckDeposit() { + } + + public DepositLimitsAllOfAttributesCheckDeposit limits(DepositLimitsAllOfAttributesCheckDepositLimits limits) { + this.limits = limits; + return this; + } + + /** + * Get limits + * @return limits + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DepositLimitsAllOfAttributesCheckDepositLimits getLimits() { + return limits; + } + + + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLimits(DepositLimitsAllOfAttributesCheckDepositLimits limits) { + this.limits = limits; + } + + + public DepositLimitsAllOfAttributesCheckDeposit totalsDaily(BigDecimal totalsDaily) { + this.totalsDaily = totalsDaily; + return this; + } + + /** + * Get totalsDaily + * @return totalsDaily + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTALS_DAILY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getTotalsDaily() { + return totalsDaily; + } + + + @JsonProperty(JSON_PROPERTY_TOTALS_DAILY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalsDaily(BigDecimal totalsDaily) { + this.totalsDaily = totalsDaily; + } + + + public DepositLimitsAllOfAttributesCheckDeposit totalsMonthly(BigDecimal totalsMonthly) { + this.totalsMonthly = totalsMonthly; + return this; + } + + /** + * Get totalsMonthly + * @return totalsMonthly + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTALS_MONTHLY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getTotalsMonthly() { + return totalsMonthly; + } + + + @JsonProperty(JSON_PROPERTY_TOTALS_MONTHLY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalsMonthly(BigDecimal totalsMonthly) { + this.totalsMonthly = totalsMonthly; + } + + + /** + * Return true if this DepositLimits_allOf_attributes_checkDeposit object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DepositLimitsAllOfAttributesCheckDeposit depositLimitsAllOfAttributesCheckDeposit = (DepositLimitsAllOfAttributesCheckDeposit) o; + return Objects.equals(this.limits, depositLimitsAllOfAttributesCheckDeposit.limits) && + Objects.equals(this.totalsDaily, depositLimitsAllOfAttributesCheckDeposit.totalsDaily) && + Objects.equals(this.totalsMonthly, depositLimitsAllOfAttributesCheckDeposit.totalsMonthly); + } + + @Override + public int hashCode() { + return Objects.hash(limits, totalsDaily, totalsMonthly); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DepositLimitsAllOfAttributesCheckDeposit {\n"); + sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); + sb.append(" totalsDaily: ").append(toIndentedString(totalsDaily)).append("\n"); + sb.append(" totalsMonthly: ").append(toIndentedString(totalsMonthly)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `limits` to the URL query string + if (getLimits() != null) { + joiner.add(getLimits().toUrlQueryString(prefix + "limits" + suffix)); + } + + // add `totalsDaily` to the URL query string + if (getTotalsDaily() != null) { + joiner.add(String.format("%stotalsDaily%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTotalsDaily()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `totalsMonthly` to the URL query string + if (getTotalsMonthly() != null) { + joiner.add(String.format("%stotalsMonthly%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTotalsMonthly()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCheckDepositLimits.java b/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCheckDepositLimits.java new file mode 100644 index 00000000..0244116a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCheckDepositLimits.java @@ -0,0 +1,259 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DepositLimitsAllOfAttributesCheckDepositLimits + */ +@JsonPropertyOrder({ + DepositLimitsAllOfAttributesCheckDepositLimits.JSON_PROPERTY_DAILY, + DepositLimitsAllOfAttributesCheckDepositLimits.JSON_PROPERTY_MONTHLY, + DepositLimitsAllOfAttributesCheckDepositLimits.JSON_PROPERTY_DAILY_SOFT, + DepositLimitsAllOfAttributesCheckDepositLimits.JSON_PROPERTY_MONTHLY_SOFT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DepositLimitsAllOfAttributesCheckDepositLimits { + public static final String JSON_PROPERTY_DAILY = "daily"; + private BigDecimal daily; + + public static final String JSON_PROPERTY_MONTHLY = "monthly"; + private BigDecimal monthly; + + public static final String JSON_PROPERTY_DAILY_SOFT = "dailySoft"; + private BigDecimal dailySoft; + + public static final String JSON_PROPERTY_MONTHLY_SOFT = "monthlySoft"; + private BigDecimal monthlySoft; + + public DepositLimitsAllOfAttributesCheckDepositLimits() { + } + + public DepositLimitsAllOfAttributesCheckDepositLimits daily(BigDecimal daily) { + this.daily = daily; + return this; + } + + /** + * Get daily + * @return daily + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DAILY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getDaily() { + return daily; + } + + + @JsonProperty(JSON_PROPERTY_DAILY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDaily(BigDecimal daily) { + this.daily = daily; + } + + + public DepositLimitsAllOfAttributesCheckDepositLimits monthly(BigDecimal monthly) { + this.monthly = monthly; + return this; + } + + /** + * Get monthly + * @return monthly + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MONTHLY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getMonthly() { + return monthly; + } + + + @JsonProperty(JSON_PROPERTY_MONTHLY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMonthly(BigDecimal monthly) { + this.monthly = monthly; + } + + + public DepositLimitsAllOfAttributesCheckDepositLimits dailySoft(BigDecimal dailySoft) { + this.dailySoft = dailySoft; + return this; + } + + /** + * Get dailySoft + * @return dailySoft + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DAILY_SOFT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getDailySoft() { + return dailySoft; + } + + + @JsonProperty(JSON_PROPERTY_DAILY_SOFT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDailySoft(BigDecimal dailySoft) { + this.dailySoft = dailySoft; + } + + + public DepositLimitsAllOfAttributesCheckDepositLimits monthlySoft(BigDecimal monthlySoft) { + this.monthlySoft = monthlySoft; + return this; + } + + /** + * Get monthlySoft + * @return monthlySoft + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MONTHLY_SOFT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getMonthlySoft() { + return monthlySoft; + } + + + @JsonProperty(JSON_PROPERTY_MONTHLY_SOFT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMonthlySoft(BigDecimal monthlySoft) { + this.monthlySoft = monthlySoft; + } + + + /** + * Return true if this DepositLimits_allOf_attributes_checkDeposit_limits object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DepositLimitsAllOfAttributesCheckDepositLimits depositLimitsAllOfAttributesCheckDepositLimits = (DepositLimitsAllOfAttributesCheckDepositLimits) o; + return Objects.equals(this.daily, depositLimitsAllOfAttributesCheckDepositLimits.daily) && + Objects.equals(this.monthly, depositLimitsAllOfAttributesCheckDepositLimits.monthly) && + Objects.equals(this.dailySoft, depositLimitsAllOfAttributesCheckDepositLimits.dailySoft) && + Objects.equals(this.monthlySoft, depositLimitsAllOfAttributesCheckDepositLimits.monthlySoft); + } + + @Override + public int hashCode() { + return Objects.hash(daily, monthly, dailySoft, monthlySoft); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DepositLimitsAllOfAttributesCheckDepositLimits {\n"); + sb.append(" daily: ").append(toIndentedString(daily)).append("\n"); + sb.append(" monthly: ").append(toIndentedString(monthly)).append("\n"); + sb.append(" dailySoft: ").append(toIndentedString(dailySoft)).append("\n"); + sb.append(" monthlySoft: ").append(toIndentedString(monthlySoft)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `daily` to the URL query string + if (getDaily() != null) { + joiner.add(String.format("%sdaily%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDaily()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `monthly` to the URL query string + if (getMonthly() != null) { + joiner.add(String.format("%smonthly%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMonthly()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dailySoft` to the URL query string + if (getDailySoft() != null) { + joiner.add(String.format("%sdailySoft%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDailySoft()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `monthlySoft` to the URL query string + if (getMonthlySoft() != null) { + joiner.add(String.format("%smonthlySoft%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMonthlySoft()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DeviceFingerprint.java b/src/main/java/unit/java/sdk/model/DeviceFingerprint.java new file mode 100644 index 00000000..f13a1a25 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DeviceFingerprint.java @@ -0,0 +1,219 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DeviceFingerprint + */ +@JsonPropertyOrder({ + DeviceFingerprint.JSON_PROPERTY_PROVIDER, + DeviceFingerprint.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeviceFingerprint { + /** + * Gets or Sets provider + */ + public enum ProviderEnum { + IOVATION("iovation"); + + private String value; + + ProviderEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ProviderEnum fromValue(String value) { + for (ProviderEnum b : ProviderEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PROVIDER = "provider"; + private ProviderEnum provider; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public DeviceFingerprint() { + } + + public DeviceFingerprint provider(ProviderEnum provider) { + this.provider = provider; + return this; + } + + /** + * Get provider + * @return provider + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ProviderEnum getProvider() { + return provider; + } + + + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProvider(ProviderEnum provider) { + this.provider = provider; + } + + + public DeviceFingerprint value(String value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(String value) { + this.value = value; + } + + + /** + * Return true if this deviceFingerprint object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeviceFingerprint deviceFingerprint = (DeviceFingerprint) o; + return Objects.equals(this.provider, deviceFingerprint.provider) && + Objects.equals(this.value, deviceFingerprint.value); + } + + @Override + public int hashCode() { + return Objects.hash(provider, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeviceFingerprint {\n"); + sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `provider` to the URL query string + if (getProvider() != null) { + joiner.add(String.format("%sprovider%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getProvider()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add(String.format("%svalue%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getValue()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DishonoredAchTransaction.java b/src/main/java/unit/java/sdk/model/DishonoredAchTransaction.java new file mode 100644 index 00000000..63b5775e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DishonoredAchTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.DishonoredAchTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * DishonoredAchTransaction + */ +@JsonPropertyOrder({ + DishonoredAchTransaction.JSON_PROPERTY_ATTRIBUTES, + DishonoredAchTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class DishonoredAchTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DishonoredAchTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public DishonoredAchTransaction() { + } + + public DishonoredAchTransaction attributes(DishonoredAchTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DishonoredAchTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(DishonoredAchTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public DishonoredAchTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public DishonoredAchTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public DishonoredAchTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this DishonoredAchTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DishonoredAchTransaction dishonoredAchTransaction = (DishonoredAchTransaction) o; + return Objects.equals(this.attributes, dishonoredAchTransaction.attributes) && + Objects.equals(this.relationships, dishonoredAchTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DishonoredAchTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DishonoredAchTransaction", DishonoredAchTransaction.class); + JSON.registerDiscriminator(DishonoredAchTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/DishonoredAchTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/DishonoredAchTransactionAllOfAttributes.java new file mode 100644 index 00000000..62dfd04d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DishonoredAchTransactionAllOfAttributes.java @@ -0,0 +1,618 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DishonoredAchTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + DishonoredAchTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + DishonoredAchTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + DishonoredAchTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + DishonoredAchTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + DishonoredAchTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + DishonoredAchTransactionAllOfAttributes.JSON_PROPERTY_DESCRIPTION, + DishonoredAchTransactionAllOfAttributes.JSON_PROPERTY_COMPANY_NAME, + DishonoredAchTransactionAllOfAttributes.JSON_PROPERTY_COUNTERPARTY_NAME, + DishonoredAchTransactionAllOfAttributes.JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER, + DishonoredAchTransactionAllOfAttributes.JSON_PROPERTY_TRACE_NUMBER, + DishonoredAchTransactionAllOfAttributes.JSON_PROPERTY_REASON, + DishonoredAchTransactionAllOfAttributes.JSON_PROPERTY_SEC_CODE, + DishonoredAchTransactionAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DishonoredAchTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_COMPANY_NAME = "companyName"; + private String companyName; + + public static final String JSON_PROPERTY_COUNTERPARTY_NAME = "counterpartyName"; + private String counterpartyName; + + public static final String JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER = "counterpartyRoutingNumber"; + private String counterpartyRoutingNumber; + + public static final String JSON_PROPERTY_TRACE_NUMBER = "traceNumber"; + private String traceNumber; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public static final String JSON_PROPERTY_SEC_CODE = "secCode"; + private String secCode; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public DishonoredAchTransactionAllOfAttributes() { + } + + public DishonoredAchTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public DishonoredAchTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public DishonoredAchTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public DishonoredAchTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public DishonoredAchTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public DishonoredAchTransactionAllOfAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public DishonoredAchTransactionAllOfAttributes companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * Get companyName + * @return companyName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPANY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCompanyName() { + return companyName; + } + + + @JsonProperty(JSON_PROPERTY_COMPANY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public DishonoredAchTransactionAllOfAttributes counterpartyName(String counterpartyName) { + this.counterpartyName = counterpartyName; + return this; + } + + /** + * Get counterpartyName + * @return counterpartyName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCounterpartyName() { + return counterpartyName; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterpartyName(String counterpartyName) { + this.counterpartyName = counterpartyName; + } + + + public DishonoredAchTransactionAllOfAttributes counterpartyRoutingNumber(String counterpartyRoutingNumber) { + this.counterpartyRoutingNumber = counterpartyRoutingNumber; + return this; + } + + /** + * Get counterpartyRoutingNumber + * @return counterpartyRoutingNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCounterpartyRoutingNumber() { + return counterpartyRoutingNumber; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCounterpartyRoutingNumber(String counterpartyRoutingNumber) { + this.counterpartyRoutingNumber = counterpartyRoutingNumber; + } + + + public DishonoredAchTransactionAllOfAttributes traceNumber(String traceNumber) { + this.traceNumber = traceNumber; + return this; + } + + /** + * Get traceNumber + * @return traceNumber + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTraceNumber() { + return traceNumber; + } + + + @JsonProperty(JSON_PROPERTY_TRACE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTraceNumber(String traceNumber) { + this.traceNumber = traceNumber; + } + + + public DishonoredAchTransactionAllOfAttributes reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(String reason) { + this.reason = reason; + } + + + public DishonoredAchTransactionAllOfAttributes secCode(String secCode) { + this.secCode = secCode; + return this; + } + + /** + * Get secCode + * @return secCode + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEC_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSecCode() { + return secCode; + } + + + @JsonProperty(JSON_PROPERTY_SEC_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSecCode(String secCode) { + this.secCode = secCode; + } + + + public DishonoredAchTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this DishonoredAchTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DishonoredAchTransactionAllOfAttributes dishonoredAchTransactionAllOfAttributes = (DishonoredAchTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, dishonoredAchTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, dishonoredAchTransactionAllOfAttributes.direction) && + Objects.equals(this.amount, dishonoredAchTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, dishonoredAchTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, dishonoredAchTransactionAllOfAttributes.summary) && + Objects.equals(this.description, dishonoredAchTransactionAllOfAttributes.description) && + Objects.equals(this.companyName, dishonoredAchTransactionAllOfAttributes.companyName) && + Objects.equals(this.counterpartyName, dishonoredAchTransactionAllOfAttributes.counterpartyName) && + Objects.equals(this.counterpartyRoutingNumber, dishonoredAchTransactionAllOfAttributes.counterpartyRoutingNumber) && + Objects.equals(this.traceNumber, dishonoredAchTransactionAllOfAttributes.traceNumber) && + Objects.equals(this.reason, dishonoredAchTransactionAllOfAttributes.reason) && + Objects.equals(this.secCode, dishonoredAchTransactionAllOfAttributes.secCode) && + Objects.equals(this.tags, dishonoredAchTransactionAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, amount, balance, summary, description, companyName, counterpartyName, counterpartyRoutingNumber, traceNumber, reason, secCode, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DishonoredAchTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" counterpartyName: ").append(toIndentedString(counterpartyName)).append("\n"); + sb.append(" counterpartyRoutingNumber: ").append(toIndentedString(counterpartyRoutingNumber)).append("\n"); + sb.append(" traceNumber: ").append(toIndentedString(traceNumber)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" secCode: ").append(toIndentedString(secCode)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `companyName` to the URL query string + if (getCompanyName() != null) { + joiner.add(String.format("%scompanyName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCompanyName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterpartyName` to the URL query string + if (getCounterpartyName() != null) { + joiner.add(String.format("%scounterpartyName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCounterpartyName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterpartyRoutingNumber` to the URL query string + if (getCounterpartyRoutingNumber() != null) { + joiner.add(String.format("%scounterpartyRoutingNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCounterpartyRoutingNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `traceNumber` to the URL query string + if (getTraceNumber() != null) { + joiner.add(String.format("%straceNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTraceNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `secCode` to the URL query string + if (getSecCode() != null) { + joiner.add(String.format("%ssecCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSecCode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Dispute.java b/src/main/java/unit/java/sdk/model/Dispute.java new file mode 100644 index 00000000..38734e49 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Dispute.java @@ -0,0 +1,260 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.DisputeAttributes; +import unit.java.sdk.model.DisputeRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Dispute + */ +@JsonPropertyOrder({ + Dispute.JSON_PROPERTY_TYPE, + Dispute.JSON_PROPERTY_ID, + Dispute.JSON_PROPERTY_ATTRIBUTES, + Dispute.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Dispute { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "dispute"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DisputeAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private DisputeRelationships relationships; + + public Dispute() { + } + + public Dispute type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public Dispute id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + public Dispute attributes(DisputeAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DisputeAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(DisputeAttributes attributes) { + this.attributes = attributes; + } + + + public Dispute relationships(DisputeRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DisputeRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(DisputeRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this dispute object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Dispute dispute = (Dispute) o; + return Objects.equals(this.type, dispute.type) && + Objects.equals(this.id, dispute.id) && + Objects.equals(this.attributes, dispute.attributes) && + Objects.equals(this.relationships, dispute.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Dispute {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DisputeAttributes.java b/src/main/java/unit/java/sdk/model/DisputeAttributes.java new file mode 100644 index 00000000..66feb786 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DisputeAttributes.java @@ -0,0 +1,490 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.DisputeAttributesStatusHistoryInner; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DisputeAttributes + */ +@JsonPropertyOrder({ + DisputeAttributes.JSON_PROPERTY_SOURCE, + DisputeAttributes.JSON_PROPERTY_EXTERNAL_ID, + DisputeAttributes.JSON_PROPERTY_LINK, + DisputeAttributes.JSON_PROPERTY_DESCRIPTION, + DisputeAttributes.JSON_PROPERTY_AMOUNT, + DisputeAttributes.JSON_PROPERTY_STATUS, + DisputeAttributes.JSON_PROPERTY_STATUS_HISTORY, + DisputeAttributes.JSON_PROPERTY_CREATED_AT, + DisputeAttributes.JSON_PROPERTY_DECISION_REASON +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisputeAttributes { + /** + * Gets or Sets source + */ + public enum SourceEnum { + DEBITCARD("DebitCard"), + + ACH("ACH"); + + private String value; + + SourceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceEnum fromValue(String value) { + for (SourceEnum b : SourceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE = "source"; + private SourceEnum source; + + public static final String JSON_PROPERTY_EXTERNAL_ID = "externalId"; + private String externalId; + + public static final String JSON_PROPERTY_LINK = "link"; + private String link; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_STATUS_HISTORY = "statusHistory"; + private List statusHistory; + + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DECISION_REASON = "decisionReason"; + private String decisionReason; + + public DisputeAttributes() { + } + + public DisputeAttributes source(SourceEnum source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SourceEnum getSource() { + return source; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSource(SourceEnum source) { + this.source = source; + } + + + public DisputeAttributes externalId(String externalId) { + this.externalId = externalId; + return this; + } + + /** + * Get externalId + * @return externalId + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getExternalId() { + return externalId; + } + + + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExternalId(String externalId) { + this.externalId = externalId; + } + + + public DisputeAttributes link(String link) { + this.link = link; + return this; + } + + /** + * Get link + * @return link + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLink() { + return link; + } + + + @JsonProperty(JSON_PROPERTY_LINK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLink(String link) { + this.link = link; + } + + + public DisputeAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public DisputeAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public DisputeAttributes status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(String status) { + this.status = status; + } + + + public DisputeAttributes statusHistory(List statusHistory) { + this.statusHistory = statusHistory; + return this; + } + + public DisputeAttributes addStatusHistoryItem(DisputeAttributesStatusHistoryInner statusHistoryItem) { + if (this.statusHistory == null) { + this.statusHistory = new ArrayList<>(); + } + this.statusHistory.add(statusHistoryItem); + return this; + } + + /** + * Get statusHistory + * @return statusHistory + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_HISTORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getStatusHistory() { + return statusHistory; + } + + + @JsonProperty(JSON_PROPERTY_STATUS_HISTORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatusHistory(List statusHistory) { + this.statusHistory = statusHistory; + } + + + public DisputeAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public DisputeAttributes decisionReason(String decisionReason) { + this.decisionReason = decisionReason; + return this; + } + + /** + * Get decisionReason + * @return decisionReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECISION_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDecisionReason() { + return decisionReason; + } + + + @JsonProperty(JSON_PROPERTY_DECISION_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecisionReason(String decisionReason) { + this.decisionReason = decisionReason; + } + + + /** + * Return true if this dispute_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisputeAttributes disputeAttributes = (DisputeAttributes) o; + return Objects.equals(this.source, disputeAttributes.source) && + Objects.equals(this.externalId, disputeAttributes.externalId) && + Objects.equals(this.link, disputeAttributes.link) && + Objects.equals(this.description, disputeAttributes.description) && + Objects.equals(this.amount, disputeAttributes.amount) && + Objects.equals(this.status, disputeAttributes.status) && + Objects.equals(this.statusHistory, disputeAttributes.statusHistory) && + Objects.equals(this.createdAt, disputeAttributes.createdAt) && + Objects.equals(this.decisionReason, disputeAttributes.decisionReason); + } + + @Override + public int hashCode() { + return Objects.hash(source, externalId, link, description, amount, status, statusHistory, createdAt, decisionReason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisputeAttributes {\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); + sb.append(" link: ").append(toIndentedString(link)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" statusHistory: ").append(toIndentedString(statusHistory)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" decisionReason: ").append(toIndentedString(decisionReason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(String.format("%ssource%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSource()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `externalId` to the URL query string + if (getExternalId() != null) { + joiner.add(String.format("%sexternalId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getExternalId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `link` to the URL query string + if (getLink() != null) { + joiner.add(String.format("%slink%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLink()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `statusHistory` to the URL query string + if (getStatusHistory() != null) { + for (int i = 0; i < getStatusHistory().size(); i++) { + if (getStatusHistory().get(i) != null) { + joiner.add(getStatusHistory().get(i).toUrlQueryString(String.format("%sstatusHistory%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `decisionReason` to the URL query string + if (getDecisionReason() != null) { + joiner.add(String.format("%sdecisionReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDecisionReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DisputeAttributesStatusHistoryInner.java b/src/main/java/unit/java/sdk/model/DisputeAttributesStatusHistoryInner.java new file mode 100644 index 00000000..cfe5053c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DisputeAttributesStatusHistoryInner.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DisputeAttributesStatusHistoryInner + */ +@JsonPropertyOrder({ + DisputeAttributesStatusHistoryInner.JSON_PROPERTY_TYPE, + DisputeAttributesStatusHistoryInner.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisputeAttributesStatusHistoryInner { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public DisputeAttributesStatusHistoryInner() { + } + + public DisputeAttributesStatusHistoryInner type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public DisputeAttributesStatusHistoryInner updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + /** + * Return true if this dispute_attributes_statusHistory_inner object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisputeAttributesStatusHistoryInner disputeAttributesStatusHistoryInner = (DisputeAttributesStatusHistoryInner) o; + return Objects.equals(this.type, disputeAttributesStatusHistoryInner.type) && + Objects.equals(this.updatedAt, disputeAttributesStatusHistoryInner.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(type, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisputeAttributesStatusHistoryInner {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DisputeRelationships.java b/src/main/java/unit/java/sdk/model/DisputeRelationships.java new file mode 100644 index 00000000..d4b00db1 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DisputeRelationships.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DisputeRelationships + */ +@JsonPropertyOrder({ + DisputeRelationships.JSON_PROPERTY_CUSTOMER, + DisputeRelationships.JSON_PROPERTY_ACCOUNT, + DisputeRelationships.JSON_PROPERTY_TRANSACTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisputeRelationships { + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private Relationship customer; + + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private Relationship account; + + public static final String JSON_PROPERTY_TRANSACTION = "transaction"; + private Relationship transaction; + + public DisputeRelationships() { + } + + public DisputeRelationships customer(Relationship customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationship getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomer(Relationship customer) { + this.customer = customer; + } + + + public DisputeRelationships account(Relationship account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationship getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(Relationship account) { + this.account = account; + } + + + public DisputeRelationships transaction(Relationship transaction) { + this.transaction = transaction; + return this; + } + + /** + * Get transaction + * @return transaction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationship getTransaction() { + return transaction; + } + + + @JsonProperty(JSON_PROPERTY_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTransaction(Relationship transaction) { + this.transaction = transaction; + } + + + /** + * Return true if this disputeRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisputeRelationships disputeRelationships = (DisputeRelationships) o; + return Objects.equals(this.customer, disputeRelationships.customer) && + Objects.equals(this.account, disputeRelationships.account) && + Objects.equals(this.transaction, disputeRelationships.transaction); + } + + @Override + public int hashCode() { + return Objects.hash(customer, account, transaction); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisputeRelationships {\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" transaction: ").append(toIndentedString(transaction)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `transaction` to the URL query string + if (getTransaction() != null) { + joiner.add(getTransaction().toUrlQueryString(prefix + "transaction" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DisputeSettlementTransaction.java b/src/main/java/unit/java/sdk/model/DisputeSettlementTransaction.java new file mode 100644 index 00000000..bbbad480 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DisputeSettlementTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.FeeTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * DisputeSettlementTransaction + */ +@JsonPropertyOrder({ + DisputeSettlementTransaction.JSON_PROPERTY_ATTRIBUTES, + DisputeSettlementTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class DisputeSettlementTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FeeTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public DisputeSettlementTransaction() { + } + + public DisputeSettlementTransaction attributes(FeeTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FeeTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(FeeTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public DisputeSettlementTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public DisputeSettlementTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public DisputeSettlementTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this DisputeSettlementTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisputeSettlementTransaction disputeSettlementTransaction = (DisputeSettlementTransaction) o; + return Objects.equals(this.attributes, disputeSettlementTransaction.attributes) && + Objects.equals(this.relationships, disputeSettlementTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisputeSettlementTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DisputeSettlementTransaction", DisputeSettlementTransaction.class); + JSON.registerDiscriminator(DisputeSettlementTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/DisputeTransaction.java b/src/main/java/unit/java/sdk/model/DisputeTransaction.java new file mode 100644 index 00000000..a67b63db --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DisputeTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.DisputeTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * DisputeTransaction + */ +@JsonPropertyOrder({ + DisputeTransaction.JSON_PROPERTY_ATTRIBUTES, + DisputeTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class DisputeTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DisputeTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public DisputeTransaction() { + } + + public DisputeTransaction attributes(DisputeTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DisputeTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(DisputeTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public DisputeTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public DisputeTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public DisputeTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this DisputeTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisputeTransaction disputeTransaction = (DisputeTransaction) o; + return Objects.equals(this.attributes, disputeTransaction.attributes) && + Objects.equals(this.relationships, disputeTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisputeTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DisputeTransaction", DisputeTransaction.class); + JSON.registerDiscriminator(DisputeTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/DisputeTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/DisputeTransactionAllOfAttributes.java new file mode 100644 index 00000000..b07747a1 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DisputeTransactionAllOfAttributes.java @@ -0,0 +1,438 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DisputeTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + DisputeTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + DisputeTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + DisputeTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + DisputeTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + DisputeTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + DisputeTransactionAllOfAttributes.JSON_PROPERTY_REASON, + DisputeTransactionAllOfAttributes.JSON_PROPERTY_DISPUTE_ID, + DisputeTransactionAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DisputeTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public static final String JSON_PROPERTY_DISPUTE_ID = "disputeId"; + private String disputeId; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public DisputeTransactionAllOfAttributes() { + } + + public DisputeTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public DisputeTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public DisputeTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public DisputeTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public DisputeTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public DisputeTransactionAllOfAttributes reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReason(String reason) { + this.reason = reason; + } + + + public DisputeTransactionAllOfAttributes disputeId(String disputeId) { + this.disputeId = disputeId; + return this; + } + + /** + * Get disputeId + * @return disputeId + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DISPUTE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDisputeId() { + return disputeId; + } + + + @JsonProperty(JSON_PROPERTY_DISPUTE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDisputeId(String disputeId) { + this.disputeId = disputeId; + } + + + public DisputeTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this DisputeTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisputeTransactionAllOfAttributes disputeTransactionAllOfAttributes = (DisputeTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, disputeTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, disputeTransactionAllOfAttributes.direction) && + Objects.equals(this.amount, disputeTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, disputeTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, disputeTransactionAllOfAttributes.summary) && + Objects.equals(this.reason, disputeTransactionAllOfAttributes.reason) && + Objects.equals(this.disputeId, disputeTransactionAllOfAttributes.disputeId) && + Objects.equals(this.tags, disputeTransactionAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, amount, balance, summary, reason, disputeId, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisputeTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" disputeId: ").append(toIndentedString(disputeId)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `disputeId` to the URL query string + if (getDisputeId() != null) { + joiner.add(String.format("%sdisputeId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDisputeId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Document.java b/src/main/java/unit/java/sdk/model/Document.java new file mode 100644 index 00000000..061966f7 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Document.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.DocumentAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Document + */ +@JsonPropertyOrder({ + Document.JSON_PROPERTY_TYPE, + Document.JSON_PROPERTY_ID, + Document.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Document { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "document"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DocumentAttributes attributes; + + public Document() { + } + + public Document type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public Document id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + public Document attributes(DocumentAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DocumentAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(DocumentAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this document object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Document document = (Document) o; + return Objects.equals(this.type, document.type) && + Objects.equals(this.id, document.id) && + Objects.equals(this.attributes, document.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Document {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DocumentAttributes.java b/src/main/java/unit/java/sdk/model/DocumentAttributes.java new file mode 100644 index 00000000..b3ea3d2e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DocumentAttributes.java @@ -0,0 +1,836 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DocumentAttributes + */ +@JsonPropertyOrder({ + DocumentAttributes.JSON_PROPERTY_DOCUMENT_TYPE, + DocumentAttributes.JSON_PROPERTY_STATUS, + DocumentAttributes.JSON_PROPERTY_DESCRIPTION, + DocumentAttributes.JSON_PROPERTY_NATIONALITY, + DocumentAttributes.JSON_PROPERTY_SSN, + DocumentAttributes.JSON_PROPERTY_PASSPORT, + DocumentAttributes.JSON_PROPERTY_MATRICULA_CONSULAR, + DocumentAttributes.JSON_PROPERTY_NAME, + DocumentAttributes.JSON_PROPERTY_ADDRESS, + DocumentAttributes.JSON_PROPERTY_DATE_OF_INCORPORATION, + DocumentAttributes.JSON_PROPERTY_STATE_OF_INCORPORATION, + DocumentAttributes.JSON_PROPERTY_DATE_OF_BIRTH, + DocumentAttributes.JSON_PROPERTY_EIN, + DocumentAttributes.JSON_PROPERTY_REASON_CODE, + DocumentAttributes.JSON_PROPERTY_REASON, + DocumentAttributes.JSON_PROPERTY_EVALUATION_ID, + DocumentAttributes.JSON_PROPERTY_FRONT_DOCUMENT_ID, + DocumentAttributes.JSON_PROPERTY_BACK_DOCUMENT_ID, + DocumentAttributes.JSON_PROPERTY_FRONT_DOCUMENT_STORE_ID, + DocumentAttributes.JSON_PROPERTY_BACK_DOCUMENT_STORE_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DocumentAttributes { + public static final String JSON_PROPERTY_DOCUMENT_TYPE = "documentType"; + private String documentType; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public static final String JSON_PROPERTY_SSN = "ssn"; + private String ssn; + + public static final String JSON_PROPERTY_PASSPORT = "passport"; + private String passport; + + public static final String JSON_PROPERTY_MATRICULA_CONSULAR = "matriculaConsular"; + private String matriculaConsular; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_DATE_OF_INCORPORATION = "dateOfIncorporation"; + private LocalDate dateOfIncorporation; + + public static final String JSON_PROPERTY_STATE_OF_INCORPORATION = "stateOfIncorporation"; + private String stateOfIncorporation; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public static final String JSON_PROPERTY_EIN = "ein"; + private String ein; + + public static final String JSON_PROPERTY_REASON_CODE = "reasonCode"; + private String reasonCode; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public static final String JSON_PROPERTY_EVALUATION_ID = "evaluationId"; + private String evaluationId; + + public static final String JSON_PROPERTY_FRONT_DOCUMENT_ID = "frontDocumentId"; + private String frontDocumentId; + + public static final String JSON_PROPERTY_BACK_DOCUMENT_ID = "backDocumentId"; + private String backDocumentId; + + public static final String JSON_PROPERTY_FRONT_DOCUMENT_STORE_ID = "frontDocumentStoreId"; + private String frontDocumentStoreId; + + public static final String JSON_PROPERTY_BACK_DOCUMENT_STORE_ID = "backDocumentStoreId"; + private String backDocumentStoreId; + + public DocumentAttributes() { + } + + public DocumentAttributes documentType(String documentType) { + this.documentType = documentType; + return this; + } + + /** + * Get documentType + * @return documentType + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOCUMENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDocumentType() { + return documentType; + } + + + @JsonProperty(JSON_PROPERTY_DOCUMENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDocumentType(String documentType) { + this.documentType = documentType; + } + + + public DocumentAttributes status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(String status) { + this.status = status; + } + + + public DocumentAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + + public DocumentAttributes nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * Get nationality + * @return nationality + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + public DocumentAttributes ssn(String ssn) { + this.ssn = ssn; + return this; + } + + /** + * Get ssn + * @return ssn + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSsn() { + return ssn; + } + + + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSsn(String ssn) { + this.ssn = ssn; + } + + + public DocumentAttributes passport(String passport) { + this.passport = passport; + return this; + } + + /** + * Get passport + * @return passport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassport() { + return passport; + } + + + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassport(String passport) { + this.passport = passport; + } + + + public DocumentAttributes matriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + return this; + } + + /** + * Get matriculaConsular + * @return matriculaConsular + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMatriculaConsular() { + return matriculaConsular; + } + + + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMatriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + } + + + public DocumentAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + public DocumentAttributes address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(Address address) { + this.address = address; + } + + + public DocumentAttributes dateOfIncorporation(LocalDate dateOfIncorporation) { + this.dateOfIncorporation = dateOfIncorporation; + return this; + } + + /** + * Get dateOfIncorporation + * @return dateOfIncorporation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getDateOfIncorporation() { + return dateOfIncorporation; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfIncorporation(LocalDate dateOfIncorporation) { + this.dateOfIncorporation = dateOfIncorporation; + } + + + public DocumentAttributes stateOfIncorporation(String stateOfIncorporation) { + this.stateOfIncorporation = stateOfIncorporation; + return this; + } + + /** + * Get stateOfIncorporation + * @return stateOfIncorporation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStateOfIncorporation() { + return stateOfIncorporation; + } + + + @JsonProperty(JSON_PROPERTY_STATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStateOfIncorporation(String stateOfIncorporation) { + this.stateOfIncorporation = stateOfIncorporation; + } + + + public DocumentAttributes dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + public DocumentAttributes ein(String ein) { + this.ein = ein; + return this; + } + + /** + * Get ein + * @return ein + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEin() { + return ein; + } + + + @JsonProperty(JSON_PROPERTY_EIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEin(String ein) { + this.ein = ein; + } + + + public DocumentAttributes reasonCode(String reasonCode) { + this.reasonCode = reasonCode; + return this; + } + + /** + * Get reasonCode + * @return reasonCode + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReasonCode() { + return reasonCode; + } + + + @JsonProperty(JSON_PROPERTY_REASON_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReasonCode(String reasonCode) { + this.reasonCode = reasonCode; + } + + + public DocumentAttributes reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(String reason) { + this.reason = reason; + } + + + public DocumentAttributes evaluationId(String evaluationId) { + this.evaluationId = evaluationId; + return this; + } + + /** + * Get evaluationId + * @return evaluationId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEvaluationId() { + return evaluationId; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationId(String evaluationId) { + this.evaluationId = evaluationId; + } + + + public DocumentAttributes frontDocumentId(String frontDocumentId) { + this.frontDocumentId = frontDocumentId; + return this; + } + + /** + * Get frontDocumentId + * @return frontDocumentId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FRONT_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFrontDocumentId() { + return frontDocumentId; + } + + + @JsonProperty(JSON_PROPERTY_FRONT_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFrontDocumentId(String frontDocumentId) { + this.frontDocumentId = frontDocumentId; + } + + + public DocumentAttributes backDocumentId(String backDocumentId) { + this.backDocumentId = backDocumentId; + return this; + } + + /** + * Get backDocumentId + * @return backDocumentId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BACK_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBackDocumentId() { + return backDocumentId; + } + + + @JsonProperty(JSON_PROPERTY_BACK_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBackDocumentId(String backDocumentId) { + this.backDocumentId = backDocumentId; + } + + + public DocumentAttributes frontDocumentStoreId(String frontDocumentStoreId) { + this.frontDocumentStoreId = frontDocumentStoreId; + return this; + } + + /** + * Get frontDocumentStoreId + * @return frontDocumentStoreId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FRONT_DOCUMENT_STORE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFrontDocumentStoreId() { + return frontDocumentStoreId; + } + + + @JsonProperty(JSON_PROPERTY_FRONT_DOCUMENT_STORE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFrontDocumentStoreId(String frontDocumentStoreId) { + this.frontDocumentStoreId = frontDocumentStoreId; + } + + + public DocumentAttributes backDocumentStoreId(String backDocumentStoreId) { + this.backDocumentStoreId = backDocumentStoreId; + return this; + } + + /** + * Get backDocumentStoreId + * @return backDocumentStoreId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BACK_DOCUMENT_STORE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBackDocumentStoreId() { + return backDocumentStoreId; + } + + + @JsonProperty(JSON_PROPERTY_BACK_DOCUMENT_STORE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBackDocumentStoreId(String backDocumentStoreId) { + this.backDocumentStoreId = backDocumentStoreId; + } + + + /** + * Return true if this document_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentAttributes documentAttributes = (DocumentAttributes) o; + return Objects.equals(this.documentType, documentAttributes.documentType) && + Objects.equals(this.status, documentAttributes.status) && + Objects.equals(this.description, documentAttributes.description) && + Objects.equals(this.nationality, documentAttributes.nationality) && + Objects.equals(this.ssn, documentAttributes.ssn) && + Objects.equals(this.passport, documentAttributes.passport) && + Objects.equals(this.matriculaConsular, documentAttributes.matriculaConsular) && + Objects.equals(this.name, documentAttributes.name) && + Objects.equals(this.address, documentAttributes.address) && + Objects.equals(this.dateOfIncorporation, documentAttributes.dateOfIncorporation) && + Objects.equals(this.stateOfIncorporation, documentAttributes.stateOfIncorporation) && + Objects.equals(this.dateOfBirth, documentAttributes.dateOfBirth) && + Objects.equals(this.ein, documentAttributes.ein) && + Objects.equals(this.reasonCode, documentAttributes.reasonCode) && + Objects.equals(this.reason, documentAttributes.reason) && + Objects.equals(this.evaluationId, documentAttributes.evaluationId) && + Objects.equals(this.frontDocumentId, documentAttributes.frontDocumentId) && + Objects.equals(this.backDocumentId, documentAttributes.backDocumentId) && + Objects.equals(this.frontDocumentStoreId, documentAttributes.frontDocumentStoreId) && + Objects.equals(this.backDocumentStoreId, documentAttributes.backDocumentStoreId); + } + + @Override + public int hashCode() { + return Objects.hash(documentType, status, description, nationality, ssn, passport, matriculaConsular, name, address, dateOfIncorporation, stateOfIncorporation, dateOfBirth, ein, reasonCode, reason, evaluationId, frontDocumentId, backDocumentId, frontDocumentStoreId, backDocumentStoreId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DocumentAttributes {\n"); + sb.append(" documentType: ").append(toIndentedString(documentType)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); + sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); + sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" dateOfIncorporation: ").append(toIndentedString(dateOfIncorporation)).append("\n"); + sb.append(" stateOfIncorporation: ").append(toIndentedString(stateOfIncorporation)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); + sb.append(" reasonCode: ").append(toIndentedString(reasonCode)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); + sb.append(" frontDocumentId: ").append(toIndentedString(frontDocumentId)).append("\n"); + sb.append(" backDocumentId: ").append(toIndentedString(backDocumentId)).append("\n"); + sb.append(" frontDocumentStoreId: ").append(toIndentedString(frontDocumentStoreId)).append("\n"); + sb.append(" backDocumentStoreId: ").append(toIndentedString(backDocumentStoreId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `documentType` to the URL query string + if (getDocumentType() != null) { + joiner.add(String.format("%sdocumentType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDocumentType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nationality` to the URL query string + if (getNationality() != null) { + joiner.add(String.format("%snationality%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNationality()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ssn` to the URL query string + if (getSsn() != null) { + joiner.add(String.format("%sssn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSsn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `passport` to the URL query string + if (getPassport() != null) { + joiner.add(String.format("%spassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `matriculaConsular` to the URL query string + if (getMatriculaConsular() != null) { + joiner.add(String.format("%smatriculaConsular%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMatriculaConsular()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `dateOfIncorporation` to the URL query string + if (getDateOfIncorporation() != null) { + joiner.add(String.format("%sdateOfIncorporation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfIncorporation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `stateOfIncorporation` to the URL query string + if (getStateOfIncorporation() != null) { + joiner.add(String.format("%sstateOfIncorporation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStateOfIncorporation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ein` to the URL query string + if (getEin() != null) { + joiner.add(String.format("%sein%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEin()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `reasonCode` to the URL query string + if (getReasonCode() != null) { + joiner.add(String.format("%sreasonCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReasonCode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationId` to the URL query string + if (getEvaluationId() != null) { + joiner.add(String.format("%sevaluationId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEvaluationId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `frontDocumentId` to the URL query string + if (getFrontDocumentId() != null) { + joiner.add(String.format("%sfrontDocumentId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFrontDocumentId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `backDocumentId` to the URL query string + if (getBackDocumentId() != null) { + joiner.add(String.format("%sbackDocumentId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBackDocumentId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `frontDocumentStoreId` to the URL query string + if (getFrontDocumentStoreId() != null) { + joiner.add(String.format("%sfrontDocumentStoreId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFrontDocumentStoreId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `backDocumentStoreId` to the URL query string + if (getBackDocumentStoreId() != null) { + joiner.add(String.format("%sbackDocumentStoreId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBackDocumentStoreId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DocumentsRelationship.java b/src/main/java/unit/java/sdk/model/DocumentsRelationship.java new file mode 100644 index 00000000..ff98507e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DocumentsRelationship.java @@ -0,0 +1,219 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import unit.java.sdk.model.DocumentsRelationshipDataInner; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DocumentsRelationship + */ +@JsonPropertyOrder({ + DocumentsRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DocumentsRelationship extends HashMap { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public DocumentsRelationship() { + } + + public DocumentsRelationship data(List data) { + this.data = data; + return this; + } + + public DocumentsRelationship addDataItem(DocumentsRelationshipDataInner dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public DocumentsRelationship putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this documentsRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentsRelationship documentsRelationship = (DocumentsRelationship) o; + return Objects.equals(this.data, documentsRelationship.data)&& + Objects.equals(this.additionalProperties, documentsRelationship.additionalProperties) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(data, super.hashCode(), additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DocumentsRelationship {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/DocumentsRelationshipDataInner.java b/src/main/java/unit/java/sdk/model/DocumentsRelationshipDataInner.java new file mode 100644 index 00000000..e1ad8baa --- /dev/null +++ b/src/main/java/unit/java/sdk/model/DocumentsRelationshipDataInner.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DocumentsRelationshipDataInner + */ +@JsonPropertyOrder({ + DocumentsRelationshipDataInner.JSON_PROPERTY_TYPE, + DocumentsRelationshipDataInner.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DocumentsRelationshipDataInner { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "document"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public DocumentsRelationshipDataInner() { + } + + public DocumentsRelationshipDataInner type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public DocumentsRelationshipDataInner id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this documentsRelationship_data_inner object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentsRelationshipDataInner documentsRelationshipDataInner = (DocumentsRelationshipDataInner) o; + return Objects.equals(this.type, documentsRelationshipDataInner.type) && + Objects.equals(this.id, documentsRelationshipDataInner.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DocumentsRelationshipDataInner {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/EntityType.java b/src/main/java/unit/java/sdk/model/EntityType.java new file mode 100644 index 00000000..3b3e076a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/EntityType.java @@ -0,0 +1,86 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets entityType + */ +public enum EntityType { + + CORPORATION("Corporation"), + + LLC("LLC"), + + PARTNERSHIP("Partnership"), + + PUBLICLYTRADEDCORPORATION("PubliclyTradedCorporation"), + + PRIVATELYHELDCORPORATION("PrivatelyHeldCorporation"), + + NOTFORPROFITORGANIZATION("NotForProfitOrganization"); + + private String value; + + EntityType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EntityType fromValue(String value) { + for (EntityType b : EntityType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } + +} + diff --git a/src/main/java/unit/java/sdk/model/EvaluationParams.java b/src/main/java/unit/java/sdk/model/EvaluationParams.java new file mode 100644 index 00000000..4ed2e34c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/EvaluationParams.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * EvaluationParams + */ +@JsonPropertyOrder({ + EvaluationParams.JSON_PROPERTY_USE_SELFIE_VERIFICATION, + EvaluationParams.JSON_PROPERTY_REQUIRE_ID_VERIFICATION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EvaluationParams { + /** + * Gets or Sets useSelfieVerification + */ + public enum UseSelfieVerificationEnum { + NEVER("Never"), + + REPLACEIDENTIFICATION("ReplaceIdentification"), + + ALWAYS("Always"); + + private String value; + + UseSelfieVerificationEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static UseSelfieVerificationEnum fromValue(String value) { + for (UseSelfieVerificationEnum b : UseSelfieVerificationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_USE_SELFIE_VERIFICATION = "useSelfieVerification"; + private UseSelfieVerificationEnum useSelfieVerification; + + public static final String JSON_PROPERTY_REQUIRE_ID_VERIFICATION = "requireIdVerification"; + private Boolean requireIdVerification = false; + + public EvaluationParams() { + } + + public EvaluationParams useSelfieVerification(UseSelfieVerificationEnum useSelfieVerification) { + this.useSelfieVerification = useSelfieVerification; + return this; + } + + /** + * Get useSelfieVerification + * @return useSelfieVerification + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USE_SELFIE_VERIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UseSelfieVerificationEnum getUseSelfieVerification() { + return useSelfieVerification; + } + + + @JsonProperty(JSON_PROPERTY_USE_SELFIE_VERIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUseSelfieVerification(UseSelfieVerificationEnum useSelfieVerification) { + this.useSelfieVerification = useSelfieVerification; + } + + + public EvaluationParams requireIdVerification(Boolean requireIdVerification) { + this.requireIdVerification = requireIdVerification; + return this; + } + + /** + * Get requireIdVerification + * @return requireIdVerification + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRE_ID_VERIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getRequireIdVerification() { + return requireIdVerification; + } + + + @JsonProperty(JSON_PROPERTY_REQUIRE_ID_VERIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequireIdVerification(Boolean requireIdVerification) { + this.requireIdVerification = requireIdVerification; + } + + + /** + * Return true if this evaluationParams object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvaluationParams evaluationParams = (EvaluationParams) o; + return Objects.equals(this.useSelfieVerification, evaluationParams.useSelfieVerification) && + Objects.equals(this.requireIdVerification, evaluationParams.requireIdVerification); + } + + @Override + public int hashCode() { + return Objects.hash(useSelfieVerification, requireIdVerification); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvaluationParams {\n"); + sb.append(" useSelfieVerification: ").append(toIndentedString(useSelfieVerification)).append("\n"); + sb.append(" requireIdVerification: ").append(toIndentedString(requireIdVerification)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `useSelfieVerification` to the URL query string + if (getUseSelfieVerification() != null) { + joiner.add(String.format("%suseSelfieVerification%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUseSelfieVerification()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `requireIdVerification` to the URL query string + if (getRequireIdVerification() != null) { + joiner.add(String.format("%srequireIdVerification%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRequireIdVerification()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Event.java b/src/main/java/unit/java/sdk/model/Event.java new file mode 100644 index 00000000..997325c2 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Event.java @@ -0,0 +1,258 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Event + */ +@JsonPropertyOrder({ + Event.JSON_PROPERTY_TYPE, + Event.JSON_PROPERTY_ID, + Event.JSON_PROPERTY_ATTRIBUTES, + Event.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Event { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private Object attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private Object relationships; + + public Event() { + } + + public Event type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public Event id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + public Event attributes(Object attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(Object attributes) { + this.attributes = attributes; + } + + + public Event relationships(Object relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(Object relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this event object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Event event = (Event) o; + return Objects.equals(this.type, event.type) && + Objects.equals(this.id, event.id) && + Objects.equals(this.attributes, event.attributes) && + Objects.equals(this.relationships, event.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Event {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(String.format("%sattributes%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAttributes()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(String.format("%srelationships%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRelationships()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter.java new file mode 100644 index 00000000..27979b14 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter.java @@ -0,0 +1,329 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter + */ +@JsonPropertyOrder({ + ExecuteFilterParameter.JSON_PROPERTY_QUERY, + ExecuteFilterParameter.JSON_PROPERTY_STATUS, + ExecuteFilterParameter.JSON_PROPERTY_EMAIL, + ExecuteFilterParameter.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter { + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + AWAITINGDOCUMENTS("AwaitingDocuments"), + + PENDINGREVIEW("PendingReview"), + + PENDING("Pending"), + + APPROVED("Approved"), + + DENIED("Denied"), + + CANCELED("Canceled"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private List status; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = new HashMap<>(); + + public ExecuteFilterParameter() { + } + + public ExecuteFilterParameter query(String query) { + this.query = query; + return this; + } + + /** + * Get query + * @return query + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getQuery() { + return query; + } + + + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQuery(String query) { + this.query = query; + } + + + public ExecuteFilterParameter status(List status) { + this.status = status; + return this; + } + + public ExecuteFilterParameter addStatusItem(StatusEnum statusItem) { + if (this.status == null) { + this.status = new ArrayList<>(); + } + this.status.add(statusItem); + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(List status) { + this.status = status; + } + + + public ExecuteFilterParameter email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public ExecuteFilterParameter tags(Map tags) { + this.tags = tags; + return this; + } + + public ExecuteFilterParameter putTagsItem(String key, String tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Map tags) { + this.tags = tags; + } + + + /** + * Return true if this execute_filter_parameter object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter executeFilterParameter = (ExecuteFilterParameter) o; + return Objects.equals(this.query, executeFilterParameter.query) && + Objects.equals(this.status, executeFilterParameter.status) && + Objects.equals(this.email, executeFilterParameter.email) && + Objects.equals(this.tags, executeFilterParameter.tags); + } + + @Override + public int hashCode() { + return Objects.hash(query, status, email, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `query` to the URL query string + if (getQuery() != null) { + joiner.add(String.format("%squery%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getQuery()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + for (int i = 0; i < getStatus().size(); i++) { + joiner.add(String.format("%sstatus%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getStatus().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (String _key : getTags().keySet()) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTags().get(_key), URLEncoder.encode(String.valueOf(getTags().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter1.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter1.java new file mode 100644 index 00000000..b83b2257 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter1.java @@ -0,0 +1,321 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter1 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter1.JSON_PROPERTY_QUERY, + ExecuteFilterParameter1.JSON_PROPERTY_STATUS, + ExecuteFilterParameter1.JSON_PROPERTY_EMAIL, + ExecuteFilterParameter1.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter1 { + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + PENDING("Pending"), + + APPROVED("Approved"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private List status; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = new HashMap<>(); + + public ExecuteFilterParameter1() { + } + + public ExecuteFilterParameter1 query(String query) { + this.query = query; + return this; + } + + /** + * Get query + * @return query + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getQuery() { + return query; + } + + + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQuery(String query) { + this.query = query; + } + + + public ExecuteFilterParameter1 status(List status) { + this.status = status; + return this; + } + + public ExecuteFilterParameter1 addStatusItem(StatusEnum statusItem) { + if (this.status == null) { + this.status = new ArrayList<>(); + } + this.status.add(statusItem); + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(List status) { + this.status = status; + } + + + public ExecuteFilterParameter1 email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public ExecuteFilterParameter1 tags(Map tags) { + this.tags = tags; + return this; + } + + public ExecuteFilterParameter1 putTagsItem(String key, String tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Map tags) { + this.tags = tags; + } + + + /** + * Return true if this execute_filter_parameter_1 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter1 executeFilterParameter1 = (ExecuteFilterParameter1) o; + return Objects.equals(this.query, executeFilterParameter1.query) && + Objects.equals(this.status, executeFilterParameter1.status) && + Objects.equals(this.email, executeFilterParameter1.email) && + Objects.equals(this.tags, executeFilterParameter1.tags); + } + + @Override + public int hashCode() { + return Objects.hash(query, status, email, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter1 {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `query` to the URL query string + if (getQuery() != null) { + joiner.add(String.format("%squery%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getQuery()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + for (int i = 0; i < getStatus().size(); i++) { + joiner.add(String.format("%sstatus%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getStatus().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (String _key : getTags().keySet()) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTags().get(_key), URLEncoder.encode(String.valueOf(getTags().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter10.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter10.java new file mode 100644 index 00000000..0e8a7cee --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter10.java @@ -0,0 +1,222 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter10 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter10.JSON_PROPERTY_ACCOUNT_ID, + ExecuteFilterParameter10.JSON_PROPERTY_CUSTOMER_ID, + ExecuteFilterParameter10.JSON_PROPERTY_PERIOD +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter10 { + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + private String accountId; + + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + private String customerId; + + public static final String JSON_PROPERTY_PERIOD = "period"; + private String period; + + public ExecuteFilterParameter10() { + } + + public ExecuteFilterParameter10 accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * @return accountId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountId() { + return accountId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + + public ExecuteFilterParameter10 customerId(String customerId) { + this.customerId = customerId; + return this; + } + + /** + * Get customerId + * @return customerId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerId() { + return customerId; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + + public ExecuteFilterParameter10 period(String period) { + this.period = period; + return this; + } + + /** + * Get period + * @return period + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERIOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPeriod() { + return period; + } + + + @JsonProperty(JSON_PROPERTY_PERIOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPeriod(String period) { + this.period = period; + } + + + /** + * Return true if this execute_filter_parameter_10 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter10 executeFilterParameter10 = (ExecuteFilterParameter10) o; + return Objects.equals(this.accountId, executeFilterParameter10.accountId) && + Objects.equals(this.customerId, executeFilterParameter10.customerId) && + Objects.equals(this.period, executeFilterParameter10.period); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, customerId, period); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter10 {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" period: ").append(toIndentedString(period)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `accountId` to the URL query string + if (getAccountId() != null) { + joiner.add(String.format("%saccountId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(String.format("%scustomerId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCustomerId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `period` to the URL query string + if (getPeriod() != null) { + joiner.add(String.format("%speriod%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPeriod()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter11.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter11.java new file mode 100644 index 00000000..52d94ce6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter11.java @@ -0,0 +1,452 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter11 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter11.JSON_PROPERTY_TRANSACTION_ID, + ExecuteFilterParameter11.JSON_PROPERTY_REWARDED_TRANSACTION_ID, + ExecuteFilterParameter11.JSON_PROPERTY_RECEIVING_ACCOUNT_ID, + ExecuteFilterParameter11.JSON_PROPERTY_CUSTOMER_ID, + ExecuteFilterParameter11.JSON_PROPERTY_CARD_ID, + ExecuteFilterParameter11.JSON_PROPERTY_SINCE, + ExecuteFilterParameter11.JSON_PROPERTY_UNTIL, + ExecuteFilterParameter11.JSON_PROPERTY_STATUS, + ExecuteFilterParameter11.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter11 { + public static final String JSON_PROPERTY_TRANSACTION_ID = "transactionId"; + private String transactionId; + + public static final String JSON_PROPERTY_REWARDED_TRANSACTION_ID = "rewardedTransactionId"; + private String rewardedTransactionId; + + public static final String JSON_PROPERTY_RECEIVING_ACCOUNT_ID = "receivingAccountId"; + private String receivingAccountId; + + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + private String customerId; + + public static final String JSON_PROPERTY_CARD_ID = "cardId"; + private String cardId; + + public static final String JSON_PROPERTY_SINCE = "since"; + private String since; + + public static final String JSON_PROPERTY_UNTIL = "until"; + private String until; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = new HashMap<>(); + + public ExecuteFilterParameter11() { + } + + public ExecuteFilterParameter11 transactionId(String transactionId) { + this.transactionId = transactionId; + return this; + } + + /** + * Get transactionId + * @return transactionId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTransactionId() { + return transactionId; + } + + + @JsonProperty(JSON_PROPERTY_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransactionId(String transactionId) { + this.transactionId = transactionId; + } + + + public ExecuteFilterParameter11 rewardedTransactionId(String rewardedTransactionId) { + this.rewardedTransactionId = rewardedTransactionId; + return this; + } + + /** + * Get rewardedTransactionId + * @return rewardedTransactionId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REWARDED_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRewardedTransactionId() { + return rewardedTransactionId; + } + + + @JsonProperty(JSON_PROPERTY_REWARDED_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRewardedTransactionId(String rewardedTransactionId) { + this.rewardedTransactionId = rewardedTransactionId; + } + + + public ExecuteFilterParameter11 receivingAccountId(String receivingAccountId) { + this.receivingAccountId = receivingAccountId; + return this; + } + + /** + * Get receivingAccountId + * @return receivingAccountId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECEIVING_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReceivingAccountId() { + return receivingAccountId; + } + + + @JsonProperty(JSON_PROPERTY_RECEIVING_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReceivingAccountId(String receivingAccountId) { + this.receivingAccountId = receivingAccountId; + } + + + public ExecuteFilterParameter11 customerId(String customerId) { + this.customerId = customerId; + return this; + } + + /** + * Get customerId + * @return customerId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerId() { + return customerId; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + + public ExecuteFilterParameter11 cardId(String cardId) { + this.cardId = cardId; + return this; + } + + /** + * Get cardId + * @return cardId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCardId() { + return cardId; + } + + + @JsonProperty(JSON_PROPERTY_CARD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardId(String cardId) { + this.cardId = cardId; + } + + + public ExecuteFilterParameter11 since(String since) { + this.since = since; + return this; + } + + /** + * Get since + * @return since + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSince() { + return since; + } + + + @JsonProperty(JSON_PROPERTY_SINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSince(String since) { + this.since = since; + } + + + public ExecuteFilterParameter11 until(String until) { + this.until = until; + return this; + } + + /** + * Get until + * @return until + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UNTIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUntil() { + return until; + } + + + @JsonProperty(JSON_PROPERTY_UNTIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUntil(String until) { + this.until = until; + } + + + public ExecuteFilterParameter11 status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(String status) { + this.status = status; + } + + + public ExecuteFilterParameter11 tags(Map tags) { + this.tags = tags; + return this; + } + + public ExecuteFilterParameter11 putTagsItem(String key, String tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Map tags) { + this.tags = tags; + } + + + /** + * Return true if this execute_filter_parameter_11 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter11 executeFilterParameter11 = (ExecuteFilterParameter11) o; + return Objects.equals(this.transactionId, executeFilterParameter11.transactionId) && + Objects.equals(this.rewardedTransactionId, executeFilterParameter11.rewardedTransactionId) && + Objects.equals(this.receivingAccountId, executeFilterParameter11.receivingAccountId) && + Objects.equals(this.customerId, executeFilterParameter11.customerId) && + Objects.equals(this.cardId, executeFilterParameter11.cardId) && + Objects.equals(this.since, executeFilterParameter11.since) && + Objects.equals(this.until, executeFilterParameter11.until) && + Objects.equals(this.status, executeFilterParameter11.status) && + Objects.equals(this.tags, executeFilterParameter11.tags); + } + + @Override + public int hashCode() { + return Objects.hash(transactionId, rewardedTransactionId, receivingAccountId, customerId, cardId, since, until, status, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter11 {\n"); + sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); + sb.append(" rewardedTransactionId: ").append(toIndentedString(rewardedTransactionId)).append("\n"); + sb.append(" receivingAccountId: ").append(toIndentedString(receivingAccountId)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" cardId: ").append(toIndentedString(cardId)).append("\n"); + sb.append(" since: ").append(toIndentedString(since)).append("\n"); + sb.append(" until: ").append(toIndentedString(until)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `transactionId` to the URL query string + if (getTransactionId() != null) { + joiner.add(String.format("%stransactionId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTransactionId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `rewardedTransactionId` to the URL query string + if (getRewardedTransactionId() != null) { + joiner.add(String.format("%srewardedTransactionId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRewardedTransactionId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `receivingAccountId` to the URL query string + if (getReceivingAccountId() != null) { + joiner.add(String.format("%sreceivingAccountId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReceivingAccountId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(String.format("%scustomerId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCustomerId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardId` to the URL query string + if (getCardId() != null) { + joiner.add(String.format("%scardId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `since` to the URL query string + if (getSince() != null) { + joiner.add(String.format("%ssince%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSince()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `until` to the URL query string + if (getUntil() != null) { + joiner.add(String.format("%suntil%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUntil()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (String _key : getTags().keySet()) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTags().get(_key), URLEncoder.encode(String.valueOf(getTags().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter12.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter12.java new file mode 100644 index 00000000..f93f52c4 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter12.java @@ -0,0 +1,236 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter12 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter12.JSON_PROPERTY_SINCE, + ExecuteFilterParameter12.JSON_PROPERTY_UNTIL, + ExecuteFilterParameter12.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter12 { + public static final String JSON_PROPERTY_SINCE = "since"; + private String since; + + public static final String JSON_PROPERTY_UNTIL = "until"; + private String until; + + public static final String JSON_PROPERTY_TYPE = "type"; + private List type; + + public ExecuteFilterParameter12() { + } + + public ExecuteFilterParameter12 since(String since) { + this.since = since; + return this; + } + + /** + * Get since + * @return since + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSince() { + return since; + } + + + @JsonProperty(JSON_PROPERTY_SINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSince(String since) { + this.since = since; + } + + + public ExecuteFilterParameter12 until(String until) { + this.until = until; + return this; + } + + /** + * Get until + * @return until + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UNTIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUntil() { + return until; + } + + + @JsonProperty(JSON_PROPERTY_UNTIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUntil(String until) { + this.until = until; + } + + + public ExecuteFilterParameter12 type(List type) { + this.type = type; + return this; + } + + public ExecuteFilterParameter12 addTypeItem(String typeItem) { + if (this.type == null) { + this.type = new ArrayList<>(); + } + this.type.add(typeItem); + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(List type) { + this.type = type; + } + + + /** + * Return true if this execute_filter_parameter_12 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter12 executeFilterParameter12 = (ExecuteFilterParameter12) o; + return Objects.equals(this.since, executeFilterParameter12.since) && + Objects.equals(this.until, executeFilterParameter12.until) && + Objects.equals(this.type, executeFilterParameter12.type); + } + + @Override + public int hashCode() { + return Objects.hash(since, until, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter12 {\n"); + sb.append(" since: ").append(toIndentedString(since)).append("\n"); + sb.append(" until: ").append(toIndentedString(until)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `since` to the URL query string + if (getSince() != null) { + joiner.add(String.format("%ssince%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSince()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `until` to the URL query string + if (getUntil() != null) { + joiner.add(String.format("%suntil%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUntil()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + for (int i = 0; i < getType().size(); i++) { + joiner.add(String.format("%stype%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getType().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter13.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter13.java new file mode 100644 index 00000000..cfb39dc0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter13.java @@ -0,0 +1,339 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter13 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter13.JSON_PROPERTY_ACCOUNT_ID, + ExecuteFilterParameter13.JSON_PROPERTY_CUSTOMER_ID, + ExecuteFilterParameter13.JSON_PROPERTY_TAGS, + ExecuteFilterParameter13.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter13 { + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + private String accountId; + + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + private String customerId; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = new HashMap<>(); + + /** + * Gets or Sets status + */ + public enum StatusEnum { + AWAITINGIMAGES("AwaitingImages"), + + AWAITINGFRONTIMAGE("AwaitingFrontImage"), + + AWAITINGBACKIMAGE("AwaitingBackImage"), + + PENDING("Pending"), + + PENDINGREVIEW("PendingReview"), + + REJECTED("Rejected"), + + CLEARING("Clearing"), + + SENT("Sent"), + + CANCELED("Canceled"), + + RETURNED("Returned"), + + AWAITINGCUSTOMERCONFIRMATION("AwaitingCustomerConfirmation"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private List status; + + public ExecuteFilterParameter13() { + } + + public ExecuteFilterParameter13 accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * @return accountId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountId() { + return accountId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + + public ExecuteFilterParameter13 customerId(String customerId) { + this.customerId = customerId; + return this; + } + + /** + * Get customerId + * @return customerId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerId() { + return customerId; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + + public ExecuteFilterParameter13 tags(Map tags) { + this.tags = tags; + return this; + } + + public ExecuteFilterParameter13 putTagsItem(String key, String tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Map tags) { + this.tags = tags; + } + + + public ExecuteFilterParameter13 status(List status) { + this.status = status; + return this; + } + + public ExecuteFilterParameter13 addStatusItem(StatusEnum statusItem) { + if (this.status == null) { + this.status = new ArrayList<>(); + } + this.status.add(statusItem); + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(List status) { + this.status = status; + } + + + /** + * Return true if this execute_filter_parameter_13 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter13 executeFilterParameter13 = (ExecuteFilterParameter13) o; + return Objects.equals(this.accountId, executeFilterParameter13.accountId) && + Objects.equals(this.customerId, executeFilterParameter13.customerId) && + Objects.equals(this.tags, executeFilterParameter13.tags) && + Objects.equals(this.status, executeFilterParameter13.status); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, customerId, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter13 {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `accountId` to the URL query string + if (getAccountId() != null) { + joiner.add(String.format("%saccountId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(String.format("%scustomerId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCustomerId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (String _key : getTags().keySet()) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTags().get(_key), URLEncoder.encode(String.valueOf(getTags().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `status` to the URL query string + if (getStatus() != null) { + for (int i = 0; i < getStatus().size(); i++) { + joiner.add(String.format("%sstatus%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getStatus().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter14.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter14.java new file mode 100644 index 00000000..d53fe927 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter14.java @@ -0,0 +1,258 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter14 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter14.JSON_PROPERTY_SINCE, + ExecuteFilterParameter14.JSON_PROPERTY_UNTIL, + ExecuteFilterParameter14.JSON_PROPERTY_FROM_ID, + ExecuteFilterParameter14.JSON_PROPERTY_TO_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter14 { + public static final String JSON_PROPERTY_SINCE = "since"; + private String since; + + public static final String JSON_PROPERTY_UNTIL = "until"; + private String until; + + public static final String JSON_PROPERTY_FROM_ID = "fromId"; + private Integer fromId; + + public static final String JSON_PROPERTY_TO_ID = "toId"; + private Integer toId; + + public ExecuteFilterParameter14() { + } + + public ExecuteFilterParameter14 since(String since) { + this.since = since; + return this; + } + + /** + * Get since + * @return since + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSince() { + return since; + } + + + @JsonProperty(JSON_PROPERTY_SINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSince(String since) { + this.since = since; + } + + + public ExecuteFilterParameter14 until(String until) { + this.until = until; + return this; + } + + /** + * Get until + * @return until + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UNTIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUntil() { + return until; + } + + + @JsonProperty(JSON_PROPERTY_UNTIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUntil(String until) { + this.until = until; + } + + + public ExecuteFilterParameter14 fromId(Integer fromId) { + this.fromId = fromId; + return this; + } + + /** + * Get fromId + * @return fromId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getFromId() { + return fromId; + } + + + @JsonProperty(JSON_PROPERTY_FROM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFromId(Integer fromId) { + this.fromId = fromId; + } + + + public ExecuteFilterParameter14 toId(Integer toId) { + this.toId = toId; + return this; + } + + /** + * Get toId + * @return toId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getToId() { + return toId; + } + + + @JsonProperty(JSON_PROPERTY_TO_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setToId(Integer toId) { + this.toId = toId; + } + + + /** + * Return true if this execute_filter_parameter_14 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter14 executeFilterParameter14 = (ExecuteFilterParameter14) o; + return Objects.equals(this.since, executeFilterParameter14.since) && + Objects.equals(this.until, executeFilterParameter14.until) && + Objects.equals(this.fromId, executeFilterParameter14.fromId) && + Objects.equals(this.toId, executeFilterParameter14.toId); + } + + @Override + public int hashCode() { + return Objects.hash(since, until, fromId, toId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter14 {\n"); + sb.append(" since: ").append(toIndentedString(since)).append("\n"); + sb.append(" until: ").append(toIndentedString(until)).append("\n"); + sb.append(" fromId: ").append(toIndentedString(fromId)).append("\n"); + sb.append(" toId: ").append(toIndentedString(toId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `since` to the URL query string + if (getSince() != null) { + joiner.add(String.format("%ssince%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSince()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `until` to the URL query string + if (getUntil() != null) { + joiner.add(String.format("%suntil%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUntil()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `fromId` to the URL query string + if (getFromId() != null) { + joiner.add(String.format("%sfromId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFromId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `toId` to the URL query string + if (getToId() != null) { + joiner.add(String.format("%stoId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getToId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter15.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter15.java new file mode 100644 index 00000000..f647a91a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter15.java @@ -0,0 +1,258 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter15 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter15.JSON_PROPERTY_COORDINATES, + ExecuteFilterParameter15.JSON_PROPERTY_SEARCH_RADIUS, + ExecuteFilterParameter15.JSON_PROPERTY_POSTAL_CODE, + ExecuteFilterParameter15.JSON_PROPERTY_ADDRESS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter15 { + public static final String JSON_PROPERTY_COORDINATES = "coordinates"; + private Object coordinates; + + public static final String JSON_PROPERTY_SEARCH_RADIUS = "searchRadius"; + private Integer searchRadius; + + public static final String JSON_PROPERTY_POSTAL_CODE = "postalCode"; + private String postalCode; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Object address; + + public ExecuteFilterParameter15() { + } + + public ExecuteFilterParameter15 coordinates(Object coordinates) { + this.coordinates = coordinates; + return this; + } + + /** + * Get coordinates + * @return coordinates + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COORDINATES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getCoordinates() { + return coordinates; + } + + + @JsonProperty(JSON_PROPERTY_COORDINATES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCoordinates(Object coordinates) { + this.coordinates = coordinates; + } + + + public ExecuteFilterParameter15 searchRadius(Integer searchRadius) { + this.searchRadius = searchRadius; + return this; + } + + /** + * Get searchRadius + * @return searchRadius + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEARCH_RADIUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getSearchRadius() { + return searchRadius; + } + + + @JsonProperty(JSON_PROPERTY_SEARCH_RADIUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSearchRadius(Integer searchRadius) { + this.searchRadius = searchRadius; + } + + + public ExecuteFilterParameter15 postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * Get postalCode + * @return postalCode + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPostalCode() { + return postalCode; + } + + + @JsonProperty(JSON_PROPERTY_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public ExecuteFilterParameter15 address(Object address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(Object address) { + this.address = address; + } + + + /** + * Return true if this execute_filter_parameter_15 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter15 executeFilterParameter15 = (ExecuteFilterParameter15) o; + return Objects.equals(this.coordinates, executeFilterParameter15.coordinates) && + Objects.equals(this.searchRadius, executeFilterParameter15.searchRadius) && + Objects.equals(this.postalCode, executeFilterParameter15.postalCode) && + Objects.equals(this.address, executeFilterParameter15.address); + } + + @Override + public int hashCode() { + return Objects.hash(coordinates, searchRadius, postalCode, address); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter15 {\n"); + sb.append(" coordinates: ").append(toIndentedString(coordinates)).append("\n"); + sb.append(" searchRadius: ").append(toIndentedString(searchRadius)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `coordinates` to the URL query string + if (getCoordinates() != null) { + joiner.add(String.format("%scoordinates%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCoordinates()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `searchRadius` to the URL query string + if (getSearchRadius() != null) { + joiner.add(String.format("%ssearchRadius%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSearchRadius()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `postalCode` to the URL query string + if (getPostalCode() != null) { + joiner.add(String.format("%spostalCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPostalCode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(String.format("%saddress%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAddress()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter16.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter16.java new file mode 100644 index 00000000..087f6fbf --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter16.java @@ -0,0 +1,657 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter16 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter16.JSON_PROPERTY_ACCOUNT_ID, + ExecuteFilterParameter16.JSON_PROPERTY_CUSTOMER_ID, + ExecuteFilterParameter16.JSON_PROPERTY_QUERY, + ExecuteFilterParameter16.JSON_PROPERTY_TAGS, + ExecuteFilterParameter16.JSON_PROPERTY_SINCE, + ExecuteFilterParameter16.JSON_PROPERTY_UNTIL, + ExecuteFilterParameter16.JSON_PROPERTY_CARD_ID, + ExecuteFilterParameter16.JSON_PROPERTY_EXCLUDE_FEES, + ExecuteFilterParameter16.JSON_PROPERTY_TYPE, + ExecuteFilterParameter16.JSON_PROPERTY_DIRECTION, + ExecuteFilterParameter16.JSON_PROPERTY_FROM_AMOUNT, + ExecuteFilterParameter16.JSON_PROPERTY_TO_AMOUNT, + ExecuteFilterParameter16.JSON_PROPERTY_ACCOUNT_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter16 { + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + private String accountId; + + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + private String customerId; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = new HashMap<>(); + + public static final String JSON_PROPERTY_SINCE = "since"; + private String since; + + public static final String JSON_PROPERTY_UNTIL = "until"; + private String until; + + public static final String JSON_PROPERTY_CARD_ID = "cardId"; + private String cardId; + + public static final String JSON_PROPERTY_EXCLUDE_FEES = "excludeFees"; + private Boolean excludeFees; + + public static final String JSON_PROPERTY_TYPE = "type"; + private List type; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + DEBIT("Debit"), + + CREDIT("Credit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private List direction; + + public static final String JSON_PROPERTY_FROM_AMOUNT = "fromAmount"; + private Integer fromAmount; + + public static final String JSON_PROPERTY_TO_AMOUNT = "toAmount"; + private Integer toAmount; + + public static final String JSON_PROPERTY_ACCOUNT_TYPE = "accountType"; + private String accountType; + + public ExecuteFilterParameter16() { + } + + public ExecuteFilterParameter16 accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * @return accountId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountId() { + return accountId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + + public ExecuteFilterParameter16 customerId(String customerId) { + this.customerId = customerId; + return this; + } + + /** + * Get customerId + * @return customerId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerId() { + return customerId; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + + public ExecuteFilterParameter16 query(String query) { + this.query = query; + return this; + } + + /** + * Get query + * @return query + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getQuery() { + return query; + } + + + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQuery(String query) { + this.query = query; + } + + + public ExecuteFilterParameter16 tags(Map tags) { + this.tags = tags; + return this; + } + + public ExecuteFilterParameter16 putTagsItem(String key, String tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Map tags) { + this.tags = tags; + } + + + public ExecuteFilterParameter16 since(String since) { + this.since = since; + return this; + } + + /** + * Get since + * @return since + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSince() { + return since; + } + + + @JsonProperty(JSON_PROPERTY_SINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSince(String since) { + this.since = since; + } + + + public ExecuteFilterParameter16 until(String until) { + this.until = until; + return this; + } + + /** + * Get until + * @return until + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UNTIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUntil() { + return until; + } + + + @JsonProperty(JSON_PROPERTY_UNTIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUntil(String until) { + this.until = until; + } + + + public ExecuteFilterParameter16 cardId(String cardId) { + this.cardId = cardId; + return this; + } + + /** + * Get cardId + * @return cardId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCardId() { + return cardId; + } + + + @JsonProperty(JSON_PROPERTY_CARD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardId(String cardId) { + this.cardId = cardId; + } + + + public ExecuteFilterParameter16 excludeFees(Boolean excludeFees) { + this.excludeFees = excludeFees; + return this; + } + + /** + * Get excludeFees + * @return excludeFees + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXCLUDE_FEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getExcludeFees() { + return excludeFees; + } + + + @JsonProperty(JSON_PROPERTY_EXCLUDE_FEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExcludeFees(Boolean excludeFees) { + this.excludeFees = excludeFees; + } + + + public ExecuteFilterParameter16 type(List type) { + this.type = type; + return this; + } + + public ExecuteFilterParameter16 addTypeItem(String typeItem) { + if (this.type == null) { + this.type = new ArrayList<>(); + } + this.type.add(typeItem); + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(List type) { + this.type = type; + } + + + public ExecuteFilterParameter16 direction(List direction) { + this.direction = direction; + return this; + } + + public ExecuteFilterParameter16 addDirectionItem(DirectionEnum directionItem) { + if (this.direction == null) { + this.direction = new ArrayList<>(); + } + this.direction.add(directionItem); + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDirection(List direction) { + this.direction = direction; + } + + + public ExecuteFilterParameter16 fromAmount(Integer fromAmount) { + this.fromAmount = fromAmount; + return this; + } + + /** + * Get fromAmount + * @return fromAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getFromAmount() { + return fromAmount; + } + + + @JsonProperty(JSON_PROPERTY_FROM_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFromAmount(Integer fromAmount) { + this.fromAmount = fromAmount; + } + + + public ExecuteFilterParameter16 toAmount(Integer toAmount) { + this.toAmount = toAmount; + return this; + } + + /** + * Get toAmount + * @return toAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getToAmount() { + return toAmount; + } + + + @JsonProperty(JSON_PROPERTY_TO_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setToAmount(Integer toAmount) { + this.toAmount = toAmount; + } + + + public ExecuteFilterParameter16 accountType(String accountType) { + this.accountType = accountType; + return this; + } + + /** + * Get accountType + * @return accountType + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountType() { + return accountType; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountType(String accountType) { + this.accountType = accountType; + } + + + /** + * Return true if this execute_filter_parameter_16 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter16 executeFilterParameter16 = (ExecuteFilterParameter16) o; + return Objects.equals(this.accountId, executeFilterParameter16.accountId) && + Objects.equals(this.customerId, executeFilterParameter16.customerId) && + Objects.equals(this.query, executeFilterParameter16.query) && + Objects.equals(this.tags, executeFilterParameter16.tags) && + Objects.equals(this.since, executeFilterParameter16.since) && + Objects.equals(this.until, executeFilterParameter16.until) && + Objects.equals(this.cardId, executeFilterParameter16.cardId) && + Objects.equals(this.excludeFees, executeFilterParameter16.excludeFees) && + Objects.equals(this.type, executeFilterParameter16.type) && + Objects.equals(this.direction, executeFilterParameter16.direction) && + Objects.equals(this.fromAmount, executeFilterParameter16.fromAmount) && + Objects.equals(this.toAmount, executeFilterParameter16.toAmount) && + Objects.equals(this.accountType, executeFilterParameter16.accountType); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, customerId, query, tags, since, until, cardId, excludeFees, type, direction, fromAmount, toAmount, accountType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter16 {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" since: ").append(toIndentedString(since)).append("\n"); + sb.append(" until: ").append(toIndentedString(until)).append("\n"); + sb.append(" cardId: ").append(toIndentedString(cardId)).append("\n"); + sb.append(" excludeFees: ").append(toIndentedString(excludeFees)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" fromAmount: ").append(toIndentedString(fromAmount)).append("\n"); + sb.append(" toAmount: ").append(toIndentedString(toAmount)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `accountId` to the URL query string + if (getAccountId() != null) { + joiner.add(String.format("%saccountId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(String.format("%scustomerId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCustomerId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `query` to the URL query string + if (getQuery() != null) { + joiner.add(String.format("%squery%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getQuery()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (String _key : getTags().keySet()) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTags().get(_key), URLEncoder.encode(String.valueOf(getTags().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `since` to the URL query string + if (getSince() != null) { + joiner.add(String.format("%ssince%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSince()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `until` to the URL query string + if (getUntil() != null) { + joiner.add(String.format("%suntil%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUntil()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardId` to the URL query string + if (getCardId() != null) { + joiner.add(String.format("%scardId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `excludeFees` to the URL query string + if (getExcludeFees() != null) { + joiner.add(String.format("%sexcludeFees%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getExcludeFees()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + for (int i = 0; i < getType().size(); i++) { + joiner.add(String.format("%stype%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getType().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `direction` to the URL query string + if (getDirection() != null) { + for (int i = 0; i < getDirection().size(); i++) { + joiner.add(String.format("%sdirection%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getDirection().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `fromAmount` to the URL query string + if (getFromAmount() != null) { + joiner.add(String.format("%sfromAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFromAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `toAmount` to the URL query string + if (getToAmount() != null) { + joiner.add(String.format("%stoAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getToAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `accountType` to the URL query string + if (getAccountType() != null) { + joiner.add(String.format("%saccountType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter17.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter17.java new file mode 100644 index 00000000..3f0509eb --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter17.java @@ -0,0 +1,150 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter17 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter17.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter17 { + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public ExecuteFilterParameter17() { + } + + public ExecuteFilterParameter17 query(String query) { + this.query = query; + return this; + } + + /** + * Get query + * @return query + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getQuery() { + return query; + } + + + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQuery(String query) { + this.query = query; + } + + + /** + * Return true if this execute_filter_parameter_17 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter17 executeFilterParameter17 = (ExecuteFilterParameter17) o; + return Objects.equals(this.query, executeFilterParameter17.query); + } + + @Override + public int hashCode() { + return Objects.hash(query); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter17 {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `query` to the URL query string + if (getQuery() != null) { + joiner.add(String.format("%squery%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getQuery()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter18.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter18.java new file mode 100644 index 00000000..269b71d9 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter18.java @@ -0,0 +1,396 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter18 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter18.JSON_PROPERTY_ACCOUNT_ID, + ExecuteFilterParameter18.JSON_PROPERTY_CREDIT_ACCOUNT_ID, + ExecuteFilterParameter18.JSON_PROPERTY_CUSTOMER_ID, + ExecuteFilterParameter18.JSON_PROPERTY_STATUS, + ExecuteFilterParameter18.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter18 { + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + private String accountId; + + public static final String JSON_PROPERTY_CREDIT_ACCOUNT_ID = "creditAccountId"; + private String creditAccountId; + + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + private String customerId; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + PENDING("Pending"), + + PENDINGREVIEW("PendingReview"), + + RETURNED("Returned"), + + SENT("Sent"), + + REJECTED("Rejected"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private List status; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + ACHREPAYMENT("AchRepayment"), + + BOOKREPAYMENT("BookRepayment"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private List type; + + public ExecuteFilterParameter18() { + } + + public ExecuteFilterParameter18 accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * @return accountId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountId() { + return accountId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + + public ExecuteFilterParameter18 creditAccountId(String creditAccountId) { + this.creditAccountId = creditAccountId; + return this; + } + + /** + * Get creditAccountId + * @return creditAccountId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREDIT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCreditAccountId() { + return creditAccountId; + } + + + @JsonProperty(JSON_PROPERTY_CREDIT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreditAccountId(String creditAccountId) { + this.creditAccountId = creditAccountId; + } + + + public ExecuteFilterParameter18 customerId(String customerId) { + this.customerId = customerId; + return this; + } + + /** + * Get customerId + * @return customerId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerId() { + return customerId; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + + public ExecuteFilterParameter18 status(List status) { + this.status = status; + return this; + } + + public ExecuteFilterParameter18 addStatusItem(StatusEnum statusItem) { + if (this.status == null) { + this.status = new ArrayList<>(); + } + this.status.add(statusItem); + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(List status) { + this.status = status; + } + + + public ExecuteFilterParameter18 type(List type) { + this.type = type; + return this; + } + + public ExecuteFilterParameter18 addTypeItem(TypeEnum typeItem) { + if (this.type == null) { + this.type = new ArrayList<>(); + } + this.type.add(typeItem); + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(List type) { + this.type = type; + } + + + /** + * Return true if this execute_filter_parameter_18 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter18 executeFilterParameter18 = (ExecuteFilterParameter18) o; + return Objects.equals(this.accountId, executeFilterParameter18.accountId) && + Objects.equals(this.creditAccountId, executeFilterParameter18.creditAccountId) && + Objects.equals(this.customerId, executeFilterParameter18.customerId) && + Objects.equals(this.status, executeFilterParameter18.status) && + Objects.equals(this.type, executeFilterParameter18.type); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, creditAccountId, customerId, status, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter18 {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" creditAccountId: ").append(toIndentedString(creditAccountId)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `accountId` to the URL query string + if (getAccountId() != null) { + joiner.add(String.format("%saccountId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `creditAccountId` to the URL query string + if (getCreditAccountId() != null) { + joiner.add(String.format("%screditAccountId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreditAccountId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(String.format("%scustomerId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCustomerId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + for (int i = 0; i < getStatus().size(); i++) { + joiner.add(String.format("%sstatus%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getStatus().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `type` to the URL query string + if (getType() != null) { + for (int i = 0; i < getType().size(); i++) { + joiner.add(String.format("%stype%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getType().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter19.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter19.java new file mode 100644 index 00000000..65390ae5 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter19.java @@ -0,0 +1,523 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter19 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter19.JSON_PROPERTY_ACCOUNT_ID, + ExecuteFilterParameter19.JSON_PROPERTY_CUSTOMER_ID, + ExecuteFilterParameter19.JSON_PROPERTY_STATUS, + ExecuteFilterParameter19.JSON_PROPERTY_TAGS, + ExecuteFilterParameter19.JSON_PROPERTY_SINCE, + ExecuteFilterParameter19.JSON_PROPERTY_UNTIL, + ExecuteFilterParameter19.JSON_PROPERTY_FROM_AMOUNT, + ExecuteFilterParameter19.JSON_PROPERTY_TO_AMOUNT, + ExecuteFilterParameter19.JSON_PROPERTY_CHECK_NUMBER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter19 { + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + private String accountId; + + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + private String customerId; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + NEW("New"), + + PENDING("Pending"), + + CANCELED("Canceled"), + + REJECTED("Rejected"), + + INDELIVERY("InDelivery"), + + INPRODUCTION("InProduction"), + + DELIVERED("Delivered"), + + RETURNEDTOSENDER("ReturnedToSender"), + + PENDING2("Pending"), + + PROCESSED("Processed"), + + PENDINGREVIEW("PendingReview"), + + MARKEDFORRETURN("MarkedForReturn"), + + RETURNED("Returned"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private List status; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = new HashMap<>(); + + public static final String JSON_PROPERTY_SINCE = "since"; + private String since; + + public static final String JSON_PROPERTY_UNTIL = "until"; + private String until; + + public static final String JSON_PROPERTY_FROM_AMOUNT = "fromAmount"; + private Integer fromAmount; + + public static final String JSON_PROPERTY_TO_AMOUNT = "toAmount"; + private Integer toAmount; + + public static final String JSON_PROPERTY_CHECK_NUMBER = "checkNumber"; + private String checkNumber; + + public ExecuteFilterParameter19() { + } + + public ExecuteFilterParameter19 accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * @return accountId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountId() { + return accountId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + + public ExecuteFilterParameter19 customerId(String customerId) { + this.customerId = customerId; + return this; + } + + /** + * Get customerId + * @return customerId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerId() { + return customerId; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + + public ExecuteFilterParameter19 status(List status) { + this.status = status; + return this; + } + + public ExecuteFilterParameter19 addStatusItem(StatusEnum statusItem) { + if (this.status == null) { + this.status = new ArrayList<>(); + } + this.status.add(statusItem); + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(List status) { + this.status = status; + } + + + public ExecuteFilterParameter19 tags(Map tags) { + this.tags = tags; + return this; + } + + public ExecuteFilterParameter19 putTagsItem(String key, String tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Map tags) { + this.tags = tags; + } + + + public ExecuteFilterParameter19 since(String since) { + this.since = since; + return this; + } + + /** + * Get since + * @return since + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSince() { + return since; + } + + + @JsonProperty(JSON_PROPERTY_SINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSince(String since) { + this.since = since; + } + + + public ExecuteFilterParameter19 until(String until) { + this.until = until; + return this; + } + + /** + * Get until + * @return until + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UNTIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUntil() { + return until; + } + + + @JsonProperty(JSON_PROPERTY_UNTIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUntil(String until) { + this.until = until; + } + + + public ExecuteFilterParameter19 fromAmount(Integer fromAmount) { + this.fromAmount = fromAmount; + return this; + } + + /** + * Get fromAmount + * @return fromAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getFromAmount() { + return fromAmount; + } + + + @JsonProperty(JSON_PROPERTY_FROM_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFromAmount(Integer fromAmount) { + this.fromAmount = fromAmount; + } + + + public ExecuteFilterParameter19 toAmount(Integer toAmount) { + this.toAmount = toAmount; + return this; + } + + /** + * Get toAmount + * @return toAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getToAmount() { + return toAmount; + } + + + @JsonProperty(JSON_PROPERTY_TO_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setToAmount(Integer toAmount) { + this.toAmount = toAmount; + } + + + public ExecuteFilterParameter19 checkNumber(String checkNumber) { + this.checkNumber = checkNumber; + return this; + } + + /** + * Get checkNumber + * @return checkNumber + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCheckNumber() { + return checkNumber; + } + + + @JsonProperty(JSON_PROPERTY_CHECK_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCheckNumber(String checkNumber) { + this.checkNumber = checkNumber; + } + + + /** + * Return true if this execute_filter_parameter_19 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter19 executeFilterParameter19 = (ExecuteFilterParameter19) o; + return Objects.equals(this.accountId, executeFilterParameter19.accountId) && + Objects.equals(this.customerId, executeFilterParameter19.customerId) && + Objects.equals(this.status, executeFilterParameter19.status) && + Objects.equals(this.tags, executeFilterParameter19.tags) && + Objects.equals(this.since, executeFilterParameter19.since) && + Objects.equals(this.until, executeFilterParameter19.until) && + Objects.equals(this.fromAmount, executeFilterParameter19.fromAmount) && + Objects.equals(this.toAmount, executeFilterParameter19.toAmount) && + Objects.equals(this.checkNumber, executeFilterParameter19.checkNumber); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, customerId, status, tags, since, until, fromAmount, toAmount, checkNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter19 {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" since: ").append(toIndentedString(since)).append("\n"); + sb.append(" until: ").append(toIndentedString(until)).append("\n"); + sb.append(" fromAmount: ").append(toIndentedString(fromAmount)).append("\n"); + sb.append(" toAmount: ").append(toIndentedString(toAmount)).append("\n"); + sb.append(" checkNumber: ").append(toIndentedString(checkNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `accountId` to the URL query string + if (getAccountId() != null) { + joiner.add(String.format("%saccountId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(String.format("%scustomerId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCustomerId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + for (int i = 0; i < getStatus().size(); i++) { + joiner.add(String.format("%sstatus%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getStatus().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (String _key : getTags().keySet()) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTags().get(_key), URLEncoder.encode(String.valueOf(getTags().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `since` to the URL query string + if (getSince() != null) { + joiner.add(String.format("%ssince%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSince()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `until` to the URL query string + if (getUntil() != null) { + joiner.add(String.format("%suntil%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUntil()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `fromAmount` to the URL query string + if (getFromAmount() != null) { + joiner.add(String.format("%sfromAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFromAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `toAmount` to the URL query string + if (getToAmount() != null) { + joiner.add(String.format("%stoAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getToAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `checkNumber` to the URL query string + if (getCheckNumber() != null) { + joiner.add(String.format("%scheckNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCheckNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter2.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter2.java new file mode 100644 index 00000000..62def742 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter2.java @@ -0,0 +1,443 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter2 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter2.JSON_PROPERTY_CUSTOMER_ID, + ExecuteFilterParameter2.JSON_PROPERTY_STATUS, + ExecuteFilterParameter2.JSON_PROPERTY_TYPE, + ExecuteFilterParameter2.JSON_PROPERTY_FROM_BALANCE, + ExecuteFilterParameter2.JSON_PROPERTY_TO_BALANCE, + ExecuteFilterParameter2.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter2 { + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + private String customerId; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + OPEN("Open"), + + FROZEN("Frozen"), + + CLOSED("Closed"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private List status; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + DEPOSIT("deposit"), + + CREDIT("credit"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private List type; + + public static final String JSON_PROPERTY_FROM_BALANCE = "fromBalance"; + private BigDecimal fromBalance; + + public static final String JSON_PROPERTY_TO_BALANCE = "toBalance"; + private BigDecimal toBalance; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = new HashMap<>(); + + public ExecuteFilterParameter2() { + } + + public ExecuteFilterParameter2 customerId(String customerId) { + this.customerId = customerId; + return this; + } + + /** + * Get customerId + * @return customerId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerId() { + return customerId; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + + public ExecuteFilterParameter2 status(List status) { + this.status = status; + return this; + } + + public ExecuteFilterParameter2 addStatusItem(StatusEnum statusItem) { + if (this.status == null) { + this.status = new ArrayList<>(); + } + this.status.add(statusItem); + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(List status) { + this.status = status; + } + + + public ExecuteFilterParameter2 type(List type) { + this.type = type; + return this; + } + + public ExecuteFilterParameter2 addTypeItem(TypeEnum typeItem) { + if (this.type == null) { + this.type = new ArrayList<>(); + } + this.type.add(typeItem); + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(List type) { + this.type = type; + } + + + public ExecuteFilterParameter2 fromBalance(BigDecimal fromBalance) { + this.fromBalance = fromBalance; + return this; + } + + /** + * Get fromBalance + * @return fromBalance + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getFromBalance() { + return fromBalance; + } + + + @JsonProperty(JSON_PROPERTY_FROM_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFromBalance(BigDecimal fromBalance) { + this.fromBalance = fromBalance; + } + + + public ExecuteFilterParameter2 toBalance(BigDecimal toBalance) { + this.toBalance = toBalance; + return this; + } + + /** + * Get toBalance + * @return toBalance + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getToBalance() { + return toBalance; + } + + + @JsonProperty(JSON_PROPERTY_TO_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setToBalance(BigDecimal toBalance) { + this.toBalance = toBalance; + } + + + public ExecuteFilterParameter2 tags(Map tags) { + this.tags = tags; + return this; + } + + public ExecuteFilterParameter2 putTagsItem(String key, String tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Map tags) { + this.tags = tags; + } + + + /** + * Return true if this execute_filter_parameter_2 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter2 executeFilterParameter2 = (ExecuteFilterParameter2) o; + return Objects.equals(this.customerId, executeFilterParameter2.customerId) && + Objects.equals(this.status, executeFilterParameter2.status) && + Objects.equals(this.type, executeFilterParameter2.type) && + Objects.equals(this.fromBalance, executeFilterParameter2.fromBalance) && + Objects.equals(this.toBalance, executeFilterParameter2.toBalance) && + Objects.equals(this.tags, executeFilterParameter2.tags); + } + + @Override + public int hashCode() { + return Objects.hash(customerId, status, type, fromBalance, toBalance, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter2 {\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" fromBalance: ").append(toIndentedString(fromBalance)).append("\n"); + sb.append(" toBalance: ").append(toIndentedString(toBalance)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(String.format("%scustomerId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCustomerId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + for (int i = 0; i < getStatus().size(); i++) { + joiner.add(String.format("%sstatus%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getStatus().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `type` to the URL query string + if (getType() != null) { + for (int i = 0; i < getType().size(); i++) { + joiner.add(String.format("%stype%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getType().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `fromBalance` to the URL query string + if (getFromBalance() != null) { + joiner.add(String.format("%sfromBalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFromBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `toBalance` to the URL query string + if (getToBalance() != null) { + joiner.add(String.format("%stoBalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getToBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (String _key : getTags().keySet()) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTags().get(_key), URLEncoder.encode(String.valueOf(getTags().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter20.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter20.java new file mode 100644 index 00000000..e984565d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter20.java @@ -0,0 +1,501 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter20 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter20.JSON_PROPERTY_ACCOUNT_ID, + ExecuteFilterParameter20.JSON_PROPERTY_CUSTOMER_ID, + ExecuteFilterParameter20.JSON_PROPERTY_STATUS, + ExecuteFilterParameter20.JSON_PROPERTY_TAGS, + ExecuteFilterParameter20.JSON_PROPERTY_SINCE, + ExecuteFilterParameter20.JSON_PROPERTY_UNTIL, + ExecuteFilterParameter20.JSON_PROPERTY_FROM_AMOUNT, + ExecuteFilterParameter20.JSON_PROPERTY_TO_AMOUNT, + ExecuteFilterParameter20.JSON_PROPERTY_CHECK_NUMBER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter20 { + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + private String accountId; + + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + private String customerId; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + ACTIVE("Active"), + + DISABLED("Disabled"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private List status; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = new HashMap<>(); + + public static final String JSON_PROPERTY_SINCE = "since"; + private String since; + + public static final String JSON_PROPERTY_UNTIL = "until"; + private String until; + + public static final String JSON_PROPERTY_FROM_AMOUNT = "fromAmount"; + private Integer fromAmount; + + public static final String JSON_PROPERTY_TO_AMOUNT = "toAmount"; + private Integer toAmount; + + public static final String JSON_PROPERTY_CHECK_NUMBER = "checkNumber"; + private String checkNumber; + + public ExecuteFilterParameter20() { + } + + public ExecuteFilterParameter20 accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * @return accountId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountId() { + return accountId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + + public ExecuteFilterParameter20 customerId(String customerId) { + this.customerId = customerId; + return this; + } + + /** + * Get customerId + * @return customerId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerId() { + return customerId; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + + public ExecuteFilterParameter20 status(List status) { + this.status = status; + return this; + } + + public ExecuteFilterParameter20 addStatusItem(StatusEnum statusItem) { + if (this.status == null) { + this.status = new ArrayList<>(); + } + this.status.add(statusItem); + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(List status) { + this.status = status; + } + + + public ExecuteFilterParameter20 tags(Map tags) { + this.tags = tags; + return this; + } + + public ExecuteFilterParameter20 putTagsItem(String key, String tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Map tags) { + this.tags = tags; + } + + + public ExecuteFilterParameter20 since(String since) { + this.since = since; + return this; + } + + /** + * Get since + * @return since + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSince() { + return since; + } + + + @JsonProperty(JSON_PROPERTY_SINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSince(String since) { + this.since = since; + } + + + public ExecuteFilterParameter20 until(String until) { + this.until = until; + return this; + } + + /** + * Get until + * @return until + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UNTIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUntil() { + return until; + } + + + @JsonProperty(JSON_PROPERTY_UNTIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUntil(String until) { + this.until = until; + } + + + public ExecuteFilterParameter20 fromAmount(Integer fromAmount) { + this.fromAmount = fromAmount; + return this; + } + + /** + * Get fromAmount + * @return fromAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getFromAmount() { + return fromAmount; + } + + + @JsonProperty(JSON_PROPERTY_FROM_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFromAmount(Integer fromAmount) { + this.fromAmount = fromAmount; + } + + + public ExecuteFilterParameter20 toAmount(Integer toAmount) { + this.toAmount = toAmount; + return this; + } + + /** + * Get toAmount + * @return toAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getToAmount() { + return toAmount; + } + + + @JsonProperty(JSON_PROPERTY_TO_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setToAmount(Integer toAmount) { + this.toAmount = toAmount; + } + + + public ExecuteFilterParameter20 checkNumber(String checkNumber) { + this.checkNumber = checkNumber; + return this; + } + + /** + * Get checkNumber + * @return checkNumber + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCheckNumber() { + return checkNumber; + } + + + @JsonProperty(JSON_PROPERTY_CHECK_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCheckNumber(String checkNumber) { + this.checkNumber = checkNumber; + } + + + /** + * Return true if this execute_filter_parameter_20 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter20 executeFilterParameter20 = (ExecuteFilterParameter20) o; + return Objects.equals(this.accountId, executeFilterParameter20.accountId) && + Objects.equals(this.customerId, executeFilterParameter20.customerId) && + Objects.equals(this.status, executeFilterParameter20.status) && + Objects.equals(this.tags, executeFilterParameter20.tags) && + Objects.equals(this.since, executeFilterParameter20.since) && + Objects.equals(this.until, executeFilterParameter20.until) && + Objects.equals(this.fromAmount, executeFilterParameter20.fromAmount) && + Objects.equals(this.toAmount, executeFilterParameter20.toAmount) && + Objects.equals(this.checkNumber, executeFilterParameter20.checkNumber); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, customerId, status, tags, since, until, fromAmount, toAmount, checkNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter20 {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" since: ").append(toIndentedString(since)).append("\n"); + sb.append(" until: ").append(toIndentedString(until)).append("\n"); + sb.append(" fromAmount: ").append(toIndentedString(fromAmount)).append("\n"); + sb.append(" toAmount: ").append(toIndentedString(toAmount)).append("\n"); + sb.append(" checkNumber: ").append(toIndentedString(checkNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `accountId` to the URL query string + if (getAccountId() != null) { + joiner.add(String.format("%saccountId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(String.format("%scustomerId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCustomerId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + for (int i = 0; i < getStatus().size(); i++) { + joiner.add(String.format("%sstatus%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getStatus().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (String _key : getTags().keySet()) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTags().get(_key), URLEncoder.encode(String.valueOf(getTags().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `since` to the URL query string + if (getSince() != null) { + joiner.add(String.format("%ssince%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSince()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `until` to the URL query string + if (getUntil() != null) { + joiner.add(String.format("%suntil%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUntil()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `fromAmount` to the URL query string + if (getFromAmount() != null) { + joiner.add(String.format("%sfromAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFromAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `toAmount` to the URL query string + if (getToAmount() != null) { + joiner.add(String.format("%stoAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getToAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `checkNumber` to the URL query string + if (getCheckNumber() != null) { + joiner.add(String.format("%scheckNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCheckNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter3.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter3.java new file mode 100644 index 00000000..898fbf3e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter3.java @@ -0,0 +1,321 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter3 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter3.JSON_PROPERTY_QUERY, + ExecuteFilterParameter3.JSON_PROPERTY_STATUS, + ExecuteFilterParameter3.JSON_PROPERTY_EMAIL, + ExecuteFilterParameter3.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter3 { + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + ACTIVE("Active"), + + ARCHIVED("Archived"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private List status; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = new HashMap<>(); + + public ExecuteFilterParameter3() { + } + + public ExecuteFilterParameter3 query(String query) { + this.query = query; + return this; + } + + /** + * Get query + * @return query + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getQuery() { + return query; + } + + + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQuery(String query) { + this.query = query; + } + + + public ExecuteFilterParameter3 status(List status) { + this.status = status; + return this; + } + + public ExecuteFilterParameter3 addStatusItem(StatusEnum statusItem) { + if (this.status == null) { + this.status = new ArrayList<>(); + } + this.status.add(statusItem); + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(List status) { + this.status = status; + } + + + public ExecuteFilterParameter3 email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public ExecuteFilterParameter3 tags(Map tags) { + this.tags = tags; + return this; + } + + public ExecuteFilterParameter3 putTagsItem(String key, String tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Map tags) { + this.tags = tags; + } + + + /** + * Return true if this execute_filter_parameter_3 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter3 executeFilterParameter3 = (ExecuteFilterParameter3) o; + return Objects.equals(this.query, executeFilterParameter3.query) && + Objects.equals(this.status, executeFilterParameter3.status) && + Objects.equals(this.email, executeFilterParameter3.email) && + Objects.equals(this.tags, executeFilterParameter3.tags); + } + + @Override + public int hashCode() { + return Objects.hash(query, status, email, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter3 {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `query` to the URL query string + if (getQuery() != null) { + joiner.add(String.format("%squery%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getQuery()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + for (int i = 0; i < getStatus().size(); i++) { + joiner.add(String.format("%sstatus%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getStatus().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (String _key : getTags().keySet()) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTags().get(_key), URLEncoder.encode(String.valueOf(getTags().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter4.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter4.java new file mode 100644 index 00000000..5af2feb4 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter4.java @@ -0,0 +1,798 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter4 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter4.JSON_PROPERTY_ACCOUNT_ID, + ExecuteFilterParameter4.JSON_PROPERTY_CUSTOMER_ID, + ExecuteFilterParameter4.JSON_PROPERTY_COUNTERPARTY_ACCOUNT_ID, + ExecuteFilterParameter4.JSON_PROPERTY_STATUS, + ExecuteFilterParameter4.JSON_PROPERTY_TYPE, + ExecuteFilterParameter4.JSON_PROPERTY_DIRECTION, + ExecuteFilterParameter4.JSON_PROPERTY_SINCE, + ExecuteFilterParameter4.JSON_PROPERTY_UNTIL, + ExecuteFilterParameter4.JSON_PROPERTY_FROM_AMOUNT, + ExecuteFilterParameter4.JSON_PROPERTY_TO_AMOUNT, + ExecuteFilterParameter4.JSON_PROPERTY_RECURRING_PAYMENT_ID, + ExecuteFilterParameter4.JSON_PROPERTY_FEATURE, + ExecuteFilterParameter4.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter4 { + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + private String accountId; + + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + private String customerId; + + public static final String JSON_PROPERTY_COUNTERPARTY_ACCOUNT_ID = "counterpartyAccountId"; + private String counterpartyAccountId; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + REJECTED("Rejected"), + + PENDING("Pending"), + + CANCELED("Canceled"), + + PENDING_REVIEW("Pending Review"), + + CLEARING("Clearing"), + + SENT("Sent"), + + RETURNED("Returned"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private List status; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + ACHPAYMENT("AchPayment"), + + BOOKPAYMENT("BookPayment"), + + WIREPAYMENT("WirePayment"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private List type; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + DEBIT("Debit"), + + CREDIT("Credit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private List direction; + + public static final String JSON_PROPERTY_SINCE = "since"; + private String since; + + public static final String JSON_PROPERTY_UNTIL = "until"; + private String until; + + public static final String JSON_PROPERTY_FROM_AMOUNT = "fromAmount"; + private Integer fromAmount; + + public static final String JSON_PROPERTY_TO_AMOUNT = "toAmount"; + private Integer toAmount; + + public static final String JSON_PROPERTY_RECURRING_PAYMENT_ID = "recurringPaymentId"; + private Integer recurringPaymentId; + + /** + * Gets or Sets feature + */ + public enum FeatureEnum { + SAMEDAY("SameDay"), + + RECURRINGPAYMENT("RecurringPayment"); + + private String value; + + FeatureEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FeatureEnum fromValue(String value) { + for (FeatureEnum b : FeatureEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_FEATURE = "feature"; + private List feature; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = new HashMap<>(); + + public ExecuteFilterParameter4() { + } + + public ExecuteFilterParameter4 accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * @return accountId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountId() { + return accountId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + + public ExecuteFilterParameter4 customerId(String customerId) { + this.customerId = customerId; + return this; + } + + /** + * Get customerId + * @return customerId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerId() { + return customerId; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + + public ExecuteFilterParameter4 counterpartyAccountId(String counterpartyAccountId) { + this.counterpartyAccountId = counterpartyAccountId; + return this; + } + + /** + * Get counterpartyAccountId + * @return counterpartyAccountId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCounterpartyAccountId() { + return counterpartyAccountId; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterpartyAccountId(String counterpartyAccountId) { + this.counterpartyAccountId = counterpartyAccountId; + } + + + public ExecuteFilterParameter4 status(List status) { + this.status = status; + return this; + } + + public ExecuteFilterParameter4 addStatusItem(StatusEnum statusItem) { + if (this.status == null) { + this.status = new ArrayList<>(); + } + this.status.add(statusItem); + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(List status) { + this.status = status; + } + + + public ExecuteFilterParameter4 type(List type) { + this.type = type; + return this; + } + + public ExecuteFilterParameter4 addTypeItem(TypeEnum typeItem) { + if (this.type == null) { + this.type = new ArrayList<>(); + } + this.type.add(typeItem); + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(List type) { + this.type = type; + } + + + public ExecuteFilterParameter4 direction(List direction) { + this.direction = direction; + return this; + } + + public ExecuteFilterParameter4 addDirectionItem(DirectionEnum directionItem) { + if (this.direction == null) { + this.direction = new ArrayList<>(); + } + this.direction.add(directionItem); + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDirection(List direction) { + this.direction = direction; + } + + + public ExecuteFilterParameter4 since(String since) { + this.since = since; + return this; + } + + /** + * Get since + * @return since + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSince() { + return since; + } + + + @JsonProperty(JSON_PROPERTY_SINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSince(String since) { + this.since = since; + } + + + public ExecuteFilterParameter4 until(String until) { + this.until = until; + return this; + } + + /** + * Get until + * @return until + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UNTIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUntil() { + return until; + } + + + @JsonProperty(JSON_PROPERTY_UNTIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUntil(String until) { + this.until = until; + } + + + public ExecuteFilterParameter4 fromAmount(Integer fromAmount) { + this.fromAmount = fromAmount; + return this; + } + + /** + * Get fromAmount + * @return fromAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getFromAmount() { + return fromAmount; + } + + + @JsonProperty(JSON_PROPERTY_FROM_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFromAmount(Integer fromAmount) { + this.fromAmount = fromAmount; + } + + + public ExecuteFilterParameter4 toAmount(Integer toAmount) { + this.toAmount = toAmount; + return this; + } + + /** + * Get toAmount + * @return toAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getToAmount() { + return toAmount; + } + + + @JsonProperty(JSON_PROPERTY_TO_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setToAmount(Integer toAmount) { + this.toAmount = toAmount; + } + + + public ExecuteFilterParameter4 recurringPaymentId(Integer recurringPaymentId) { + this.recurringPaymentId = recurringPaymentId; + return this; + } + + /** + * Get recurringPaymentId + * @return recurringPaymentId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECURRING_PAYMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getRecurringPaymentId() { + return recurringPaymentId; + } + + + @JsonProperty(JSON_PROPERTY_RECURRING_PAYMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRecurringPaymentId(Integer recurringPaymentId) { + this.recurringPaymentId = recurringPaymentId; + } + + + public ExecuteFilterParameter4 feature(List feature) { + this.feature = feature; + return this; + } + + public ExecuteFilterParameter4 addFeatureItem(FeatureEnum featureItem) { + if (this.feature == null) { + this.feature = new ArrayList<>(); + } + this.feature.add(featureItem); + return this; + } + + /** + * Get feature + * @return feature + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEATURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getFeature() { + return feature; + } + + + @JsonProperty(JSON_PROPERTY_FEATURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFeature(List feature) { + this.feature = feature; + } + + + public ExecuteFilterParameter4 tags(Map tags) { + this.tags = tags; + return this; + } + + public ExecuteFilterParameter4 putTagsItem(String key, String tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Map tags) { + this.tags = tags; + } + + + /** + * Return true if this execute_filter_parameter_4 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter4 executeFilterParameter4 = (ExecuteFilterParameter4) o; + return Objects.equals(this.accountId, executeFilterParameter4.accountId) && + Objects.equals(this.customerId, executeFilterParameter4.customerId) && + Objects.equals(this.counterpartyAccountId, executeFilterParameter4.counterpartyAccountId) && + Objects.equals(this.status, executeFilterParameter4.status) && + Objects.equals(this.type, executeFilterParameter4.type) && + Objects.equals(this.direction, executeFilterParameter4.direction) && + Objects.equals(this.since, executeFilterParameter4.since) && + Objects.equals(this.until, executeFilterParameter4.until) && + Objects.equals(this.fromAmount, executeFilterParameter4.fromAmount) && + Objects.equals(this.toAmount, executeFilterParameter4.toAmount) && + Objects.equals(this.recurringPaymentId, executeFilterParameter4.recurringPaymentId) && + Objects.equals(this.feature, executeFilterParameter4.feature) && + Objects.equals(this.tags, executeFilterParameter4.tags); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, customerId, counterpartyAccountId, status, type, direction, since, until, fromAmount, toAmount, recurringPaymentId, feature, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter4 {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" counterpartyAccountId: ").append(toIndentedString(counterpartyAccountId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" since: ").append(toIndentedString(since)).append("\n"); + sb.append(" until: ").append(toIndentedString(until)).append("\n"); + sb.append(" fromAmount: ").append(toIndentedString(fromAmount)).append("\n"); + sb.append(" toAmount: ").append(toIndentedString(toAmount)).append("\n"); + sb.append(" recurringPaymentId: ").append(toIndentedString(recurringPaymentId)).append("\n"); + sb.append(" feature: ").append(toIndentedString(feature)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `accountId` to the URL query string + if (getAccountId() != null) { + joiner.add(String.format("%saccountId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(String.format("%scustomerId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCustomerId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterpartyAccountId` to the URL query string + if (getCounterpartyAccountId() != null) { + joiner.add(String.format("%scounterpartyAccountId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCounterpartyAccountId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + for (int i = 0; i < getStatus().size(); i++) { + joiner.add(String.format("%sstatus%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getStatus().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `type` to the URL query string + if (getType() != null) { + for (int i = 0; i < getType().size(); i++) { + joiner.add(String.format("%stype%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getType().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `direction` to the URL query string + if (getDirection() != null) { + for (int i = 0; i < getDirection().size(); i++) { + joiner.add(String.format("%sdirection%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getDirection().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `since` to the URL query string + if (getSince() != null) { + joiner.add(String.format("%ssince%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSince()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `until` to the URL query string + if (getUntil() != null) { + joiner.add(String.format("%suntil%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUntil()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `fromAmount` to the URL query string + if (getFromAmount() != null) { + joiner.add(String.format("%sfromAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFromAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `toAmount` to the URL query string + if (getToAmount() != null) { + joiner.add(String.format("%stoAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getToAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `recurringPaymentId` to the URL query string + if (getRecurringPaymentId() != null) { + joiner.add(String.format("%srecurringPaymentId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRecurringPaymentId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `feature` to the URL query string + if (getFeature() != null) { + for (int i = 0; i < getFeature().size(); i++) { + joiner.add(String.format("%sfeature%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getFeature().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (String _key : getTags().keySet()) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTags().get(_key), URLEncoder.encode(String.valueOf(getTags().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter5.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter5.java new file mode 100644 index 00000000..e8f233a3 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter5.java @@ -0,0 +1,359 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter5 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter5.JSON_PROPERTY_CUSTOMER_ID, + ExecuteFilterParameter5.JSON_PROPERTY_ACCOUNT_NUMBER, + ExecuteFilterParameter5.JSON_PROPERTY_ROUTING_NUMBER, + ExecuteFilterParameter5.JSON_PROPERTY_PERMISSIONS, + ExecuteFilterParameter5.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter5 { + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + private String customerId; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + private String accountNumber; + + public static final String JSON_PROPERTY_ROUTING_NUMBER = "routingNumber"; + private String routingNumber; + + /** + * Gets or Sets permissions + */ + public enum PermissionsEnum { + CREDITONLY("CreditOnly"), + + DEBITONLY("DebitOnly"), + + CREDITANDDEBIT("CreditAndDebit"); + + private String value; + + PermissionsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PermissionsEnum fromValue(String value) { + for (PermissionsEnum b : PermissionsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PERMISSIONS = "permissions"; + private List permissions; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = new HashMap<>(); + + public ExecuteFilterParameter5() { + } + + public ExecuteFilterParameter5 customerId(String customerId) { + this.customerId = customerId; + return this; + } + + /** + * Get customerId + * @return customerId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerId() { + return customerId; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + + public ExecuteFilterParameter5 accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountNumber() { + return accountNumber; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public ExecuteFilterParameter5 routingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; + } + + /** + * Get routingNumber + * @return routingNumber + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRoutingNumber() { + return routingNumber; + } + + + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + } + + + public ExecuteFilterParameter5 permissions(List permissions) { + this.permissions = permissions; + return this; + } + + public ExecuteFilterParameter5 addPermissionsItem(PermissionsEnum permissionsItem) { + if (this.permissions == null) { + this.permissions = new ArrayList<>(); + } + this.permissions.add(permissionsItem); + return this; + } + + /** + * Get permissions + * @return permissions + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERMISSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getPermissions() { + return permissions; + } + + + @JsonProperty(JSON_PROPERTY_PERMISSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPermissions(List permissions) { + this.permissions = permissions; + } + + + public ExecuteFilterParameter5 tags(Map tags) { + this.tags = tags; + return this; + } + + public ExecuteFilterParameter5 putTagsItem(String key, String tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Map tags) { + this.tags = tags; + } + + + /** + * Return true if this execute_filter_parameter_5 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter5 executeFilterParameter5 = (ExecuteFilterParameter5) o; + return Objects.equals(this.customerId, executeFilterParameter5.customerId) && + Objects.equals(this.accountNumber, executeFilterParameter5.accountNumber) && + Objects.equals(this.routingNumber, executeFilterParameter5.routingNumber) && + Objects.equals(this.permissions, executeFilterParameter5.permissions) && + Objects.equals(this.tags, executeFilterParameter5.tags); + } + + @Override + public int hashCode() { + return Objects.hash(customerId, accountNumber, routingNumber, permissions, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter5 {\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(String.format("%scustomerId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCustomerId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add(String.format("%saccountNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `routingNumber` to the URL query string + if (getRoutingNumber() != null) { + joiner.add(String.format("%sroutingNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRoutingNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `permissions` to the URL query string + if (getPermissions() != null) { + for (int i = 0; i < getPermissions().size(); i++) { + joiner.add(String.format("%spermissions%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getPermissions().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (String _key : getTags().keySet()) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTags().get(_key), URLEncoder.encode(String.valueOf(getTags().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter6.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter6.java new file mode 100644 index 00000000..8bb26f67 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter6.java @@ -0,0 +1,465 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter6 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter6.JSON_PROPERTY_ACCOUNT_ID, + ExecuteFilterParameter6.JSON_PROPERTY_CUSTOMER_ID, + ExecuteFilterParameter6.JSON_PROPERTY_STATUS, + ExecuteFilterParameter6.JSON_PROPERTY_TYPE, + ExecuteFilterParameter6.JSON_PROPERTY_FROM_START_TIME, + ExecuteFilterParameter6.JSON_PROPERTY_TO_START_TIME, + ExecuteFilterParameter6.JSON_PROPERTY_FROM_END_TIME, + ExecuteFilterParameter6.JSON_PROPERTY_TO_END_TIME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter6 { + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + private String accountId; + + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + private String customerId; + + public static final String JSON_PROPERTY_STATUS = "status"; + private List status; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + RECURRINGCREDITACHPAYMENT("recurringCreditAchPayment"), + + RECURRINGDEBITACHPAYMENT("recurringDebitAchPayment"), + + RECURRINGCREDITBOOKPAYMENT("recurringCreditBookPayment"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private List type; + + public static final String JSON_PROPERTY_FROM_START_TIME = "fromStartTime"; + private String fromStartTime; + + public static final String JSON_PROPERTY_TO_START_TIME = "toStartTime"; + private String toStartTime; + + public static final String JSON_PROPERTY_FROM_END_TIME = "fromEndTime"; + private String fromEndTime; + + public static final String JSON_PROPERTY_TO_END_TIME = "toEndTime"; + private String toEndTime; + + public ExecuteFilterParameter6() { + } + + public ExecuteFilterParameter6 accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * @return accountId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountId() { + return accountId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + + public ExecuteFilterParameter6 customerId(String customerId) { + this.customerId = customerId; + return this; + } + + /** + * Get customerId + * @return customerId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerId() { + return customerId; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + + public ExecuteFilterParameter6 status(List status) { + this.status = status; + return this; + } + + public ExecuteFilterParameter6 addStatusItem(String statusItem) { + if (this.status == null) { + this.status = new ArrayList<>(); + } + this.status.add(statusItem); + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(List status) { + this.status = status; + } + + + public ExecuteFilterParameter6 type(List type) { + this.type = type; + return this; + } + + public ExecuteFilterParameter6 addTypeItem(TypeEnum typeItem) { + if (this.type == null) { + this.type = new ArrayList<>(); + } + this.type.add(typeItem); + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(List type) { + this.type = type; + } + + + public ExecuteFilterParameter6 fromStartTime(String fromStartTime) { + this.fromStartTime = fromStartTime; + return this; + } + + /** + * Get fromStartTime + * @return fromStartTime + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM_START_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFromStartTime() { + return fromStartTime; + } + + + @JsonProperty(JSON_PROPERTY_FROM_START_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFromStartTime(String fromStartTime) { + this.fromStartTime = fromStartTime; + } + + + public ExecuteFilterParameter6 toStartTime(String toStartTime) { + this.toStartTime = toStartTime; + return this; + } + + /** + * Get toStartTime + * @return toStartTime + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO_START_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getToStartTime() { + return toStartTime; + } + + + @JsonProperty(JSON_PROPERTY_TO_START_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setToStartTime(String toStartTime) { + this.toStartTime = toStartTime; + } + + + public ExecuteFilterParameter6 fromEndTime(String fromEndTime) { + this.fromEndTime = fromEndTime; + return this; + } + + /** + * Get fromEndTime + * @return fromEndTime + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM_END_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFromEndTime() { + return fromEndTime; + } + + + @JsonProperty(JSON_PROPERTY_FROM_END_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFromEndTime(String fromEndTime) { + this.fromEndTime = fromEndTime; + } + + + public ExecuteFilterParameter6 toEndTime(String toEndTime) { + this.toEndTime = toEndTime; + return this; + } + + /** + * Get toEndTime + * @return toEndTime + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO_END_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getToEndTime() { + return toEndTime; + } + + + @JsonProperty(JSON_PROPERTY_TO_END_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setToEndTime(String toEndTime) { + this.toEndTime = toEndTime; + } + + + /** + * Return true if this execute_filter_parameter_6 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter6 executeFilterParameter6 = (ExecuteFilterParameter6) o; + return Objects.equals(this.accountId, executeFilterParameter6.accountId) && + Objects.equals(this.customerId, executeFilterParameter6.customerId) && + Objects.equals(this.status, executeFilterParameter6.status) && + Objects.equals(this.type, executeFilterParameter6.type) && + Objects.equals(this.fromStartTime, executeFilterParameter6.fromStartTime) && + Objects.equals(this.toStartTime, executeFilterParameter6.toStartTime) && + Objects.equals(this.fromEndTime, executeFilterParameter6.fromEndTime) && + Objects.equals(this.toEndTime, executeFilterParameter6.toEndTime); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, customerId, status, type, fromStartTime, toStartTime, fromEndTime, toEndTime); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter6 {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" fromStartTime: ").append(toIndentedString(fromStartTime)).append("\n"); + sb.append(" toStartTime: ").append(toIndentedString(toStartTime)).append("\n"); + sb.append(" fromEndTime: ").append(toIndentedString(fromEndTime)).append("\n"); + sb.append(" toEndTime: ").append(toIndentedString(toEndTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `accountId` to the URL query string + if (getAccountId() != null) { + joiner.add(String.format("%saccountId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(String.format("%scustomerId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCustomerId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + for (int i = 0; i < getStatus().size(); i++) { + joiner.add(String.format("%sstatus%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getStatus().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `type` to the URL query string + if (getType() != null) { + for (int i = 0; i < getType().size(); i++) { + joiner.add(String.format("%stype%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getType().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `fromStartTime` to the URL query string + if (getFromStartTime() != null) { + joiner.add(String.format("%sfromStartTime%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFromStartTime()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `toStartTime` to the URL query string + if (getToStartTime() != null) { + joiner.add(String.format("%stoStartTime%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getToStartTime()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `fromEndTime` to the URL query string + if (getFromEndTime() != null) { + joiner.add(String.format("%sfromEndTime%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFromEndTime()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `toEndTime` to the URL query string + if (getToEndTime() != null) { + joiner.add(String.format("%stoEndTime%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getToEndTime()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter7.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter7.java new file mode 100644 index 00000000..9b6d88dc --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter7.java @@ -0,0 +1,331 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter7 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter7.JSON_PROPERTY_STATUS, + ExecuteFilterParameter7.JSON_PROPERTY_ACCOUNT_ID, + ExecuteFilterParameter7.JSON_PROPERTY_CUSTOMER_ID, + ExecuteFilterParameter7.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter7 { + /** + * Gets or Sets status + */ + public enum StatusEnum { + INACTIVE("Inactive"), + + ACTIVE("Active"), + + STOLEN("Stolen"), + + LOST("Lost"), + + FROZEN("Frozen"), + + CLOSEDBYCUSTOMER("ClosedByCustomer"), + + SUSPECTEDFRAUD("SuspectedFraud"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private List status; + + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + private String accountId; + + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + private String customerId; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = new HashMap<>(); + + public ExecuteFilterParameter7() { + } + + public ExecuteFilterParameter7 status(List status) { + this.status = status; + return this; + } + + public ExecuteFilterParameter7 addStatusItem(StatusEnum statusItem) { + if (this.status == null) { + this.status = new ArrayList<>(); + } + this.status.add(statusItem); + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(List status) { + this.status = status; + } + + + public ExecuteFilterParameter7 accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * @return accountId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountId() { + return accountId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + + public ExecuteFilterParameter7 customerId(String customerId) { + this.customerId = customerId; + return this; + } + + /** + * Get customerId + * @return customerId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerId() { + return customerId; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + + public ExecuteFilterParameter7 tags(Map tags) { + this.tags = tags; + return this; + } + + public ExecuteFilterParameter7 putTagsItem(String key, String tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Map tags) { + this.tags = tags; + } + + + /** + * Return true if this execute_filter_parameter_7 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter7 executeFilterParameter7 = (ExecuteFilterParameter7) o; + return Objects.equals(this.status, executeFilterParameter7.status) && + Objects.equals(this.accountId, executeFilterParameter7.accountId) && + Objects.equals(this.customerId, executeFilterParameter7.customerId) && + Objects.equals(this.tags, executeFilterParameter7.tags); + } + + @Override + public int hashCode() { + return Objects.hash(status, accountId, customerId, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter7 {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + for (int i = 0; i < getStatus().size(); i++) { + joiner.add(String.format("%sstatus%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getStatus().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `accountId` to the URL query string + if (getAccountId() != null) { + joiner.add(String.format("%saccountId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(String.format("%scustomerId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCustomerId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (String _key : getTags().keySet()) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTags().get(_key), URLEncoder.encode(String.valueOf(getTags().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter8.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter8.java new file mode 100644 index 00000000..4537b00d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter8.java @@ -0,0 +1,575 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter8 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter8.JSON_PROPERTY_ACCOUNT_ID, + ExecuteFilterParameter8.JSON_PROPERTY_ACCOUNT_TYPE, + ExecuteFilterParameter8.JSON_PROPERTY_CUSTOMER_ID, + ExecuteFilterParameter8.JSON_PROPERTY_CARD_ID, + ExecuteFilterParameter8.JSON_PROPERTY_INCLUDE_NON_AUTHORIZED, + ExecuteFilterParameter8.JSON_PROPERTY_MERCHANT_CATEGORY_CODE, + ExecuteFilterParameter8.JSON_PROPERTY_SINCE, + ExecuteFilterParameter8.JSON_PROPERTY_UNTIL, + ExecuteFilterParameter8.JSON_PROPERTY_FROM_AMOUNT, + ExecuteFilterParameter8.JSON_PROPERTY_TO_AMOUNT, + ExecuteFilterParameter8.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter8 { + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + private String accountId; + + public static final String JSON_PROPERTY_ACCOUNT_TYPE = "accountType"; + private String accountType; + + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + private String customerId; + + public static final String JSON_PROPERTY_CARD_ID = "cardId"; + private String cardId; + + public static final String JSON_PROPERTY_INCLUDE_NON_AUTHORIZED = "includeNonAuthorized"; + private Boolean includeNonAuthorized; + + public static final String JSON_PROPERTY_MERCHANT_CATEGORY_CODE = "merchantCategoryCode"; + private List merchantCategoryCode; + + public static final String JSON_PROPERTY_SINCE = "since"; + private String since; + + public static final String JSON_PROPERTY_UNTIL = "until"; + private String until; + + public static final String JSON_PROPERTY_FROM_AMOUNT = "fromAmount"; + private Integer fromAmount; + + public static final String JSON_PROPERTY_TO_AMOUNT = "toAmount"; + private Integer toAmount; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + AUTHORIZED("Authorized"), + + COMPLETED("Completed"), + + CANCELED("Canceled"), + + DECLINED("Declined"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private List status; + + public ExecuteFilterParameter8() { + } + + public ExecuteFilterParameter8 accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * @return accountId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountId() { + return accountId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + + public ExecuteFilterParameter8 accountType(String accountType) { + this.accountType = accountType; + return this; + } + + /** + * Get accountType + * @return accountType + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountType() { + return accountType; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountType(String accountType) { + this.accountType = accountType; + } + + + public ExecuteFilterParameter8 customerId(String customerId) { + this.customerId = customerId; + return this; + } + + /** + * Get customerId + * @return customerId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerId() { + return customerId; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + + public ExecuteFilterParameter8 cardId(String cardId) { + this.cardId = cardId; + return this; + } + + /** + * Get cardId + * @return cardId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCardId() { + return cardId; + } + + + @JsonProperty(JSON_PROPERTY_CARD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardId(String cardId) { + this.cardId = cardId; + } + + + public ExecuteFilterParameter8 includeNonAuthorized(Boolean includeNonAuthorized) { + this.includeNonAuthorized = includeNonAuthorized; + return this; + } + + /** + * Get includeNonAuthorized + * @return includeNonAuthorized + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_NON_AUTHORIZED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIncludeNonAuthorized() { + return includeNonAuthorized; + } + + + @JsonProperty(JSON_PROPERTY_INCLUDE_NON_AUTHORIZED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncludeNonAuthorized(Boolean includeNonAuthorized) { + this.includeNonAuthorized = includeNonAuthorized; + } + + + public ExecuteFilterParameter8 merchantCategoryCode(List merchantCategoryCode) { + this.merchantCategoryCode = merchantCategoryCode; + return this; + } + + public ExecuteFilterParameter8 addMerchantCategoryCodeItem(String merchantCategoryCodeItem) { + if (this.merchantCategoryCode == null) { + this.merchantCategoryCode = new ArrayList<>(); + } + this.merchantCategoryCode.add(merchantCategoryCodeItem); + return this; + } + + /** + * Get merchantCategoryCode + * @return merchantCategoryCode + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MERCHANT_CATEGORY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getMerchantCategoryCode() { + return merchantCategoryCode; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_CATEGORY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantCategoryCode(List merchantCategoryCode) { + this.merchantCategoryCode = merchantCategoryCode; + } + + + public ExecuteFilterParameter8 since(String since) { + this.since = since; + return this; + } + + /** + * Get since + * @return since + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSince() { + return since; + } + + + @JsonProperty(JSON_PROPERTY_SINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSince(String since) { + this.since = since; + } + + + public ExecuteFilterParameter8 until(String until) { + this.until = until; + return this; + } + + /** + * Get until + * @return until + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UNTIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUntil() { + return until; + } + + + @JsonProperty(JSON_PROPERTY_UNTIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUntil(String until) { + this.until = until; + } + + + public ExecuteFilterParameter8 fromAmount(Integer fromAmount) { + this.fromAmount = fromAmount; + return this; + } + + /** + * Get fromAmount + * @return fromAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getFromAmount() { + return fromAmount; + } + + + @JsonProperty(JSON_PROPERTY_FROM_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFromAmount(Integer fromAmount) { + this.fromAmount = fromAmount; + } + + + public ExecuteFilterParameter8 toAmount(Integer toAmount) { + this.toAmount = toAmount; + return this; + } + + /** + * Get toAmount + * @return toAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getToAmount() { + return toAmount; + } + + + @JsonProperty(JSON_PROPERTY_TO_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setToAmount(Integer toAmount) { + this.toAmount = toAmount; + } + + + public ExecuteFilterParameter8 status(List status) { + this.status = status; + return this; + } + + public ExecuteFilterParameter8 addStatusItem(StatusEnum statusItem) { + if (this.status == null) { + this.status = new ArrayList<>(); + } + this.status.add(statusItem); + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(List status) { + this.status = status; + } + + + /** + * Return true if this execute_filter_parameter_8 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter8 executeFilterParameter8 = (ExecuteFilterParameter8) o; + return Objects.equals(this.accountId, executeFilterParameter8.accountId) && + Objects.equals(this.accountType, executeFilterParameter8.accountType) && + Objects.equals(this.customerId, executeFilterParameter8.customerId) && + Objects.equals(this.cardId, executeFilterParameter8.cardId) && + Objects.equals(this.includeNonAuthorized, executeFilterParameter8.includeNonAuthorized) && + Objects.equals(this.merchantCategoryCode, executeFilterParameter8.merchantCategoryCode) && + Objects.equals(this.since, executeFilterParameter8.since) && + Objects.equals(this.until, executeFilterParameter8.until) && + Objects.equals(this.fromAmount, executeFilterParameter8.fromAmount) && + Objects.equals(this.toAmount, executeFilterParameter8.toAmount) && + Objects.equals(this.status, executeFilterParameter8.status); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, accountType, customerId, cardId, includeNonAuthorized, merchantCategoryCode, since, until, fromAmount, toAmount, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter8 {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" cardId: ").append(toIndentedString(cardId)).append("\n"); + sb.append(" includeNonAuthorized: ").append(toIndentedString(includeNonAuthorized)).append("\n"); + sb.append(" merchantCategoryCode: ").append(toIndentedString(merchantCategoryCode)).append("\n"); + sb.append(" since: ").append(toIndentedString(since)).append("\n"); + sb.append(" until: ").append(toIndentedString(until)).append("\n"); + sb.append(" fromAmount: ").append(toIndentedString(fromAmount)).append("\n"); + sb.append(" toAmount: ").append(toIndentedString(toAmount)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `accountId` to the URL query string + if (getAccountId() != null) { + joiner.add(String.format("%saccountId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `accountType` to the URL query string + if (getAccountType() != null) { + joiner.add(String.format("%saccountType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(String.format("%scustomerId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCustomerId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardId` to the URL query string + if (getCardId() != null) { + joiner.add(String.format("%scardId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `includeNonAuthorized` to the URL query string + if (getIncludeNonAuthorized() != null) { + joiner.add(String.format("%sincludeNonAuthorized%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIncludeNonAuthorized()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `merchantCategoryCode` to the URL query string + if (getMerchantCategoryCode() != null) { + for (int i = 0; i < getMerchantCategoryCode().size(); i++) { + joiner.add(String.format("%smerchantCategoryCode%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getMerchantCategoryCode().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `since` to the URL query string + if (getSince() != null) { + joiner.add(String.format("%ssince%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSince()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `until` to the URL query string + if (getUntil() != null) { + joiner.add(String.format("%suntil%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUntil()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `fromAmount` to the URL query string + if (getFromAmount() != null) { + joiner.add(String.format("%sfromAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFromAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `toAmount` to the URL query string + if (getToAmount() != null) { + joiner.add(String.format("%stoAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getToAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + for (int i = 0; i < getStatus().size(); i++) { + joiner.add(String.format("%sstatus%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getStatus().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ExecuteFilterParameter9.java b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter9.java new file mode 100644 index 00000000..5543af0d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ExecuteFilterParameter9.java @@ -0,0 +1,308 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ExecuteFilterParameter9 + */ +@JsonPropertyOrder({ + ExecuteFilterParameter9.JSON_PROPERTY_ACCOUNT_ID, + ExecuteFilterParameter9.JSON_PROPERTY_CUSTOMER_ID, + ExecuteFilterParameter9.JSON_PROPERTY_MERCHANT_CATEGORY_CODE, + ExecuteFilterParameter9.JSON_PROPERTY_FROM_AMOUNT, + ExecuteFilterParameter9.JSON_PROPERTY_TO_AMOUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExecuteFilterParameter9 { + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + private String accountId; + + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + private String customerId; + + public static final String JSON_PROPERTY_MERCHANT_CATEGORY_CODE = "merchantCategoryCode"; + private List merchantCategoryCode; + + public static final String JSON_PROPERTY_FROM_AMOUNT = "fromAmount"; + private Integer fromAmount; + + public static final String JSON_PROPERTY_TO_AMOUNT = "toAmount"; + private Integer toAmount; + + public ExecuteFilterParameter9() { + } + + public ExecuteFilterParameter9 accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * @return accountId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountId() { + return accountId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + + public ExecuteFilterParameter9 customerId(String customerId) { + this.customerId = customerId; + return this; + } + + /** + * Get customerId + * @return customerId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerId() { + return customerId; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + + public ExecuteFilterParameter9 merchantCategoryCode(List merchantCategoryCode) { + this.merchantCategoryCode = merchantCategoryCode; + return this; + } + + public ExecuteFilterParameter9 addMerchantCategoryCodeItem(String merchantCategoryCodeItem) { + if (this.merchantCategoryCode == null) { + this.merchantCategoryCode = new ArrayList<>(); + } + this.merchantCategoryCode.add(merchantCategoryCodeItem); + return this; + } + + /** + * Get merchantCategoryCode + * @return merchantCategoryCode + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MERCHANT_CATEGORY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getMerchantCategoryCode() { + return merchantCategoryCode; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_CATEGORY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantCategoryCode(List merchantCategoryCode) { + this.merchantCategoryCode = merchantCategoryCode; + } + + + public ExecuteFilterParameter9 fromAmount(Integer fromAmount) { + this.fromAmount = fromAmount; + return this; + } + + /** + * Get fromAmount + * @return fromAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getFromAmount() { + return fromAmount; + } + + + @JsonProperty(JSON_PROPERTY_FROM_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFromAmount(Integer fromAmount) { + this.fromAmount = fromAmount; + } + + + public ExecuteFilterParameter9 toAmount(Integer toAmount) { + this.toAmount = toAmount; + return this; + } + + /** + * Get toAmount + * @return toAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getToAmount() { + return toAmount; + } + + + @JsonProperty(JSON_PROPERTY_TO_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setToAmount(Integer toAmount) { + this.toAmount = toAmount; + } + + + /** + * Return true if this execute_filter_parameter_9 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteFilterParameter9 executeFilterParameter9 = (ExecuteFilterParameter9) o; + return Objects.equals(this.accountId, executeFilterParameter9.accountId) && + Objects.equals(this.customerId, executeFilterParameter9.customerId) && + Objects.equals(this.merchantCategoryCode, executeFilterParameter9.merchantCategoryCode) && + Objects.equals(this.fromAmount, executeFilterParameter9.fromAmount) && + Objects.equals(this.toAmount, executeFilterParameter9.toAmount); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, customerId, merchantCategoryCode, fromAmount, toAmount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteFilterParameter9 {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); + sb.append(" merchantCategoryCode: ").append(toIndentedString(merchantCategoryCode)).append("\n"); + sb.append(" fromAmount: ").append(toIndentedString(fromAmount)).append("\n"); + sb.append(" toAmount: ").append(toIndentedString(toAmount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `accountId` to the URL query string + if (getAccountId() != null) { + joiner.add(String.format("%saccountId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(String.format("%scustomerId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCustomerId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `merchantCategoryCode` to the URL query string + if (getMerchantCategoryCode() != null) { + for (int i = 0; i < getMerchantCategoryCode().size(); i++) { + joiner.add(String.format("%smerchantCategoryCode%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getMerchantCategoryCode().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `fromAmount` to the URL query string + if (getFromAmount() != null) { + joiner.add(String.format("%sfromAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFromAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `toAmount` to the URL query string + if (getToAmount() != null) { + joiner.add(String.format("%stoAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getToAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Fee.java b/src/main/java/unit/java/sdk/model/Fee.java new file mode 100644 index 00000000..2339acf3 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Fee.java @@ -0,0 +1,260 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.FeeAttributes; +import unit.java.sdk.model.FeeRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Fee + */ +@JsonPropertyOrder({ + Fee.JSON_PROPERTY_TYPE, + Fee.JSON_PROPERTY_ID, + Fee.JSON_PROPERTY_ATTRIBUTES, + Fee.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Fee { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "fee"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FeeAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private FeeRelationships relationships; + + public Fee() { + } + + public Fee type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public Fee id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public Fee attributes(FeeAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FeeAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(FeeAttributes attributes) { + this.attributes = attributes; + } + + + public Fee relationships(FeeRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FeeRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(FeeRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this fee object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Fee fee = (Fee) o; + return Objects.equals(this.type, fee.type) && + Objects.equals(this.id, fee.id) && + Objects.equals(this.attributes, fee.attributes) && + Objects.equals(this.relationships, fee.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Fee {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/FeeAttributes.java b/src/main/java/unit/java/sdk/model/FeeAttributes.java new file mode 100644 index 00000000..aa6863c0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/FeeAttributes.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * FeeAttributes + */ +@JsonPropertyOrder({ + FeeAttributes.JSON_PROPERTY_AMOUNT, + FeeAttributes.JSON_PROPERTY_DESCRIPTION, + FeeAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FeeAttributes { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public FeeAttributes() { + } + + public FeeAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public FeeAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public FeeAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this fee_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeeAttributes feeAttributes = (FeeAttributes) o; + return Objects.equals(this.amount, feeAttributes.amount) && + Objects.equals(this.description, feeAttributes.description) && + Objects.equals(this.tags, feeAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(amount, description, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeeAttributes {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/FeeRelationships.java b/src/main/java/unit/java/sdk/model/FeeRelationships.java new file mode 100644 index 00000000..6c434af7 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/FeeRelationships.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * FeeRelationships + */ +@JsonPropertyOrder({ + FeeRelationships.JSON_PROPERTY_ACCOUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FeeRelationships { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private Relationship account; + + public FeeRelationships() { + } + + public FeeRelationships account(Relationship account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationship getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(Relationship account) { + this.account = account; + } + + + /** + * Return true if this feeRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeeRelationships feeRelationships = (FeeRelationships) o; + return Objects.equals(this.account, feeRelationships.account); + } + + @Override + public int hashCode() { + return Objects.hash(account); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeeRelationships {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/FeeTransaction.java b/src/main/java/unit/java/sdk/model/FeeTransaction.java new file mode 100644 index 00000000..d25fb40c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/FeeTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.FeeTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * FeeTransaction + */ +@JsonPropertyOrder({ + FeeTransaction.JSON_PROPERTY_ATTRIBUTES, + FeeTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class FeeTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FeeTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public FeeTransaction() { + } + + public FeeTransaction attributes(FeeTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FeeTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(FeeTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public FeeTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public FeeTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public FeeTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this FeeTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeeTransaction feeTransaction = (FeeTransaction) o; + return Objects.equals(this.attributes, feeTransaction.attributes) && + Objects.equals(this.relationships, feeTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeeTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("FeeTransaction", FeeTransaction.class); + JSON.registerDiscriminator(FeeTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/FeeTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/FeeTransactionAllOfAttributes.java new file mode 100644 index 00000000..c8ae74b0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/FeeTransactionAllOfAttributes.java @@ -0,0 +1,366 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * FeeTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + FeeTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + FeeTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + FeeTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + FeeTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + FeeTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + FeeTransactionAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FeeTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public FeeTransactionAllOfAttributes() { + } + + public FeeTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public FeeTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public FeeTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public FeeTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public FeeTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public FeeTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this FeeTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeeTransactionAllOfAttributes feeTransactionAllOfAttributes = (FeeTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, feeTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, feeTransactionAllOfAttributes.direction) && + Objects.equals(this.amount, feeTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, feeTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, feeTransactionAllOfAttributes.summary) && + Objects.equals(this.tags, feeTransactionAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, amount, balance, summary, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeeTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/FreezeAccountRequest.java b/src/main/java/unit/java/sdk/model/FreezeAccountRequest.java new file mode 100644 index 00000000..adf451f5 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/FreezeAccountRequest.java @@ -0,0 +1,150 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * FreezeAccountRequest + */ +@JsonPropertyOrder({ + FreezeAccountRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FreezeAccountRequest { + public static final String JSON_PROPERTY_DATA = "data"; + private FreezeAccountRequest data; + + public FreezeAccountRequest() { + } + + public FreezeAccountRequest data(FreezeAccountRequest data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FreezeAccountRequest getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(FreezeAccountRequest data) { + this.data = data; + } + + + /** + * Return true if this FreezeAccountRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FreezeAccountRequest freezeAccountRequest = (FreezeAccountRequest) o; + return Objects.equals(this.data, freezeAccountRequest.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FreezeAccountRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/FreezeAccountRequestAttributes.java b/src/main/java/unit/java/sdk/model/FreezeAccountRequestAttributes.java new file mode 100644 index 00000000..1a46e9a9 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/FreezeAccountRequestAttributes.java @@ -0,0 +1,244 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * FreezeAccountRequestAttributes + */ +@JsonPropertyOrder({ + FreezeAccountRequestAttributes.JSON_PROPERTY_REASON, + FreezeAccountRequestAttributes.JSON_PROPERTY_REASON_TEXT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FreezeAccountRequestAttributes { + /** + * Gets or Sets reason + */ + public enum ReasonEnum { + FRAUD("Fraud"), + + OTHER("Other"); + + private String value; + + ReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ReasonEnum fromValue(String value) { + for (ReasonEnum b : ReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_REASON = "reason"; + private ReasonEnum reason; + + public static final String JSON_PROPERTY_REASON_TEXT = "reasonText"; + private JsonNullable reasonText = JsonNullable.undefined(); + + public FreezeAccountRequestAttributes() { + } + + public FreezeAccountRequestAttributes reason(ReasonEnum reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReasonEnum getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(ReasonEnum reason) { + this.reason = reason; + } + + + public FreezeAccountRequestAttributes reasonText(String reasonText) { + this.reasonText = JsonNullable.of(reasonText); + return this; + } + + /** + * Get reasonText + * @return reasonText + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getReasonText() { + return reasonText.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REASON_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getReasonText_JsonNullable() { + return reasonText; + } + + @JsonProperty(JSON_PROPERTY_REASON_TEXT) + public void setReasonText_JsonNullable(JsonNullable reasonText) { + this.reasonText = reasonText; + } + + public void setReasonText(String reasonText) { + this.reasonText = JsonNullable.of(reasonText); + } + + + /** + * Return true if this freezeAccountRequest_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FreezeAccountRequestAttributes freezeAccountRequestAttributes = (FreezeAccountRequestAttributes) o; + return Objects.equals(this.reason, freezeAccountRequestAttributes.reason) && + equalsNullable(this.reasonText, freezeAccountRequestAttributes.reasonText); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(reason, hashCodeNullable(reasonText)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FreezeAccountRequestAttributes {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" reasonText: ").append(toIndentedString(reasonText)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `reasonText` to the URL query string + if (getReasonText() != null) { + joiner.add(String.format("%sreasonText%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReasonText()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/FullName.java b/src/main/java/unit/java/sdk/model/FullName.java new file mode 100644 index 00000000..45d9c87f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/FullName.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * FullName + */ +@JsonPropertyOrder({ + FullName.JSON_PROPERTY_FIRST, + FullName.JSON_PROPERTY_LAST +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FullName { + public static final String JSON_PROPERTY_FIRST = "first"; + private String first; + + public static final String JSON_PROPERTY_LAST = "last"; + private String last; + + public FullName() { + } + + public FullName first(String first) { + this.first = first; + return this; + } + + /** + * Get first + * @return first + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FIRST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getFirst() { + return first; + } + + + @JsonProperty(JSON_PROPERTY_FIRST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFirst(String first) { + this.first = first; + } + + + public FullName last(String last) { + this.last = last; + return this; + } + + /** + * Get last + * @return last + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LAST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getLast() { + return last; + } + + + @JsonProperty(JSON_PROPERTY_LAST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLast(String last) { + this.last = last; + } + + + /** + * Return true if this fullName object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FullName fullName = (FullName) o; + return Objects.equals(this.first, fullName.first) && + Objects.equals(this.last, fullName.last); + } + + @Override + public int hashCode() { + return Objects.hash(first, last); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FullName {\n"); + sb.append(" first: ").append(toIndentedString(first)).append("\n"); + sb.append(" last: ").append(toIndentedString(last)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `first` to the URL query string + if (getFirst() != null) { + joiner.add(String.format("%sfirst%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFirst()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `last` to the URL query string + if (getLast() != null) { + joiner.add(String.format("%slast%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLast()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Grantor.java b/src/main/java/unit/java/sdk/model/Grantor.java new file mode 100644 index 00000000..88f9f03d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Grantor.java @@ -0,0 +1,600 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Grantor + */ +@JsonPropertyOrder({ + Grantor.JSON_PROPERTY_FULL_NAME, + Grantor.JSON_PROPERTY_EMAIL, + Grantor.JSON_PROPERTY_PHONE, + Grantor.JSON_PROPERTY_SSN, + Grantor.JSON_PROPERTY_PASSPORT, + Grantor.JSON_PROPERTY_MATRICULA_CONSULAR, + Grantor.JSON_PROPERTY_NATIONALITY, + Grantor.JSON_PROPERTY_ADDRESS, + Grantor.JSON_PROPERTY_DATE_OF_BIRTH, + Grantor.JSON_PROPERTY_EVALUATION_ID, + Grantor.JSON_PROPERTY_EVALUATION_FLAGS, + Grantor.JSON_PROPERTY_STATUS, + Grantor.JSON_PROPERTY_MASKED_S_S_N +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Grantor { + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_SSN = "ssn"; + private String ssn; + + public static final String JSON_PROPERTY_PASSPORT = "passport"; + private String passport; + + public static final String JSON_PROPERTY_MATRICULA_CONSULAR = "matriculaConsular"; + private String matriculaConsular; + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public static final String JSON_PROPERTY_EVALUATION_ID = "evaluationId"; + private String evaluationId; + + public static final String JSON_PROPERTY_EVALUATION_FLAGS = "evaluationFlags"; + private List evaluationFlags; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_MASKED_S_S_N = "maskedSSN"; + private String maskedSSN; + + public Grantor() { + } + + public Grantor fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public Grantor email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEmail(String email) { + this.email = email; + } + + + public Grantor phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public Grantor ssn(String ssn) { + this.ssn = ssn; + return this; + } + + /** + * Get ssn + * @return ssn + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSsn() { + return ssn; + } + + + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSsn(String ssn) { + this.ssn = ssn; + } + + + public Grantor passport(String passport) { + this.passport = passport; + return this; + } + + /** + * Get passport + * @return passport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassport() { + return passport; + } + + + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassport(String passport) { + this.passport = passport; + } + + + public Grantor matriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + return this; + } + + /** + * Get matriculaConsular + * @return matriculaConsular + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMatriculaConsular() { + return matriculaConsular; + } + + + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMatriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + } + + + public Grantor nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * Get nationality + * @return nationality + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + public Grantor address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(Address address) { + this.address = address; + } + + + public Grantor dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + public Grantor evaluationId(String evaluationId) { + this.evaluationId = evaluationId; + return this; + } + + /** + * Get evaluationId + * @return evaluationId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEvaluationId() { + return evaluationId; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationId(String evaluationId) { + this.evaluationId = evaluationId; + } + + + public Grantor evaluationFlags(List evaluationFlags) { + this.evaluationFlags = evaluationFlags; + return this; + } + + public Grantor addEvaluationFlagsItem(String evaluationFlagsItem) { + if (this.evaluationFlags == null) { + this.evaluationFlags = new ArrayList<>(); + } + this.evaluationFlags.add(evaluationFlagsItem); + return this; + } + + /** + * Get evaluationFlags + * @return evaluationFlags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_FLAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getEvaluationFlags() { + return evaluationFlags; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_FLAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationFlags(List evaluationFlags) { + this.evaluationFlags = evaluationFlags; + } + + + public Grantor status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(String status) { + this.status = status; + } + + + public Grantor maskedSSN(String maskedSSN) { + this.maskedSSN = maskedSSN; + return this; + } + + /** + * Get maskedSSN + * @return maskedSSN + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MASKED_S_S_N) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMaskedSSN() { + return maskedSSN; + } + + + @JsonProperty(JSON_PROPERTY_MASKED_S_S_N) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaskedSSN(String maskedSSN) { + this.maskedSSN = maskedSSN; + } + + + /** + * Return true if this grantor object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Grantor grantor = (Grantor) o; + return Objects.equals(this.fullName, grantor.fullName) && + Objects.equals(this.email, grantor.email) && + Objects.equals(this.phone, grantor.phone) && + Objects.equals(this.ssn, grantor.ssn) && + Objects.equals(this.passport, grantor.passport) && + Objects.equals(this.matriculaConsular, grantor.matriculaConsular) && + Objects.equals(this.nationality, grantor.nationality) && + Objects.equals(this.address, grantor.address) && + Objects.equals(this.dateOfBirth, grantor.dateOfBirth) && + Objects.equals(this.evaluationId, grantor.evaluationId) && + Objects.equals(this.evaluationFlags, grantor.evaluationFlags) && + Objects.equals(this.status, grantor.status) && + Objects.equals(this.maskedSSN, grantor.maskedSSN); + } + + @Override + public int hashCode() { + return Objects.hash(fullName, email, phone, ssn, passport, matriculaConsular, nationality, address, dateOfBirth, evaluationId, evaluationFlags, status, maskedSSN); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Grantor {\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); + sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); + sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); + sb.append(" evaluationFlags: ").append(toIndentedString(evaluationFlags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" maskedSSN: ").append(toIndentedString(maskedSSN)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `ssn` to the URL query string + if (getSsn() != null) { + joiner.add(String.format("%sssn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSsn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `passport` to the URL query string + if (getPassport() != null) { + joiner.add(String.format("%spassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `matriculaConsular` to the URL query string + if (getMatriculaConsular() != null) { + joiner.add(String.format("%smatriculaConsular%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMatriculaConsular()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nationality` to the URL query string + if (getNationality() != null) { + joiner.add(String.format("%snationality%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNationality()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationId` to the URL query string + if (getEvaluationId() != null) { + joiner.add(String.format("%sevaluationId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEvaluationId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationFlags` to the URL query string + if (getEvaluationFlags() != null) { + for (int i = 0; i < getEvaluationFlags().size(); i++) { + joiner.add(String.format("%sevaluationFlags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getEvaluationFlags().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `maskedSSN` to the URL query string + if (getMaskedSSN() != null) { + joiner.add(String.format("%smaskedSSN%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMaskedSSN()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/HealthcareAmounts.java b/src/main/java/unit/java/sdk/model/HealthcareAmounts.java new file mode 100644 index 00000000..cb278cde --- /dev/null +++ b/src/main/java/unit/java/sdk/model/HealthcareAmounts.java @@ -0,0 +1,330 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * HealthcareAmounts + */ +@JsonPropertyOrder({ + HealthcareAmounts.JSON_PROPERTY_TRANSIT_AMOUNT, + HealthcareAmounts.JSON_PROPERTY_PRESCRIPTION_R_X_AMOUNT, + HealthcareAmounts.JSON_PROPERTY_VISION_OPTICAL_AMOUNT, + HealthcareAmounts.JSON_PROPERTY_CLINIC_OTHER_QUALIFIED_MEDICAL_AMOUNT, + HealthcareAmounts.JSON_PROPERTY_DENTAL_AMOUNT, + HealthcareAmounts.JSON_PROPERTY_TOTAL_HEALTHCARE_AMOUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HealthcareAmounts { + public static final String JSON_PROPERTY_TRANSIT_AMOUNT = "transitAmount"; + private Integer transitAmount; + + public static final String JSON_PROPERTY_PRESCRIPTION_R_X_AMOUNT = "prescriptionRXAmount"; + private Integer prescriptionRXAmount; + + public static final String JSON_PROPERTY_VISION_OPTICAL_AMOUNT = "visionOpticalAmount"; + private Integer visionOpticalAmount; + + public static final String JSON_PROPERTY_CLINIC_OTHER_QUALIFIED_MEDICAL_AMOUNT = "clinicOtherQualifiedMedicalAmount"; + private Integer clinicOtherQualifiedMedicalAmount; + + public static final String JSON_PROPERTY_DENTAL_AMOUNT = "dentalAmount"; + private Integer dentalAmount; + + public static final String JSON_PROPERTY_TOTAL_HEALTHCARE_AMOUNT = "totalHealthcareAmount"; + private Integer totalHealthcareAmount; + + public HealthcareAmounts() { + } + + public HealthcareAmounts transitAmount(Integer transitAmount) { + this.transitAmount = transitAmount; + return this; + } + + /** + * Get transitAmount + * @return transitAmount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRANSIT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getTransitAmount() { + return transitAmount; + } + + + @JsonProperty(JSON_PROPERTY_TRANSIT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTransitAmount(Integer transitAmount) { + this.transitAmount = transitAmount; + } + + + public HealthcareAmounts prescriptionRXAmount(Integer prescriptionRXAmount) { + this.prescriptionRXAmount = prescriptionRXAmount; + return this; + } + + /** + * Get prescriptionRXAmount + * @return prescriptionRXAmount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PRESCRIPTION_R_X_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getPrescriptionRXAmount() { + return prescriptionRXAmount; + } + + + @JsonProperty(JSON_PROPERTY_PRESCRIPTION_R_X_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPrescriptionRXAmount(Integer prescriptionRXAmount) { + this.prescriptionRXAmount = prescriptionRXAmount; + } + + + public HealthcareAmounts visionOpticalAmount(Integer visionOpticalAmount) { + this.visionOpticalAmount = visionOpticalAmount; + return this; + } + + /** + * Get visionOpticalAmount + * @return visionOpticalAmount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VISION_OPTICAL_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getVisionOpticalAmount() { + return visionOpticalAmount; + } + + + @JsonProperty(JSON_PROPERTY_VISION_OPTICAL_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVisionOpticalAmount(Integer visionOpticalAmount) { + this.visionOpticalAmount = visionOpticalAmount; + } + + + public HealthcareAmounts clinicOtherQualifiedMedicalAmount(Integer clinicOtherQualifiedMedicalAmount) { + this.clinicOtherQualifiedMedicalAmount = clinicOtherQualifiedMedicalAmount; + return this; + } + + /** + * Get clinicOtherQualifiedMedicalAmount + * @return clinicOtherQualifiedMedicalAmount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CLINIC_OTHER_QUALIFIED_MEDICAL_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getClinicOtherQualifiedMedicalAmount() { + return clinicOtherQualifiedMedicalAmount; + } + + + @JsonProperty(JSON_PROPERTY_CLINIC_OTHER_QUALIFIED_MEDICAL_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setClinicOtherQualifiedMedicalAmount(Integer clinicOtherQualifiedMedicalAmount) { + this.clinicOtherQualifiedMedicalAmount = clinicOtherQualifiedMedicalAmount; + } + + + public HealthcareAmounts dentalAmount(Integer dentalAmount) { + this.dentalAmount = dentalAmount; + return this; + } + + /** + * Get dentalAmount + * @return dentalAmount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DENTAL_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getDentalAmount() { + return dentalAmount; + } + + + @JsonProperty(JSON_PROPERTY_DENTAL_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDentalAmount(Integer dentalAmount) { + this.dentalAmount = dentalAmount; + } + + + public HealthcareAmounts totalHealthcareAmount(Integer totalHealthcareAmount) { + this.totalHealthcareAmount = totalHealthcareAmount; + return this; + } + + /** + * Get totalHealthcareAmount + * @return totalHealthcareAmount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_HEALTHCARE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getTotalHealthcareAmount() { + return totalHealthcareAmount; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_HEALTHCARE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalHealthcareAmount(Integer totalHealthcareAmount) { + this.totalHealthcareAmount = totalHealthcareAmount; + } + + + /** + * Return true if this healthcareAmounts object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HealthcareAmounts healthcareAmounts = (HealthcareAmounts) o; + return Objects.equals(this.transitAmount, healthcareAmounts.transitAmount) && + Objects.equals(this.prescriptionRXAmount, healthcareAmounts.prescriptionRXAmount) && + Objects.equals(this.visionOpticalAmount, healthcareAmounts.visionOpticalAmount) && + Objects.equals(this.clinicOtherQualifiedMedicalAmount, healthcareAmounts.clinicOtherQualifiedMedicalAmount) && + Objects.equals(this.dentalAmount, healthcareAmounts.dentalAmount) && + Objects.equals(this.totalHealthcareAmount, healthcareAmounts.totalHealthcareAmount); + } + + @Override + public int hashCode() { + return Objects.hash(transitAmount, prescriptionRXAmount, visionOpticalAmount, clinicOtherQualifiedMedicalAmount, dentalAmount, totalHealthcareAmount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HealthcareAmounts {\n"); + sb.append(" transitAmount: ").append(toIndentedString(transitAmount)).append("\n"); + sb.append(" prescriptionRXAmount: ").append(toIndentedString(prescriptionRXAmount)).append("\n"); + sb.append(" visionOpticalAmount: ").append(toIndentedString(visionOpticalAmount)).append("\n"); + sb.append(" clinicOtherQualifiedMedicalAmount: ").append(toIndentedString(clinicOtherQualifiedMedicalAmount)).append("\n"); + sb.append(" dentalAmount: ").append(toIndentedString(dentalAmount)).append("\n"); + sb.append(" totalHealthcareAmount: ").append(toIndentedString(totalHealthcareAmount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `transitAmount` to the URL query string + if (getTransitAmount() != null) { + joiner.add(String.format("%stransitAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTransitAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `prescriptionRXAmount` to the URL query string + if (getPrescriptionRXAmount() != null) { + joiner.add(String.format("%sprescriptionRXAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPrescriptionRXAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `visionOpticalAmount` to the URL query string + if (getVisionOpticalAmount() != null) { + joiner.add(String.format("%svisionOpticalAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVisionOpticalAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `clinicOtherQualifiedMedicalAmount` to the URL query string + if (getClinicOtherQualifiedMedicalAmount() != null) { + joiner.add(String.format("%sclinicOtherQualifiedMedicalAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getClinicOtherQualifiedMedicalAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dentalAmount` to the URL query string + if (getDentalAmount() != null) { + joiner.add(String.format("%sdentalAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDentalAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `totalHealthcareAmount` to the URL query string + if (getTotalHealthcareAmount() != null) { + joiner.add(String.format("%stotalHealthcareAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTotalHealthcareAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/IncludedResourceInner.java b/src/main/java/unit/java/sdk/model/IncludedResourceInner.java new file mode 100644 index 00000000..2d18f4d8 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/IncludedResourceInner.java @@ -0,0 +1,258 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * IncludedResourceInner + */ +@JsonPropertyOrder({ + IncludedResourceInner.JSON_PROPERTY_ID, + IncludedResourceInner.JSON_PROPERTY_TYPE, + IncludedResourceInner.JSON_PROPERTY_ATTRIBUTES, + IncludedResourceInner.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class IncludedResourceInner { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private Object attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private Object relationships; + + public IncludedResourceInner() { + } + + public IncludedResourceInner id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public IncludedResourceInner type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public IncludedResourceInner attributes(Object attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(Object attributes) { + this.attributes = attributes; + } + + + public IncludedResourceInner relationships(Object relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(Object relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this IncludedResource_inner object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncludedResourceInner includedResourceInner = (IncludedResourceInner) o; + return Objects.equals(this.id, includedResourceInner.id) && + Objects.equals(this.type, includedResourceInner.type) && + Objects.equals(this.attributes, includedResourceInner.attributes) && + Objects.equals(this.relationships, includedResourceInner.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncludedResourceInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(String.format("%sattributes%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAttributes()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(String.format("%srelationships%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRelationships()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/IncomingAchRelationship.java b/src/main/java/unit/java/sdk/model/IncomingAchRelationship.java new file mode 100644 index 00000000..df05443f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/IncomingAchRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.IncomingAchRelationshipData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * IncomingAchRelationship + */ +@JsonPropertyOrder({ + IncomingAchRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class IncomingAchRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private IncomingAchRelationshipData data; + + public IncomingAchRelationship() { + } + + public IncomingAchRelationship data(IncomingAchRelationshipData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public IncomingAchRelationshipData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(IncomingAchRelationshipData data) { + this.data = data; + } + + + /** + * Return true if this incomingAchRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncomingAchRelationship incomingAchRelationship = (IncomingAchRelationship) o; + return Objects.equals(this.data, incomingAchRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncomingAchRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/IncomingAchRelationshipData.java b/src/main/java/unit/java/sdk/model/IncomingAchRelationshipData.java new file mode 100644 index 00000000..00c0914d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/IncomingAchRelationshipData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * IncomingAchRelationshipData + */ +@JsonPropertyOrder({ + IncomingAchRelationshipData.JSON_PROPERTY_TYPE, + IncomingAchRelationshipData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class IncomingAchRelationshipData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "incomingAch"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public IncomingAchRelationshipData() { + } + + public IncomingAchRelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public IncomingAchRelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this incomingAchRelationship_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IncomingAchRelationshipData incomingAchRelationshipData = (IncomingAchRelationshipData) o; + return Objects.equals(this.type, incomingAchRelationshipData.type) && + Objects.equals(this.id, incomingAchRelationshipData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IncomingAchRelationshipData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/IndividualApplication.java b/src/main/java/unit/java/sdk/model/IndividualApplication.java new file mode 100644 index 00000000..b68e632c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/IndividualApplication.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Application; +import unit.java.sdk.model.ApplicationRelationships; +import unit.java.sdk.model.IndividualApplicationAllOfAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * IndividualApplication + */ +@JsonPropertyOrder({ + IndividualApplication.JSON_PROPERTY_ATTRIBUTES, + IndividualApplication.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class IndividualApplication extends Application { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IndividualApplicationAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private ApplicationRelationships relationships; + + public IndividualApplication() { + } + + public IndividualApplication attributes(IndividualApplicationAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public IndividualApplicationAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(IndividualApplicationAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public IndividualApplication relationships(ApplicationRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApplicationRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(ApplicationRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public IndividualApplication id(String id) { + this.setId(id); + return this; + } + + @Override + public IndividualApplication type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this IndividualApplication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IndividualApplication individualApplication = (IndividualApplication) o; + return Objects.equals(this.attributes, individualApplication.attributes) && + Objects.equals(this.relationships, individualApplication.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IndividualApplication {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("IndividualApplication", IndividualApplication.class); + JSON.registerDiscriminator(IndividualApplication.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/IndividualApplicationAllOfAttributes.java b/src/main/java/unit/java/sdk/model/IndividualApplicationAllOfAttributes.java new file mode 100644 index 00000000..62154e04 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/IndividualApplicationAllOfAttributes.java @@ -0,0 +1,1856 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.ApplicationStatus; +import unit.java.sdk.model.BusinessVertical; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Industry; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.PowerOfAttorneyAgent; +import unit.java.sdk.model.SoleProprietorshipAnnualRevenue; +import unit.java.sdk.model.SoleProprietorshipNumberOfEmployees; +import unit.java.sdk.model.SourceOfIncome; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * IndividualApplicationAllOfAttributes + */ +@JsonPropertyOrder({ + IndividualApplicationAllOfAttributes.JSON_PROPERTY_CREATED_AT, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_UPDATED_AT, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_STATUS, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_MESSAGE, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_EVALUATION_OUTCOME, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_EVALUATION_ID, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_EVALUATION_ENTITY_ID, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_FULL_NAME, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_EMAIL, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_PHONE, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_SSN, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_PASSPORT, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_NATIONALITY, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_MATRICULA_CONSULAR, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_ADDRESS, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_DATE_OF_BIRTH, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_DBA, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_EIN, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_IP, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_SOLE_PROPRIETORSHIP, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_DECISION_METHOD, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_DECISION_USER_ID, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_DECISION_REASON, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_DECISION_DATE_TIME, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_TAGS, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_RISK_RATE, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_EVALUATION_FLAGS, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_EVALUATION_SCORES, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_IP_LOCATION_DETAILS, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_PHONE_LOCATION_DETAILS, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_MASKED_S_S_N, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_MASKED_PASSPORT, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_MASKED_MATRICULA_CONSULAR, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_JWT_SUBJECT, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_ARCHIVED, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_POWER_OF_ATTORNEY_AGENT, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_INDUSTRY, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_ID_THEFT_SCORE, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_OCCUPATION, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_ANNUAL_INCOME, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_SOURCE_OF_INCOME, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_ANNUAL_REVENUE, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_NUMBER_OF_EMPLOYEES, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_BUSINESS_VERTICAL, + IndividualApplicationAllOfAttributes.JSON_PROPERTY_WEBSITE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class IndividualApplicationAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_STATUS = "status"; + private ApplicationStatus status; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_EVALUATION_OUTCOME = "evaluationOutcome"; + private String evaluationOutcome; + + public static final String JSON_PROPERTY_EVALUATION_ID = "evaluationId"; + private String evaluationId; + + public static final String JSON_PROPERTY_EVALUATION_ENTITY_ID = "evaluationEntityId"; + private String evaluationEntityId; + + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_SSN = "ssn"; + private String ssn; + + public static final String JSON_PROPERTY_PASSPORT = "passport"; + private String passport; + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public static final String JSON_PROPERTY_MATRICULA_CONSULAR = "matriculaConsular"; + private String matriculaConsular; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Object address; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public static final String JSON_PROPERTY_DBA = "dba"; + private String dba; + + public static final String JSON_PROPERTY_EIN = "ein"; + private String ein; + + public static final String JSON_PROPERTY_IP = "ip"; + private String ip; + + public static final String JSON_PROPERTY_SOLE_PROPRIETORSHIP = "soleProprietorship"; + private Boolean soleProprietorship; + + /** + * Gets or Sets decisionMethod + */ + public enum DecisionMethodEnum { + MANUALLY("Manually"), + + AUTOMATICALLY("Automatically"); + + private String value; + + DecisionMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DecisionMethodEnum fromValue(String value) { + for (DecisionMethodEnum b : DecisionMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DECISION_METHOD = "decisionMethod"; + private DecisionMethodEnum decisionMethod; + + public static final String JSON_PROPERTY_DECISION_USER_ID = "decisionUserId"; + private String decisionUserId; + + public static final String JSON_PROPERTY_DECISION_REASON = "decisionReason"; + private String decisionReason; + + public static final String JSON_PROPERTY_DECISION_DATE_TIME = "decisionDateTime"; + private OffsetDateTime decisionDateTime; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + /** + * Gets or Sets riskRate + */ + public enum RiskRateEnum { + LOW("low"), + + MEDIUM("medium"), + + HIGH("high"); + + private String value; + + RiskRateEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RiskRateEnum fromValue(String value) { + for (RiskRateEnum b : RiskRateEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RISK_RATE = "riskRate"; + private RiskRateEnum riskRate; + + public static final String JSON_PROPERTY_EVALUATION_FLAGS = "evaluationFlags"; + private List evaluationFlags; + + public static final String JSON_PROPERTY_EVALUATION_SCORES = "evaluationScores"; + private Object evaluationScores; + + public static final String JSON_PROPERTY_IP_LOCATION_DETAILS = "ipLocationDetails"; + private Object ipLocationDetails; + + public static final String JSON_PROPERTY_PHONE_LOCATION_DETAILS = "phoneLocationDetails"; + private Object phoneLocationDetails; + + public static final String JSON_PROPERTY_MASKED_S_S_N = "maskedSSN"; + private String maskedSSN; + + public static final String JSON_PROPERTY_MASKED_PASSPORT = "maskedPassport"; + private String maskedPassport; + + public static final String JSON_PROPERTY_MASKED_MATRICULA_CONSULAR = "maskedMatriculaConsular"; + private String maskedMatriculaConsular; + + public static final String JSON_PROPERTY_JWT_SUBJECT = "jwtSubject"; + private JsonNullable jwtSubject = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ARCHIVED = "archived"; + private Boolean archived; + + public static final String JSON_PROPERTY_POWER_OF_ATTORNEY_AGENT = "powerOfAttorneyAgent"; + private PowerOfAttorneyAgent powerOfAttorneyAgent; + + public static final String JSON_PROPERTY_INDUSTRY = "industry"; + private Industry industry; + + public static final String JSON_PROPERTY_ID_THEFT_SCORE = "idTheftScore"; + private Integer idTheftScore; + + public static final String JSON_PROPERTY_OCCUPATION = "occupation"; + private Occupation occupation; + + public static final String JSON_PROPERTY_ANNUAL_INCOME = "annualIncome"; + private AnnualIncome annualIncome; + + public static final String JSON_PROPERTY_SOURCE_OF_INCOME = "sourceOfIncome"; + private SourceOfIncome sourceOfIncome; + + public static final String JSON_PROPERTY_ANNUAL_REVENUE = "annualRevenue"; + private SoleProprietorshipAnnualRevenue annualRevenue; + + public static final String JSON_PROPERTY_NUMBER_OF_EMPLOYEES = "numberOfEmployees"; + private SoleProprietorshipNumberOfEmployees numberOfEmployees; + + public static final String JSON_PROPERTY_BUSINESS_VERTICAL = "businessVertical"; + private BusinessVertical businessVertical; + + public static final String JSON_PROPERTY_WEBSITE = "website"; + private String website; + + public IndividualApplicationAllOfAttributes() { + } + + public IndividualApplicationAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public IndividualApplicationAllOfAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public IndividualApplicationAllOfAttributes status(ApplicationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ApplicationStatus getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(ApplicationStatus status) { + this.status = status; + } + + + public IndividualApplicationAllOfAttributes message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + + public IndividualApplicationAllOfAttributes evaluationOutcome(String evaluationOutcome) { + this.evaluationOutcome = evaluationOutcome; + return this; + } + + /** + * Get evaluationOutcome + * @return evaluationOutcome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_OUTCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEvaluationOutcome() { + return evaluationOutcome; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_OUTCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationOutcome(String evaluationOutcome) { + this.evaluationOutcome = evaluationOutcome; + } + + + public IndividualApplicationAllOfAttributes evaluationId(String evaluationId) { + this.evaluationId = evaluationId; + return this; + } + + /** + * Get evaluationId + * @return evaluationId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEvaluationId() { + return evaluationId; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationId(String evaluationId) { + this.evaluationId = evaluationId; + } + + + public IndividualApplicationAllOfAttributes evaluationEntityId(String evaluationEntityId) { + this.evaluationEntityId = evaluationEntityId; + return this; + } + + /** + * Get evaluationEntityId + * @return evaluationEntityId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_ENTITY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEvaluationEntityId() { + return evaluationEntityId; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_ENTITY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationEntityId(String evaluationEntityId) { + this.evaluationEntityId = evaluationEntityId; + } + + + public IndividualApplicationAllOfAttributes fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public IndividualApplicationAllOfAttributes email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public IndividualApplicationAllOfAttributes phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public IndividualApplicationAllOfAttributes ssn(String ssn) { + this.ssn = ssn; + return this; + } + + /** + * Get ssn + * @return ssn + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSsn() { + return ssn; + } + + + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSsn(String ssn) { + this.ssn = ssn; + } + + + public IndividualApplicationAllOfAttributes passport(String passport) { + this.passport = passport; + return this; + } + + /** + * Get passport + * @return passport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassport() { + return passport; + } + + + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassport(String passport) { + this.passport = passport; + } + + + public IndividualApplicationAllOfAttributes nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * Get nationality + * @return nationality + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + public IndividualApplicationAllOfAttributes matriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + return this; + } + + /** + * Get matriculaConsular + * @return matriculaConsular + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMatriculaConsular() { + return matriculaConsular; + } + + + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMatriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + } + + + public IndividualApplicationAllOfAttributes address(Object address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(Object address) { + this.address = address; + } + + + public IndividualApplicationAllOfAttributes dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + public IndividualApplicationAllOfAttributes dba(String dba) { + this.dba = dba; + return this; + } + + /** + * Get dba + * @return dba + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDba() { + return dba; + } + + + @JsonProperty(JSON_PROPERTY_DBA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDba(String dba) { + this.dba = dba; + } + + + public IndividualApplicationAllOfAttributes ein(String ein) { + this.ein = ein; + return this; + } + + /** + * Get ein + * @return ein + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEin() { + return ein; + } + + + @JsonProperty(JSON_PROPERTY_EIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEin(String ein) { + this.ein = ein; + } + + + public IndividualApplicationAllOfAttributes ip(String ip) { + this.ip = ip; + return this; + } + + /** + * Get ip + * @return ip + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIp() { + return ip; + } + + + @JsonProperty(JSON_PROPERTY_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIp(String ip) { + this.ip = ip; + } + + + public IndividualApplicationAllOfAttributes soleProprietorship(Boolean soleProprietorship) { + this.soleProprietorship = soleProprietorship; + return this; + } + + /** + * Get soleProprietorship + * @return soleProprietorship + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOLE_PROPRIETORSHIP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSoleProprietorship() { + return soleProprietorship; + } + + + @JsonProperty(JSON_PROPERTY_SOLE_PROPRIETORSHIP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSoleProprietorship(Boolean soleProprietorship) { + this.soleProprietorship = soleProprietorship; + } + + + public IndividualApplicationAllOfAttributes decisionMethod(DecisionMethodEnum decisionMethod) { + this.decisionMethod = decisionMethod; + return this; + } + + /** + * Get decisionMethod + * @return decisionMethod + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECISION_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DecisionMethodEnum getDecisionMethod() { + return decisionMethod; + } + + + @JsonProperty(JSON_PROPERTY_DECISION_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecisionMethod(DecisionMethodEnum decisionMethod) { + this.decisionMethod = decisionMethod; + } + + + public IndividualApplicationAllOfAttributes decisionUserId(String decisionUserId) { + this.decisionUserId = decisionUserId; + return this; + } + + /** + * Get decisionUserId + * @return decisionUserId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECISION_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDecisionUserId() { + return decisionUserId; + } + + + @JsonProperty(JSON_PROPERTY_DECISION_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecisionUserId(String decisionUserId) { + this.decisionUserId = decisionUserId; + } + + + public IndividualApplicationAllOfAttributes decisionReason(String decisionReason) { + this.decisionReason = decisionReason; + return this; + } + + /** + * Get decisionReason + * @return decisionReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECISION_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDecisionReason() { + return decisionReason; + } + + + @JsonProperty(JSON_PROPERTY_DECISION_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecisionReason(String decisionReason) { + this.decisionReason = decisionReason; + } + + + public IndividualApplicationAllOfAttributes decisionDateTime(OffsetDateTime decisionDateTime) { + this.decisionDateTime = decisionDateTime; + return this; + } + + /** + * Get decisionDateTime + * @return decisionDateTime + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECISION_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getDecisionDateTime() { + return decisionDateTime; + } + + + @JsonProperty(JSON_PROPERTY_DECISION_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecisionDateTime(OffsetDateTime decisionDateTime) { + this.decisionDateTime = decisionDateTime; + } + + + public IndividualApplicationAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public IndividualApplicationAllOfAttributes riskRate(RiskRateEnum riskRate) { + this.riskRate = riskRate; + return this; + } + + /** + * Get riskRate + * @return riskRate + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RISK_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RiskRateEnum getRiskRate() { + return riskRate; + } + + + @JsonProperty(JSON_PROPERTY_RISK_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRiskRate(RiskRateEnum riskRate) { + this.riskRate = riskRate; + } + + + public IndividualApplicationAllOfAttributes evaluationFlags(List evaluationFlags) { + this.evaluationFlags = evaluationFlags; + return this; + } + + public IndividualApplicationAllOfAttributes addEvaluationFlagsItem(String evaluationFlagsItem) { + if (this.evaluationFlags == null) { + this.evaluationFlags = new ArrayList<>(); + } + this.evaluationFlags.add(evaluationFlagsItem); + return this; + } + + /** + * Get evaluationFlags + * @return evaluationFlags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_FLAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getEvaluationFlags() { + return evaluationFlags; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_FLAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationFlags(List evaluationFlags) { + this.evaluationFlags = evaluationFlags; + } + + + public IndividualApplicationAllOfAttributes evaluationScores(Object evaluationScores) { + this.evaluationScores = evaluationScores; + return this; + } + + /** + * Get evaluationScores + * @return evaluationScores + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_SCORES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getEvaluationScores() { + return evaluationScores; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_SCORES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationScores(Object evaluationScores) { + this.evaluationScores = evaluationScores; + } + + + public IndividualApplicationAllOfAttributes ipLocationDetails(Object ipLocationDetails) { + this.ipLocationDetails = ipLocationDetails; + return this; + } + + /** + * Get ipLocationDetails + * @return ipLocationDetails + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IP_LOCATION_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getIpLocationDetails() { + return ipLocationDetails; + } + + + @JsonProperty(JSON_PROPERTY_IP_LOCATION_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIpLocationDetails(Object ipLocationDetails) { + this.ipLocationDetails = ipLocationDetails; + } + + + public IndividualApplicationAllOfAttributes phoneLocationDetails(Object phoneLocationDetails) { + this.phoneLocationDetails = phoneLocationDetails; + return this; + } + + /** + * Get phoneLocationDetails + * @return phoneLocationDetails + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE_LOCATION_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getPhoneLocationDetails() { + return phoneLocationDetails; + } + + + @JsonProperty(JSON_PROPERTY_PHONE_LOCATION_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhoneLocationDetails(Object phoneLocationDetails) { + this.phoneLocationDetails = phoneLocationDetails; + } + + + public IndividualApplicationAllOfAttributes maskedSSN(String maskedSSN) { + this.maskedSSN = maskedSSN; + return this; + } + + /** + * Get maskedSSN + * @return maskedSSN + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MASKED_S_S_N) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMaskedSSN() { + return maskedSSN; + } + + + @JsonProperty(JSON_PROPERTY_MASKED_S_S_N) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaskedSSN(String maskedSSN) { + this.maskedSSN = maskedSSN; + } + + + public IndividualApplicationAllOfAttributes maskedPassport(String maskedPassport) { + this.maskedPassport = maskedPassport; + return this; + } + + /** + * Get maskedPassport + * @return maskedPassport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MASKED_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMaskedPassport() { + return maskedPassport; + } + + + @JsonProperty(JSON_PROPERTY_MASKED_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaskedPassport(String maskedPassport) { + this.maskedPassport = maskedPassport; + } + + + public IndividualApplicationAllOfAttributes maskedMatriculaConsular(String maskedMatriculaConsular) { + this.maskedMatriculaConsular = maskedMatriculaConsular; + return this; + } + + /** + * Get maskedMatriculaConsular + * @return maskedMatriculaConsular + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MASKED_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMaskedMatriculaConsular() { + return maskedMatriculaConsular; + } + + + @JsonProperty(JSON_PROPERTY_MASKED_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaskedMatriculaConsular(String maskedMatriculaConsular) { + this.maskedMatriculaConsular = maskedMatriculaConsular; + } + + + public IndividualApplicationAllOfAttributes jwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + return this; + } + + /** + * Get jwtSubject + * @return jwtSubject + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getJwtSubject() { + return jwtSubject.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getJwtSubject_JsonNullable() { + return jwtSubject; + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + public void setJwtSubject_JsonNullable(JsonNullable jwtSubject) { + this.jwtSubject = jwtSubject; + } + + public void setJwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + } + + + public IndividualApplicationAllOfAttributes archived(Boolean archived) { + this.archived = archived; + return this; + } + + /** + * Get archived + * @return archived + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getArchived() { + return archived; + } + + + @JsonProperty(JSON_PROPERTY_ARCHIVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArchived(Boolean archived) { + this.archived = archived; + } + + + public IndividualApplicationAllOfAttributes powerOfAttorneyAgent(PowerOfAttorneyAgent powerOfAttorneyAgent) { + this.powerOfAttorneyAgent = powerOfAttorneyAgent; + return this; + } + + /** + * Get powerOfAttorneyAgent + * @return powerOfAttorneyAgent + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POWER_OF_ATTORNEY_AGENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PowerOfAttorneyAgent getPowerOfAttorneyAgent() { + return powerOfAttorneyAgent; + } + + + @JsonProperty(JSON_PROPERTY_POWER_OF_ATTORNEY_AGENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPowerOfAttorneyAgent(PowerOfAttorneyAgent powerOfAttorneyAgent) { + this.powerOfAttorneyAgent = powerOfAttorneyAgent; + } + + + public IndividualApplicationAllOfAttributes industry(Industry industry) { + this.industry = industry; + return this; + } + + /** + * Get industry + * @return industry + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDUSTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Industry getIndustry() { + return industry; + } + + + @JsonProperty(JSON_PROPERTY_INDUSTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIndustry(Industry industry) { + this.industry = industry; + } + + + public IndividualApplicationAllOfAttributes idTheftScore(Integer idTheftScore) { + this.idTheftScore = idTheftScore; + return this; + } + + /** + * Get idTheftScore + * @return idTheftScore + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID_THEFT_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getIdTheftScore() { + return idTheftScore; + } + + + @JsonProperty(JSON_PROPERTY_ID_THEFT_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdTheftScore(Integer idTheftScore) { + this.idTheftScore = idTheftScore; + } + + + public IndividualApplicationAllOfAttributes occupation(Occupation occupation) { + this.occupation = occupation; + return this; + } + + /** + * Get occupation + * @return occupation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Occupation getOccupation() { + return occupation; + } + + + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOccupation(Occupation occupation) { + this.occupation = occupation; + } + + + public IndividualApplicationAllOfAttributes annualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + return this; + } + + /** + * Get annualIncome + * @return annualIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnnualIncome getAnnualIncome() { + return annualIncome; + } + + + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + } + + + public IndividualApplicationAllOfAttributes sourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + return this; + } + + /** + * Get sourceOfIncome + * @return sourceOfIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SourceOfIncome getSourceOfIncome() { + return sourceOfIncome; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + } + + + public IndividualApplicationAllOfAttributes annualRevenue(SoleProprietorshipAnnualRevenue annualRevenue) { + this.annualRevenue = annualRevenue; + return this; + } + + /** + * Get annualRevenue + * @return annualRevenue + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNUAL_REVENUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SoleProprietorshipAnnualRevenue getAnnualRevenue() { + return annualRevenue; + } + + + @JsonProperty(JSON_PROPERTY_ANNUAL_REVENUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnualRevenue(SoleProprietorshipAnnualRevenue annualRevenue) { + this.annualRevenue = annualRevenue; + } + + + public IndividualApplicationAllOfAttributes numberOfEmployees(SoleProprietorshipNumberOfEmployees numberOfEmployees) { + this.numberOfEmployees = numberOfEmployees; + return this; + } + + /** + * Get numberOfEmployees + * @return numberOfEmployees + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUMBER_OF_EMPLOYEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SoleProprietorshipNumberOfEmployees getNumberOfEmployees() { + return numberOfEmployees; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER_OF_EMPLOYEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumberOfEmployees(SoleProprietorshipNumberOfEmployees numberOfEmployees) { + this.numberOfEmployees = numberOfEmployees; + } + + + public IndividualApplicationAllOfAttributes businessVertical(BusinessVertical businessVertical) { + this.businessVertical = businessVertical; + return this; + } + + /** + * Get businessVertical + * @return businessVertical + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUSINESS_VERTICAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BusinessVertical getBusinessVertical() { + return businessVertical; + } + + + @JsonProperty(JSON_PROPERTY_BUSINESS_VERTICAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBusinessVertical(BusinessVertical businessVertical) { + this.businessVertical = businessVertical; + } + + + public IndividualApplicationAllOfAttributes website(String website) { + this.website = website; + return this; + } + + /** + * Get website + * @return website + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEBSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebsite() { + return website; + } + + + @JsonProperty(JSON_PROPERTY_WEBSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWebsite(String website) { + this.website = website; + } + + + /** + * Return true if this IndividualApplication_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IndividualApplicationAllOfAttributes individualApplicationAllOfAttributes = (IndividualApplicationAllOfAttributes) o; + return Objects.equals(this.createdAt, individualApplicationAllOfAttributes.createdAt) && + Objects.equals(this.updatedAt, individualApplicationAllOfAttributes.updatedAt) && + Objects.equals(this.status, individualApplicationAllOfAttributes.status) && + Objects.equals(this.message, individualApplicationAllOfAttributes.message) && + Objects.equals(this.evaluationOutcome, individualApplicationAllOfAttributes.evaluationOutcome) && + Objects.equals(this.evaluationId, individualApplicationAllOfAttributes.evaluationId) && + Objects.equals(this.evaluationEntityId, individualApplicationAllOfAttributes.evaluationEntityId) && + Objects.equals(this.fullName, individualApplicationAllOfAttributes.fullName) && + Objects.equals(this.email, individualApplicationAllOfAttributes.email) && + Objects.equals(this.phone, individualApplicationAllOfAttributes.phone) && + Objects.equals(this.ssn, individualApplicationAllOfAttributes.ssn) && + Objects.equals(this.passport, individualApplicationAllOfAttributes.passport) && + Objects.equals(this.nationality, individualApplicationAllOfAttributes.nationality) && + Objects.equals(this.matriculaConsular, individualApplicationAllOfAttributes.matriculaConsular) && + Objects.equals(this.address, individualApplicationAllOfAttributes.address) && + Objects.equals(this.dateOfBirth, individualApplicationAllOfAttributes.dateOfBirth) && + Objects.equals(this.dba, individualApplicationAllOfAttributes.dba) && + Objects.equals(this.ein, individualApplicationAllOfAttributes.ein) && + Objects.equals(this.ip, individualApplicationAllOfAttributes.ip) && + Objects.equals(this.soleProprietorship, individualApplicationAllOfAttributes.soleProprietorship) && + Objects.equals(this.decisionMethod, individualApplicationAllOfAttributes.decisionMethod) && + Objects.equals(this.decisionUserId, individualApplicationAllOfAttributes.decisionUserId) && + Objects.equals(this.decisionReason, individualApplicationAllOfAttributes.decisionReason) && + Objects.equals(this.decisionDateTime, individualApplicationAllOfAttributes.decisionDateTime) && + Objects.equals(this.tags, individualApplicationAllOfAttributes.tags) && + Objects.equals(this.riskRate, individualApplicationAllOfAttributes.riskRate) && + Objects.equals(this.evaluationFlags, individualApplicationAllOfAttributes.evaluationFlags) && + Objects.equals(this.evaluationScores, individualApplicationAllOfAttributes.evaluationScores) && + Objects.equals(this.ipLocationDetails, individualApplicationAllOfAttributes.ipLocationDetails) && + Objects.equals(this.phoneLocationDetails, individualApplicationAllOfAttributes.phoneLocationDetails) && + Objects.equals(this.maskedSSN, individualApplicationAllOfAttributes.maskedSSN) && + Objects.equals(this.maskedPassport, individualApplicationAllOfAttributes.maskedPassport) && + Objects.equals(this.maskedMatriculaConsular, individualApplicationAllOfAttributes.maskedMatriculaConsular) && + equalsNullable(this.jwtSubject, individualApplicationAllOfAttributes.jwtSubject) && + Objects.equals(this.archived, individualApplicationAllOfAttributes.archived) && + Objects.equals(this.powerOfAttorneyAgent, individualApplicationAllOfAttributes.powerOfAttorneyAgent) && + Objects.equals(this.industry, individualApplicationAllOfAttributes.industry) && + Objects.equals(this.idTheftScore, individualApplicationAllOfAttributes.idTheftScore) && + Objects.equals(this.occupation, individualApplicationAllOfAttributes.occupation) && + Objects.equals(this.annualIncome, individualApplicationAllOfAttributes.annualIncome) && + Objects.equals(this.sourceOfIncome, individualApplicationAllOfAttributes.sourceOfIncome) && + Objects.equals(this.annualRevenue, individualApplicationAllOfAttributes.annualRevenue) && + Objects.equals(this.numberOfEmployees, individualApplicationAllOfAttributes.numberOfEmployees) && + Objects.equals(this.businessVertical, individualApplicationAllOfAttributes.businessVertical) && + Objects.equals(this.website, individualApplicationAllOfAttributes.website); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, updatedAt, status, message, evaluationOutcome, evaluationId, evaluationEntityId, fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, dba, ein, ip, soleProprietorship, decisionMethod, decisionUserId, decisionReason, decisionDateTime, tags, riskRate, evaluationFlags, evaluationScores, ipLocationDetails, phoneLocationDetails, maskedSSN, maskedPassport, maskedMatriculaConsular, hashCodeNullable(jwtSubject), archived, powerOfAttorneyAgent, industry, idTheftScore, occupation, annualIncome, sourceOfIncome, annualRevenue, numberOfEmployees, businessVertical, website); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IndividualApplicationAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" evaluationOutcome: ").append(toIndentedString(evaluationOutcome)).append("\n"); + sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); + sb.append(" evaluationEntityId: ").append(toIndentedString(evaluationEntityId)).append("\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); + sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" dba: ").append(toIndentedString(dba)).append("\n"); + sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append(" soleProprietorship: ").append(toIndentedString(soleProprietorship)).append("\n"); + sb.append(" decisionMethod: ").append(toIndentedString(decisionMethod)).append("\n"); + sb.append(" decisionUserId: ").append(toIndentedString(decisionUserId)).append("\n"); + sb.append(" decisionReason: ").append(toIndentedString(decisionReason)).append("\n"); + sb.append(" decisionDateTime: ").append(toIndentedString(decisionDateTime)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" riskRate: ").append(toIndentedString(riskRate)).append("\n"); + sb.append(" evaluationFlags: ").append(toIndentedString(evaluationFlags)).append("\n"); + sb.append(" evaluationScores: ").append(toIndentedString(evaluationScores)).append("\n"); + sb.append(" ipLocationDetails: ").append(toIndentedString(ipLocationDetails)).append("\n"); + sb.append(" phoneLocationDetails: ").append(toIndentedString(phoneLocationDetails)).append("\n"); + sb.append(" maskedSSN: ").append(toIndentedString(maskedSSN)).append("\n"); + sb.append(" maskedPassport: ").append(toIndentedString(maskedPassport)).append("\n"); + sb.append(" maskedMatriculaConsular: ").append(toIndentedString(maskedMatriculaConsular)).append("\n"); + sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); + sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); + sb.append(" powerOfAttorneyAgent: ").append(toIndentedString(powerOfAttorneyAgent)).append("\n"); + sb.append(" industry: ").append(toIndentedString(industry)).append("\n"); + sb.append(" idTheftScore: ").append(toIndentedString(idTheftScore)).append("\n"); + sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); + sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); + sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); + sb.append(" annualRevenue: ").append(toIndentedString(annualRevenue)).append("\n"); + sb.append(" numberOfEmployees: ").append(toIndentedString(numberOfEmployees)).append("\n"); + sb.append(" businessVertical: ").append(toIndentedString(businessVertical)).append("\n"); + sb.append(" website: ").append(toIndentedString(website)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationOutcome` to the URL query string + if (getEvaluationOutcome() != null) { + joiner.add(String.format("%sevaluationOutcome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEvaluationOutcome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationId` to the URL query string + if (getEvaluationId() != null) { + joiner.add(String.format("%sevaluationId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEvaluationId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationEntityId` to the URL query string + if (getEvaluationEntityId() != null) { + joiner.add(String.format("%sevaluationEntityId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEvaluationEntityId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `ssn` to the URL query string + if (getSsn() != null) { + joiner.add(String.format("%sssn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSsn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `passport` to the URL query string + if (getPassport() != null) { + joiner.add(String.format("%spassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nationality` to the URL query string + if (getNationality() != null) { + joiner.add(String.format("%snationality%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNationality()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `matriculaConsular` to the URL query string + if (getMatriculaConsular() != null) { + joiner.add(String.format("%smatriculaConsular%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMatriculaConsular()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(String.format("%saddress%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAddress()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dba` to the URL query string + if (getDba() != null) { + joiner.add(String.format("%sdba%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDba()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ein` to the URL query string + if (getEin() != null) { + joiner.add(String.format("%sein%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEin()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ip` to the URL query string + if (getIp() != null) { + joiner.add(String.format("%sip%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIp()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `soleProprietorship` to the URL query string + if (getSoleProprietorship() != null) { + joiner.add(String.format("%ssoleProprietorship%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSoleProprietorship()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `decisionMethod` to the URL query string + if (getDecisionMethod() != null) { + joiner.add(String.format("%sdecisionMethod%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDecisionMethod()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `decisionUserId` to the URL query string + if (getDecisionUserId() != null) { + joiner.add(String.format("%sdecisionUserId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDecisionUserId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `decisionReason` to the URL query string + if (getDecisionReason() != null) { + joiner.add(String.format("%sdecisionReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDecisionReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `decisionDateTime` to the URL query string + if (getDecisionDateTime() != null) { + joiner.add(String.format("%sdecisionDateTime%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDecisionDateTime()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `riskRate` to the URL query string + if (getRiskRate() != null) { + joiner.add(String.format("%sriskRate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRiskRate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationFlags` to the URL query string + if (getEvaluationFlags() != null) { + for (int i = 0; i < getEvaluationFlags().size(); i++) { + joiner.add(String.format("%sevaluationFlags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getEvaluationFlags().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `evaluationScores` to the URL query string + if (getEvaluationScores() != null) { + joiner.add(String.format("%sevaluationScores%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEvaluationScores()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ipLocationDetails` to the URL query string + if (getIpLocationDetails() != null) { + joiner.add(String.format("%sipLocationDetails%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIpLocationDetails()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phoneLocationDetails` to the URL query string + if (getPhoneLocationDetails() != null) { + joiner.add(String.format("%sphoneLocationDetails%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPhoneLocationDetails()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `maskedSSN` to the URL query string + if (getMaskedSSN() != null) { + joiner.add(String.format("%smaskedSSN%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMaskedSSN()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `maskedPassport` to the URL query string + if (getMaskedPassport() != null) { + joiner.add(String.format("%smaskedPassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMaskedPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `maskedMatriculaConsular` to the URL query string + if (getMaskedMatriculaConsular() != null) { + joiner.add(String.format("%smaskedMatriculaConsular%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMaskedMatriculaConsular()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `jwtSubject` to the URL query string + if (getJwtSubject() != null) { + joiner.add(String.format("%sjwtSubject%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getJwtSubject()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `archived` to the URL query string + if (getArchived() != null) { + joiner.add(String.format("%sarchived%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getArchived()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `powerOfAttorneyAgent` to the URL query string + if (getPowerOfAttorneyAgent() != null) { + joiner.add(getPowerOfAttorneyAgent().toUrlQueryString(prefix + "powerOfAttorneyAgent" + suffix)); + } + + // add `industry` to the URL query string + if (getIndustry() != null) { + joiner.add(String.format("%sindustry%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIndustry()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idTheftScore` to the URL query string + if (getIdTheftScore() != null) { + joiner.add(String.format("%sidTheftScore%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdTheftScore()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `occupation` to the URL query string + if (getOccupation() != null) { + joiner.add(String.format("%soccupation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOccupation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `annualIncome` to the URL query string + if (getAnnualIncome() != null) { + joiner.add(String.format("%sannualIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAnnualIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sourceOfIncome` to the URL query string + if (getSourceOfIncome() != null) { + joiner.add(String.format("%ssourceOfIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSourceOfIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `annualRevenue` to the URL query string + if (getAnnualRevenue() != null) { + joiner.add(String.format("%sannualRevenue%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAnnualRevenue()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `numberOfEmployees` to the URL query string + if (getNumberOfEmployees() != null) { + joiner.add(String.format("%snumberOfEmployees%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNumberOfEmployees()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `businessVertical` to the URL query string + if (getBusinessVertical() != null) { + joiner.add(String.format("%sbusinessVertical%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBusinessVertical()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `website` to the URL query string + if (getWebsite() != null) { + joiner.add(String.format("%swebsite%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getWebsite()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/IndividualCustomer.java b/src/main/java/unit/java/sdk/model/IndividualCustomer.java new file mode 100644 index 00000000..b10decc1 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/IndividualCustomer.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Customer; +import unit.java.sdk.model.CustomerRelationships; +import unit.java.sdk.model.IndividualCustomerAllOfAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * IndividualCustomer + */ +@JsonPropertyOrder({ + IndividualCustomer.JSON_PROPERTY_ATTRIBUTES, + IndividualCustomer.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class IndividualCustomer extends Customer { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IndividualCustomerAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CustomerRelationships relationships; + + public IndividualCustomer() { + } + + public IndividualCustomer attributes(IndividualCustomerAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public IndividualCustomerAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(IndividualCustomerAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public IndividualCustomer relationships(CustomerRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CustomerRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(CustomerRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public IndividualCustomer id(String id) { + this.setId(id); + return this; + } + + @Override + public IndividualCustomer type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this IndividualCustomer object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IndividualCustomer individualCustomer = (IndividualCustomer) o; + return Objects.equals(this.attributes, individualCustomer.attributes) && + Objects.equals(this.relationships, individualCustomer.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IndividualCustomer {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(String.format("%srelationships%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRelationships()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("IndividualCustomer", IndividualCustomer.class); + JSON.registerDiscriminator(IndividualCustomer.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/IndividualCustomerAllOfAttributes.java b/src/main/java/unit/java/sdk/model/IndividualCustomerAllOfAttributes.java new file mode 100644 index 00000000..c57f6035 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/IndividualCustomerAllOfAttributes.java @@ -0,0 +1,1069 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.AuthorizedUser; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * IndividualCustomerAllOfAttributes + */ +@JsonPropertyOrder({ + IndividualCustomerAllOfAttributes.JSON_PROPERTY_CREATED_AT, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_FULL_NAME, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_EMAIL, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_PHONE, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_SSN, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_PASSPORT, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_NATIONALITY, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_MATRICULA_CONSULAR, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_ADDRESS, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_DATE_OF_BIRTH, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_EIN, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_DBA, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_SOLE_PROPRIETORSHIP, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_TAGS, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_RISK_RATE, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_MASKED_S_S_N, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_MASKED_PASSPORT, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_MASKED_MATRICULA_CONSULAR, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_AUTHORIZED_USERS, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_JWT_SUBJECT, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_STATUS, + IndividualCustomerAllOfAttributes.JSON_PROPERTY_ARCHIVE_REASON +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class IndividualCustomerAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_SSN = "ssn"; + private String ssn; + + public static final String JSON_PROPERTY_PASSPORT = "passport"; + private String passport; + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public static final String JSON_PROPERTY_MATRICULA_CONSULAR = "matriculaConsular"; + private String matriculaConsular; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public static final String JSON_PROPERTY_EIN = "ein"; + private String ein; + + public static final String JSON_PROPERTY_DBA = "dba"; + private String dba; + + public static final String JSON_PROPERTY_SOLE_PROPRIETORSHIP = "soleProprietorship"; + private Boolean soleProprietorship = false; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + /** + * Gets or Sets riskRate + */ + public enum RiskRateEnum { + LOW("low"), + + MEDIUM("medium"), + + HIGH("high"); + + private String value; + + RiskRateEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RiskRateEnum fromValue(String value) { + for (RiskRateEnum b : RiskRateEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RISK_RATE = "riskRate"; + private RiskRateEnum riskRate; + + public static final String JSON_PROPERTY_MASKED_S_S_N = "maskedSSN"; + private String maskedSSN; + + public static final String JSON_PROPERTY_MASKED_PASSPORT = "maskedPassport"; + private String maskedPassport; + + public static final String JSON_PROPERTY_MASKED_MATRICULA_CONSULAR = "maskedMatriculaConsular"; + private String maskedMatriculaConsular; + + public static final String JSON_PROPERTY_AUTHORIZED_USERS = "authorizedUsers"; + private List authorizedUsers; + + public static final String JSON_PROPERTY_JWT_SUBJECT = "jwtSubject"; + private JsonNullable jwtSubject = JsonNullable.undefined(); + + /** + * Gets or Sets status + */ + public enum StatusEnum { + ACTIVE("Active"), + + ARCHIVED("Archived"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + /** + * Gets or Sets archiveReason + */ + public enum ArchiveReasonEnum { + INACTIVE("Inactive"), + + FRAUDACHACTIVITY("FraudACHActivity"), + + FRAUDCARDACTIVITY("FraudCardActivity"), + + FRAUDCHECKACTIVITY("FraudCheckActivity"), + + FRAUDAPPLICATIONHISTORY("FraudApplicationHistory"), + + FRAUDACCOUNTACTIVITY("FraudAccountActivity"), + + FRAUDCLIENTIDENTIFIED("FraudClientIdentified"), + + FRAUDLINKEDTOFRAUDULENTCUSTOMER("FraudLinkedToFraudulentCustomer"); + + private String value; + + ArchiveReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArchiveReasonEnum fromValue(String value) { + for (ArchiveReasonEnum b : ArchiveReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ARCHIVE_REASON = "archiveReason"; + private ArchiveReasonEnum archiveReason; + + public IndividualCustomerAllOfAttributes() { + } + + public IndividualCustomerAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public IndividualCustomerAllOfAttributes fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public IndividualCustomerAllOfAttributes email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public IndividualCustomerAllOfAttributes phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public IndividualCustomerAllOfAttributes ssn(String ssn) { + this.ssn = ssn; + return this; + } + + /** + * Get ssn + * @return ssn + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSsn() { + return ssn; + } + + + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSsn(String ssn) { + this.ssn = ssn; + } + + + public IndividualCustomerAllOfAttributes passport(String passport) { + this.passport = passport; + return this; + } + + /** + * Get passport + * @return passport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassport() { + return passport; + } + + + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassport(String passport) { + this.passport = passport; + } + + + public IndividualCustomerAllOfAttributes nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * Get nationality + * @return nationality + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + public IndividualCustomerAllOfAttributes matriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + return this; + } + + /** + * Get matriculaConsular + * @return matriculaConsular + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMatriculaConsular() { + return matriculaConsular; + } + + + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMatriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + } + + + public IndividualCustomerAllOfAttributes address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(Address address) { + this.address = address; + } + + + public IndividualCustomerAllOfAttributes dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + public IndividualCustomerAllOfAttributes ein(String ein) { + this.ein = ein; + return this; + } + + /** + * Get ein + * @return ein + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEin() { + return ein; + } + + + @JsonProperty(JSON_PROPERTY_EIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEin(String ein) { + this.ein = ein; + } + + + public IndividualCustomerAllOfAttributes dba(String dba) { + this.dba = dba; + return this; + } + + /** + * Get dba + * @return dba + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DBA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDba() { + return dba; + } + + + @JsonProperty(JSON_PROPERTY_DBA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDba(String dba) { + this.dba = dba; + } + + + public IndividualCustomerAllOfAttributes soleProprietorship(Boolean soleProprietorship) { + this.soleProprietorship = soleProprietorship; + return this; + } + + /** + * Get soleProprietorship + * @return soleProprietorship + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOLE_PROPRIETORSHIP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSoleProprietorship() { + return soleProprietorship; + } + + + @JsonProperty(JSON_PROPERTY_SOLE_PROPRIETORSHIP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSoleProprietorship(Boolean soleProprietorship) { + this.soleProprietorship = soleProprietorship; + } + + + public IndividualCustomerAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public IndividualCustomerAllOfAttributes riskRate(RiskRateEnum riskRate) { + this.riskRate = riskRate; + return this; + } + + /** + * Get riskRate + * @return riskRate + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RISK_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RiskRateEnum getRiskRate() { + return riskRate; + } + + + @JsonProperty(JSON_PROPERTY_RISK_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRiskRate(RiskRateEnum riskRate) { + this.riskRate = riskRate; + } + + + public IndividualCustomerAllOfAttributes maskedSSN(String maskedSSN) { + this.maskedSSN = maskedSSN; + return this; + } + + /** + * Get maskedSSN + * @return maskedSSN + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MASKED_S_S_N) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMaskedSSN() { + return maskedSSN; + } + + + @JsonProperty(JSON_PROPERTY_MASKED_S_S_N) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaskedSSN(String maskedSSN) { + this.maskedSSN = maskedSSN; + } + + + public IndividualCustomerAllOfAttributes maskedPassport(String maskedPassport) { + this.maskedPassport = maskedPassport; + return this; + } + + /** + * Get maskedPassport + * @return maskedPassport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MASKED_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMaskedPassport() { + return maskedPassport; + } + + + @JsonProperty(JSON_PROPERTY_MASKED_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaskedPassport(String maskedPassport) { + this.maskedPassport = maskedPassport; + } + + + public IndividualCustomerAllOfAttributes maskedMatriculaConsular(String maskedMatriculaConsular) { + this.maskedMatriculaConsular = maskedMatriculaConsular; + return this; + } + + /** + * Get maskedMatriculaConsular + * @return maskedMatriculaConsular + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MASKED_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMaskedMatriculaConsular() { + return maskedMatriculaConsular; + } + + + @JsonProperty(JSON_PROPERTY_MASKED_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaskedMatriculaConsular(String maskedMatriculaConsular) { + this.maskedMatriculaConsular = maskedMatriculaConsular; + } + + + public IndividualCustomerAllOfAttributes authorizedUsers(List authorizedUsers) { + this.authorizedUsers = authorizedUsers; + return this; + } + + public IndividualCustomerAllOfAttributes addAuthorizedUsersItem(AuthorizedUser authorizedUsersItem) { + if (this.authorizedUsers == null) { + this.authorizedUsers = new ArrayList<>(); + } + this.authorizedUsers.add(authorizedUsersItem); + return this; + } + + /** + * Get authorizedUsers + * @return authorizedUsers + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHORIZED_USERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getAuthorizedUsers() { + return authorizedUsers; + } + + + @JsonProperty(JSON_PROPERTY_AUTHORIZED_USERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAuthorizedUsers(List authorizedUsers) { + this.authorizedUsers = authorizedUsers; + } + + + public IndividualCustomerAllOfAttributes jwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + return this; + } + + /** + * Get jwtSubject + * @return jwtSubject + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getJwtSubject() { + return jwtSubject.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getJwtSubject_JsonNullable() { + return jwtSubject; + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + public void setJwtSubject_JsonNullable(JsonNullable jwtSubject) { + this.jwtSubject = jwtSubject; + } + + public void setJwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + } + + + public IndividualCustomerAllOfAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public IndividualCustomerAllOfAttributes archiveReason(ArchiveReasonEnum archiveReason) { + this.archiveReason = archiveReason; + return this; + } + + /** + * Get archiveReason + * @return archiveReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ArchiveReasonEnum getArchiveReason() { + return archiveReason; + } + + + @JsonProperty(JSON_PROPERTY_ARCHIVE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArchiveReason(ArchiveReasonEnum archiveReason) { + this.archiveReason = archiveReason; + } + + + /** + * Return true if this IndividualCustomer_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IndividualCustomerAllOfAttributes individualCustomerAllOfAttributes = (IndividualCustomerAllOfAttributes) o; + return Objects.equals(this.createdAt, individualCustomerAllOfAttributes.createdAt) && + Objects.equals(this.fullName, individualCustomerAllOfAttributes.fullName) && + Objects.equals(this.email, individualCustomerAllOfAttributes.email) && + Objects.equals(this.phone, individualCustomerAllOfAttributes.phone) && + Objects.equals(this.ssn, individualCustomerAllOfAttributes.ssn) && + Objects.equals(this.passport, individualCustomerAllOfAttributes.passport) && + Objects.equals(this.nationality, individualCustomerAllOfAttributes.nationality) && + Objects.equals(this.matriculaConsular, individualCustomerAllOfAttributes.matriculaConsular) && + Objects.equals(this.address, individualCustomerAllOfAttributes.address) && + Objects.equals(this.dateOfBirth, individualCustomerAllOfAttributes.dateOfBirth) && + Objects.equals(this.ein, individualCustomerAllOfAttributes.ein) && + Objects.equals(this.dba, individualCustomerAllOfAttributes.dba) && + Objects.equals(this.soleProprietorship, individualCustomerAllOfAttributes.soleProprietorship) && + Objects.equals(this.tags, individualCustomerAllOfAttributes.tags) && + Objects.equals(this.riskRate, individualCustomerAllOfAttributes.riskRate) && + Objects.equals(this.maskedSSN, individualCustomerAllOfAttributes.maskedSSN) && + Objects.equals(this.maskedPassport, individualCustomerAllOfAttributes.maskedPassport) && + Objects.equals(this.maskedMatriculaConsular, individualCustomerAllOfAttributes.maskedMatriculaConsular) && + Objects.equals(this.authorizedUsers, individualCustomerAllOfAttributes.authorizedUsers) && + equalsNullable(this.jwtSubject, individualCustomerAllOfAttributes.jwtSubject) && + Objects.equals(this.status, individualCustomerAllOfAttributes.status) && + Objects.equals(this.archiveReason, individualCustomerAllOfAttributes.archiveReason); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, ein, dba, soleProprietorship, tags, riskRate, maskedSSN, maskedPassport, maskedMatriculaConsular, authorizedUsers, hashCodeNullable(jwtSubject), status, archiveReason); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IndividualCustomerAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); + sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); + sb.append(" dba: ").append(toIndentedString(dba)).append("\n"); + sb.append(" soleProprietorship: ").append(toIndentedString(soleProprietorship)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" riskRate: ").append(toIndentedString(riskRate)).append("\n"); + sb.append(" maskedSSN: ").append(toIndentedString(maskedSSN)).append("\n"); + sb.append(" maskedPassport: ").append(toIndentedString(maskedPassport)).append("\n"); + sb.append(" maskedMatriculaConsular: ").append(toIndentedString(maskedMatriculaConsular)).append("\n"); + sb.append(" authorizedUsers: ").append(toIndentedString(authorizedUsers)).append("\n"); + sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" archiveReason: ").append(toIndentedString(archiveReason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `ssn` to the URL query string + if (getSsn() != null) { + joiner.add(String.format("%sssn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSsn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `passport` to the URL query string + if (getPassport() != null) { + joiner.add(String.format("%spassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nationality` to the URL query string + if (getNationality() != null) { + joiner.add(String.format("%snationality%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNationality()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `matriculaConsular` to the URL query string + if (getMatriculaConsular() != null) { + joiner.add(String.format("%smatriculaConsular%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMatriculaConsular()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ein` to the URL query string + if (getEin() != null) { + joiner.add(String.format("%sein%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEin()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dba` to the URL query string + if (getDba() != null) { + joiner.add(String.format("%sdba%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDba()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `soleProprietorship` to the URL query string + if (getSoleProprietorship() != null) { + joiner.add(String.format("%ssoleProprietorship%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSoleProprietorship()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `riskRate` to the URL query string + if (getRiskRate() != null) { + joiner.add(String.format("%sriskRate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRiskRate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `maskedSSN` to the URL query string + if (getMaskedSSN() != null) { + joiner.add(String.format("%smaskedSSN%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMaskedSSN()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `maskedPassport` to the URL query string + if (getMaskedPassport() != null) { + joiner.add(String.format("%smaskedPassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMaskedPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `maskedMatriculaConsular` to the URL query string + if (getMaskedMatriculaConsular() != null) { + joiner.add(String.format("%smaskedMatriculaConsular%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMaskedMatriculaConsular()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `authorizedUsers` to the URL query string + if (getAuthorizedUsers() != null) { + for (int i = 0; i < getAuthorizedUsers().size(); i++) { + if (getAuthorizedUsers().get(i) != null) { + joiner.add(getAuthorizedUsers().get(i).toUrlQueryString(String.format("%sauthorizedUsers%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `jwtSubject` to the URL query string + if (getJwtSubject() != null) { + joiner.add(String.format("%sjwtSubject%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getJwtSubject()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `archiveReason` to the URL query string + if (getArchiveReason() != null) { + joiner.add(String.format("%sarchiveReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getArchiveReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/IndividualDebitCard.java b/src/main/java/unit/java/sdk/model/IndividualDebitCard.java new file mode 100644 index 00000000..4f08c217 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/IndividualDebitCard.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Card; +import unit.java.sdk.model.CardRelationships; +import unit.java.sdk.model.IndividualDebitCardAllOfAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * IndividualDebitCard + */ +@JsonPropertyOrder({ + IndividualDebitCard.JSON_PROPERTY_ATTRIBUTES, + IndividualDebitCard.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class IndividualDebitCard extends Card { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IndividualDebitCardAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CardRelationships relationships; + + public IndividualDebitCard() { + } + + public IndividualDebitCard attributes(IndividualDebitCardAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public IndividualDebitCardAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(IndividualDebitCardAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public IndividualDebitCard relationships(CardRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CardRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CardRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public IndividualDebitCard type(String type) { + this.setType(type); + return this; + } + + @Override + public IndividualDebitCard id(String id) { + this.setId(id); + return this; + } + + /** + * Return true if this IndividualDebitCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IndividualDebitCard individualDebitCard = (IndividualDebitCard) o; + return Objects.equals(this.attributes, individualDebitCard.attributes) && + Objects.equals(this.relationships, individualDebitCard.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IndividualDebitCard {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("IndividualDebitCard", IndividualDebitCard.class); + JSON.registerDiscriminator(IndividualDebitCard.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/IndividualDebitCardAllOfAttributes.java b/src/main/java/unit/java/sdk/model/IndividualDebitCardAllOfAttributes.java new file mode 100644 index 00000000..0c4f0c49 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/IndividualDebitCardAllOfAttributes.java @@ -0,0 +1,477 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.PhysicalCardStatus; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * IndividualDebitCardAllOfAttributes + */ +@JsonPropertyOrder({ + IndividualDebitCardAllOfAttributes.JSON_PROPERTY_CREATED_AT, + IndividualDebitCardAllOfAttributes.JSON_PROPERTY_UPDATED_AT, + IndividualDebitCardAllOfAttributes.JSON_PROPERTY_LAST4_DIGITS, + IndividualDebitCardAllOfAttributes.JSON_PROPERTY_EXPIRATION_DATE, + IndividualDebitCardAllOfAttributes.JSON_PROPERTY_SHIPPING_ADDRESS, + IndividualDebitCardAllOfAttributes.JSON_PROPERTY_BIN, + IndividualDebitCardAllOfAttributes.JSON_PROPERTY_STATUS, + IndividualDebitCardAllOfAttributes.JSON_PROPERTY_DESIGN, + IndividualDebitCardAllOfAttributes.JSON_PROPERTY_TAGS, + IndividualDebitCardAllOfAttributes.JSON_PROPERTY_FREEZE_REASON +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class IndividualDebitCardAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_LAST4_DIGITS = "last4Digits"; + private String last4Digits; + + public static final String JSON_PROPERTY_EXPIRATION_DATE = "expirationDate"; + private String expirationDate; + + public static final String JSON_PROPERTY_SHIPPING_ADDRESS = "shippingAddress"; + private Address shippingAddress; + + public static final String JSON_PROPERTY_BIN = "bin"; + private String bin; + + public static final String JSON_PROPERTY_STATUS = "status"; + private PhysicalCardStatus status; + + public static final String JSON_PROPERTY_DESIGN = "design"; + private String design; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_FREEZE_REASON = "freezeReason"; + private String freezeReason; + + public IndividualDebitCardAllOfAttributes() { + } + + public IndividualDebitCardAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public IndividualDebitCardAllOfAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public IndividualDebitCardAllOfAttributes last4Digits(String last4Digits) { + this.last4Digits = last4Digits; + return this; + } + + /** + * Get last4Digits + * @return last4Digits + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LAST4_DIGITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getLast4Digits() { + return last4Digits; + } + + + @JsonProperty(JSON_PROPERTY_LAST4_DIGITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLast4Digits(String last4Digits) { + this.last4Digits = last4Digits; + } + + + public IndividualDebitCardAllOfAttributes expirationDate(String expirationDate) { + this.expirationDate = expirationDate; + return this; + } + + /** + * Get expirationDate + * @return expirationDate + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getExpirationDate() { + return expirationDate; + } + + + @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExpirationDate(String expirationDate) { + this.expirationDate = expirationDate; + } + + + public IndividualDebitCardAllOfAttributes shippingAddress(Address shippingAddress) { + this.shippingAddress = shippingAddress; + return this; + } + + /** + * Get shippingAddress + * @return shippingAddress + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHIPPING_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Address getShippingAddress() { + return shippingAddress; + } + + + @JsonProperty(JSON_PROPERTY_SHIPPING_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShippingAddress(Address shippingAddress) { + this.shippingAddress = shippingAddress; + } + + + public IndividualDebitCardAllOfAttributes bin(String bin) { + this.bin = bin; + return this; + } + + /** + * Get bin + * @return bin + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBin() { + return bin; + } + + + @JsonProperty(JSON_PROPERTY_BIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBin(String bin) { + this.bin = bin; + } + + + public IndividualDebitCardAllOfAttributes status(PhysicalCardStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PhysicalCardStatus getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(PhysicalCardStatus status) { + this.status = status; + } + + + public IndividualDebitCardAllOfAttributes design(String design) { + this.design = design; + return this; + } + + /** + * Get design + * @return design + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDesign() { + return design; + } + + + @JsonProperty(JSON_PROPERTY_DESIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDesign(String design) { + this.design = design; + } + + + public IndividualDebitCardAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public IndividualDebitCardAllOfAttributes freezeReason(String freezeReason) { + this.freezeReason = freezeReason; + return this; + } + + /** + * Get freezeReason + * @return freezeReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FREEZE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFreezeReason() { + return freezeReason; + } + + + @JsonProperty(JSON_PROPERTY_FREEZE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFreezeReason(String freezeReason) { + this.freezeReason = freezeReason; + } + + + /** + * Return true if this IndividualDebitCard_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IndividualDebitCardAllOfAttributes individualDebitCardAllOfAttributes = (IndividualDebitCardAllOfAttributes) o; + return Objects.equals(this.createdAt, individualDebitCardAllOfAttributes.createdAt) && + Objects.equals(this.updatedAt, individualDebitCardAllOfAttributes.updatedAt) && + Objects.equals(this.last4Digits, individualDebitCardAllOfAttributes.last4Digits) && + Objects.equals(this.expirationDate, individualDebitCardAllOfAttributes.expirationDate) && + Objects.equals(this.shippingAddress, individualDebitCardAllOfAttributes.shippingAddress) && + Objects.equals(this.bin, individualDebitCardAllOfAttributes.bin) && + Objects.equals(this.status, individualDebitCardAllOfAttributes.status) && + Objects.equals(this.design, individualDebitCardAllOfAttributes.design) && + Objects.equals(this.tags, individualDebitCardAllOfAttributes.tags) && + Objects.equals(this.freezeReason, individualDebitCardAllOfAttributes.freezeReason); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, updatedAt, last4Digits, expirationDate, shippingAddress, bin, status, design, tags, freezeReason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IndividualDebitCardAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" last4Digits: ").append(toIndentedString(last4Digits)).append("\n"); + sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); + sb.append(" shippingAddress: ").append(toIndentedString(shippingAddress)).append("\n"); + sb.append(" bin: ").append(toIndentedString(bin)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" design: ").append(toIndentedString(design)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" freezeReason: ").append(toIndentedString(freezeReason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `last4Digits` to the URL query string + if (getLast4Digits() != null) { + joiner.add(String.format("%slast4Digits%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLast4Digits()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `expirationDate` to the URL query string + if (getExpirationDate() != null) { + joiner.add(String.format("%sexpirationDate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getExpirationDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `shippingAddress` to the URL query string + if (getShippingAddress() != null) { + joiner.add(getShippingAddress().toUrlQueryString(prefix + "shippingAddress" + suffix)); + } + + // add `bin` to the URL query string + if (getBin() != null) { + joiner.add(String.format("%sbin%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBin()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `design` to the URL query string + if (getDesign() != null) { + joiner.add(String.format("%sdesign%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDesign()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `freezeReason` to the URL query string + if (getFreezeReason() != null) { + joiner.add(String.format("%sfreezeReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFreezeReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/IndividualVirtualDebitCard.java b/src/main/java/unit/java/sdk/model/IndividualVirtualDebitCard.java new file mode 100644 index 00000000..fb7b2081 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/IndividualVirtualDebitCard.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Card; +import unit.java.sdk.model.CardRelationships; +import unit.java.sdk.model.IndividualVirtualDebitCardAllOfAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * IndividualVirtualDebitCard + */ +@JsonPropertyOrder({ + IndividualVirtualDebitCard.JSON_PROPERTY_ATTRIBUTES, + IndividualVirtualDebitCard.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class IndividualVirtualDebitCard extends Card { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IndividualVirtualDebitCardAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CardRelationships relationships; + + public IndividualVirtualDebitCard() { + } + + public IndividualVirtualDebitCard attributes(IndividualVirtualDebitCardAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public IndividualVirtualDebitCardAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(IndividualVirtualDebitCardAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public IndividualVirtualDebitCard relationships(CardRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CardRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(CardRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public IndividualVirtualDebitCard type(String type) { + this.setType(type); + return this; + } + + @Override + public IndividualVirtualDebitCard id(String id) { + this.setId(id); + return this; + } + + /** + * Return true if this IndividualVirtualDebitCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IndividualVirtualDebitCard individualVirtualDebitCard = (IndividualVirtualDebitCard) o; + return Objects.equals(this.attributes, individualVirtualDebitCard.attributes) && + Objects.equals(this.relationships, individualVirtualDebitCard.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IndividualVirtualDebitCard {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("IndividualVirtualDebitCard", IndividualVirtualDebitCard.class); + JSON.registerDiscriminator(IndividualVirtualDebitCard.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/IndividualVirtualDebitCardAllOfAttributes.java b/src/main/java/unit/java/sdk/model/IndividualVirtualDebitCardAllOfAttributes.java new file mode 100644 index 00000000..d58c0bae --- /dev/null +++ b/src/main/java/unit/java/sdk/model/IndividualVirtualDebitCardAllOfAttributes.java @@ -0,0 +1,404 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.VirtualCardStatus; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * IndividualVirtualDebitCardAllOfAttributes + */ +@JsonPropertyOrder({ + IndividualVirtualDebitCardAllOfAttributes.JSON_PROPERTY_CREATED_AT, + IndividualVirtualDebitCardAllOfAttributes.JSON_PROPERTY_UPDATED_AT, + IndividualVirtualDebitCardAllOfAttributes.JSON_PROPERTY_LAST4_DIGITS, + IndividualVirtualDebitCardAllOfAttributes.JSON_PROPERTY_EXPIRATION_DATE, + IndividualVirtualDebitCardAllOfAttributes.JSON_PROPERTY_BIN, + IndividualVirtualDebitCardAllOfAttributes.JSON_PROPERTY_STATUS, + IndividualVirtualDebitCardAllOfAttributes.JSON_PROPERTY_TAGS, + IndividualVirtualDebitCardAllOfAttributes.JSON_PROPERTY_FREEZE_REASON +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class IndividualVirtualDebitCardAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_LAST4_DIGITS = "last4Digits"; + private String last4Digits; + + public static final String JSON_PROPERTY_EXPIRATION_DATE = "expirationDate"; + private String expirationDate; + + public static final String JSON_PROPERTY_BIN = "bin"; + private String bin; + + public static final String JSON_PROPERTY_STATUS = "status"; + private VirtualCardStatus status; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_FREEZE_REASON = "freezeReason"; + private String freezeReason; + + public IndividualVirtualDebitCardAllOfAttributes() { + } + + public IndividualVirtualDebitCardAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public IndividualVirtualDebitCardAllOfAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public IndividualVirtualDebitCardAllOfAttributes last4Digits(String last4Digits) { + this.last4Digits = last4Digits; + return this; + } + + /** + * Get last4Digits + * @return last4Digits + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LAST4_DIGITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getLast4Digits() { + return last4Digits; + } + + + @JsonProperty(JSON_PROPERTY_LAST4_DIGITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLast4Digits(String last4Digits) { + this.last4Digits = last4Digits; + } + + + public IndividualVirtualDebitCardAllOfAttributes expirationDate(String expirationDate) { + this.expirationDate = expirationDate; + return this; + } + + /** + * Get expirationDate + * @return expirationDate + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getExpirationDate() { + return expirationDate; + } + + + @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExpirationDate(String expirationDate) { + this.expirationDate = expirationDate; + } + + + public IndividualVirtualDebitCardAllOfAttributes bin(String bin) { + this.bin = bin; + return this; + } + + /** + * Get bin + * @return bin + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBin() { + return bin; + } + + + @JsonProperty(JSON_PROPERTY_BIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBin(String bin) { + this.bin = bin; + } + + + public IndividualVirtualDebitCardAllOfAttributes status(VirtualCardStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public VirtualCardStatus getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(VirtualCardStatus status) { + this.status = status; + } + + + public IndividualVirtualDebitCardAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public IndividualVirtualDebitCardAllOfAttributes freezeReason(String freezeReason) { + this.freezeReason = freezeReason; + return this; + } + + /** + * Get freezeReason + * @return freezeReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FREEZE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFreezeReason() { + return freezeReason; + } + + + @JsonProperty(JSON_PROPERTY_FREEZE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFreezeReason(String freezeReason) { + this.freezeReason = freezeReason; + } + + + /** + * Return true if this IndividualVirtualDebitCard_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IndividualVirtualDebitCardAllOfAttributes individualVirtualDebitCardAllOfAttributes = (IndividualVirtualDebitCardAllOfAttributes) o; + return Objects.equals(this.createdAt, individualVirtualDebitCardAllOfAttributes.createdAt) && + Objects.equals(this.updatedAt, individualVirtualDebitCardAllOfAttributes.updatedAt) && + Objects.equals(this.last4Digits, individualVirtualDebitCardAllOfAttributes.last4Digits) && + Objects.equals(this.expirationDate, individualVirtualDebitCardAllOfAttributes.expirationDate) && + Objects.equals(this.bin, individualVirtualDebitCardAllOfAttributes.bin) && + Objects.equals(this.status, individualVirtualDebitCardAllOfAttributes.status) && + Objects.equals(this.tags, individualVirtualDebitCardAllOfAttributes.tags) && + Objects.equals(this.freezeReason, individualVirtualDebitCardAllOfAttributes.freezeReason); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, updatedAt, last4Digits, expirationDate, bin, status, tags, freezeReason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IndividualVirtualDebitCardAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" last4Digits: ").append(toIndentedString(last4Digits)).append("\n"); + sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); + sb.append(" bin: ").append(toIndentedString(bin)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" freezeReason: ").append(toIndentedString(freezeReason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `last4Digits` to the URL query string + if (getLast4Digits() != null) { + joiner.add(String.format("%slast4Digits%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLast4Digits()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `expirationDate` to the URL query string + if (getExpirationDate() != null) { + joiner.add(String.format("%sexpirationDate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getExpirationDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `bin` to the URL query string + if (getBin() != null) { + joiner.add(String.format("%sbin%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBin()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `freezeReason` to the URL query string + if (getFreezeReason() != null) { + joiner.add(String.format("%sfreezeReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFreezeReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Industry.java b/src/main/java/unit/java/sdk/model/Industry.java new file mode 100644 index 00000000..b8faa082 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Industry.java @@ -0,0 +1,98 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets industry + */ +public enum Industry { + + RETAIL("Retail"), + + WHOLESALE("Wholesale"), + + RESTAURANTS("Restaurants"), + + HOSPITALS("Hospitals"), + + CONSTRUCTION("Construction"), + + INSURANCE("Insurance"), + + UNIONS("Unions"), + + REALESTATE("RealEstate"), + + FREELANCEPROFESSIONAL("FreelanceProfessional"), + + OTHERPROFESSIONALSERVICES("OtherProfessionalServices"), + + ONLINERETAILER("OnlineRetailer"), + + OTHEREDUCATIONSERVICES("OtherEducationServices"); + + private String value; + + Industry(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static Industry fromValue(String value) { + for (Industry b : Industry.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } + +} + diff --git a/src/main/java/unit/java/sdk/model/Institution.java b/src/main/java/unit/java/sdk/model/Institution.java new file mode 100644 index 00000000..4cca9429 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Institution.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.InstitutionAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Institution + */ +@JsonPropertyOrder({ + Institution.JSON_PROPERTY_TYPE, + Institution.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Institution { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "institution"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private InstitutionAttributes attributes; + + public Institution() { + } + + public Institution type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public Institution attributes(InstitutionAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public InstitutionAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(InstitutionAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this institution object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Institution institution = (Institution) o; + return Objects.equals(this.type, institution.type) && + Objects.equals(this.attributes, institution.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Institution {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/InstitutionAttributes.java b/src/main/java/unit/java/sdk/model/InstitutionAttributes.java new file mode 100644 index 00000000..5a00fbfa --- /dev/null +++ b/src/main/java/unit/java/sdk/model/InstitutionAttributes.java @@ -0,0 +1,294 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * InstitutionAttributes + */ +@JsonPropertyOrder({ + InstitutionAttributes.JSON_PROPERTY_ROUTING_NUMBER, + InstitutionAttributes.JSON_PROPERTY_NAME, + InstitutionAttributes.JSON_PROPERTY_ADDRESS, + InstitutionAttributes.JSON_PROPERTY_IS_WIRE_SUPPORTED, + InstitutionAttributes.JSON_PROPERTY_IS_A_C_H_SUPPORTED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InstitutionAttributes { + public static final String JSON_PROPERTY_ROUTING_NUMBER = "routingNumber"; + private String routingNumber; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private String address; + + public static final String JSON_PROPERTY_IS_WIRE_SUPPORTED = "isWireSupported"; + private Boolean isWireSupported; + + public static final String JSON_PROPERTY_IS_A_C_H_SUPPORTED = "isACHSupported"; + private Boolean isACHSupported; + + public InstitutionAttributes() { + } + + public InstitutionAttributes routingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; + } + + /** + * Get routingNumber + * @return routingNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getRoutingNumber() { + return routingNumber; + } + + + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + } + + + public InstitutionAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public InstitutionAttributes address(String address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(String address) { + this.address = address; + } + + + public InstitutionAttributes isWireSupported(Boolean isWireSupported) { + this.isWireSupported = isWireSupported; + return this; + } + + /** + * Get isWireSupported + * @return isWireSupported + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_WIRE_SUPPORTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsWireSupported() { + return isWireSupported; + } + + + @JsonProperty(JSON_PROPERTY_IS_WIRE_SUPPORTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsWireSupported(Boolean isWireSupported) { + this.isWireSupported = isWireSupported; + } + + + public InstitutionAttributes isACHSupported(Boolean isACHSupported) { + this.isACHSupported = isACHSupported; + return this; + } + + /** + * Get isACHSupported + * @return isACHSupported + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_A_C_H_SUPPORTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsACHSupported() { + return isACHSupported; + } + + + @JsonProperty(JSON_PROPERTY_IS_A_C_H_SUPPORTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsACHSupported(Boolean isACHSupported) { + this.isACHSupported = isACHSupported; + } + + + /** + * Return true if this institution_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InstitutionAttributes institutionAttributes = (InstitutionAttributes) o; + return Objects.equals(this.routingNumber, institutionAttributes.routingNumber) && + Objects.equals(this.name, institutionAttributes.name) && + Objects.equals(this.address, institutionAttributes.address) && + Objects.equals(this.isWireSupported, institutionAttributes.isWireSupported) && + Objects.equals(this.isACHSupported, institutionAttributes.isACHSupported); + } + + @Override + public int hashCode() { + return Objects.hash(routingNumber, name, address, isWireSupported, isACHSupported); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InstitutionAttributes {\n"); + sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" isWireSupported: ").append(toIndentedString(isWireSupported)).append("\n"); + sb.append(" isACHSupported: ").append(toIndentedString(isACHSupported)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `routingNumber` to the URL query string + if (getRoutingNumber() != null) { + joiner.add(String.format("%sroutingNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRoutingNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(String.format("%saddress%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAddress()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `isWireSupported` to the URL query string + if (getIsWireSupported() != null) { + joiner.add(String.format("%sisWireSupported%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIsWireSupported()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `isACHSupported` to the URL query string + if (getIsACHSupported() != null) { + joiner.add(String.format("%sisACHSupported%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIsACHSupported()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/InterchangeTransaction.java b/src/main/java/unit/java/sdk/model/InterchangeTransaction.java new file mode 100644 index 00000000..ef37de5d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/InterchangeTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.FeeTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * InterchangeTransaction + */ +@JsonPropertyOrder({ + InterchangeTransaction.JSON_PROPERTY_ATTRIBUTES, + InterchangeTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class InterchangeTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FeeTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public InterchangeTransaction() { + } + + public InterchangeTransaction attributes(FeeTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FeeTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(FeeTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public InterchangeTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public InterchangeTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public InterchangeTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this InterchangeTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InterchangeTransaction interchangeTransaction = (InterchangeTransaction) o; + return Objects.equals(this.attributes, interchangeTransaction.attributes) && + Objects.equals(this.relationships, interchangeTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InterchangeTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("InterchangeTransaction", InterchangeTransaction.class); + JSON.registerDiscriminator(InterchangeTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/InterestShareTransaction.java b/src/main/java/unit/java/sdk/model/InterestShareTransaction.java new file mode 100644 index 00000000..428fcf25 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/InterestShareTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.FeeTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * InterestShareTransaction + */ +@JsonPropertyOrder({ + InterestShareTransaction.JSON_PROPERTY_ATTRIBUTES, + InterestShareTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class InterestShareTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FeeTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public InterestShareTransaction() { + } + + public InterestShareTransaction attributes(FeeTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FeeTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(FeeTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public InterestShareTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public InterestShareTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public InterestShareTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this InterestShareTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InterestShareTransaction interestShareTransaction = (InterestShareTransaction) o; + return Objects.equals(this.attributes, interestShareTransaction.attributes) && + Objects.equals(this.relationships, interestShareTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InterestShareTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("InterestShareTransaction", InterestShareTransaction.class); + JSON.registerDiscriminator(InterestShareTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/InterestTransaction.java b/src/main/java/unit/java/sdk/model/InterestTransaction.java new file mode 100644 index 00000000..c56d3368 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/InterestTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.FeeTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * InterestTransaction + */ +@JsonPropertyOrder({ + InterestTransaction.JSON_PROPERTY_ATTRIBUTES, + InterestTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class InterestTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FeeTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public InterestTransaction() { + } + + public InterestTransaction attributes(FeeTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FeeTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(FeeTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public InterestTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public InterestTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public InterestTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this InterestTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InterestTransaction interestTransaction = (InterestTransaction) o; + return Objects.equals(this.attributes, interestTransaction.attributes) && + Objects.equals(this.relationships, interestTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InterestTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("InterestTransaction", InterestTransaction.class); + JSON.registerDiscriminator(InterestTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/Limits.java b/src/main/java/unit/java/sdk/model/Limits.java new file mode 100644 index 00000000..df54d251 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Limits.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.LimitsAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Limits + */ +@JsonPropertyOrder({ + Limits.JSON_PROPERTY_TYPE, + Limits.JSON_PROPERTY_ID, + Limits.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Limits { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LimitsAttributes attributes; + + public Limits() { + } + + public Limits type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public Limits id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public Limits attributes(LimitsAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LimitsAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(LimitsAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this limits object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Limits limits = (Limits) o; + return Objects.equals(this.type, limits.type) && + Objects.equals(this.id, limits.id) && + Objects.equals(this.attributes, limits.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Limits {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Limits1.java b/src/main/java/unit/java/sdk/model/Limits1.java new file mode 100644 index 00000000..fb258191 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Limits1.java @@ -0,0 +1,172 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * Limits1 + */ +@JsonPropertyOrder({ + Limits1.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = CreditLimits.class, name = "creditLimits"), + @JsonSubTypes.Type(value = DepositLimits.class, name = "limits"), +}) + +public class Limits1 { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public Limits1() { + } + + public Limits1 type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + /** + * Return true if this limits_1 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Limits1 limits1 = (Limits1) o; + return Objects.equals(this.type, limits1.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Limits1 {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("creditLimits", CreditLimits.class); + mappings.put("limits", DepositLimits.class); + mappings.put("limits_1", Limits1.class); + JSON.registerDiscriminator(Limits1.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/LimitsAttributes.java b/src/main/java/unit/java/sdk/model/LimitsAttributes.java new file mode 100644 index 00000000..558be25f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/LimitsAttributes.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.LimitsAttributesCard; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * LimitsAttributes + */ +@JsonPropertyOrder({ + LimitsAttributes.JSON_PROPERTY_CARD +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class LimitsAttributes { + public static final String JSON_PROPERTY_CARD = "card"; + private LimitsAttributesCard card; + + public LimitsAttributes() { + } + + public LimitsAttributes card(LimitsAttributesCard card) { + this.card = card; + return this; + } + + /** + * Get card + * @return card + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LimitsAttributesCard getCard() { + return card; + } + + + @JsonProperty(JSON_PROPERTY_CARD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCard(LimitsAttributesCard card) { + this.card = card; + } + + + /** + * Return true if this limits_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LimitsAttributes limitsAttributes = (LimitsAttributes) o; + return Objects.equals(this.card, limitsAttributes.card); + } + + @Override + public int hashCode() { + return Objects.hash(card); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LimitsAttributes {\n"); + sb.append(" card: ").append(toIndentedString(card)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `card` to the URL query string + if (getCard() != null) { + joiner.add(getCard().toUrlQueryString(prefix + "card" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/LimitsAttributesCard.java b/src/main/java/unit/java/sdk/model/LimitsAttributesCard.java new file mode 100644 index 00000000..a734e58a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/LimitsAttributesCard.java @@ -0,0 +1,188 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.LimitsAttributesCardLimits; +import unit.java.sdk.model.LimitsAttributesCardTotalsDaily; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * LimitsAttributesCard + */ +@JsonPropertyOrder({ + LimitsAttributesCard.JSON_PROPERTY_LIMITS, + LimitsAttributesCard.JSON_PROPERTY_TOTALS_DAILY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class LimitsAttributesCard { + public static final String JSON_PROPERTY_LIMITS = "limits"; + private LimitsAttributesCardLimits limits; + + public static final String JSON_PROPERTY_TOTALS_DAILY = "totalsDaily"; + private LimitsAttributesCardTotalsDaily totalsDaily; + + public LimitsAttributesCard() { + } + + public LimitsAttributesCard limits(LimitsAttributesCardLimits limits) { + this.limits = limits; + return this; + } + + /** + * Get limits + * @return limits + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LimitsAttributesCardLimits getLimits() { + return limits; + } + + + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLimits(LimitsAttributesCardLimits limits) { + this.limits = limits; + } + + + public LimitsAttributesCard totalsDaily(LimitsAttributesCardTotalsDaily totalsDaily) { + this.totalsDaily = totalsDaily; + return this; + } + + /** + * Get totalsDaily + * @return totalsDaily + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTALS_DAILY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LimitsAttributesCardTotalsDaily getTotalsDaily() { + return totalsDaily; + } + + + @JsonProperty(JSON_PROPERTY_TOTALS_DAILY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalsDaily(LimitsAttributesCardTotalsDaily totalsDaily) { + this.totalsDaily = totalsDaily; + } + + + /** + * Return true if this limits_attributes_card object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LimitsAttributesCard limitsAttributesCard = (LimitsAttributesCard) o; + return Objects.equals(this.limits, limitsAttributesCard.limits) && + Objects.equals(this.totalsDaily, limitsAttributesCard.totalsDaily); + } + + @Override + public int hashCode() { + return Objects.hash(limits, totalsDaily); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LimitsAttributesCard {\n"); + sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); + sb.append(" totalsDaily: ").append(toIndentedString(totalsDaily)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `limits` to the URL query string + if (getLimits() != null) { + joiner.add(getLimits().toUrlQueryString(prefix + "limits" + suffix)); + } + + // add `totalsDaily` to the URL query string + if (getTotalsDaily() != null) { + joiner.add(getTotalsDaily().toUrlQueryString(prefix + "totalsDaily" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/LimitsAttributesCardLimits.java b/src/main/java/unit/java/sdk/model/LimitsAttributesCardLimits.java new file mode 100644 index 00000000..481e6e81 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/LimitsAttributesCardLimits.java @@ -0,0 +1,259 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * LimitsAttributesCardLimits + */ +@JsonPropertyOrder({ + LimitsAttributesCardLimits.JSON_PROPERTY_DAILY_WITHDRAWAL, + LimitsAttributesCardLimits.JSON_PROPERTY_DAILY_DEPOSIT, + LimitsAttributesCardLimits.JSON_PROPERTY_DAILY_PURCHASE, + LimitsAttributesCardLimits.JSON_PROPERTY_DAILY_CARD_TRANSACTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class LimitsAttributesCardLimits { + public static final String JSON_PROPERTY_DAILY_WITHDRAWAL = "dailyWithdrawal"; + private BigDecimal dailyWithdrawal; + + public static final String JSON_PROPERTY_DAILY_DEPOSIT = "dailyDeposit"; + private BigDecimal dailyDeposit; + + public static final String JSON_PROPERTY_DAILY_PURCHASE = "dailyPurchase"; + private BigDecimal dailyPurchase; + + public static final String JSON_PROPERTY_DAILY_CARD_TRANSACTION = "dailyCardTransaction"; + private BigDecimal dailyCardTransaction; + + public LimitsAttributesCardLimits() { + } + + public LimitsAttributesCardLimits dailyWithdrawal(BigDecimal dailyWithdrawal) { + this.dailyWithdrawal = dailyWithdrawal; + return this; + } + + /** + * Get dailyWithdrawal + * @return dailyWithdrawal + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DAILY_WITHDRAWAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getDailyWithdrawal() { + return dailyWithdrawal; + } + + + @JsonProperty(JSON_PROPERTY_DAILY_WITHDRAWAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDailyWithdrawal(BigDecimal dailyWithdrawal) { + this.dailyWithdrawal = dailyWithdrawal; + } + + + public LimitsAttributesCardLimits dailyDeposit(BigDecimal dailyDeposit) { + this.dailyDeposit = dailyDeposit; + return this; + } + + /** + * Get dailyDeposit + * @return dailyDeposit + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DAILY_DEPOSIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getDailyDeposit() { + return dailyDeposit; + } + + + @JsonProperty(JSON_PROPERTY_DAILY_DEPOSIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDailyDeposit(BigDecimal dailyDeposit) { + this.dailyDeposit = dailyDeposit; + } + + + public LimitsAttributesCardLimits dailyPurchase(BigDecimal dailyPurchase) { + this.dailyPurchase = dailyPurchase; + return this; + } + + /** + * Get dailyPurchase + * @return dailyPurchase + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DAILY_PURCHASE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getDailyPurchase() { + return dailyPurchase; + } + + + @JsonProperty(JSON_PROPERTY_DAILY_PURCHASE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDailyPurchase(BigDecimal dailyPurchase) { + this.dailyPurchase = dailyPurchase; + } + + + public LimitsAttributesCardLimits dailyCardTransaction(BigDecimal dailyCardTransaction) { + this.dailyCardTransaction = dailyCardTransaction; + return this; + } + + /** + * Get dailyCardTransaction + * @return dailyCardTransaction + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DAILY_CARD_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getDailyCardTransaction() { + return dailyCardTransaction; + } + + + @JsonProperty(JSON_PROPERTY_DAILY_CARD_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDailyCardTransaction(BigDecimal dailyCardTransaction) { + this.dailyCardTransaction = dailyCardTransaction; + } + + + /** + * Return true if this limits_attributes_card_limits object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LimitsAttributesCardLimits limitsAttributesCardLimits = (LimitsAttributesCardLimits) o; + return Objects.equals(this.dailyWithdrawal, limitsAttributesCardLimits.dailyWithdrawal) && + Objects.equals(this.dailyDeposit, limitsAttributesCardLimits.dailyDeposit) && + Objects.equals(this.dailyPurchase, limitsAttributesCardLimits.dailyPurchase) && + Objects.equals(this.dailyCardTransaction, limitsAttributesCardLimits.dailyCardTransaction); + } + + @Override + public int hashCode() { + return Objects.hash(dailyWithdrawal, dailyDeposit, dailyPurchase, dailyCardTransaction); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LimitsAttributesCardLimits {\n"); + sb.append(" dailyWithdrawal: ").append(toIndentedString(dailyWithdrawal)).append("\n"); + sb.append(" dailyDeposit: ").append(toIndentedString(dailyDeposit)).append("\n"); + sb.append(" dailyPurchase: ").append(toIndentedString(dailyPurchase)).append("\n"); + sb.append(" dailyCardTransaction: ").append(toIndentedString(dailyCardTransaction)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dailyWithdrawal` to the URL query string + if (getDailyWithdrawal() != null) { + joiner.add(String.format("%sdailyWithdrawal%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDailyWithdrawal()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dailyDeposit` to the URL query string + if (getDailyDeposit() != null) { + joiner.add(String.format("%sdailyDeposit%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDailyDeposit()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dailyPurchase` to the URL query string + if (getDailyPurchase() != null) { + joiner.add(String.format("%sdailyPurchase%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDailyPurchase()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dailyCardTransaction` to the URL query string + if (getDailyCardTransaction() != null) { + joiner.add(String.format("%sdailyCardTransaction%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDailyCardTransaction()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/LimitsAttributesCardTotalsDaily.java b/src/main/java/unit/java/sdk/model/LimitsAttributesCardTotalsDaily.java new file mode 100644 index 00000000..717c9c5c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/LimitsAttributesCardTotalsDaily.java @@ -0,0 +1,259 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * LimitsAttributesCardTotalsDaily + */ +@JsonPropertyOrder({ + LimitsAttributesCardTotalsDaily.JSON_PROPERTY_WITHDRAWAL, + LimitsAttributesCardTotalsDaily.JSON_PROPERTY_DEPOSIT, + LimitsAttributesCardTotalsDaily.JSON_PROPERTY_PURCHASE, + LimitsAttributesCardTotalsDaily.JSON_PROPERTY_CARD_TRANSACTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class LimitsAttributesCardTotalsDaily { + public static final String JSON_PROPERTY_WITHDRAWAL = "withdrawal"; + private BigDecimal withdrawal; + + public static final String JSON_PROPERTY_DEPOSIT = "deposit"; + private BigDecimal deposit; + + public static final String JSON_PROPERTY_PURCHASE = "purchase"; + private BigDecimal purchase; + + public static final String JSON_PROPERTY_CARD_TRANSACTION = "cardTransaction"; + private BigDecimal cardTransaction; + + public LimitsAttributesCardTotalsDaily() { + } + + public LimitsAttributesCardTotalsDaily withdrawal(BigDecimal withdrawal) { + this.withdrawal = withdrawal; + return this; + } + + /** + * Get withdrawal + * @return withdrawal + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WITHDRAWAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getWithdrawal() { + return withdrawal; + } + + + @JsonProperty(JSON_PROPERTY_WITHDRAWAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWithdrawal(BigDecimal withdrawal) { + this.withdrawal = withdrawal; + } + + + public LimitsAttributesCardTotalsDaily deposit(BigDecimal deposit) { + this.deposit = deposit; + return this; + } + + /** + * Get deposit + * @return deposit + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEPOSIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getDeposit() { + return deposit; + } + + + @JsonProperty(JSON_PROPERTY_DEPOSIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeposit(BigDecimal deposit) { + this.deposit = deposit; + } + + + public LimitsAttributesCardTotalsDaily purchase(BigDecimal purchase) { + this.purchase = purchase; + return this; + } + + /** + * Get purchase + * @return purchase + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PURCHASE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getPurchase() { + return purchase; + } + + + @JsonProperty(JSON_PROPERTY_PURCHASE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPurchase(BigDecimal purchase) { + this.purchase = purchase; + } + + + public LimitsAttributesCardTotalsDaily cardTransaction(BigDecimal cardTransaction) { + this.cardTransaction = cardTransaction; + return this; + } + + /** + * Get cardTransaction + * @return cardTransaction + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getCardTransaction() { + return cardTransaction; + } + + + @JsonProperty(JSON_PROPERTY_CARD_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardTransaction(BigDecimal cardTransaction) { + this.cardTransaction = cardTransaction; + } + + + /** + * Return true if this limits_attributes_card_totalsDaily object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LimitsAttributesCardTotalsDaily limitsAttributesCardTotalsDaily = (LimitsAttributesCardTotalsDaily) o; + return Objects.equals(this.withdrawal, limitsAttributesCardTotalsDaily.withdrawal) && + Objects.equals(this.deposit, limitsAttributesCardTotalsDaily.deposit) && + Objects.equals(this.purchase, limitsAttributesCardTotalsDaily.purchase) && + Objects.equals(this.cardTransaction, limitsAttributesCardTotalsDaily.cardTransaction); + } + + @Override + public int hashCode() { + return Objects.hash(withdrawal, deposit, purchase, cardTransaction); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LimitsAttributesCardTotalsDaily {\n"); + sb.append(" withdrawal: ").append(toIndentedString(withdrawal)).append("\n"); + sb.append(" deposit: ").append(toIndentedString(deposit)).append("\n"); + sb.append(" purchase: ").append(toIndentedString(purchase)).append("\n"); + sb.append(" cardTransaction: ").append(toIndentedString(cardTransaction)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `withdrawal` to the URL query string + if (getWithdrawal() != null) { + joiner.add(String.format("%swithdrawal%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getWithdrawal()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `deposit` to the URL query string + if (getDeposit() != null) { + joiner.add(String.format("%sdeposit%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDeposit()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `purchase` to the URL query string + if (getPurchase() != null) { + joiner.add(String.format("%spurchase%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPurchase()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardTransaction` to the URL query string + if (getCardTransaction() != null) { + joiner.add(String.format("%scardTransaction%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardTransaction()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ListPageParametersObject.java b/src/main/java/unit/java/sdk/model/ListPageParametersObject.java new file mode 100644 index 00000000..fee2feca --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ListPageParametersObject.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ListPageParametersObject + */ +@JsonPropertyOrder({ + ListPageParametersObject.JSON_PROPERTY_LIMIT, + ListPageParametersObject.JSON_PROPERTY_OFFSET +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ListPageParametersObject { + public static final String JSON_PROPERTY_LIMIT = "limit"; + private Integer limit = 100; + + public static final String JSON_PROPERTY_OFFSET = "offset"; + private Integer offset = 0; + + public ListPageParametersObject() { + } + + public ListPageParametersObject limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * maximum: 1000 + * @return limit + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getLimit() { + return limit; + } + + + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLimit(Integer limit) { + this.limit = limit; + } + + + public ListPageParametersObject offset(Integer offset) { + this.offset = offset; + return this; + } + + /** + * Get offset + * @return offset + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OFFSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getOffset() { + return offset; + } + + + @JsonProperty(JSON_PROPERTY_OFFSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOffset(Integer offset) { + this.offset = offset; + } + + + /** + * Return true if this listPageParametersObject object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListPageParametersObject listPageParametersObject = (ListPageParametersObject) o; + return Objects.equals(this.limit, listPageParametersObject.limit) && + Objects.equals(this.offset, listPageParametersObject.offset); + } + + @Override + public int hashCode() { + return Objects.hash(limit, offset); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListPageParametersObject {\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `limit` to the URL query string + if (getLimit() != null) { + joiner.add(String.format("%slimit%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLimit()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `offset` to the URL query string + if (getOffset() != null) { + joiner.add(String.format("%soffset%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOffset()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Merchant.java b/src/main/java/unit/java/sdk/model/Merchant.java new file mode 100644 index 00000000..4c6288ba --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Merchant.java @@ -0,0 +1,294 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Merchant + */ +@JsonPropertyOrder({ + Merchant.JSON_PROPERTY_NAME, + Merchant.JSON_PROPERTY_TYPE, + Merchant.JSON_PROPERTY_CATEGORY, + Merchant.JSON_PROPERTY_LOCATION, + Merchant.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Merchant { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_TYPE = "type"; + private Integer type; + + public static final String JSON_PROPERTY_CATEGORY = "category"; + private String category; + + public static final String JSON_PROPERTY_LOCATION = "location"; + private String location; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public Merchant() { + } + + public Merchant name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public Merchant type(Integer type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(Integer type) { + this.type = type; + } + + + public Merchant category(String category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCategory() { + return category; + } + + + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCategory(String category) { + this.category = category; + } + + + public Merchant location(String location) { + this.location = location; + return this; + } + + /** + * Get location + * @return location + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLocation() { + return location; + } + + + @JsonProperty(JSON_PROPERTY_LOCATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLocation(String location) { + this.location = location; + } + + + public Merchant id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this merchant object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Merchant merchant = (Merchant) o; + return Objects.equals(this.name, merchant.name) && + Objects.equals(this.type, merchant.type) && + Objects.equals(this.category, merchant.category) && + Objects.equals(this.location, merchant.location) && + Objects.equals(this.id, merchant.id); + } + + @Override + public int hashCode() { + return Objects.hash(name, type, category, location, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Merchant {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `category` to the URL query string + if (getCategory() != null) { + joiner.add(String.format("%scategory%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCategory()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `location` to the URL query string + if (getLocation() != null) { + joiner.add(String.format("%slocation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLocation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/MonthlySchedule.java b/src/main/java/unit/java/sdk/model/MonthlySchedule.java new file mode 100644 index 00000000..ef13d0fc --- /dev/null +++ b/src/main/java/unit/java/sdk/model/MonthlySchedule.java @@ -0,0 +1,414 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * MonthlySchedule + */ +@JsonPropertyOrder({ + MonthlySchedule.JSON_PROPERTY_START_TIME, + MonthlySchedule.JSON_PROPERTY_END_TIME, + MonthlySchedule.JSON_PROPERTY_DAY_OF_MONTH, + MonthlySchedule.JSON_PROPERTY_DAY_OF_WEEK, + MonthlySchedule.JSON_PROPERTY_INTERVAL, + MonthlySchedule.JSON_PROPERTY_TOTAL_NUMBER_OF_PAYMENTS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class MonthlySchedule { + public static final String JSON_PROPERTY_START_TIME = "startTime"; + private LocalDate startTime; + + public static final String JSON_PROPERTY_END_TIME = "endTime"; + private LocalDate endTime; + + public static final String JSON_PROPERTY_DAY_OF_MONTH = "dayOfMonth"; + private Integer dayOfMonth; + + /** + * Gets or Sets dayOfWeek + */ + public enum DayOfWeekEnum { + SUNDAY("Sunday"), + + MONDAY("Monday"), + + TUESDAY("Tuesday"), + + WEDNESDAY("Wednesday"), + + THURSDAY("Thursday"), + + FRIDAY("Friday"), + + SATURDAY("Saturday"); + + private String value; + + DayOfWeekEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DayOfWeekEnum fromValue(String value) { + for (DayOfWeekEnum b : DayOfWeekEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DAY_OF_WEEK = "dayOfWeek"; + private DayOfWeekEnum dayOfWeek; + + /** + * Gets or Sets interval + */ + public enum IntervalEnum { + MONTHLY("Monthly"), + + WEEKLY("Weekly"); + + private String value; + + IntervalEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IntervalEnum fromValue(String value) { + for (IntervalEnum b : IntervalEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_INTERVAL = "interval"; + private IntervalEnum interval; + + public static final String JSON_PROPERTY_TOTAL_NUMBER_OF_PAYMENTS = "totalNumberOfPayments"; + private Integer totalNumberOfPayments; + + public MonthlySchedule() { + } + + public MonthlySchedule startTime(LocalDate startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get startTime + * @return startTime + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getStartTime() { + return startTime; + } + + + @JsonProperty(JSON_PROPERTY_START_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStartTime(LocalDate startTime) { + this.startTime = startTime; + } + + + public MonthlySchedule endTime(LocalDate endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get endTime + * @return endTime + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getEndTime() { + return endTime; + } + + + @JsonProperty(JSON_PROPERTY_END_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEndTime(LocalDate endTime) { + this.endTime = endTime; + } + + + public MonthlySchedule dayOfMonth(Integer dayOfMonth) { + this.dayOfMonth = dayOfMonth; + return this; + } + + /** + * Get dayOfMonth + * minimum: -5 + * maximum: 28 + * @return dayOfMonth + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DAY_OF_MONTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getDayOfMonth() { + return dayOfMonth; + } + + + @JsonProperty(JSON_PROPERTY_DAY_OF_MONTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDayOfMonth(Integer dayOfMonth) { + this.dayOfMonth = dayOfMonth; + } + + + public MonthlySchedule dayOfWeek(DayOfWeekEnum dayOfWeek) { + this.dayOfWeek = dayOfWeek; + return this; + } + + /** + * Get dayOfWeek + * @return dayOfWeek + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DAY_OF_WEEK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DayOfWeekEnum getDayOfWeek() { + return dayOfWeek; + } + + + @JsonProperty(JSON_PROPERTY_DAY_OF_WEEK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDayOfWeek(DayOfWeekEnum dayOfWeek) { + this.dayOfWeek = dayOfWeek; + } + + + public MonthlySchedule interval(IntervalEnum interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * @return interval + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public IntervalEnum getInterval() { + return interval; + } + + + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInterval(IntervalEnum interval) { + this.interval = interval; + } + + + public MonthlySchedule totalNumberOfPayments(Integer totalNumberOfPayments) { + this.totalNumberOfPayments = totalNumberOfPayments; + return this; + } + + /** + * Get totalNumberOfPayments + * minimum: 1 + * @return totalNumberOfPayments + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_NUMBER_OF_PAYMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getTotalNumberOfPayments() { + return totalNumberOfPayments; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_NUMBER_OF_PAYMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalNumberOfPayments(Integer totalNumberOfPayments) { + this.totalNumberOfPayments = totalNumberOfPayments; + } + + + /** + * Return true if this monthlySchedule object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MonthlySchedule monthlySchedule = (MonthlySchedule) o; + return Objects.equals(this.startTime, monthlySchedule.startTime) && + Objects.equals(this.endTime, monthlySchedule.endTime) && + Objects.equals(this.dayOfMonth, monthlySchedule.dayOfMonth) && + Objects.equals(this.dayOfWeek, monthlySchedule.dayOfWeek) && + Objects.equals(this.interval, monthlySchedule.interval) && + Objects.equals(this.totalNumberOfPayments, monthlySchedule.totalNumberOfPayments); + } + + @Override + public int hashCode() { + return Objects.hash(startTime, endTime, dayOfMonth, dayOfWeek, interval, totalNumberOfPayments); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MonthlySchedule {\n"); + sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); + sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); + sb.append(" dayOfMonth: ").append(toIndentedString(dayOfMonth)).append("\n"); + sb.append(" dayOfWeek: ").append(toIndentedString(dayOfWeek)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" totalNumberOfPayments: ").append(toIndentedString(totalNumberOfPayments)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `startTime` to the URL query string + if (getStartTime() != null) { + joiner.add(String.format("%sstartTime%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStartTime()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `endTime` to the URL query string + if (getEndTime() != null) { + joiner.add(String.format("%sendTime%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEndTime()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dayOfMonth` to the URL query string + if (getDayOfMonth() != null) { + joiner.add(String.format("%sdayOfMonth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDayOfMonth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dayOfWeek` to the URL query string + if (getDayOfWeek() != null) { + joiner.add(String.format("%sdayOfWeek%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDayOfWeek()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `interval` to the URL query string + if (getInterval() != null) { + joiner.add(String.format("%sinterval%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getInterval()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `totalNumberOfPayments` to the URL query string + if (getTotalNumberOfPayments() != null) { + joiner.add(String.format("%stotalNumberOfPayments%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTotalNumberOfPayments()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/NegativeBalanceCoverageTransaction.java b/src/main/java/unit/java/sdk/model/NegativeBalanceCoverageTransaction.java new file mode 100644 index 00000000..e70e36f8 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/NegativeBalanceCoverageTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.FeeTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * NegativeBalanceCoverageTransaction + */ +@JsonPropertyOrder({ + NegativeBalanceCoverageTransaction.JSON_PROPERTY_ATTRIBUTES, + NegativeBalanceCoverageTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class NegativeBalanceCoverageTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FeeTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public NegativeBalanceCoverageTransaction() { + } + + public NegativeBalanceCoverageTransaction attributes(FeeTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FeeTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(FeeTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public NegativeBalanceCoverageTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public NegativeBalanceCoverageTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public NegativeBalanceCoverageTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this NegativeBalanceCoverageTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NegativeBalanceCoverageTransaction negativeBalanceCoverageTransaction = (NegativeBalanceCoverageTransaction) o; + return Objects.equals(this.attributes, negativeBalanceCoverageTransaction.attributes) && + Objects.equals(this.relationships, negativeBalanceCoverageTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NegativeBalanceCoverageTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NegativeBalanceCoverageTransaction", NegativeBalanceCoverageTransaction.class); + JSON.registerDiscriminator(NegativeBalanceCoverageTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/Occupation.java b/src/main/java/unit/java/sdk/model/Occupation.java new file mode 100644 index 00000000..cb6b0b13 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Occupation.java @@ -0,0 +1,120 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets occupation + */ +public enum Occupation { + + ARCHITECTORENGINEER("ArchitectOrEngineer"), + + BUSINESSANALYSTACCOUNTANTORFINANCIALADVISOR("BusinessAnalystAccountantOrFinancialAdvisor"), + + COMMUNITYANDSOCIALSERVICESWORKER("CommunityAndSocialServicesWorker"), + + CONSTRUCTIONMECHANICORMAINTENANCEWORKER("ConstructionMechanicOrMaintenanceWorker"), + + DOCTOR("Doctor"), + + EDUCATOR("Educator"), + + ENTERTAINMENTSPORTSARTSORMEDIA("EntertainmentSportsArtsOrMedia"), + + EXECUTIVEORMANAGER("ExecutiveOrManager"), + + FARMERFISHERMANFORESTER("FarmerFishermanForester"), + + FOODSERVICEWORKER("FoodServiceWorker"), + + GIGWORKER("GigWorker"), + + HOSPITALITYOFFICEORADMINISTRATIVESUPPORTWORKER("HospitalityOfficeOrAdministrativeSupportWorker"), + + HOUSEHOLDMANAGER("HouseholdManager"), + + JANITORHOUSEKEEPERLANDSCAPER("JanitorHousekeeperLandscaper"), + + LAWYER("Lawyer"), + + MANUFACTURINGORPRODUCTIONWORKER("ManufacturingOrProductionWorker"), + + MILITARYORPUBLICSAFETY("MilitaryOrPublicSafety"), + + NURSEHEALTHCARETECHNICIANORHEALTHCARESUPPORT("NurseHealthcareTechnicianOrHealthcareSupport"), + + PERSONALCAREORSERVICEWORKER("PersonalCareOrServiceWorker"), + + PILOTDRIVEROPERATOR("PilotDriverOperator"), + + SALESREPRESENTATIVEBROKERAGENT("SalesRepresentativeBrokerAgent"), + + SCIENTISTORTECHNOLOGIST("ScientistOrTechnologist"), + + STUDENT("Student"); + + private String value; + + Occupation(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static Occupation fromValue(String value) { + for (Occupation b : Occupation.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } + +} + diff --git a/src/main/java/unit/java/sdk/model/Officer.java b/src/main/java/unit/java/sdk/model/Officer.java new file mode 100644 index 00000000..44eae7e4 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Officer.java @@ -0,0 +1,913 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.SourceOfIncome; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Officer + */ +@JsonPropertyOrder({ + Officer.JSON_PROPERTY_STATUS, + Officer.JSON_PROPERTY_FULL_NAME, + Officer.JSON_PROPERTY_EMAIL, + Officer.JSON_PROPERTY_PHONE, + Officer.JSON_PROPERTY_SSN, + Officer.JSON_PROPERTY_PASSPORT, + Officer.JSON_PROPERTY_NATIONALITY, + Officer.JSON_PROPERTY_MATRICULA_CONSULAR, + Officer.JSON_PROPERTY_ADDRESS, + Officer.JSON_PROPERTY_DATE_OF_BIRTH, + Officer.JSON_PROPERTY_EVALUATION_ID, + Officer.JSON_PROPERTY_TITLE, + Officer.JSON_PROPERTY_EVALUATION_FLAGS, + Officer.JSON_PROPERTY_MASKED_S_S_N, + Officer.JSON_PROPERTY_MASKED_PASSPORT, + Officer.JSON_PROPERTY_MASKED_MATRICULA_CONSULAR, + Officer.JSON_PROPERTY_ID_THEFT_SCORE, + Officer.JSON_PROPERTY_OCCUPATION, + Officer.JSON_PROPERTY_ANNUAL_INCOME, + Officer.JSON_PROPERTY_SOURCE_OF_INCOME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Officer { + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_SSN = "ssn"; + private String ssn; + + public static final String JSON_PROPERTY_PASSPORT = "passport"; + private String passport; + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public static final String JSON_PROPERTY_MATRICULA_CONSULAR = "matriculaConsular"; + private String matriculaConsular; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Object address; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public static final String JSON_PROPERTY_EVALUATION_ID = "evaluationId"; + private String evaluationId; + + /** + * Gets or Sets title + */ + public enum TitleEnum { + PRESIDENT("President"), + + CEO("CEO"), + + COO("COO"), + + CFO("CFO"), + + BENEFITSADMINISTRATIONOFFICER("BenefitsAdministrationOfficer"), + + CIO("CIO"), + + VP("VP"), + + AVP("AVP"), + + TREASURER("Treasurer"), + + SECRETARY("Secretary"), + + CONTROLLER("Controller"), + + MANAGER("Manager"), + + PARTNER("Partner"), + + MEMBER("Member"); + + private String value; + + TitleEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TitleEnum fromValue(String value) { + for (TitleEnum b : TitleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TITLE = "title"; + private TitleEnum title; + + public static final String JSON_PROPERTY_EVALUATION_FLAGS = "evaluationFlags"; + private List evaluationFlags; + + public static final String JSON_PROPERTY_MASKED_S_S_N = "maskedSSN"; + private String maskedSSN; + + public static final String JSON_PROPERTY_MASKED_PASSPORT = "maskedPassport"; + private String maskedPassport; + + public static final String JSON_PROPERTY_MASKED_MATRICULA_CONSULAR = "maskedMatriculaConsular"; + private String maskedMatriculaConsular; + + public static final String JSON_PROPERTY_ID_THEFT_SCORE = "idTheftScore"; + private Integer idTheftScore; + + public static final String JSON_PROPERTY_OCCUPATION = "occupation"; + private Occupation occupation; + + public static final String JSON_PROPERTY_ANNUAL_INCOME = "annualIncome"; + private AnnualIncome annualIncome; + + public static final String JSON_PROPERTY_SOURCE_OF_INCOME = "sourceOfIncome"; + private SourceOfIncome sourceOfIncome; + + public Officer() { + } + + public Officer status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(String status) { + this.status = status; + } + + + public Officer fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public Officer email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public Officer phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public Officer ssn(String ssn) { + this.ssn = ssn; + return this; + } + + /** + * Get ssn + * @return ssn + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSsn() { + return ssn; + } + + + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSsn(String ssn) { + this.ssn = ssn; + } + + + public Officer passport(String passport) { + this.passport = passport; + return this; + } + + /** + * Get passport + * @return passport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassport() { + return passport; + } + + + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassport(String passport) { + this.passport = passport; + } + + + public Officer nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * Get nationality + * @return nationality + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + public Officer matriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + return this; + } + + /** + * Get matriculaConsular + * @return matriculaConsular + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMatriculaConsular() { + return matriculaConsular; + } + + + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMatriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + } + + + public Officer address(Object address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(Object address) { + this.address = address; + } + + + public Officer dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + public Officer evaluationId(String evaluationId) { + this.evaluationId = evaluationId; + return this; + } + + /** + * Get evaluationId + * @return evaluationId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEvaluationId() { + return evaluationId; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationId(String evaluationId) { + this.evaluationId = evaluationId; + } + + + public Officer title(TitleEnum title) { + this.title = title; + return this; + } + + /** + * Get title + * @return title + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TitleEnum getTitle() { + return title; + } + + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTitle(TitleEnum title) { + this.title = title; + } + + + public Officer evaluationFlags(List evaluationFlags) { + this.evaluationFlags = evaluationFlags; + return this; + } + + public Officer addEvaluationFlagsItem(String evaluationFlagsItem) { + if (this.evaluationFlags == null) { + this.evaluationFlags = new ArrayList<>(); + } + this.evaluationFlags.add(evaluationFlagsItem); + return this; + } + + /** + * Get evaluationFlags + * @return evaluationFlags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_FLAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getEvaluationFlags() { + return evaluationFlags; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_FLAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationFlags(List evaluationFlags) { + this.evaluationFlags = evaluationFlags; + } + + + public Officer maskedSSN(String maskedSSN) { + this.maskedSSN = maskedSSN; + return this; + } + + /** + * Get maskedSSN + * @return maskedSSN + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MASKED_S_S_N) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMaskedSSN() { + return maskedSSN; + } + + + @JsonProperty(JSON_PROPERTY_MASKED_S_S_N) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaskedSSN(String maskedSSN) { + this.maskedSSN = maskedSSN; + } + + + public Officer maskedPassport(String maskedPassport) { + this.maskedPassport = maskedPassport; + return this; + } + + /** + * Get maskedPassport + * @return maskedPassport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MASKED_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMaskedPassport() { + return maskedPassport; + } + + + @JsonProperty(JSON_PROPERTY_MASKED_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaskedPassport(String maskedPassport) { + this.maskedPassport = maskedPassport; + } + + + public Officer maskedMatriculaConsular(String maskedMatriculaConsular) { + this.maskedMatriculaConsular = maskedMatriculaConsular; + return this; + } + + /** + * Get maskedMatriculaConsular + * @return maskedMatriculaConsular + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MASKED_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMaskedMatriculaConsular() { + return maskedMatriculaConsular; + } + + + @JsonProperty(JSON_PROPERTY_MASKED_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaskedMatriculaConsular(String maskedMatriculaConsular) { + this.maskedMatriculaConsular = maskedMatriculaConsular; + } + + + public Officer idTheftScore(Integer idTheftScore) { + this.idTheftScore = idTheftScore; + return this; + } + + /** + * Get idTheftScore + * @return idTheftScore + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID_THEFT_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getIdTheftScore() { + return idTheftScore; + } + + + @JsonProperty(JSON_PROPERTY_ID_THEFT_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdTheftScore(Integer idTheftScore) { + this.idTheftScore = idTheftScore; + } + + + public Officer occupation(Occupation occupation) { + this.occupation = occupation; + return this; + } + + /** + * Get occupation + * @return occupation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Occupation getOccupation() { + return occupation; + } + + + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOccupation(Occupation occupation) { + this.occupation = occupation; + } + + + public Officer annualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + return this; + } + + /** + * Get annualIncome + * @return annualIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnnualIncome getAnnualIncome() { + return annualIncome; + } + + + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + } + + + public Officer sourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + return this; + } + + /** + * Get sourceOfIncome + * @return sourceOfIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SourceOfIncome getSourceOfIncome() { + return sourceOfIncome; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + } + + + /** + * Return true if this officer object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Officer officer = (Officer) o; + return Objects.equals(this.status, officer.status) && + Objects.equals(this.fullName, officer.fullName) && + Objects.equals(this.email, officer.email) && + Objects.equals(this.phone, officer.phone) && + Objects.equals(this.ssn, officer.ssn) && + Objects.equals(this.passport, officer.passport) && + Objects.equals(this.nationality, officer.nationality) && + Objects.equals(this.matriculaConsular, officer.matriculaConsular) && + Objects.equals(this.address, officer.address) && + Objects.equals(this.dateOfBirth, officer.dateOfBirth) && + Objects.equals(this.evaluationId, officer.evaluationId) && + Objects.equals(this.title, officer.title) && + Objects.equals(this.evaluationFlags, officer.evaluationFlags) && + Objects.equals(this.maskedSSN, officer.maskedSSN) && + Objects.equals(this.maskedPassport, officer.maskedPassport) && + Objects.equals(this.maskedMatriculaConsular, officer.maskedMatriculaConsular) && + Objects.equals(this.idTheftScore, officer.idTheftScore) && + Objects.equals(this.occupation, officer.occupation) && + Objects.equals(this.annualIncome, officer.annualIncome) && + Objects.equals(this.sourceOfIncome, officer.sourceOfIncome); + } + + @Override + public int hashCode() { + return Objects.hash(status, fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, evaluationId, title, evaluationFlags, maskedSSN, maskedPassport, maskedMatriculaConsular, idTheftScore, occupation, annualIncome, sourceOfIncome); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Officer {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); + sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" evaluationFlags: ").append(toIndentedString(evaluationFlags)).append("\n"); + sb.append(" maskedSSN: ").append(toIndentedString(maskedSSN)).append("\n"); + sb.append(" maskedPassport: ").append(toIndentedString(maskedPassport)).append("\n"); + sb.append(" maskedMatriculaConsular: ").append(toIndentedString(maskedMatriculaConsular)).append("\n"); + sb.append(" idTheftScore: ").append(toIndentedString(idTheftScore)).append("\n"); + sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); + sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); + sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `ssn` to the URL query string + if (getSsn() != null) { + joiner.add(String.format("%sssn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSsn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `passport` to the URL query string + if (getPassport() != null) { + joiner.add(String.format("%spassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nationality` to the URL query string + if (getNationality() != null) { + joiner.add(String.format("%snationality%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNationality()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `matriculaConsular` to the URL query string + if (getMatriculaConsular() != null) { + joiner.add(String.format("%smatriculaConsular%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMatriculaConsular()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(String.format("%saddress%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAddress()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationId` to the URL query string + if (getEvaluationId() != null) { + joiner.add(String.format("%sevaluationId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEvaluationId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `title` to the URL query string + if (getTitle() != null) { + joiner.add(String.format("%stitle%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTitle()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationFlags` to the URL query string + if (getEvaluationFlags() != null) { + for (int i = 0; i < getEvaluationFlags().size(); i++) { + joiner.add(String.format("%sevaluationFlags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getEvaluationFlags().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `maskedSSN` to the URL query string + if (getMaskedSSN() != null) { + joiner.add(String.format("%smaskedSSN%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMaskedSSN()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `maskedPassport` to the URL query string + if (getMaskedPassport() != null) { + joiner.add(String.format("%smaskedPassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMaskedPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `maskedMatriculaConsular` to the URL query string + if (getMaskedMatriculaConsular() != null) { + joiner.add(String.format("%smaskedMatriculaConsular%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMaskedMatriculaConsular()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idTheftScore` to the URL query string + if (getIdTheftScore() != null) { + joiner.add(String.format("%sidTheftScore%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdTheftScore()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `occupation` to the URL query string + if (getOccupation() != null) { + joiner.add(String.format("%soccupation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOccupation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `annualIncome` to the URL query string + if (getAnnualIncome() != null) { + joiner.add(String.format("%sannualIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAnnualIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sourceOfIncome` to the URL query string + if (getSourceOfIncome() != null) { + joiner.add(String.format("%ssourceOfIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSourceOfIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/OrgRelationship.java b/src/main/java/unit/java/sdk/model/OrgRelationship.java new file mode 100644 index 00000000..6e8dce2b --- /dev/null +++ b/src/main/java/unit/java/sdk/model/OrgRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.OrgRelationshipData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * OrgRelationship + */ +@JsonPropertyOrder({ + OrgRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OrgRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private OrgRelationshipData data; + + public OrgRelationship() { + } + + public OrgRelationship data(OrgRelationshipData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OrgRelationshipData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(OrgRelationshipData data) { + this.data = data; + } + + + /** + * Return true if this orgRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrgRelationship orgRelationship = (OrgRelationship) o; + return Objects.equals(this.data, orgRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/OrgRelationshipData.java b/src/main/java/unit/java/sdk/model/OrgRelationshipData.java new file mode 100644 index 00000000..258979e9 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/OrgRelationshipData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * OrgRelationshipData + */ +@JsonPropertyOrder({ + OrgRelationshipData.JSON_PROPERTY_ID, + OrgRelationshipData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OrgRelationshipData { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "org"; + + public OrgRelationshipData() { + } + + public OrgRelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + public OrgRelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + /** + * Return true if this orgRelationship_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrgRelationshipData orgRelationshipData = (OrgRelationshipData) o; + return Objects.equals(this.id, orgRelationshipData.id) && + Objects.equals(this.type, orgRelationshipData.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgRelationshipData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/OriginatedAchTransaction.java b/src/main/java/unit/java/sdk/model/OriginatedAchTransaction.java new file mode 100644 index 00000000..b343a8ce --- /dev/null +++ b/src/main/java/unit/java/sdk/model/OriginatedAchTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.OriginatedAchTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * OriginatedAchTransaction + */ +@JsonPropertyOrder({ + OriginatedAchTransaction.JSON_PROPERTY_ATTRIBUTES, + OriginatedAchTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class OriginatedAchTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OriginatedAchTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public OriginatedAchTransaction() { + } + + public OriginatedAchTransaction attributes(OriginatedAchTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OriginatedAchTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(OriginatedAchTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public OriginatedAchTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public OriginatedAchTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public OriginatedAchTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this OriginatedAchTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OriginatedAchTransaction originatedAchTransaction = (OriginatedAchTransaction) o; + return Objects.equals(this.attributes, originatedAchTransaction.attributes) && + Objects.equals(this.relationships, originatedAchTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OriginatedAchTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("OriginatedAchTransaction", OriginatedAchTransaction.class); + JSON.registerDiscriminator(OriginatedAchTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/OriginatedAchTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/OriginatedAchTransactionAllOfAttributes.java new file mode 100644 index 00000000..ef024846 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/OriginatedAchTransactionAllOfAttributes.java @@ -0,0 +1,547 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * OriginatedAchTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + OriginatedAchTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + OriginatedAchTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + OriginatedAchTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + OriginatedAchTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + OriginatedAchTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + OriginatedAchTransactionAllOfAttributes.JSON_PROPERTY_DESCRIPTION, + OriginatedAchTransactionAllOfAttributes.JSON_PROPERTY_ADDENDA, + OriginatedAchTransactionAllOfAttributes.JSON_PROPERTY_COUNTERPARTY, + OriginatedAchTransactionAllOfAttributes.JSON_PROPERTY_TAGS, + OriginatedAchTransactionAllOfAttributes.JSON_PROPERTY_SEC_CODE, + OriginatedAchTransactionAllOfAttributes.JSON_PROPERTY_TRACE_NUMBER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OriginatedAchTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ADDENDA = "addenda"; + private String addenda; + + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; + private Counterparty counterparty; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_SEC_CODE = "secCode"; + private String secCode; + + public static final String JSON_PROPERTY_TRACE_NUMBER = "traceNumber"; + private String traceNumber; + + public OriginatedAchTransactionAllOfAttributes() { + } + + public OriginatedAchTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public OriginatedAchTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public OriginatedAchTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public OriginatedAchTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public OriginatedAchTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public OriginatedAchTransactionAllOfAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public OriginatedAchTransactionAllOfAttributes addenda(String addenda) { + this.addenda = addenda; + return this; + } + + /** + * Get addenda + * @return addenda + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAddenda() { + return addenda; + } + + + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddenda(String addenda) { + this.addenda = addenda; + } + + + public OriginatedAchTransactionAllOfAttributes counterparty(Counterparty counterparty) { + this.counterparty = counterparty; + return this; + } + + /** + * Get counterparty + * @return counterparty + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Counterparty getCounterparty() { + return counterparty; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCounterparty(Counterparty counterparty) { + this.counterparty = counterparty; + } + + + public OriginatedAchTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public OriginatedAchTransactionAllOfAttributes secCode(String secCode) { + this.secCode = secCode; + return this; + } + + /** + * Get secCode + * @return secCode + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEC_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSecCode() { + return secCode; + } + + + @JsonProperty(JSON_PROPERTY_SEC_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSecCode(String secCode) { + this.secCode = secCode; + } + + + public OriginatedAchTransactionAllOfAttributes traceNumber(String traceNumber) { + this.traceNumber = traceNumber; + return this; + } + + /** + * Get traceNumber + * @return traceNumber + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTraceNumber() { + return traceNumber; + } + + + @JsonProperty(JSON_PROPERTY_TRACE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTraceNumber(String traceNumber) { + this.traceNumber = traceNumber; + } + + + /** + * Return true if this OriginatedAchTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OriginatedAchTransactionAllOfAttributes originatedAchTransactionAllOfAttributes = (OriginatedAchTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, originatedAchTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, originatedAchTransactionAllOfAttributes.direction) && + Objects.equals(this.amount, originatedAchTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, originatedAchTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, originatedAchTransactionAllOfAttributes.summary) && + Objects.equals(this.description, originatedAchTransactionAllOfAttributes.description) && + Objects.equals(this.addenda, originatedAchTransactionAllOfAttributes.addenda) && + Objects.equals(this.counterparty, originatedAchTransactionAllOfAttributes.counterparty) && + Objects.equals(this.tags, originatedAchTransactionAllOfAttributes.tags) && + Objects.equals(this.secCode, originatedAchTransactionAllOfAttributes.secCode) && + Objects.equals(this.traceNumber, originatedAchTransactionAllOfAttributes.traceNumber); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, amount, balance, summary, description, addenda, counterparty, tags, secCode, traceNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OriginatedAchTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); + sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" secCode: ").append(toIndentedString(secCode)).append("\n"); + sb.append(" traceNumber: ").append(toIndentedString(traceNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `addenda` to the URL query string + if (getAddenda() != null) { + joiner.add(String.format("%saddenda%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAddenda()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterparty` to the URL query string + if (getCounterparty() != null) { + joiner.add(getCounterparty().toUrlQueryString(prefix + "counterparty" + suffix)); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `secCode` to the URL query string + if (getSecCode() != null) { + joiner.add(String.format("%ssecCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSecCode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `traceNumber` to the URL query string + if (getTraceNumber() != null) { + joiner.add(String.format("%straceNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTraceNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PaginationMeta.java b/src/main/java/unit/java/sdk/model/PaginationMeta.java new file mode 100644 index 00000000..0a1e00ac --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PaginationMeta.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PaginationMetaPagination; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PaginationMeta + */ +@JsonPropertyOrder({ + PaginationMeta.JSON_PROPERTY_PAGINATION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PaginationMeta { + public static final String JSON_PROPERTY_PAGINATION = "pagination"; + private PaginationMetaPagination pagination; + + public PaginationMeta() { + } + + public PaginationMeta pagination(PaginationMetaPagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGINATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMetaPagination getPagination() { + return pagination; + } + + + @JsonProperty(JSON_PROPERTY_PAGINATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPagination(PaginationMetaPagination pagination) { + this.pagination = pagination; + } + + + /** + * Return true if this paginationMeta object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaginationMeta paginationMeta = (PaginationMeta) o; + return Objects.equals(this.pagination, paginationMeta.pagination); + } + + @Override + public int hashCode() { + return Objects.hash(pagination); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaginationMeta {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `pagination` to the URL query string + if (getPagination() != null) { + joiner.add(getPagination().toUrlQueryString(prefix + "pagination" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PaginationMetaPagination.java b/src/main/java/unit/java/sdk/model/PaginationMetaPagination.java new file mode 100644 index 00000000..2e206470 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PaginationMetaPagination.java @@ -0,0 +1,222 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PaginationMetaPagination + */ +@JsonPropertyOrder({ + PaginationMetaPagination.JSON_PROPERTY_LIMIT, + PaginationMetaPagination.JSON_PROPERTY_OFFSET, + PaginationMetaPagination.JSON_PROPERTY_TOTAL +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PaginationMetaPagination { + public static final String JSON_PROPERTY_LIMIT = "limit"; + private Integer limit; + + public static final String JSON_PROPERTY_OFFSET = "offset"; + private Integer offset; + + public static final String JSON_PROPERTY_TOTAL = "total"; + private Integer total; + + public PaginationMetaPagination() { + } + + public PaginationMetaPagination limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * @return limit + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getLimit() { + return limit; + } + + + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLimit(Integer limit) { + this.limit = limit; + } + + + public PaginationMetaPagination offset(Integer offset) { + this.offset = offset; + return this; + } + + /** + * Get offset + * @return offset + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OFFSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getOffset() { + return offset; + } + + + @JsonProperty(JSON_PROPERTY_OFFSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOffset(Integer offset) { + this.offset = offset; + } + + + public PaginationMetaPagination total(Integer total) { + this.total = total; + return this; + } + + /** + * Get total + * @return total + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getTotal() { + return total; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotal(Integer total) { + this.total = total; + } + + + /** + * Return true if this paginationMeta_pagination object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaginationMetaPagination paginationMetaPagination = (PaginationMetaPagination) o; + return Objects.equals(this.limit, paginationMetaPagination.limit) && + Objects.equals(this.offset, paginationMetaPagination.offset) && + Objects.equals(this.total, paginationMetaPagination.total); + } + + @Override + public int hashCode() { + return Objects.hash(limit, offset, total); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaginationMetaPagination {\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `limit` to the URL query string + if (getLimit() != null) { + joiner.add(String.format("%slimit%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLimit()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `offset` to the URL query string + if (getOffset() != null) { + joiner.add(String.format("%soffset%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOffset()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add(String.format("%stotal%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTotal()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchAccount.java b/src/main/java/unit/java/sdk/model/PatchAccount.java new file mode 100644 index 00000000..a2cbb728 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchAccount.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchAccountData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchAccount + */ +@JsonPropertyOrder({ + PatchAccount.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchAccount { + public static final String JSON_PROPERTY_DATA = "data"; + private PatchAccountData data; + + public PatchAccount() { + } + + public PatchAccount data(PatchAccountData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchAccountData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(PatchAccountData data) { + this.data = data; + } + + + /** + * Return true if this patch_account object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchAccount patchAccount = (PatchAccount) o; + return Objects.equals(this.data, patchAccount.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchAccount {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchAccountData.java b/src/main/java/unit/java/sdk/model/PatchAccountData.java new file mode 100644 index 00000000..d56963e5 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchAccountData.java @@ -0,0 +1,297 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateCreditAccount; +import unit.java.sdk.model.UpdateCreditAccountAttributes; +import unit.java.sdk.model.UpdateDepositAccount; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import unit.java.sdk.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = PatchAccountData.PatchAccountDataDeserializer.class) +@JsonSerialize(using = PatchAccountData.PatchAccountDataSerializer.class) +public class PatchAccountData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(PatchAccountData.class.getName()); + + public static class PatchAccountDataSerializer extends StdSerializer { + public PatchAccountDataSerializer(Class t) { + super(t); + } + + public PatchAccountDataSerializer() { + this(null); + } + + @Override + public void serialize(PatchAccountData value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class PatchAccountDataDeserializer extends StdDeserializer { + public PatchAccountDataDeserializer() { + this(PatchAccountData.class); + } + + public PatchAccountDataDeserializer(Class vc) { + super(vc); + } + + @Override + public PatchAccountData deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize UpdateCreditAccount + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (UpdateCreditAccount.class.equals(Integer.class) || UpdateCreditAccount.class.equals(Long.class) || UpdateCreditAccount.class.equals(Float.class) || UpdateCreditAccount.class.equals(Double.class) || UpdateCreditAccount.class.equals(Boolean.class) || UpdateCreditAccount.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((UpdateCreditAccount.class.equals(Integer.class) || UpdateCreditAccount.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((UpdateCreditAccount.class.equals(Float.class) || UpdateCreditAccount.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (UpdateCreditAccount.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (UpdateCreditAccount.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(UpdateCreditAccount.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'UpdateCreditAccount'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'UpdateCreditAccount'", e); + } + + // deserialize UpdateDepositAccount + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (UpdateDepositAccount.class.equals(Integer.class) || UpdateDepositAccount.class.equals(Long.class) || UpdateDepositAccount.class.equals(Float.class) || UpdateDepositAccount.class.equals(Double.class) || UpdateDepositAccount.class.equals(Boolean.class) || UpdateDepositAccount.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((UpdateDepositAccount.class.equals(Integer.class) || UpdateDepositAccount.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((UpdateDepositAccount.class.equals(Float.class) || UpdateDepositAccount.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (UpdateDepositAccount.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (UpdateDepositAccount.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(UpdateDepositAccount.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'UpdateDepositAccount'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'UpdateDepositAccount'", e); + } + + if (match == 1) { + PatchAccountData ret = new PatchAccountData(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for PatchAccountData: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public PatchAccountData getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "PatchAccountData cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public PatchAccountData() { + super("oneOf", Boolean.FALSE); + } + + public PatchAccountData(UpdateCreditAccount o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public PatchAccountData(UpdateDepositAccount o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("UpdateCreditAccount", UpdateCreditAccount.class); + schemas.put("UpdateDepositAccount", UpdateDepositAccount.class); + JSON.registerDescendants(PatchAccountData.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return PatchAccountData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * UpdateCreditAccount, UpdateDepositAccount + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(UpdateCreditAccount.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UpdateDepositAccount.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be UpdateCreditAccount, UpdateDepositAccount"); + } + + /** + * Get the actual instance, which can be the following: + * UpdateCreditAccount, UpdateDepositAccount + * + * @return The actual instance (UpdateCreditAccount, UpdateDepositAccount) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `UpdateCreditAccount`. If the actual instance is not `UpdateCreditAccount`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `UpdateCreditAccount` + * @throws ClassCastException if the instance is not `UpdateCreditAccount` + */ + public UpdateCreditAccount getUpdateCreditAccount() throws ClassCastException { + return (UpdateCreditAccount)super.getActualInstance(); + } + + /** + * Get the actual instance of `UpdateDepositAccount`. If the actual instance is not `UpdateDepositAccount`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `UpdateDepositAccount` + * @throws ClassCastException if the instance is not `UpdateDepositAccount` + */ + public UpdateDepositAccount getUpdateDepositAccount() throws ClassCastException { + return (UpdateDepositAccount)super.getActualInstance(); + } + + + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof UpdateDepositAccount) { + if (getActualInstance() != null) { + joiner.add(((UpdateDepositAccount)getActualInstance()).toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof UpdateCreditAccount) { + if (getActualInstance() != null) { + joiner.add(((UpdateCreditAccount)getActualInstance()).toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } + +} + diff --git a/src/main/java/unit/java/sdk/model/PatchAchPayment.java b/src/main/java/unit/java/sdk/model/PatchAchPayment.java new file mode 100644 index 00000000..8933f71a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchAchPayment.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchTrustApplicationAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchAchPayment + */ +@JsonPropertyOrder({ + PatchAchPayment.JSON_PROPERTY_TYPE, + PatchAchPayment.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchAchPayment { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "achPayment"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchTrustApplicationAttributes attributes; + + public PatchAchPayment() { + } + + public PatchAchPayment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public PatchAchPayment attributes(PatchTrustApplicationAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchTrustApplicationAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchTrustApplicationAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this patchAchPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchAchPayment patchAchPayment = (PatchAchPayment) o; + return Objects.equals(this.type, patchAchPayment.type) && + Objects.equals(this.attributes, patchAchPayment.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchAchPayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchAchReceivedPayment.java b/src/main/java/unit/java/sdk/model/PatchAchReceivedPayment.java new file mode 100644 index 00000000..0b7416bc --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchAchReceivedPayment.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchTrustApplicationAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchAchReceivedPayment + */ +@JsonPropertyOrder({ + PatchAchReceivedPayment.JSON_PROPERTY_TYPE, + PatchAchReceivedPayment.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchAchReceivedPayment { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "achReceivedPayment"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchTrustApplicationAttributes attributes; + + public PatchAchReceivedPayment() { + } + + public PatchAchReceivedPayment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public PatchAchReceivedPayment attributes(PatchTrustApplicationAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchTrustApplicationAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchTrustApplicationAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this patchAchReceivedPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchAchReceivedPayment patchAchReceivedPayment = (PatchAchReceivedPayment) o; + return Objects.equals(this.type, patchAchReceivedPayment.type) && + Objects.equals(this.attributes, patchAchReceivedPayment.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchAchReceivedPayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchBookPayment.java b/src/main/java/unit/java/sdk/model/PatchBookPayment.java new file mode 100644 index 00000000..bf6530e5 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchBookPayment.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchTrustApplicationAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchBookPayment + */ +@JsonPropertyOrder({ + PatchBookPayment.JSON_PROPERTY_TYPE, + PatchBookPayment.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBookPayment { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "bookPayment"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchTrustApplicationAttributes attributes; + + public PatchBookPayment() { + } + + public PatchBookPayment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public PatchBookPayment attributes(PatchTrustApplicationAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchTrustApplicationAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchTrustApplicationAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this patchBookPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBookPayment patchBookPayment = (PatchBookPayment) o; + return Objects.equals(this.type, patchBookPayment.type) && + Objects.equals(this.attributes, patchBookPayment.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBookPayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchBookTransaction.java b/src/main/java/unit/java/sdk/model/PatchBookTransaction.java new file mode 100644 index 00000000..cad86d13 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchBookTransaction.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBookTransactionAttributes; +import unit.java.sdk.model.PatchBookTransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchBookTransaction + */ +@JsonPropertyOrder({ + PatchBookTransaction.JSON_PROPERTY_TYPE, + PatchBookTransaction.JSON_PROPERTY_ATTRIBUTES, + PatchBookTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBookTransaction { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "bookTransaction"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchBookTransactionAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private PatchBookTransactionRelationships relationships; + + public PatchBookTransaction() { + } + + public PatchBookTransaction type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public PatchBookTransaction attributes(PatchBookTransactionAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchBookTransactionAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchBookTransactionAttributes attributes) { + this.attributes = attributes; + } + + + public PatchBookTransaction relationships(PatchBookTransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PatchBookTransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(PatchBookTransactionRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this patchBookTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBookTransaction patchBookTransaction = (PatchBookTransaction) o; + return Objects.equals(this.type, patchBookTransaction.type) && + Objects.equals(this.attributes, patchBookTransaction.attributes) && + Objects.equals(this.relationships, patchBookTransaction.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBookTransaction {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchBookTransactionAttributes.java b/src/main/java/unit/java/sdk/model/PatchBookTransactionAttributes.java new file mode 100644 index 00000000..298b17b7 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchBookTransactionAttributes.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchBookTransactionAttributes + */ +@JsonPropertyOrder({ + PatchBookTransactionAttributes.JSON_PROPERTY_TAGS, + PatchBookTransactionAttributes.JSON_PROPERTY_SUMMARY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBookTransactionAttributes { + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public PatchBookTransactionAttributes() { + } + + public PatchBookTransactionAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public PatchBookTransactionAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSummary(String summary) { + this.summary = summary; + } + + + /** + * Return true if this patchBookTransaction_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBookTransactionAttributes patchBookTransactionAttributes = (PatchBookTransactionAttributes) o; + return Objects.equals(this.tags, patchBookTransactionAttributes.tags) && + Objects.equals(this.summary, patchBookTransactionAttributes.summary); + } + + @Override + public int hashCode() { + return Objects.hash(tags, summary); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBookTransactionAttributes {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchBookTransactionRelationships.java b/src/main/java/unit/java/sdk/model/PatchBookTransactionRelationships.java new file mode 100644 index 00000000..6f1a3899 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchBookTransactionRelationships.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountRelationship1; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchBookTransactionRelationships + */ +@JsonPropertyOrder({ + PatchBookTransactionRelationships.JSON_PROPERTY_ACCOUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBookTransactionRelationships { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private AccountRelationship1 account; + + public PatchBookTransactionRelationships() { + } + + public PatchBookTransactionRelationships account(AccountRelationship1 account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AccountRelationship1 getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(AccountRelationship1 account) { + this.account = account; + } + + + /** + * Return true if this patchBookTransaction_relationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBookTransactionRelationships patchBookTransactionRelationships = (PatchBookTransactionRelationships) o; + return Objects.equals(this.account, patchBookTransactionRelationships.account); + } + + @Override + public int hashCode() { + return Objects.hash(account); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBookTransactionRelationships {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchBusinessApplication.java b/src/main/java/unit/java/sdk/model/PatchBusinessApplication.java new file mode 100644 index 00000000..59c2afa8 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchBusinessApplication.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessApplicationAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchBusinessApplication + */ +@JsonPropertyOrder({ + PatchBusinessApplication.JSON_PROPERTY_TYPE, + PatchBusinessApplication.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBusinessApplication { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "businessApplication"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchBusinessApplicationAttributes attributes; + + public PatchBusinessApplication() { + } + + public PatchBusinessApplication type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public PatchBusinessApplication attributes(PatchBusinessApplicationAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchBusinessApplicationAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchBusinessApplicationAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this patchBusinessApplication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBusinessApplication patchBusinessApplication = (PatchBusinessApplication) o; + return Objects.equals(this.type, patchBusinessApplication.type) && + Objects.equals(this.attributes, patchBusinessApplication.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBusinessApplication {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchBusinessApplicationAttributes.java b/src/main/java/unit/java/sdk/model/PatchBusinessApplicationAttributes.java new file mode 100644 index 00000000..b994a9b2 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchBusinessApplicationAttributes.java @@ -0,0 +1,456 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.BusinessAnnualRevenue; +import unit.java.sdk.model.BusinessNumberOfEmployees; +import unit.java.sdk.model.BusinessVertical; +import unit.java.sdk.model.CashFlow; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchBusinessApplicationAttributes + */ +@JsonPropertyOrder({ + PatchBusinessApplicationAttributes.JSON_PROPERTY_TAGS, + PatchBusinessApplicationAttributes.JSON_PROPERTY_ANNUAL_REVENUE, + PatchBusinessApplicationAttributes.JSON_PROPERTY_NUMBER_OF_EMPLOYEES, + PatchBusinessApplicationAttributes.JSON_PROPERTY_CASH_FLOW, + PatchBusinessApplicationAttributes.JSON_PROPERTY_YEAR_OF_INCORPORATION, + PatchBusinessApplicationAttributes.JSON_PROPERTY_COUNTRIES_OF_OPERATION, + PatchBusinessApplicationAttributes.JSON_PROPERTY_STOCK_SYMBOL, + PatchBusinessApplicationAttributes.JSON_PROPERTY_WEBSITE, + PatchBusinessApplicationAttributes.JSON_PROPERTY_BUSINESS_VERTICAL +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBusinessApplicationAttributes { + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_ANNUAL_REVENUE = "annualRevenue"; + private BusinessAnnualRevenue annualRevenue; + + public static final String JSON_PROPERTY_NUMBER_OF_EMPLOYEES = "numberOfEmployees"; + private BusinessNumberOfEmployees numberOfEmployees; + + public static final String JSON_PROPERTY_CASH_FLOW = "cashFlow"; + private CashFlow cashFlow; + + public static final String JSON_PROPERTY_YEAR_OF_INCORPORATION = "yearOfIncorporation"; + private String yearOfIncorporation; + + public static final String JSON_PROPERTY_COUNTRIES_OF_OPERATION = "countriesOfOperation"; + private List countriesOfOperation; + + public static final String JSON_PROPERTY_STOCK_SYMBOL = "stockSymbol"; + private String stockSymbol; + + public static final String JSON_PROPERTY_WEBSITE = "website"; + private String website; + + public static final String JSON_PROPERTY_BUSINESS_VERTICAL = "businessVertical"; + private BusinessVertical businessVertical; + + public PatchBusinessApplicationAttributes() { + } + + public PatchBusinessApplicationAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public PatchBusinessApplicationAttributes annualRevenue(BusinessAnnualRevenue annualRevenue) { + this.annualRevenue = annualRevenue; + return this; + } + + /** + * Get annualRevenue + * @return annualRevenue + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNUAL_REVENUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BusinessAnnualRevenue getAnnualRevenue() { + return annualRevenue; + } + + + @JsonProperty(JSON_PROPERTY_ANNUAL_REVENUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnualRevenue(BusinessAnnualRevenue annualRevenue) { + this.annualRevenue = annualRevenue; + } + + + public PatchBusinessApplicationAttributes numberOfEmployees(BusinessNumberOfEmployees numberOfEmployees) { + this.numberOfEmployees = numberOfEmployees; + return this; + } + + /** + * Get numberOfEmployees + * @return numberOfEmployees + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUMBER_OF_EMPLOYEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BusinessNumberOfEmployees getNumberOfEmployees() { + return numberOfEmployees; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER_OF_EMPLOYEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumberOfEmployees(BusinessNumberOfEmployees numberOfEmployees) { + this.numberOfEmployees = numberOfEmployees; + } + + + public PatchBusinessApplicationAttributes cashFlow(CashFlow cashFlow) { + this.cashFlow = cashFlow; + return this; + } + + /** + * Get cashFlow + * @return cashFlow + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CASH_FLOW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CashFlow getCashFlow() { + return cashFlow; + } + + + @JsonProperty(JSON_PROPERTY_CASH_FLOW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCashFlow(CashFlow cashFlow) { + this.cashFlow = cashFlow; + } + + + public PatchBusinessApplicationAttributes yearOfIncorporation(String yearOfIncorporation) { + this.yearOfIncorporation = yearOfIncorporation; + return this; + } + + /** + * Get yearOfIncorporation + * @return yearOfIncorporation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_YEAR_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getYearOfIncorporation() { + return yearOfIncorporation; + } + + + @JsonProperty(JSON_PROPERTY_YEAR_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setYearOfIncorporation(String yearOfIncorporation) { + this.yearOfIncorporation = yearOfIncorporation; + } + + + public PatchBusinessApplicationAttributes countriesOfOperation(List countriesOfOperation) { + this.countriesOfOperation = countriesOfOperation; + return this; + } + + public PatchBusinessApplicationAttributes addCountriesOfOperationItem(String countriesOfOperationItem) { + if (this.countriesOfOperation == null) { + this.countriesOfOperation = new ArrayList<>(); + } + this.countriesOfOperation.add(countriesOfOperationItem); + return this; + } + + /** + * Get countriesOfOperation + * @return countriesOfOperation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTRIES_OF_OPERATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getCountriesOfOperation() { + return countriesOfOperation; + } + + + @JsonProperty(JSON_PROPERTY_COUNTRIES_OF_OPERATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCountriesOfOperation(List countriesOfOperation) { + this.countriesOfOperation = countriesOfOperation; + } + + + public PatchBusinessApplicationAttributes stockSymbol(String stockSymbol) { + this.stockSymbol = stockSymbol; + return this; + } + + /** + * Get stockSymbol + * @return stockSymbol + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STOCK_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStockSymbol() { + return stockSymbol; + } + + + @JsonProperty(JSON_PROPERTY_STOCK_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStockSymbol(String stockSymbol) { + this.stockSymbol = stockSymbol; + } + + + public PatchBusinessApplicationAttributes website(String website) { + this.website = website; + return this; + } + + /** + * Get website + * @return website + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEBSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebsite() { + return website; + } + + + @JsonProperty(JSON_PROPERTY_WEBSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWebsite(String website) { + this.website = website; + } + + + public PatchBusinessApplicationAttributes businessVertical(BusinessVertical businessVertical) { + this.businessVertical = businessVertical; + return this; + } + + /** + * Get businessVertical + * @return businessVertical + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUSINESS_VERTICAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BusinessVertical getBusinessVertical() { + return businessVertical; + } + + + @JsonProperty(JSON_PROPERTY_BUSINESS_VERTICAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBusinessVertical(BusinessVertical businessVertical) { + this.businessVertical = businessVertical; + } + + + /** + * Return true if this patchBusinessApplication_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBusinessApplicationAttributes patchBusinessApplicationAttributes = (PatchBusinessApplicationAttributes) o; + return Objects.equals(this.tags, patchBusinessApplicationAttributes.tags) && + Objects.equals(this.annualRevenue, patchBusinessApplicationAttributes.annualRevenue) && + Objects.equals(this.numberOfEmployees, patchBusinessApplicationAttributes.numberOfEmployees) && + Objects.equals(this.cashFlow, patchBusinessApplicationAttributes.cashFlow) && + Objects.equals(this.yearOfIncorporation, patchBusinessApplicationAttributes.yearOfIncorporation) && + Objects.equals(this.countriesOfOperation, patchBusinessApplicationAttributes.countriesOfOperation) && + Objects.equals(this.stockSymbol, patchBusinessApplicationAttributes.stockSymbol) && + Objects.equals(this.website, patchBusinessApplicationAttributes.website) && + Objects.equals(this.businessVertical, patchBusinessApplicationAttributes.businessVertical); + } + + @Override + public int hashCode() { + return Objects.hash(tags, annualRevenue, numberOfEmployees, cashFlow, yearOfIncorporation, countriesOfOperation, stockSymbol, website, businessVertical); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBusinessApplicationAttributes {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" annualRevenue: ").append(toIndentedString(annualRevenue)).append("\n"); + sb.append(" numberOfEmployees: ").append(toIndentedString(numberOfEmployees)).append("\n"); + sb.append(" cashFlow: ").append(toIndentedString(cashFlow)).append("\n"); + sb.append(" yearOfIncorporation: ").append(toIndentedString(yearOfIncorporation)).append("\n"); + sb.append(" countriesOfOperation: ").append(toIndentedString(countriesOfOperation)).append("\n"); + sb.append(" stockSymbol: ").append(toIndentedString(stockSymbol)).append("\n"); + sb.append(" website: ").append(toIndentedString(website)).append("\n"); + sb.append(" businessVertical: ").append(toIndentedString(businessVertical)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `annualRevenue` to the URL query string + if (getAnnualRevenue() != null) { + joiner.add(String.format("%sannualRevenue%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAnnualRevenue()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `numberOfEmployees` to the URL query string + if (getNumberOfEmployees() != null) { + joiner.add(String.format("%snumberOfEmployees%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNumberOfEmployees()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cashFlow` to the URL query string + if (getCashFlow() != null) { + joiner.add(String.format("%scashFlow%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCashFlow()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `yearOfIncorporation` to the URL query string + if (getYearOfIncorporation() != null) { + joiner.add(String.format("%syearOfIncorporation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getYearOfIncorporation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `countriesOfOperation` to the URL query string + if (getCountriesOfOperation() != null) { + for (int i = 0; i < getCountriesOfOperation().size(); i++) { + joiner.add(String.format("%scountriesOfOperation%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getCountriesOfOperation().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `stockSymbol` to the URL query string + if (getStockSymbol() != null) { + joiner.add(String.format("%sstockSymbol%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStockSymbol()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `website` to the URL query string + if (getWebsite() != null) { + joiner.add(String.format("%swebsite%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getWebsite()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `businessVertical` to the URL query string + if (getBusinessVertical() != null) { + joiner.add(String.format("%sbusinessVertical%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBusinessVertical()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchBusinessApplicationBeneficialOwner.java b/src/main/java/unit/java/sdk/model/PatchBusinessApplicationBeneficialOwner.java new file mode 100644 index 00000000..a8bd94d5 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchBusinessApplicationBeneficialOwner.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessApplicationBeneficialOwnerAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchBusinessApplicationBeneficialOwner + */ +@JsonPropertyOrder({ + PatchBusinessApplicationBeneficialOwner.JSON_PROPERTY_TYPE, + PatchBusinessApplicationBeneficialOwner.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBusinessApplicationBeneficialOwner { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "beneficialOwner"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchBusinessApplicationBeneficialOwnerAttributes attributes; + + public PatchBusinessApplicationBeneficialOwner() { + } + + public PatchBusinessApplicationBeneficialOwner type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public PatchBusinessApplicationBeneficialOwner attributes(PatchBusinessApplicationBeneficialOwnerAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchBusinessApplicationBeneficialOwnerAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchBusinessApplicationBeneficialOwnerAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this patchBusinessApplicationBeneficialOwner object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBusinessApplicationBeneficialOwner patchBusinessApplicationBeneficialOwner = (PatchBusinessApplicationBeneficialOwner) o; + return Objects.equals(this.type, patchBusinessApplicationBeneficialOwner.type) && + Objects.equals(this.attributes, patchBusinessApplicationBeneficialOwner.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBusinessApplicationBeneficialOwner {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchBusinessApplicationBeneficialOwnerAttributes.java b/src/main/java/unit/java/sdk/model/PatchBusinessApplicationBeneficialOwnerAttributes.java new file mode 100644 index 00000000..48ebe89d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchBusinessApplicationBeneficialOwnerAttributes.java @@ -0,0 +1,225 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.SourceOfIncome; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchBusinessApplicationBeneficialOwnerAttributes + */ +@JsonPropertyOrder({ + PatchBusinessApplicationBeneficialOwnerAttributes.JSON_PROPERTY_OCCUPATION, + PatchBusinessApplicationBeneficialOwnerAttributes.JSON_PROPERTY_ANNUAL_INCOME, + PatchBusinessApplicationBeneficialOwnerAttributes.JSON_PROPERTY_SOURCE_OF_INCOME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBusinessApplicationBeneficialOwnerAttributes { + public static final String JSON_PROPERTY_OCCUPATION = "occupation"; + private Occupation occupation; + + public static final String JSON_PROPERTY_ANNUAL_INCOME = "annualIncome"; + private AnnualIncome annualIncome; + + public static final String JSON_PROPERTY_SOURCE_OF_INCOME = "sourceOfIncome"; + private SourceOfIncome sourceOfIncome; + + public PatchBusinessApplicationBeneficialOwnerAttributes() { + } + + public PatchBusinessApplicationBeneficialOwnerAttributes occupation(Occupation occupation) { + this.occupation = occupation; + return this; + } + + /** + * Get occupation + * @return occupation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Occupation getOccupation() { + return occupation; + } + + + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOccupation(Occupation occupation) { + this.occupation = occupation; + } + + + public PatchBusinessApplicationBeneficialOwnerAttributes annualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + return this; + } + + /** + * Get annualIncome + * @return annualIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnnualIncome getAnnualIncome() { + return annualIncome; + } + + + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + } + + + public PatchBusinessApplicationBeneficialOwnerAttributes sourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + return this; + } + + /** + * Get sourceOfIncome + * @return sourceOfIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SourceOfIncome getSourceOfIncome() { + return sourceOfIncome; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + } + + + /** + * Return true if this patchBusinessApplicationBeneficialOwner_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBusinessApplicationBeneficialOwnerAttributes patchBusinessApplicationBeneficialOwnerAttributes = (PatchBusinessApplicationBeneficialOwnerAttributes) o; + return Objects.equals(this.occupation, patchBusinessApplicationBeneficialOwnerAttributes.occupation) && + Objects.equals(this.annualIncome, patchBusinessApplicationBeneficialOwnerAttributes.annualIncome) && + Objects.equals(this.sourceOfIncome, patchBusinessApplicationBeneficialOwnerAttributes.sourceOfIncome); + } + + @Override + public int hashCode() { + return Objects.hash(occupation, annualIncome, sourceOfIncome); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBusinessApplicationBeneficialOwnerAttributes {\n"); + sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); + sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); + sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `occupation` to the URL query string + if (getOccupation() != null) { + joiner.add(String.format("%soccupation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOccupation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `annualIncome` to the URL query string + if (getAnnualIncome() != null) { + joiner.add(String.format("%sannualIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAnnualIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sourceOfIncome` to the URL query string + if (getSourceOfIncome() != null) { + joiner.add(String.format("%ssourceOfIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSourceOfIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchBusinessApplicationOfficer.java b/src/main/java/unit/java/sdk/model/PatchBusinessApplicationOfficer.java new file mode 100644 index 00000000..ec0ea2b9 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchBusinessApplicationOfficer.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessApplicationOfficerAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchBusinessApplicationOfficer + */ +@JsonPropertyOrder({ + PatchBusinessApplicationOfficer.JSON_PROPERTY_TYPE, + PatchBusinessApplicationOfficer.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBusinessApplicationOfficer { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "businessApplication"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchBusinessApplicationOfficerAttributes attributes; + + public PatchBusinessApplicationOfficer() { + } + + public PatchBusinessApplicationOfficer type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public PatchBusinessApplicationOfficer attributes(PatchBusinessApplicationOfficerAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchBusinessApplicationOfficerAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchBusinessApplicationOfficerAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this patchBusinessApplicationOfficer object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBusinessApplicationOfficer patchBusinessApplicationOfficer = (PatchBusinessApplicationOfficer) o; + return Objects.equals(this.type, patchBusinessApplicationOfficer.type) && + Objects.equals(this.attributes, patchBusinessApplicationOfficer.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBusinessApplicationOfficer {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchBusinessApplicationOfficerAttributes.java b/src/main/java/unit/java/sdk/model/PatchBusinessApplicationOfficerAttributes.java new file mode 100644 index 00000000..f568d6d3 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchBusinessApplicationOfficerAttributes.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessApplicationOfficerAttributesOfficer; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchBusinessApplicationOfficerAttributes + */ +@JsonPropertyOrder({ + PatchBusinessApplicationOfficerAttributes.JSON_PROPERTY_OFFICER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBusinessApplicationOfficerAttributes { + public static final String JSON_PROPERTY_OFFICER = "officer"; + private PatchBusinessApplicationOfficerAttributesOfficer officer; + + public PatchBusinessApplicationOfficerAttributes() { + } + + public PatchBusinessApplicationOfficerAttributes officer(PatchBusinessApplicationOfficerAttributesOfficer officer) { + this.officer = officer; + return this; + } + + /** + * Get officer + * @return officer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OFFICER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PatchBusinessApplicationOfficerAttributesOfficer getOfficer() { + return officer; + } + + + @JsonProperty(JSON_PROPERTY_OFFICER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOfficer(PatchBusinessApplicationOfficerAttributesOfficer officer) { + this.officer = officer; + } + + + /** + * Return true if this patchBusinessApplicationOfficer_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBusinessApplicationOfficerAttributes patchBusinessApplicationOfficerAttributes = (PatchBusinessApplicationOfficerAttributes) o; + return Objects.equals(this.officer, patchBusinessApplicationOfficerAttributes.officer); + } + + @Override + public int hashCode() { + return Objects.hash(officer); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBusinessApplicationOfficerAttributes {\n"); + sb.append(" officer: ").append(toIndentedString(officer)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `officer` to the URL query string + if (getOfficer() != null) { + joiner.add(getOfficer().toUrlQueryString(prefix + "officer" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchBusinessApplicationOfficerAttributesOfficer.java b/src/main/java/unit/java/sdk/model/PatchBusinessApplicationOfficerAttributesOfficer.java new file mode 100644 index 00000000..bd0d7749 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchBusinessApplicationOfficerAttributesOfficer.java @@ -0,0 +1,225 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.SourceOfIncome; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchBusinessApplicationOfficerAttributesOfficer + */ +@JsonPropertyOrder({ + PatchBusinessApplicationOfficerAttributesOfficer.JSON_PROPERTY_OCCUPATION, + PatchBusinessApplicationOfficerAttributesOfficer.JSON_PROPERTY_ANNUAL_INCOME, + PatchBusinessApplicationOfficerAttributesOfficer.JSON_PROPERTY_SOURCE_OF_INCOME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBusinessApplicationOfficerAttributesOfficer { + public static final String JSON_PROPERTY_OCCUPATION = "occupation"; + private Occupation occupation; + + public static final String JSON_PROPERTY_ANNUAL_INCOME = "annualIncome"; + private AnnualIncome annualIncome; + + public static final String JSON_PROPERTY_SOURCE_OF_INCOME = "sourceOfIncome"; + private SourceOfIncome sourceOfIncome; + + public PatchBusinessApplicationOfficerAttributesOfficer() { + } + + public PatchBusinessApplicationOfficerAttributesOfficer occupation(Occupation occupation) { + this.occupation = occupation; + return this; + } + + /** + * Get occupation + * @return occupation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Occupation getOccupation() { + return occupation; + } + + + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOccupation(Occupation occupation) { + this.occupation = occupation; + } + + + public PatchBusinessApplicationOfficerAttributesOfficer annualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + return this; + } + + /** + * Get annualIncome + * @return annualIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnnualIncome getAnnualIncome() { + return annualIncome; + } + + + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + } + + + public PatchBusinessApplicationOfficerAttributesOfficer sourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + return this; + } + + /** + * Get sourceOfIncome + * @return sourceOfIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SourceOfIncome getSourceOfIncome() { + return sourceOfIncome; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + } + + + /** + * Return true if this patchBusinessApplicationOfficer_attributes_officer object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBusinessApplicationOfficerAttributesOfficer patchBusinessApplicationOfficerAttributesOfficer = (PatchBusinessApplicationOfficerAttributesOfficer) o; + return Objects.equals(this.occupation, patchBusinessApplicationOfficerAttributesOfficer.occupation) && + Objects.equals(this.annualIncome, patchBusinessApplicationOfficerAttributesOfficer.annualIncome) && + Objects.equals(this.sourceOfIncome, patchBusinessApplicationOfficerAttributesOfficer.sourceOfIncome); + } + + @Override + public int hashCode() { + return Objects.hash(occupation, annualIncome, sourceOfIncome); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBusinessApplicationOfficerAttributesOfficer {\n"); + sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); + sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); + sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `occupation` to the URL query string + if (getOccupation() != null) { + joiner.add(String.format("%soccupation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOccupation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `annualIncome` to the URL query string + if (getAnnualIncome() != null) { + joiner.add(String.format("%sannualIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAnnualIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sourceOfIncome` to the URL query string + if (getSourceOfIncome() != null) { + joiner.add(String.format("%ssourceOfIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSourceOfIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchBusinessCreditCard.java b/src/main/java/unit/java/sdk/model/PatchBusinessCreditCard.java new file mode 100644 index 00000000..84c7ea94 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchBusinessCreditCard.java @@ -0,0 +1,220 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessDebitCardAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchBusinessCreditCard + */ +@JsonPropertyOrder({ + PatchBusinessCreditCard.JSON_PROPERTY_TYPE, + PatchBusinessCreditCard.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBusinessCreditCard { + /** + * Gets or Sets type + */ + public enum TypeEnum { + BUSINESSCREDITCARD("businessCreditCard"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchBusinessDebitCardAttributes attributes; + + public PatchBusinessCreditCard() { + } + + public PatchBusinessCreditCard type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public PatchBusinessCreditCard attributes(PatchBusinessDebitCardAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchBusinessDebitCardAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchBusinessDebitCardAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this patchBusinessCreditCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBusinessCreditCard patchBusinessCreditCard = (PatchBusinessCreditCard) o; + return Objects.equals(this.type, patchBusinessCreditCard.type) && + Objects.equals(this.attributes, patchBusinessCreditCard.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBusinessCreditCard {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchBusinessDebitCard.java b/src/main/java/unit/java/sdk/model/PatchBusinessDebitCard.java new file mode 100644 index 00000000..e75ecd4e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchBusinessDebitCard.java @@ -0,0 +1,220 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessDebitCardAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchBusinessDebitCard + */ +@JsonPropertyOrder({ + PatchBusinessDebitCard.JSON_PROPERTY_TYPE, + PatchBusinessDebitCard.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBusinessDebitCard { + /** + * Gets or Sets type + */ + public enum TypeEnum { + BUSINESSDEBITCARD("businessDebitCard"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchBusinessDebitCardAttributes attributes; + + public PatchBusinessDebitCard() { + } + + public PatchBusinessDebitCard type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public PatchBusinessDebitCard attributes(PatchBusinessDebitCardAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchBusinessDebitCardAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchBusinessDebitCardAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this patchBusinessDebitCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBusinessDebitCard patchBusinessDebitCard = (PatchBusinessDebitCard) o; + return Objects.equals(this.type, patchBusinessDebitCard.type) && + Objects.equals(this.attributes, patchBusinessDebitCard.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBusinessDebitCard {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchBusinessDebitCardAttributes.java b/src/main/java/unit/java/sdk/model/PatchBusinessDebitCardAttributes.java new file mode 100644 index 00000000..fa517955 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchBusinessDebitCardAttributes.java @@ -0,0 +1,428 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.CardLevelLimits; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchBusinessDebitCardAttributes + */ +@JsonPropertyOrder({ + PatchBusinessDebitCardAttributes.JSON_PROPERTY_SHIPPING_ADDRESS, + PatchBusinessDebitCardAttributes.JSON_PROPERTY_ADDRESS, + PatchBusinessDebitCardAttributes.JSON_PROPERTY_PHONE, + PatchBusinessDebitCardAttributes.JSON_PROPERTY_EMAIL, + PatchBusinessDebitCardAttributes.JSON_PROPERTY_DESIGN, + PatchBusinessDebitCardAttributes.JSON_PROPERTY_TAGS, + PatchBusinessDebitCardAttributes.JSON_PROPERTY_LIMITS, + PatchBusinessDebitCardAttributes.JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBusinessDebitCardAttributes { + public static final String JSON_PROPERTY_SHIPPING_ADDRESS = "shippingAddress"; + private JsonNullable
shippingAddress = JsonNullable.
undefined(); + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_DESIGN = "design"; + private String design; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_LIMITS = "limits"; + private CardLevelLimits limits; + + public static final String JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT_ID = "defaultFundingAccountId"; + private String defaultFundingAccountId; + + public PatchBusinessDebitCardAttributes() { + } + + public PatchBusinessDebitCardAttributes shippingAddress(Address shippingAddress) { + this.shippingAddress = JsonNullable.
of(shippingAddress); + return this; + } + + /** + * Get shippingAddress + * @return shippingAddress + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public Address getShippingAddress() { + return shippingAddress.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SHIPPING_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable
getShippingAddress_JsonNullable() { + return shippingAddress; + } + + @JsonProperty(JSON_PROPERTY_SHIPPING_ADDRESS) + public void setShippingAddress_JsonNullable(JsonNullable
shippingAddress) { + this.shippingAddress = shippingAddress; + } + + public void setShippingAddress(Address shippingAddress) { + this.shippingAddress = JsonNullable.
of(shippingAddress); + } + + + public PatchBusinessDebitCardAttributes address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(Address address) { + this.address = address; + } + + + public PatchBusinessDebitCardAttributes phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public PatchBusinessDebitCardAttributes email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public PatchBusinessDebitCardAttributes design(String design) { + this.design = design; + return this; + } + + /** + * Get design + * @return design + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDesign() { + return design; + } + + + @JsonProperty(JSON_PROPERTY_DESIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDesign(String design) { + this.design = design; + } + + + public PatchBusinessDebitCardAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public PatchBusinessDebitCardAttributes limits(CardLevelLimits limits) { + this.limits = limits; + return this; + } + + /** + * Get limits + * @return limits + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CardLevelLimits getLimits() { + return limits; + } + + + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLimits(CardLevelLimits limits) { + this.limits = limits; + } + + + public PatchBusinessDebitCardAttributes defaultFundingAccountId(String defaultFundingAccountId) { + this.defaultFundingAccountId = defaultFundingAccountId; + return this; + } + + /** + * Get defaultFundingAccountId + * @return defaultFundingAccountId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDefaultFundingAccountId() { + return defaultFundingAccountId; + } + + + @JsonProperty(JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefaultFundingAccountId(String defaultFundingAccountId) { + this.defaultFundingAccountId = defaultFundingAccountId; + } + + + /** + * Return true if this patchBusinessDebitCard_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBusinessDebitCardAttributes patchBusinessDebitCardAttributes = (PatchBusinessDebitCardAttributes) o; + return equalsNullable(this.shippingAddress, patchBusinessDebitCardAttributes.shippingAddress) && + Objects.equals(this.address, patchBusinessDebitCardAttributes.address) && + Objects.equals(this.phone, patchBusinessDebitCardAttributes.phone) && + Objects.equals(this.email, patchBusinessDebitCardAttributes.email) && + Objects.equals(this.design, patchBusinessDebitCardAttributes.design) && + Objects.equals(this.tags, patchBusinessDebitCardAttributes.tags) && + Objects.equals(this.limits, patchBusinessDebitCardAttributes.limits) && + Objects.equals(this.defaultFundingAccountId, patchBusinessDebitCardAttributes.defaultFundingAccountId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(shippingAddress), address, phone, email, design, tags, limits, defaultFundingAccountId); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBusinessDebitCardAttributes {\n"); + sb.append(" shippingAddress: ").append(toIndentedString(shippingAddress)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" design: ").append(toIndentedString(design)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); + sb.append(" defaultFundingAccountId: ").append(toIndentedString(defaultFundingAccountId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `shippingAddress` to the URL query string + if (getShippingAddress() != null) { + joiner.add(getShippingAddress().toUrlQueryString(prefix + "shippingAddress" + suffix)); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `design` to the URL query string + if (getDesign() != null) { + joiner.add(String.format("%sdesign%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDesign()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `limits` to the URL query string + if (getLimits() != null) { + joiner.add(getLimits().toUrlQueryString(prefix + "limits" + suffix)); + } + + // add `defaultFundingAccountId` to the URL query string + if (getDefaultFundingAccountId() != null) { + joiner.add(String.format("%sdefaultFundingAccountId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDefaultFundingAccountId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchBusinessVirtualCreditCard.java b/src/main/java/unit/java/sdk/model/PatchBusinessVirtualCreditCard.java new file mode 100644 index 00000000..16ddf358 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchBusinessVirtualCreditCard.java @@ -0,0 +1,220 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessVirtualDebitCardAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchBusinessVirtualCreditCard + */ +@JsonPropertyOrder({ + PatchBusinessVirtualCreditCard.JSON_PROPERTY_TYPE, + PatchBusinessVirtualCreditCard.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBusinessVirtualCreditCard { + /** + * Gets or Sets type + */ + public enum TypeEnum { + BUSINESSVIRTUALCREDITCARD("businessVirtualCreditCard"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchBusinessVirtualDebitCardAttributes attributes; + + public PatchBusinessVirtualCreditCard() { + } + + public PatchBusinessVirtualCreditCard type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public PatchBusinessVirtualCreditCard attributes(PatchBusinessVirtualDebitCardAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchBusinessVirtualDebitCardAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchBusinessVirtualDebitCardAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this patchBusinessVirtualCreditCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBusinessVirtualCreditCard patchBusinessVirtualCreditCard = (PatchBusinessVirtualCreditCard) o; + return Objects.equals(this.type, patchBusinessVirtualCreditCard.type) && + Objects.equals(this.attributes, patchBusinessVirtualCreditCard.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBusinessVirtualCreditCard {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchBusinessVirtualDebitCard.java b/src/main/java/unit/java/sdk/model/PatchBusinessVirtualDebitCard.java new file mode 100644 index 00000000..42874679 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchBusinessVirtualDebitCard.java @@ -0,0 +1,220 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessVirtualDebitCardAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchBusinessVirtualDebitCard + */ +@JsonPropertyOrder({ + PatchBusinessVirtualDebitCard.JSON_PROPERTY_TYPE, + PatchBusinessVirtualDebitCard.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBusinessVirtualDebitCard { + /** + * Gets or Sets type + */ + public enum TypeEnum { + BUSINESSVIRTUALDEBITCARD("businessVirtualDebitCard"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchBusinessVirtualDebitCardAttributes attributes; + + public PatchBusinessVirtualDebitCard() { + } + + public PatchBusinessVirtualDebitCard type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public PatchBusinessVirtualDebitCard attributes(PatchBusinessVirtualDebitCardAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchBusinessVirtualDebitCardAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchBusinessVirtualDebitCardAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this patchBusinessVirtualDebitCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBusinessVirtualDebitCard patchBusinessVirtualDebitCard = (PatchBusinessVirtualDebitCard) o; + return Objects.equals(this.type, patchBusinessVirtualDebitCard.type) && + Objects.equals(this.attributes, patchBusinessVirtualDebitCard.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBusinessVirtualDebitCard {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchBusinessVirtualDebitCardAttributes.java b/src/main/java/unit/java/sdk/model/PatchBusinessVirtualDebitCardAttributes.java new file mode 100644 index 00000000..74780522 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchBusinessVirtualDebitCardAttributes.java @@ -0,0 +1,333 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.CardLevelLimits; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchBusinessVirtualDebitCardAttributes + */ +@JsonPropertyOrder({ + PatchBusinessVirtualDebitCardAttributes.JSON_PROPERTY_ADDRESS, + PatchBusinessVirtualDebitCardAttributes.JSON_PROPERTY_PHONE, + PatchBusinessVirtualDebitCardAttributes.JSON_PROPERTY_EMAIL, + PatchBusinessVirtualDebitCardAttributes.JSON_PROPERTY_TAGS, + PatchBusinessVirtualDebitCardAttributes.JSON_PROPERTY_LIMITS, + PatchBusinessVirtualDebitCardAttributes.JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchBusinessVirtualDebitCardAttributes { + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_LIMITS = "limits"; + private CardLevelLimits limits; + + public static final String JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT_ID = "defaultFundingAccountId"; + private String defaultFundingAccountId; + + public PatchBusinessVirtualDebitCardAttributes() { + } + + public PatchBusinessVirtualDebitCardAttributes address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(Address address) { + this.address = address; + } + + + public PatchBusinessVirtualDebitCardAttributes phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public PatchBusinessVirtualDebitCardAttributes email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public PatchBusinessVirtualDebitCardAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public PatchBusinessVirtualDebitCardAttributes limits(CardLevelLimits limits) { + this.limits = limits; + return this; + } + + /** + * Get limits + * @return limits + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CardLevelLimits getLimits() { + return limits; + } + + + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLimits(CardLevelLimits limits) { + this.limits = limits; + } + + + public PatchBusinessVirtualDebitCardAttributes defaultFundingAccountId(String defaultFundingAccountId) { + this.defaultFundingAccountId = defaultFundingAccountId; + return this; + } + + /** + * Get defaultFundingAccountId + * @return defaultFundingAccountId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDefaultFundingAccountId() { + return defaultFundingAccountId; + } + + + @JsonProperty(JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefaultFundingAccountId(String defaultFundingAccountId) { + this.defaultFundingAccountId = defaultFundingAccountId; + } + + + /** + * Return true if this patchBusinessVirtualDebitCard_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchBusinessVirtualDebitCardAttributes patchBusinessVirtualDebitCardAttributes = (PatchBusinessVirtualDebitCardAttributes) o; + return Objects.equals(this.address, patchBusinessVirtualDebitCardAttributes.address) && + Objects.equals(this.phone, patchBusinessVirtualDebitCardAttributes.phone) && + Objects.equals(this.email, patchBusinessVirtualDebitCardAttributes.email) && + Objects.equals(this.tags, patchBusinessVirtualDebitCardAttributes.tags) && + Objects.equals(this.limits, patchBusinessVirtualDebitCardAttributes.limits) && + Objects.equals(this.defaultFundingAccountId, patchBusinessVirtualDebitCardAttributes.defaultFundingAccountId); + } + + @Override + public int hashCode() { + return Objects.hash(address, phone, email, tags, limits, defaultFundingAccountId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchBusinessVirtualDebitCardAttributes {\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); + sb.append(" defaultFundingAccountId: ").append(toIndentedString(defaultFundingAccountId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `limits` to the URL query string + if (getLimits() != null) { + joiner.add(getLimits().toUrlQueryString(prefix + "limits" + suffix)); + } + + // add `defaultFundingAccountId` to the URL query string + if (getDefaultFundingAccountId() != null) { + joiner.add(String.format("%sdefaultFundingAccountId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDefaultFundingAccountId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchChargebackTransaction.java b/src/main/java/unit/java/sdk/model/PatchChargebackTransaction.java new file mode 100644 index 00000000..7ed7e39a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchChargebackTransaction.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBookTransactionAttributes; +import unit.java.sdk.model.PatchBookTransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchChargebackTransaction + */ +@JsonPropertyOrder({ + PatchChargebackTransaction.JSON_PROPERTY_TYPE, + PatchChargebackTransaction.JSON_PROPERTY_ATTRIBUTES, + PatchChargebackTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchChargebackTransaction { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "chargebackTransaction"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchBookTransactionAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private PatchBookTransactionRelationships relationships; + + public PatchChargebackTransaction() { + } + + public PatchChargebackTransaction type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public PatchChargebackTransaction attributes(PatchBookTransactionAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchBookTransactionAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchBookTransactionAttributes attributes) { + this.attributes = attributes; + } + + + public PatchChargebackTransaction relationships(PatchBookTransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PatchBookTransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(PatchBookTransactionRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this patchChargebackTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchChargebackTransaction patchChargebackTransaction = (PatchChargebackTransaction) o; + return Objects.equals(this.type, patchChargebackTransaction.type) && + Objects.equals(this.attributes, patchChargebackTransaction.attributes) && + Objects.equals(this.relationships, patchChargebackTransaction.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchChargebackTransaction {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchCheckDeposit.java b/src/main/java/unit/java/sdk/model/PatchCheckDeposit.java new file mode 100644 index 00000000..ede8c84c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchCheckDeposit.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchCheckDepositAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchCheckDeposit + */ +@JsonPropertyOrder({ + PatchCheckDeposit.JSON_PROPERTY_TYPE, + PatchCheckDeposit.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchCheckDeposit { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "checkDeposit"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchCheckDepositAttributes attributes; + + public PatchCheckDeposit() { + } + + public PatchCheckDeposit type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public PatchCheckDeposit attributes(PatchCheckDepositAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchCheckDepositAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchCheckDepositAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this patchCheckDeposit object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchCheckDeposit patchCheckDeposit = (PatchCheckDeposit) o; + return Objects.equals(this.type, patchCheckDeposit.type) && + Objects.equals(this.attributes, patchCheckDeposit.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchCheckDeposit {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchCheckDepositAttributes.java b/src/main/java/unit/java/sdk/model/PatchCheckDepositAttributes.java new file mode 100644 index 00000000..46392380 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchCheckDepositAttributes.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchCheckDepositAttributes + */ +@JsonPropertyOrder({ + PatchCheckDepositAttributes.JSON_PROPERTY_AMOUNT, + PatchCheckDepositAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchCheckDepositAttributes { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public PatchCheckDepositAttributes() { + } + + public PatchCheckDepositAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public PatchCheckDepositAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this patchCheckDeposit_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchCheckDepositAttributes patchCheckDepositAttributes = (PatchCheckDepositAttributes) o; + return Objects.equals(this.amount, patchCheckDepositAttributes.amount) && + Objects.equals(this.tags, patchCheckDepositAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(amount, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchCheckDepositAttributes {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchCounterparty.java b/src/main/java/unit/java/sdk/model/PatchCounterparty.java new file mode 100644 index 00000000..0f9fdf00 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchCounterparty.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchCounterpartyAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchCounterparty + */ +@JsonPropertyOrder({ + PatchCounterparty.JSON_PROPERTY_TYPE, + PatchCounterparty.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchCounterparty { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "counterparty"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchCounterpartyAttributes attributes; + + public PatchCounterparty() { + } + + public PatchCounterparty type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public PatchCounterparty attributes(PatchCounterpartyAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchCounterpartyAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchCounterpartyAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this patchCounterparty object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchCounterparty patchCounterparty = (PatchCounterparty) o; + return Objects.equals(this.type, patchCounterparty.type) && + Objects.equals(this.attributes, patchCounterparty.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchCounterparty {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchCounterpartyAttributes.java b/src/main/java/unit/java/sdk/model/PatchCounterpartyAttributes.java new file mode 100644 index 00000000..ad9f2a35 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchCounterpartyAttributes.java @@ -0,0 +1,331 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchCounterpartyAttributes + */ +@JsonPropertyOrder({ + PatchCounterpartyAttributes.JSON_PROPERTY_PLAID_PROCESSOR_TOKEN, + PatchCounterpartyAttributes.JSON_PROPERTY_NAME, + PatchCounterpartyAttributes.JSON_PROPERTY_PERMISSIONS, + PatchCounterpartyAttributes.JSON_PROPERTY_VERIFY_NAME, + PatchCounterpartyAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchCounterpartyAttributes { + public static final String JSON_PROPERTY_PLAID_PROCESSOR_TOKEN = "plaidProcessorToken"; + private String plaidProcessorToken; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + /** + * Gets or Sets permissions + */ + public enum PermissionsEnum { + CREDITONLY("CreditOnly"), + + DEBITONLY("DebitOnly"), + + CREDITANDDEBIT("CreditAndDebit"); + + private String value; + + PermissionsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PermissionsEnum fromValue(String value) { + for (PermissionsEnum b : PermissionsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PERMISSIONS = "permissions"; + private PermissionsEnum permissions; + + public static final String JSON_PROPERTY_VERIFY_NAME = "verifyName"; + private Boolean verifyName = false; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public PatchCounterpartyAttributes() { + } + + public PatchCounterpartyAttributes plaidProcessorToken(String plaidProcessorToken) { + this.plaidProcessorToken = plaidProcessorToken; + return this; + } + + /** + * Get plaidProcessorToken + * @return plaidProcessorToken + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PLAID_PROCESSOR_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPlaidProcessorToken() { + return plaidProcessorToken; + } + + + @JsonProperty(JSON_PROPERTY_PLAID_PROCESSOR_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPlaidProcessorToken(String plaidProcessorToken) { + this.plaidProcessorToken = plaidProcessorToken; + } + + + public PatchCounterpartyAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + public PatchCounterpartyAttributes permissions(PermissionsEnum permissions) { + this.permissions = permissions; + return this; + } + + /** + * Get permissions + * @return permissions + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERMISSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PermissionsEnum getPermissions() { + return permissions; + } + + + @JsonProperty(JSON_PROPERTY_PERMISSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPermissions(PermissionsEnum permissions) { + this.permissions = permissions; + } + + + public PatchCounterpartyAttributes verifyName(Boolean verifyName) { + this.verifyName = verifyName; + return this; + } + + /** + * Get verifyName + * @return verifyName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERIFY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getVerifyName() { + return verifyName; + } + + + @JsonProperty(JSON_PROPERTY_VERIFY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVerifyName(Boolean verifyName) { + this.verifyName = verifyName; + } + + + public PatchCounterpartyAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this patchCounterparty_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchCounterpartyAttributes patchCounterpartyAttributes = (PatchCounterpartyAttributes) o; + return Objects.equals(this.plaidProcessorToken, patchCounterpartyAttributes.plaidProcessorToken) && + Objects.equals(this.name, patchCounterpartyAttributes.name) && + Objects.equals(this.permissions, patchCounterpartyAttributes.permissions) && + Objects.equals(this.verifyName, patchCounterpartyAttributes.verifyName) && + Objects.equals(this.tags, patchCounterpartyAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(plaidProcessorToken, name, permissions, verifyName, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchCounterpartyAttributes {\n"); + sb.append(" plaidProcessorToken: ").append(toIndentedString(plaidProcessorToken)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); + sb.append(" verifyName: ").append(toIndentedString(verifyName)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `plaidProcessorToken` to the URL query string + if (getPlaidProcessorToken() != null) { + joiner.add(String.format("%splaidProcessorToken%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPlaidProcessorToken()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `permissions` to the URL query string + if (getPermissions() != null) { + joiner.add(String.format("%spermissions%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPermissions()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `verifyName` to the URL query string + if (getVerifyName() != null) { + joiner.add(String.format("%sverifyName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVerifyName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchIndividualApplication.java b/src/main/java/unit/java/sdk/model/PatchIndividualApplication.java new file mode 100644 index 00000000..2ec59549 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchIndividualApplication.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchIndividualApplicationAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchIndividualApplication + */ +@JsonPropertyOrder({ + PatchIndividualApplication.JSON_PROPERTY_TYPE, + PatchIndividualApplication.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchIndividualApplication { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "individualApplication"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchIndividualApplicationAttributes attributes; + + public PatchIndividualApplication() { + } + + public PatchIndividualApplication type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public PatchIndividualApplication attributes(PatchIndividualApplicationAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchIndividualApplicationAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchIndividualApplicationAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this patchIndividualApplication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchIndividualApplication patchIndividualApplication = (PatchIndividualApplication) o; + return Objects.equals(this.type, patchIndividualApplication.type) && + Objects.equals(this.attributes, patchIndividualApplication.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchIndividualApplication {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchIndividualApplicationAttributes.java b/src/main/java/unit/java/sdk/model/PatchIndividualApplicationAttributes.java new file mode 100644 index 00000000..18fef756 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchIndividualApplicationAttributes.java @@ -0,0 +1,261 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.SourceOfIncome; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchIndividualApplicationAttributes + */ +@JsonPropertyOrder({ + PatchIndividualApplicationAttributes.JSON_PROPERTY_TAGS, + PatchIndividualApplicationAttributes.JSON_PROPERTY_OCCUPATION, + PatchIndividualApplicationAttributes.JSON_PROPERTY_ANNUAL_INCOME, + PatchIndividualApplicationAttributes.JSON_PROPERTY_SOURCE_OF_INCOME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchIndividualApplicationAttributes { + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_OCCUPATION = "occupation"; + private Occupation occupation; + + public static final String JSON_PROPERTY_ANNUAL_INCOME = "annualIncome"; + private AnnualIncome annualIncome; + + public static final String JSON_PROPERTY_SOURCE_OF_INCOME = "sourceOfIncome"; + private SourceOfIncome sourceOfIncome; + + public PatchIndividualApplicationAttributes() { + } + + public PatchIndividualApplicationAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public PatchIndividualApplicationAttributes occupation(Occupation occupation) { + this.occupation = occupation; + return this; + } + + /** + * Get occupation + * @return occupation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Occupation getOccupation() { + return occupation; + } + + + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOccupation(Occupation occupation) { + this.occupation = occupation; + } + + + public PatchIndividualApplicationAttributes annualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + return this; + } + + /** + * Get annualIncome + * @return annualIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnnualIncome getAnnualIncome() { + return annualIncome; + } + + + @JsonProperty(JSON_PROPERTY_ANNUAL_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnualIncome(AnnualIncome annualIncome) { + this.annualIncome = annualIncome; + } + + + public PatchIndividualApplicationAttributes sourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + return this; + } + + /** + * Get sourceOfIncome + * @return sourceOfIncome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SourceOfIncome getSourceOfIncome() { + return sourceOfIncome; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_OF_INCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceOfIncome(SourceOfIncome sourceOfIncome) { + this.sourceOfIncome = sourceOfIncome; + } + + + /** + * Return true if this patchIndividualApplication_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchIndividualApplicationAttributes patchIndividualApplicationAttributes = (PatchIndividualApplicationAttributes) o; + return Objects.equals(this.tags, patchIndividualApplicationAttributes.tags) && + Objects.equals(this.occupation, patchIndividualApplicationAttributes.occupation) && + Objects.equals(this.annualIncome, patchIndividualApplicationAttributes.annualIncome) && + Objects.equals(this.sourceOfIncome, patchIndividualApplicationAttributes.sourceOfIncome); + } + + @Override + public int hashCode() { + return Objects.hash(tags, occupation, annualIncome, sourceOfIncome); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchIndividualApplicationAttributes {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); + sb.append(" annualIncome: ").append(toIndentedString(annualIncome)).append("\n"); + sb.append(" sourceOfIncome: ").append(toIndentedString(sourceOfIncome)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `occupation` to the URL query string + if (getOccupation() != null) { + joiner.add(String.format("%soccupation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOccupation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `annualIncome` to the URL query string + if (getAnnualIncome() != null) { + joiner.add(String.format("%sannualIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAnnualIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sourceOfIncome` to the URL query string + if (getSourceOfIncome() != null) { + joiner.add(String.format("%ssourceOfIncome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSourceOfIncome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchIndividualDebitCard.java b/src/main/java/unit/java/sdk/model/PatchIndividualDebitCard.java new file mode 100644 index 00000000..6344eb74 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchIndividualDebitCard.java @@ -0,0 +1,220 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchIndividualDebitCardAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchIndividualDebitCard + */ +@JsonPropertyOrder({ + PatchIndividualDebitCard.JSON_PROPERTY_TYPE, + PatchIndividualDebitCard.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchIndividualDebitCard { + /** + * Gets or Sets type + */ + public enum TypeEnum { + INDIVIDUALDEBITCARD("individualDebitCard"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchIndividualDebitCardAttributes attributes; + + public PatchIndividualDebitCard() { + } + + public PatchIndividualDebitCard type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public PatchIndividualDebitCard attributes(PatchIndividualDebitCardAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchIndividualDebitCardAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchIndividualDebitCardAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this patchIndividualDebitCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchIndividualDebitCard patchIndividualDebitCard = (PatchIndividualDebitCard) o; + return Objects.equals(this.type, patchIndividualDebitCard.type) && + Objects.equals(this.attributes, patchIndividualDebitCard.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchIndividualDebitCard {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchIndividualDebitCardAttributes.java b/src/main/java/unit/java/sdk/model/PatchIndividualDebitCardAttributes.java new file mode 100644 index 00000000..cb0f085b --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchIndividualDebitCardAttributes.java @@ -0,0 +1,319 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.CardLevelLimits; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchIndividualDebitCardAttributes + */ +@JsonPropertyOrder({ + PatchIndividualDebitCardAttributes.JSON_PROPERTY_SHIPPING_ADDRESS, + PatchIndividualDebitCardAttributes.JSON_PROPERTY_DESIGN, + PatchIndividualDebitCardAttributes.JSON_PROPERTY_TAGS, + PatchIndividualDebitCardAttributes.JSON_PROPERTY_LIMITS, + PatchIndividualDebitCardAttributes.JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchIndividualDebitCardAttributes { + public static final String JSON_PROPERTY_SHIPPING_ADDRESS = "shippingAddress"; + private JsonNullable
shippingAddress = JsonNullable.
undefined(); + + public static final String JSON_PROPERTY_DESIGN = "design"; + private String design; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_LIMITS = "limits"; + private CardLevelLimits limits; + + public static final String JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT_ID = "defaultFundingAccountId"; + private String defaultFundingAccountId; + + public PatchIndividualDebitCardAttributes() { + } + + public PatchIndividualDebitCardAttributes shippingAddress(Address shippingAddress) { + this.shippingAddress = JsonNullable.
of(shippingAddress); + return this; + } + + /** + * Get shippingAddress + * @return shippingAddress + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public Address getShippingAddress() { + return shippingAddress.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SHIPPING_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable
getShippingAddress_JsonNullable() { + return shippingAddress; + } + + @JsonProperty(JSON_PROPERTY_SHIPPING_ADDRESS) + public void setShippingAddress_JsonNullable(JsonNullable
shippingAddress) { + this.shippingAddress = shippingAddress; + } + + public void setShippingAddress(Address shippingAddress) { + this.shippingAddress = JsonNullable.
of(shippingAddress); + } + + + public PatchIndividualDebitCardAttributes design(String design) { + this.design = design; + return this; + } + + /** + * Get design + * @return design + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDesign() { + return design; + } + + + @JsonProperty(JSON_PROPERTY_DESIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDesign(String design) { + this.design = design; + } + + + public PatchIndividualDebitCardAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public PatchIndividualDebitCardAttributes limits(CardLevelLimits limits) { + this.limits = limits; + return this; + } + + /** + * Get limits + * @return limits + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CardLevelLimits getLimits() { + return limits; + } + + + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLimits(CardLevelLimits limits) { + this.limits = limits; + } + + + public PatchIndividualDebitCardAttributes defaultFundingAccountId(String defaultFundingAccountId) { + this.defaultFundingAccountId = defaultFundingAccountId; + return this; + } + + /** + * Get defaultFundingAccountId + * @return defaultFundingAccountId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDefaultFundingAccountId() { + return defaultFundingAccountId; + } + + + @JsonProperty(JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefaultFundingAccountId(String defaultFundingAccountId) { + this.defaultFundingAccountId = defaultFundingAccountId; + } + + + /** + * Return true if this patchIndividualDebitCard_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchIndividualDebitCardAttributes patchIndividualDebitCardAttributes = (PatchIndividualDebitCardAttributes) o; + return equalsNullable(this.shippingAddress, patchIndividualDebitCardAttributes.shippingAddress) && + Objects.equals(this.design, patchIndividualDebitCardAttributes.design) && + Objects.equals(this.tags, patchIndividualDebitCardAttributes.tags) && + Objects.equals(this.limits, patchIndividualDebitCardAttributes.limits) && + Objects.equals(this.defaultFundingAccountId, patchIndividualDebitCardAttributes.defaultFundingAccountId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(shippingAddress), design, tags, limits, defaultFundingAccountId); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchIndividualDebitCardAttributes {\n"); + sb.append(" shippingAddress: ").append(toIndentedString(shippingAddress)).append("\n"); + sb.append(" design: ").append(toIndentedString(design)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); + sb.append(" defaultFundingAccountId: ").append(toIndentedString(defaultFundingAccountId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `shippingAddress` to the URL query string + if (getShippingAddress() != null) { + joiner.add(getShippingAddress().toUrlQueryString(prefix + "shippingAddress" + suffix)); + } + + // add `design` to the URL query string + if (getDesign() != null) { + joiner.add(String.format("%sdesign%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDesign()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `limits` to the URL query string + if (getLimits() != null) { + joiner.add(getLimits().toUrlQueryString(prefix + "limits" + suffix)); + } + + // add `defaultFundingAccountId` to the URL query string + if (getDefaultFundingAccountId() != null) { + joiner.add(String.format("%sdefaultFundingAccountId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDefaultFundingAccountId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchIndividualVirtualDebitCard.java b/src/main/java/unit/java/sdk/model/PatchIndividualVirtualDebitCard.java new file mode 100644 index 00000000..7e9292ee --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchIndividualVirtualDebitCard.java @@ -0,0 +1,220 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchIndividualVirtualDebitCardAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchIndividualVirtualDebitCard + */ +@JsonPropertyOrder({ + PatchIndividualVirtualDebitCard.JSON_PROPERTY_TYPE, + PatchIndividualVirtualDebitCard.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchIndividualVirtualDebitCard { + /** + * Gets or Sets type + */ + public enum TypeEnum { + INDIVIDUALVIRTUALDEBITCARD("individualVirtualDebitCard"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchIndividualVirtualDebitCardAttributes attributes; + + public PatchIndividualVirtualDebitCard() { + } + + public PatchIndividualVirtualDebitCard type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public PatchIndividualVirtualDebitCard attributes(PatchIndividualVirtualDebitCardAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchIndividualVirtualDebitCardAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchIndividualVirtualDebitCardAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this patchIndividualVirtualDebitCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchIndividualVirtualDebitCard patchIndividualVirtualDebitCard = (PatchIndividualVirtualDebitCard) o; + return Objects.equals(this.type, patchIndividualVirtualDebitCard.type) && + Objects.equals(this.attributes, patchIndividualVirtualDebitCard.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchIndividualVirtualDebitCard {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchIndividualVirtualDebitCardAttributes.java b/src/main/java/unit/java/sdk/model/PatchIndividualVirtualDebitCardAttributes.java new file mode 100644 index 00000000..5ebb2fba --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchIndividualVirtualDebitCardAttributes.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CardLevelLimits; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchIndividualVirtualDebitCardAttributes + */ +@JsonPropertyOrder({ + PatchIndividualVirtualDebitCardAttributes.JSON_PROPERTY_TAGS, + PatchIndividualVirtualDebitCardAttributes.JSON_PROPERTY_LIMITS, + PatchIndividualVirtualDebitCardAttributes.JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchIndividualVirtualDebitCardAttributes { + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_LIMITS = "limits"; + private CardLevelLimits limits; + + public static final String JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT_ID = "defaultFundingAccountId"; + private String defaultFundingAccountId; + + public PatchIndividualVirtualDebitCardAttributes() { + } + + public PatchIndividualVirtualDebitCardAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public PatchIndividualVirtualDebitCardAttributes limits(CardLevelLimits limits) { + this.limits = limits; + return this; + } + + /** + * Get limits + * @return limits + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CardLevelLimits getLimits() { + return limits; + } + + + @JsonProperty(JSON_PROPERTY_LIMITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLimits(CardLevelLimits limits) { + this.limits = limits; + } + + + public PatchIndividualVirtualDebitCardAttributes defaultFundingAccountId(String defaultFundingAccountId) { + this.defaultFundingAccountId = defaultFundingAccountId; + return this; + } + + /** + * Get defaultFundingAccountId + * @return defaultFundingAccountId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDefaultFundingAccountId() { + return defaultFundingAccountId; + } + + + @JsonProperty(JSON_PROPERTY_DEFAULT_FUNDING_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefaultFundingAccountId(String defaultFundingAccountId) { + this.defaultFundingAccountId = defaultFundingAccountId; + } + + + /** + * Return true if this patchIndividualVirtualDebitCard_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchIndividualVirtualDebitCardAttributes patchIndividualVirtualDebitCardAttributes = (PatchIndividualVirtualDebitCardAttributes) o; + return Objects.equals(this.tags, patchIndividualVirtualDebitCardAttributes.tags) && + Objects.equals(this.limits, patchIndividualVirtualDebitCardAttributes.limits) && + Objects.equals(this.defaultFundingAccountId, patchIndividualVirtualDebitCardAttributes.defaultFundingAccountId); + } + + @Override + public int hashCode() { + return Objects.hash(tags, limits, defaultFundingAccountId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchIndividualVirtualDebitCardAttributes {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); + sb.append(" defaultFundingAccountId: ").append(toIndentedString(defaultFundingAccountId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `limits` to the URL query string + if (getLimits() != null) { + joiner.add(getLimits().toUrlQueryString(prefix + "limits" + suffix)); + } + + // add `defaultFundingAccountId` to the URL query string + if (getDefaultFundingAccountId() != null) { + joiner.add(String.format("%sdefaultFundingAccountId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDefaultFundingAccountId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchSoleProprietorApplication.java b/src/main/java/unit/java/sdk/model/PatchSoleProprietorApplication.java new file mode 100644 index 00000000..9a4969be --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchSoleProprietorApplication.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchSoleProprietorApplicationAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchSoleProprietorApplication + */ +@JsonPropertyOrder({ + PatchSoleProprietorApplication.JSON_PROPERTY_TYPE, + PatchSoleProprietorApplication.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchSoleProprietorApplication { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "individualApplication"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchSoleProprietorApplicationAttributes attributes; + + public PatchSoleProprietorApplication() { + } + + public PatchSoleProprietorApplication type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public PatchSoleProprietorApplication attributes(PatchSoleProprietorApplicationAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchSoleProprietorApplicationAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchSoleProprietorApplicationAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this patchSoleProprietorApplication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchSoleProprietorApplication patchSoleProprietorApplication = (PatchSoleProprietorApplication) o; + return Objects.equals(this.type, patchSoleProprietorApplication.type) && + Objects.equals(this.attributes, patchSoleProprietorApplication.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchSoleProprietorApplication {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchSoleProprietorApplicationAttributes.java b/src/main/java/unit/java/sdk/model/PatchSoleProprietorApplicationAttributes.java new file mode 100644 index 00000000..80792347 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchSoleProprietorApplicationAttributes.java @@ -0,0 +1,297 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BusinessVertical; +import unit.java.sdk.model.SoleProprietorshipAnnualRevenue; +import unit.java.sdk.model.SoleProprietorshipNumberOfEmployees; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchSoleProprietorApplicationAttributes + */ +@JsonPropertyOrder({ + PatchSoleProprietorApplicationAttributes.JSON_PROPERTY_TAGS, + PatchSoleProprietorApplicationAttributes.JSON_PROPERTY_ANNUAL_REVENUE, + PatchSoleProprietorApplicationAttributes.JSON_PROPERTY_NUMBER_OF_EMPLOYEES, + PatchSoleProprietorApplicationAttributes.JSON_PROPERTY_BUSINESS_VERTICAL, + PatchSoleProprietorApplicationAttributes.JSON_PROPERTY_WEBSITE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchSoleProprietorApplicationAttributes { + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_ANNUAL_REVENUE = "annualRevenue"; + private SoleProprietorshipAnnualRevenue annualRevenue; + + public static final String JSON_PROPERTY_NUMBER_OF_EMPLOYEES = "numberOfEmployees"; + private SoleProprietorshipNumberOfEmployees numberOfEmployees; + + public static final String JSON_PROPERTY_BUSINESS_VERTICAL = "businessVertical"; + private BusinessVertical businessVertical; + + public static final String JSON_PROPERTY_WEBSITE = "website"; + private String website; + + public PatchSoleProprietorApplicationAttributes() { + } + + public PatchSoleProprietorApplicationAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public PatchSoleProprietorApplicationAttributes annualRevenue(SoleProprietorshipAnnualRevenue annualRevenue) { + this.annualRevenue = annualRevenue; + return this; + } + + /** + * Get annualRevenue + * @return annualRevenue + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNUAL_REVENUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SoleProprietorshipAnnualRevenue getAnnualRevenue() { + return annualRevenue; + } + + + @JsonProperty(JSON_PROPERTY_ANNUAL_REVENUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnualRevenue(SoleProprietorshipAnnualRevenue annualRevenue) { + this.annualRevenue = annualRevenue; + } + + + public PatchSoleProprietorApplicationAttributes numberOfEmployees(SoleProprietorshipNumberOfEmployees numberOfEmployees) { + this.numberOfEmployees = numberOfEmployees; + return this; + } + + /** + * Get numberOfEmployees + * @return numberOfEmployees + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUMBER_OF_EMPLOYEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SoleProprietorshipNumberOfEmployees getNumberOfEmployees() { + return numberOfEmployees; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER_OF_EMPLOYEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumberOfEmployees(SoleProprietorshipNumberOfEmployees numberOfEmployees) { + this.numberOfEmployees = numberOfEmployees; + } + + + public PatchSoleProprietorApplicationAttributes businessVertical(BusinessVertical businessVertical) { + this.businessVertical = businessVertical; + return this; + } + + /** + * Get businessVertical + * @return businessVertical + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUSINESS_VERTICAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BusinessVertical getBusinessVertical() { + return businessVertical; + } + + + @JsonProperty(JSON_PROPERTY_BUSINESS_VERTICAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBusinessVertical(BusinessVertical businessVertical) { + this.businessVertical = businessVertical; + } + + + public PatchSoleProprietorApplicationAttributes website(String website) { + this.website = website; + return this; + } + + /** + * Get website + * @return website + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEBSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebsite() { + return website; + } + + + @JsonProperty(JSON_PROPERTY_WEBSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWebsite(String website) { + this.website = website; + } + + + /** + * Return true if this patchSoleProprietorApplication_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchSoleProprietorApplicationAttributes patchSoleProprietorApplicationAttributes = (PatchSoleProprietorApplicationAttributes) o; + return Objects.equals(this.tags, patchSoleProprietorApplicationAttributes.tags) && + Objects.equals(this.annualRevenue, patchSoleProprietorApplicationAttributes.annualRevenue) && + Objects.equals(this.numberOfEmployees, patchSoleProprietorApplicationAttributes.numberOfEmployees) && + Objects.equals(this.businessVertical, patchSoleProprietorApplicationAttributes.businessVertical) && + Objects.equals(this.website, patchSoleProprietorApplicationAttributes.website); + } + + @Override + public int hashCode() { + return Objects.hash(tags, annualRevenue, numberOfEmployees, businessVertical, website); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchSoleProprietorApplicationAttributes {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" annualRevenue: ").append(toIndentedString(annualRevenue)).append("\n"); + sb.append(" numberOfEmployees: ").append(toIndentedString(numberOfEmployees)).append("\n"); + sb.append(" businessVertical: ").append(toIndentedString(businessVertical)).append("\n"); + sb.append(" website: ").append(toIndentedString(website)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `annualRevenue` to the URL query string + if (getAnnualRevenue() != null) { + joiner.add(String.format("%sannualRevenue%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAnnualRevenue()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `numberOfEmployees` to the URL query string + if (getNumberOfEmployees() != null) { + joiner.add(String.format("%snumberOfEmployees%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNumberOfEmployees()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `businessVertical` to the URL query string + if (getBusinessVertical() != null) { + joiner.add(String.format("%sbusinessVertical%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBusinessVertical()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `website` to the URL query string + if (getWebsite() != null) { + joiner.add(String.format("%swebsite%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getWebsite()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchTransactionTags.java b/src/main/java/unit/java/sdk/model/PatchTransactionTags.java new file mode 100644 index 00000000..0391bfb2 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchTransactionTags.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchTransactionTagsAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchTransactionTags + */ +@JsonPropertyOrder({ + PatchTransactionTags.JSON_PROPERTY_TYPE, + PatchTransactionTags.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchTransactionTags { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "transaction"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchTransactionTagsAttributes attributes; + + public PatchTransactionTags() { + } + + public PatchTransactionTags type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public PatchTransactionTags attributes(PatchTransactionTagsAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchTransactionTagsAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchTransactionTagsAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this patchTransactionTags object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchTransactionTags patchTransactionTags = (PatchTransactionTags) o; + return Objects.equals(this.type, patchTransactionTags.type) && + Objects.equals(this.attributes, patchTransactionTags.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchTransactionTags {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchTransactionTagsAttributes.java b/src/main/java/unit/java/sdk/model/PatchTransactionTagsAttributes.java new file mode 100644 index 00000000..f71a137a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchTransactionTagsAttributes.java @@ -0,0 +1,150 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchTransactionTagsAttributes + */ +@JsonPropertyOrder({ + PatchTransactionTagsAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchTransactionTagsAttributes { + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public PatchTransactionTagsAttributes() { + } + + public PatchTransactionTagsAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this patchTransactionTags_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchTransactionTagsAttributes patchTransactionTagsAttributes = (PatchTransactionTagsAttributes) o; + return Objects.equals(this.tags, patchTransactionTagsAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchTransactionTagsAttributes {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchTrustApplication.java b/src/main/java/unit/java/sdk/model/PatchTrustApplication.java new file mode 100644 index 00000000..8de867ae --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchTrustApplication.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchTrustApplicationAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchTrustApplication + */ +@JsonPropertyOrder({ + PatchTrustApplication.JSON_PROPERTY_TYPE, + PatchTrustApplication.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchTrustApplication { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "trustApplication"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchTrustApplicationAttributes attributes; + + public PatchTrustApplication() { + } + + public PatchTrustApplication type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public PatchTrustApplication attributes(PatchTrustApplicationAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchTrustApplicationAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PatchTrustApplicationAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this patchTrustApplication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchTrustApplication patchTrustApplication = (PatchTrustApplication) o; + return Objects.equals(this.type, patchTrustApplication.type) && + Objects.equals(this.attributes, patchTrustApplication.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchTrustApplication {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PatchTrustApplicationAttributes.java b/src/main/java/unit/java/sdk/model/PatchTrustApplicationAttributes.java new file mode 100644 index 00000000..75732e55 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PatchTrustApplicationAttributes.java @@ -0,0 +1,150 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PatchTrustApplicationAttributes + */ +@JsonPropertyOrder({ + PatchTrustApplicationAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchTrustApplicationAttributes { + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public PatchTrustApplicationAttributes() { + } + + public PatchTrustApplicationAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this patchTrustApplication_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchTrustApplicationAttributes patchTrustApplicationAttributes = (PatchTrustApplicationAttributes) o; + return Objects.equals(this.tags, patchTrustApplicationAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchTrustApplicationAttributes {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Payment.java b/src/main/java/unit/java/sdk/model/Payment.java new file mode 100644 index 00000000..acc9b8bf --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Payment.java @@ -0,0 +1,212 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * Payment + */ +@JsonPropertyOrder({ + Payment.JSON_PROPERTY_TYPE, + Payment.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = AchPayment.class, name = "achPayment"), + @JsonSubTypes.Type(value = BillPayment.class, name = "billPayment"), + @JsonSubTypes.Type(value = BookPayment.class, name = "bookPayment"), + @JsonSubTypes.Type(value = WirePayment.class, name = "wirePayment"), +}) + +public class Payment { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public Payment() { + } + + public Payment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public Payment id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this payment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Payment payment = (Payment) o; + return Objects.equals(this.type, payment.type) && + Objects.equals(this.id, payment.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Payment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("achPayment", AchPayment.class); + mappings.put("billPayment", BillPayment.class); + mappings.put("bookPayment", BookPayment.class); + mappings.put("wirePayment", WirePayment.class); + mappings.put("payment", Payment.class); + JSON.registerDiscriminator(Payment.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/PaymentAdvanceTransaction.java b/src/main/java/unit/java/sdk/model/PaymentAdvanceTransaction.java new file mode 100644 index 00000000..64a41ca0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PaymentAdvanceTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * PaymentAdvanceTransaction + */ +@JsonPropertyOrder({ + PaymentAdvanceTransaction.JSON_PROPERTY_ATTRIBUTES, + PaymentAdvanceTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class PaymentAdvanceTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CheckDepositTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public PaymentAdvanceTransaction() { + } + + public PaymentAdvanceTransaction attributes(CheckDepositTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CheckDepositTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CheckDepositTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public PaymentAdvanceTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public PaymentAdvanceTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public PaymentAdvanceTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this PaymentAdvanceTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaymentAdvanceTransaction paymentAdvanceTransaction = (PaymentAdvanceTransaction) o; + return Objects.equals(this.attributes, paymentAdvanceTransaction.attributes) && + Objects.equals(this.relationships, paymentAdvanceTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaymentAdvanceTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("PaymentAdvanceTransaction", PaymentAdvanceTransaction.class); + JSON.registerDiscriminator(PaymentAdvanceTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/PaymentRelationship.java b/src/main/java/unit/java/sdk/model/PaymentRelationship.java new file mode 100644 index 00000000..38b63ec0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PaymentRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PaymentRelationshipData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PaymentRelationship + */ +@JsonPropertyOrder({ + PaymentRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PaymentRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private PaymentRelationshipData data; + + public PaymentRelationship() { + } + + public PaymentRelationship data(PaymentRelationshipData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PaymentRelationshipData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(PaymentRelationshipData data) { + this.data = data; + } + + + /** + * Return true if this paymentRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaymentRelationship paymentRelationship = (PaymentRelationship) o; + return Objects.equals(this.data, paymentRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaymentRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PaymentRelationshipData.java b/src/main/java/unit/java/sdk/model/PaymentRelationshipData.java new file mode 100644 index 00000000..1367b8ca --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PaymentRelationshipData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PaymentRelationshipData + */ +@JsonPropertyOrder({ + PaymentRelationshipData.JSON_PROPERTY_TYPE, + PaymentRelationshipData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PaymentRelationshipData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "payment"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public PaymentRelationshipData() { + } + + public PaymentRelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public PaymentRelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this paymentRelationship_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaymentRelationshipData paymentRelationshipData = (PaymentRelationshipData) o; + return Objects.equals(this.type, paymentRelationshipData.type) && + Objects.equals(this.id, paymentRelationshipData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaymentRelationshipData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PaymentRelationships.java b/src/main/java/unit/java/sdk/model/PaymentRelationships.java new file mode 100644 index 00000000..cc24651c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PaymentRelationships.java @@ -0,0 +1,421 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import unit.java.sdk.model.PaymentRelationshipsCustomers; +import unit.java.sdk.model.Relationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PaymentRelationships + */ +@JsonPropertyOrder({ + PaymentRelationships.JSON_PROPERTY_ACCOUNT, + PaymentRelationships.JSON_PROPERTY_CUSTOMER, + PaymentRelationships.JSON_PROPERTY_CUSTOMERS, + PaymentRelationships.JSON_PROPERTY_COUNTERPARTY, + PaymentRelationships.JSON_PROPERTY_COUNTERPARTY_ACCOUNT, + PaymentRelationships.JSON_PROPERTY_TRANSACTION, + PaymentRelationships.JSON_PROPERTY_RECURRING_PAYMENT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PaymentRelationships extends HashMap { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private Relationship account; + + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private Relationship customer; + + public static final String JSON_PROPERTY_CUSTOMERS = "customers"; + private PaymentRelationshipsCustomers customers; + + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; + private Relationship counterparty; + + public static final String JSON_PROPERTY_COUNTERPARTY_ACCOUNT = "counterpartyAccount"; + private Relationship counterpartyAccount; + + public static final String JSON_PROPERTY_TRANSACTION = "transaction"; + private Relationship transaction; + + public static final String JSON_PROPERTY_RECURRING_PAYMENT = "recurringPayment"; + private Relationship recurringPayment; + + public PaymentRelationships() { + } + + public PaymentRelationships account(Relationship account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Relationship getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccount(Relationship account) { + this.account = account; + } + + + public PaymentRelationships customer(Relationship customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Relationship getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomer(Relationship customer) { + this.customer = customer; + } + + + public PaymentRelationships customers(PaymentRelationshipsCustomers customers) { + this.customers = customers; + return this; + } + + /** + * Get customers + * @return customers + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaymentRelationshipsCustomers getCustomers() { + return customers; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomers(PaymentRelationshipsCustomers customers) { + this.customers = customers; + } + + + public PaymentRelationships counterparty(Relationship counterparty) { + this.counterparty = counterparty; + return this; + } + + /** + * Get counterparty + * @return counterparty + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Relationship getCounterparty() { + return counterparty; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterparty(Relationship counterparty) { + this.counterparty = counterparty; + } + + + public PaymentRelationships counterpartyAccount(Relationship counterpartyAccount) { + this.counterpartyAccount = counterpartyAccount; + return this; + } + + /** + * Get counterpartyAccount + * @return counterpartyAccount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Relationship getCounterpartyAccount() { + return counterpartyAccount; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterpartyAccount(Relationship counterpartyAccount) { + this.counterpartyAccount = counterpartyAccount; + } + + + public PaymentRelationships transaction(Relationship transaction) { + this.transaction = transaction; + return this; + } + + /** + * Get transaction + * @return transaction + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Relationship getTransaction() { + return transaction; + } + + + @JsonProperty(JSON_PROPERTY_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransaction(Relationship transaction) { + this.transaction = transaction; + } + + + public PaymentRelationships recurringPayment(Relationship recurringPayment) { + this.recurringPayment = recurringPayment; + return this; + } + + /** + * Get recurringPayment + * @return recurringPayment + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECURRING_PAYMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Relationship getRecurringPayment() { + return recurringPayment; + } + + + @JsonProperty(JSON_PROPERTY_RECURRING_PAYMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRecurringPayment(Relationship recurringPayment) { + this.recurringPayment = recurringPayment; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public PaymentRelationships putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this paymentRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaymentRelationships paymentRelationships = (PaymentRelationships) o; + return Objects.equals(this.account, paymentRelationships.account) && + Objects.equals(this.customer, paymentRelationships.customer) && + Objects.equals(this.customers, paymentRelationships.customers) && + Objects.equals(this.counterparty, paymentRelationships.counterparty) && + Objects.equals(this.counterpartyAccount, paymentRelationships.counterpartyAccount) && + Objects.equals(this.transaction, paymentRelationships.transaction) && + Objects.equals(this.recurringPayment, paymentRelationships.recurringPayment)&& + Objects.equals(this.additionalProperties, paymentRelationships.additionalProperties) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(account, customer, customers, counterparty, counterpartyAccount, transaction, recurringPayment, super.hashCode(), additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaymentRelationships {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" customers: ").append(toIndentedString(customers)).append("\n"); + sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); + sb.append(" counterpartyAccount: ").append(toIndentedString(counterpartyAccount)).append("\n"); + sb.append(" transaction: ").append(toIndentedString(transaction)).append("\n"); + sb.append(" recurringPayment: ").append(toIndentedString(recurringPayment)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + // add `customers` to the URL query string + if (getCustomers() != null) { + joiner.add(getCustomers().toUrlQueryString(prefix + "customers" + suffix)); + } + + // add `counterparty` to the URL query string + if (getCounterparty() != null) { + joiner.add(getCounterparty().toUrlQueryString(prefix + "counterparty" + suffix)); + } + + // add `counterpartyAccount` to the URL query string + if (getCounterpartyAccount() != null) { + joiner.add(getCounterpartyAccount().toUrlQueryString(prefix + "counterpartyAccount" + suffix)); + } + + // add `transaction` to the URL query string + if (getTransaction() != null) { + joiner.add(getTransaction().toUrlQueryString(prefix + "transaction" + suffix)); + } + + // add `recurringPayment` to the URL query string + if (getRecurringPayment() != null) { + joiner.add(getRecurringPayment().toUrlQueryString(prefix + "recurringPayment" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PaymentRelationshipsCustomers.java b/src/main/java/unit/java/sdk/model/PaymentRelationshipsCustomers.java new file mode 100644 index 00000000..e7ea1ab8 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PaymentRelationshipsCustomers.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.PaymentRelationshipsCustomersDataInner; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PaymentRelationshipsCustomers + */ +@JsonPropertyOrder({ + PaymentRelationshipsCustomers.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PaymentRelationshipsCustomers { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public PaymentRelationshipsCustomers() { + } + + public PaymentRelationshipsCustomers data(List data) { + this.data = data; + return this; + } + + public PaymentRelationshipsCustomers addDataItem(PaymentRelationshipsCustomersDataInner dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this paymentRelationships_customers object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaymentRelationshipsCustomers paymentRelationshipsCustomers = (PaymentRelationshipsCustomers) o; + return Objects.equals(this.data, paymentRelationshipsCustomers.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaymentRelationshipsCustomers {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PaymentRelationshipsCustomersDataInner.java b/src/main/java/unit/java/sdk/model/PaymentRelationshipsCustomersDataInner.java new file mode 100644 index 00000000..274c0eb0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PaymentRelationshipsCustomersDataInner.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PaymentRelationshipsCustomersDataInner + */ +@JsonPropertyOrder({ + PaymentRelationshipsCustomersDataInner.JSON_PROPERTY_ID, + PaymentRelationshipsCustomersDataInner.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PaymentRelationshipsCustomersDataInner { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "org"; + + public PaymentRelationshipsCustomersDataInner() { + } + + public PaymentRelationshipsCustomersDataInner id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public PaymentRelationshipsCustomersDataInner type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + /** + * Return true if this paymentRelationships_customers_data_inner object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaymentRelationshipsCustomersDataInner paymentRelationshipsCustomersDataInner = (PaymentRelationshipsCustomersDataInner) o; + return Objects.equals(this.id, paymentRelationshipsCustomersDataInner.id) && + Objects.equals(this.type, paymentRelationshipsCustomersDataInner.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaymentRelationshipsCustomersDataInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Phone.java b/src/main/java/unit/java/sdk/model/Phone.java new file mode 100644 index 00000000..0e9f8b7b --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Phone.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Phone + */ +@JsonPropertyOrder({ + Phone.JSON_PROPERTY_COUNTRY_CODE, + Phone.JSON_PROPERTY_NUMBER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Phone { + public static final String JSON_PROPERTY_COUNTRY_CODE = "countryCode"; + private String countryCode; + + public static final String JSON_PROPERTY_NUMBER = "number"; + private String number; + + public Phone() { + } + + public Phone countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Get countryCode + * @return countryCode + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTRY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCountryCode() { + return countryCode; + } + + + @JsonProperty(JSON_PROPERTY_COUNTRY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public Phone number(String number) { + this.number = number; + return this; + } + + /** + * Get number + * @return number + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getNumber() { + return number; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumber(String number) { + this.number = number; + } + + + /** + * Return true if this phone object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Phone phone = (Phone) o; + return Objects.equals(this.countryCode, phone.countryCode) && + Objects.equals(this.number, phone.number); + } + + @Override + public int hashCode() { + return Objects.hash(countryCode, number); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Phone {\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `countryCode` to the URL query string + if (getCountryCode() != null) { + joiner.add(String.format("%scountryCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCountryCode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `number` to the URL query string + if (getNumber() != null) { + joiner.add(String.format("%snumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PhysicalCardStatus.java b/src/main/java/unit/java/sdk/model/PhysicalCardStatus.java new file mode 100644 index 00000000..bfa5fbb4 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PhysicalCardStatus.java @@ -0,0 +1,92 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets physicalCardStatus + */ +public enum PhysicalCardStatus { + + ACTIVE("Active"), + + INACTIVE("Inactive"), + + STOLEN("Stolen"), + + LOST("Lost"), + + FROZEN("Frozen"), + + CLOSEDBYCUSTOMER("ClosedByCustomer"), + + UNKNOWN("Unknown"), + + SUSPECTEDFRAUD("SuspectedFraud"), + + ACTIVEFORONLINEUSE("ActiveForOnlineUse"); + + private String value; + + PhysicalCardStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PhysicalCardStatus fromValue(String value) { + for (PhysicalCardStatus b : PhysicalCardStatus.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } + +} + diff --git a/src/main/java/unit/java/sdk/model/PinStatus.java b/src/main/java/unit/java/sdk/model/PinStatus.java new file mode 100644 index 00000000..c758fe1c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PinStatus.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PinStatusAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PinStatus + */ +@JsonPropertyOrder({ + PinStatus.JSON_PROPERTY_TYPE, + PinStatus.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PinStatus { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PinStatusAttributes attributes; + + public PinStatus() { + } + + public PinStatus type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public PinStatus attributes(PinStatusAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PinStatusAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(PinStatusAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this pinStatus object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PinStatus pinStatus = (PinStatus) o; + return Objects.equals(this.type, pinStatus.type) && + Objects.equals(this.attributes, pinStatus.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PinStatus {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PinStatusAttributes.java b/src/main/java/unit/java/sdk/model/PinStatusAttributes.java new file mode 100644 index 00000000..283b1b0f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PinStatusAttributes.java @@ -0,0 +1,150 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PinStatusAttributes + */ +@JsonPropertyOrder({ + PinStatusAttributes.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PinStatusAttributes { + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public PinStatusAttributes() { + } + + public PinStatusAttributes status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(String status) { + this.status = status; + } + + + /** + * Return true if this pinStatus_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PinStatusAttributes pinStatusAttributes = (PinStatusAttributes) o; + return Objects.equals(this.status, pinStatusAttributes.status); + } + + @Override + public int hashCode() { + return Objects.hash(status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PinStatusAttributes {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PowerOfAttorneyAgent.java b/src/main/java/unit/java/sdk/model/PowerOfAttorneyAgent.java new file mode 100644 index 00000000..1dc81c44 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PowerOfAttorneyAgent.java @@ -0,0 +1,707 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PowerOfAttorneyAgent + */ +@JsonPropertyOrder({ + PowerOfAttorneyAgent.JSON_PROPERTY_STATUS, + PowerOfAttorneyAgent.JSON_PROPERTY_FULL_NAME, + PowerOfAttorneyAgent.JSON_PROPERTY_EMAIL, + PowerOfAttorneyAgent.JSON_PROPERTY_PHONE, + PowerOfAttorneyAgent.JSON_PROPERTY_SSN, + PowerOfAttorneyAgent.JSON_PROPERTY_PASSPORT, + PowerOfAttorneyAgent.JSON_PROPERTY_NATIONALITY, + PowerOfAttorneyAgent.JSON_PROPERTY_MATRICULA_CONSULAR, + PowerOfAttorneyAgent.JSON_PROPERTY_ADDRESS, + PowerOfAttorneyAgent.JSON_PROPERTY_DATE_OF_BIRTH, + PowerOfAttorneyAgent.JSON_PROPERTY_EVALUATION_ID, + PowerOfAttorneyAgent.JSON_PROPERTY_EVALUATION_FLAGS, + PowerOfAttorneyAgent.JSON_PROPERTY_MASKED_S_S_N, + PowerOfAttorneyAgent.JSON_PROPERTY_MASKED_PASSPORT, + PowerOfAttorneyAgent.JSON_PROPERTY_MASKED_MATRICULA_CONSULAR, + PowerOfAttorneyAgent.JSON_PROPERTY_ID_THEFT_SCORE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PowerOfAttorneyAgent { + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_SSN = "ssn"; + private String ssn; + + public static final String JSON_PROPERTY_PASSPORT = "passport"; + private String passport; + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public static final String JSON_PROPERTY_MATRICULA_CONSULAR = "matriculaConsular"; + private String matriculaConsular; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Object address; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public static final String JSON_PROPERTY_EVALUATION_ID = "evaluationId"; + private String evaluationId; + + public static final String JSON_PROPERTY_EVALUATION_FLAGS = "evaluationFlags"; + private List evaluationFlags; + + public static final String JSON_PROPERTY_MASKED_S_S_N = "maskedSSN"; + private String maskedSSN; + + public static final String JSON_PROPERTY_MASKED_PASSPORT = "maskedPassport"; + private String maskedPassport; + + public static final String JSON_PROPERTY_MASKED_MATRICULA_CONSULAR = "maskedMatriculaConsular"; + private String maskedMatriculaConsular; + + public static final String JSON_PROPERTY_ID_THEFT_SCORE = "idTheftScore"; + private Integer idTheftScore; + + public PowerOfAttorneyAgent() { + } + + public PowerOfAttorneyAgent status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(String status) { + this.status = status; + } + + + public PowerOfAttorneyAgent fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public PowerOfAttorneyAgent email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public PowerOfAttorneyAgent phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public PowerOfAttorneyAgent ssn(String ssn) { + this.ssn = ssn; + return this; + } + + /** + * Get ssn + * @return ssn + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSsn() { + return ssn; + } + + + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSsn(String ssn) { + this.ssn = ssn; + } + + + public PowerOfAttorneyAgent passport(String passport) { + this.passport = passport; + return this; + } + + /** + * Get passport + * @return passport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassport() { + return passport; + } + + + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassport(String passport) { + this.passport = passport; + } + + + public PowerOfAttorneyAgent nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * Get nationality + * @return nationality + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + public PowerOfAttorneyAgent matriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + return this; + } + + /** + * Get matriculaConsular + * @return matriculaConsular + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMatriculaConsular() { + return matriculaConsular; + } + + + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMatriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + } + + + public PowerOfAttorneyAgent address(Object address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(Object address) { + this.address = address; + } + + + public PowerOfAttorneyAgent dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + public PowerOfAttorneyAgent evaluationId(String evaluationId) { + this.evaluationId = evaluationId; + return this; + } + + /** + * Get evaluationId + * @return evaluationId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEvaluationId() { + return evaluationId; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationId(String evaluationId) { + this.evaluationId = evaluationId; + } + + + public PowerOfAttorneyAgent evaluationFlags(List evaluationFlags) { + this.evaluationFlags = evaluationFlags; + return this; + } + + public PowerOfAttorneyAgent addEvaluationFlagsItem(String evaluationFlagsItem) { + if (this.evaluationFlags == null) { + this.evaluationFlags = new ArrayList<>(); + } + this.evaluationFlags.add(evaluationFlagsItem); + return this; + } + + /** + * Get evaluationFlags + * @return evaluationFlags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_FLAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getEvaluationFlags() { + return evaluationFlags; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_FLAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationFlags(List evaluationFlags) { + this.evaluationFlags = evaluationFlags; + } + + + public PowerOfAttorneyAgent maskedSSN(String maskedSSN) { + this.maskedSSN = maskedSSN; + return this; + } + + /** + * Get maskedSSN + * @return maskedSSN + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MASKED_S_S_N) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMaskedSSN() { + return maskedSSN; + } + + + @JsonProperty(JSON_PROPERTY_MASKED_S_S_N) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaskedSSN(String maskedSSN) { + this.maskedSSN = maskedSSN; + } + + + public PowerOfAttorneyAgent maskedPassport(String maskedPassport) { + this.maskedPassport = maskedPassport; + return this; + } + + /** + * Get maskedPassport + * @return maskedPassport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MASKED_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMaskedPassport() { + return maskedPassport; + } + + + @JsonProperty(JSON_PROPERTY_MASKED_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaskedPassport(String maskedPassport) { + this.maskedPassport = maskedPassport; + } + + + public PowerOfAttorneyAgent maskedMatriculaConsular(String maskedMatriculaConsular) { + this.maskedMatriculaConsular = maskedMatriculaConsular; + return this; + } + + /** + * Get maskedMatriculaConsular + * @return maskedMatriculaConsular + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MASKED_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMaskedMatriculaConsular() { + return maskedMatriculaConsular; + } + + + @JsonProperty(JSON_PROPERTY_MASKED_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaskedMatriculaConsular(String maskedMatriculaConsular) { + this.maskedMatriculaConsular = maskedMatriculaConsular; + } + + + public PowerOfAttorneyAgent idTheftScore(Integer idTheftScore) { + this.idTheftScore = idTheftScore; + return this; + } + + /** + * Get idTheftScore + * @return idTheftScore + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID_THEFT_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getIdTheftScore() { + return idTheftScore; + } + + + @JsonProperty(JSON_PROPERTY_ID_THEFT_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdTheftScore(Integer idTheftScore) { + this.idTheftScore = idTheftScore; + } + + + /** + * Return true if this powerOfAttorneyAgent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PowerOfAttorneyAgent powerOfAttorneyAgent = (PowerOfAttorneyAgent) o; + return Objects.equals(this.status, powerOfAttorneyAgent.status) && + Objects.equals(this.fullName, powerOfAttorneyAgent.fullName) && + Objects.equals(this.email, powerOfAttorneyAgent.email) && + Objects.equals(this.phone, powerOfAttorneyAgent.phone) && + Objects.equals(this.ssn, powerOfAttorneyAgent.ssn) && + Objects.equals(this.passport, powerOfAttorneyAgent.passport) && + Objects.equals(this.nationality, powerOfAttorneyAgent.nationality) && + Objects.equals(this.matriculaConsular, powerOfAttorneyAgent.matriculaConsular) && + Objects.equals(this.address, powerOfAttorneyAgent.address) && + Objects.equals(this.dateOfBirth, powerOfAttorneyAgent.dateOfBirth) && + Objects.equals(this.evaluationId, powerOfAttorneyAgent.evaluationId) && + Objects.equals(this.evaluationFlags, powerOfAttorneyAgent.evaluationFlags) && + Objects.equals(this.maskedSSN, powerOfAttorneyAgent.maskedSSN) && + Objects.equals(this.maskedPassport, powerOfAttorneyAgent.maskedPassport) && + Objects.equals(this.maskedMatriculaConsular, powerOfAttorneyAgent.maskedMatriculaConsular) && + Objects.equals(this.idTheftScore, powerOfAttorneyAgent.idTheftScore); + } + + @Override + public int hashCode() { + return Objects.hash(status, fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth, evaluationId, evaluationFlags, maskedSSN, maskedPassport, maskedMatriculaConsular, idTheftScore); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PowerOfAttorneyAgent {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); + sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); + sb.append(" evaluationFlags: ").append(toIndentedString(evaluationFlags)).append("\n"); + sb.append(" maskedSSN: ").append(toIndentedString(maskedSSN)).append("\n"); + sb.append(" maskedPassport: ").append(toIndentedString(maskedPassport)).append("\n"); + sb.append(" maskedMatriculaConsular: ").append(toIndentedString(maskedMatriculaConsular)).append("\n"); + sb.append(" idTheftScore: ").append(toIndentedString(idTheftScore)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `ssn` to the URL query string + if (getSsn() != null) { + joiner.add(String.format("%sssn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSsn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `passport` to the URL query string + if (getPassport() != null) { + joiner.add(String.format("%spassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nationality` to the URL query string + if (getNationality() != null) { + joiner.add(String.format("%snationality%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNationality()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `matriculaConsular` to the URL query string + if (getMatriculaConsular() != null) { + joiner.add(String.format("%smatriculaConsular%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMatriculaConsular()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(String.format("%saddress%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAddress()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationId` to the URL query string + if (getEvaluationId() != null) { + joiner.add(String.format("%sevaluationId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEvaluationId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationFlags` to the URL query string + if (getEvaluationFlags() != null) { + for (int i = 0; i < getEvaluationFlags().size(); i++) { + joiner.add(String.format("%sevaluationFlags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getEvaluationFlags().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `maskedSSN` to the URL query string + if (getMaskedSSN() != null) { + joiner.add(String.format("%smaskedSSN%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMaskedSSN()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `maskedPassport` to the URL query string + if (getMaskedPassport() != null) { + joiner.add(String.format("%smaskedPassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMaskedPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `maskedMatriculaConsular` to the URL query string + if (getMaskedMatriculaConsular() != null) { + joiner.add(String.format("%smaskedMatriculaConsular%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMaskedMatriculaConsular()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `idTheftScore` to the URL query string + if (getIdTheftScore() != null) { + joiner.add(String.format("%sidTheftScore%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdTheftScore()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PurchaseAuthorizationRequest.java b/src/main/java/unit/java/sdk/model/PurchaseAuthorizationRequest.java new file mode 100644 index 00000000..78df47f6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PurchaseAuthorizationRequest.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationRequest; +import unit.java.sdk.model.AuthorizationRequestRelationships; +import unit.java.sdk.model.PurchaseAuthorizationRequestAllOfAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * PurchaseAuthorizationRequest + */ +@JsonPropertyOrder({ + PurchaseAuthorizationRequest.JSON_PROPERTY_ATTRIBUTES, + PurchaseAuthorizationRequest.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class PurchaseAuthorizationRequest extends AuthorizationRequest { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PurchaseAuthorizationRequestAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private AuthorizationRequestRelationships relationships; + + public PurchaseAuthorizationRequest() { + } + + public PurchaseAuthorizationRequest attributes(PurchaseAuthorizationRequestAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PurchaseAuthorizationRequestAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(PurchaseAuthorizationRequestAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public PurchaseAuthorizationRequest relationships(AuthorizationRequestRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AuthorizationRequestRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(AuthorizationRequestRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public PurchaseAuthorizationRequest type(String type) { + this.setType(type); + return this; + } + + @Override + public PurchaseAuthorizationRequest id(String id) { + this.setId(id); + return this; + } + + /** + * Return true if this PurchaseAuthorizationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PurchaseAuthorizationRequest purchaseAuthorizationRequest = (PurchaseAuthorizationRequest) o; + return Objects.equals(this.attributes, purchaseAuthorizationRequest.attributes) && + Objects.equals(this.relationships, purchaseAuthorizationRequest.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PurchaseAuthorizationRequest {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("PurchaseAuthorizationRequest", PurchaseAuthorizationRequest.class); + JSON.registerDiscriminator(PurchaseAuthorizationRequest.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/PurchaseAuthorizationRequestAllOfAttributes.java b/src/main/java/unit/java/sdk/model/PurchaseAuthorizationRequestAllOfAttributes.java new file mode 100644 index 00000000..b3bab8ec --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PurchaseAuthorizationRequestAllOfAttributes.java @@ -0,0 +1,730 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.CardVerificationData; +import unit.java.sdk.model.HealthcareAmounts; +import unit.java.sdk.model.Merchant; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PurchaseAuthorizationRequestAllOfAttributes + */ +@JsonPropertyOrder({ + PurchaseAuthorizationRequestAllOfAttributes.JSON_PROPERTY_CREATED_AT, + PurchaseAuthorizationRequestAllOfAttributes.JSON_PROPERTY_AMOUNT, + PurchaseAuthorizationRequestAllOfAttributes.JSON_PROPERTY_STATUS, + PurchaseAuthorizationRequestAllOfAttributes.JSON_PROPERTY_PARTIAL_APPROVAL_ALLOWED, + PurchaseAuthorizationRequestAllOfAttributes.JSON_PROPERTY_APPROVED_AMOUNT, + PurchaseAuthorizationRequestAllOfAttributes.JSON_PROPERTY_DECLINE_REASON, + PurchaseAuthorizationRequestAllOfAttributes.JSON_PROPERTY_MERCHANT, + PurchaseAuthorizationRequestAllOfAttributes.JSON_PROPERTY_RECURRING, + PurchaseAuthorizationRequestAllOfAttributes.JSON_PROPERTY_TAGS, + PurchaseAuthorizationRequestAllOfAttributes.JSON_PROPERTY_HEALTHCARE_AMOUNTS, + PurchaseAuthorizationRequestAllOfAttributes.JSON_PROPERTY_PAYMENT_METHOD, + PurchaseAuthorizationRequestAllOfAttributes.JSON_PROPERTY_DIGITAL_WALLET, + PurchaseAuthorizationRequestAllOfAttributes.JSON_PROPERTY_CARD_VERIFICATION_DATA, + PurchaseAuthorizationRequestAllOfAttributes.JSON_PROPERTY_ECOMMERCE, + PurchaseAuthorizationRequestAllOfAttributes.JSON_PROPERTY_CARD_PRESENT, + PurchaseAuthorizationRequestAllOfAttributes.JSON_PROPERTY_CARD_NETWORK, + PurchaseAuthorizationRequestAllOfAttributes.JSON_PROPERTY_CASH_WITHDRAWAL_AMOUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PurchaseAuthorizationRequestAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_PARTIAL_APPROVAL_ALLOWED = "partialApprovalAllowed"; + private Boolean partialApprovalAllowed; + + public static final String JSON_PROPERTY_APPROVED_AMOUNT = "approvedAmount"; + private Integer approvedAmount; + + public static final String JSON_PROPERTY_DECLINE_REASON = "declineReason"; + private String declineReason; + + public static final String JSON_PROPERTY_MERCHANT = "merchant"; + private Merchant merchant; + + public static final String JSON_PROPERTY_RECURRING = "recurring"; + private Boolean recurring; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_HEALTHCARE_AMOUNTS = "healthcareAmounts"; + private HealthcareAmounts healthcareAmounts; + + public static final String JSON_PROPERTY_PAYMENT_METHOD = "paymentMethod"; + private String paymentMethod; + + public static final String JSON_PROPERTY_DIGITAL_WALLET = "digitalWallet"; + private String digitalWallet; + + public static final String JSON_PROPERTY_CARD_VERIFICATION_DATA = "cardVerificationData"; + private CardVerificationData cardVerificationData; + + public static final String JSON_PROPERTY_ECOMMERCE = "ecommerce"; + private Boolean ecommerce; + + public static final String JSON_PROPERTY_CARD_PRESENT = "cardPresent"; + private Boolean cardPresent; + + public static final String JSON_PROPERTY_CARD_NETWORK = "cardNetwork"; + private String cardNetwork; + + public static final String JSON_PROPERTY_CASH_WITHDRAWAL_AMOUNT = "cashWithdrawalAmount"; + private Integer cashWithdrawalAmount; + + public PurchaseAuthorizationRequestAllOfAttributes() { + } + + public PurchaseAuthorizationRequestAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public PurchaseAuthorizationRequestAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public PurchaseAuthorizationRequestAllOfAttributes status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(String status) { + this.status = status; + } + + + public PurchaseAuthorizationRequestAllOfAttributes partialApprovalAllowed(Boolean partialApprovalAllowed) { + this.partialApprovalAllowed = partialApprovalAllowed; + return this; + } + + /** + * Get partialApprovalAllowed + * @return partialApprovalAllowed + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARTIAL_APPROVAL_ALLOWED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getPartialApprovalAllowed() { + return partialApprovalAllowed; + } + + + @JsonProperty(JSON_PROPERTY_PARTIAL_APPROVAL_ALLOWED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPartialApprovalAllowed(Boolean partialApprovalAllowed) { + this.partialApprovalAllowed = partialApprovalAllowed; + } + + + public PurchaseAuthorizationRequestAllOfAttributes approvedAmount(Integer approvedAmount) { + this.approvedAmount = approvedAmount; + return this; + } + + /** + * Get approvedAmount + * @return approvedAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPROVED_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getApprovedAmount() { + return approvedAmount; + } + + + @JsonProperty(JSON_PROPERTY_APPROVED_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setApprovedAmount(Integer approvedAmount) { + this.approvedAmount = approvedAmount; + } + + + public PurchaseAuthorizationRequestAllOfAttributes declineReason(String declineReason) { + this.declineReason = declineReason; + return this; + } + + /** + * Get declineReason + * @return declineReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECLINE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDeclineReason() { + return declineReason; + } + + + @JsonProperty(JSON_PROPERTY_DECLINE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeclineReason(String declineReason) { + this.declineReason = declineReason; + } + + + public PurchaseAuthorizationRequestAllOfAttributes merchant(Merchant merchant) { + this.merchant = merchant; + return this; + } + + /** + * Get merchant + * @return merchant + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MERCHANT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Merchant getMerchant() { + return merchant; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMerchant(Merchant merchant) { + this.merchant = merchant; + } + + + public PurchaseAuthorizationRequestAllOfAttributes recurring(Boolean recurring) { + this.recurring = recurring; + return this; + } + + /** + * Get recurring + * @return recurring + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECURRING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getRecurring() { + return recurring; + } + + + @JsonProperty(JSON_PROPERTY_RECURRING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRecurring(Boolean recurring) { + this.recurring = recurring; + } + + + public PurchaseAuthorizationRequestAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public PurchaseAuthorizationRequestAllOfAttributes healthcareAmounts(HealthcareAmounts healthcareAmounts) { + this.healthcareAmounts = healthcareAmounts; + return this; + } + + /** + * Get healthcareAmounts + * @return healthcareAmounts + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HEALTHCARE_AMOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public HealthcareAmounts getHealthcareAmounts() { + return healthcareAmounts; + } + + + @JsonProperty(JSON_PROPERTY_HEALTHCARE_AMOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHealthcareAmounts(HealthcareAmounts healthcareAmounts) { + this.healthcareAmounts = healthcareAmounts; + } + + + public PurchaseAuthorizationRequestAllOfAttributes paymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + + /** + * Get paymentMethod + * @return paymentMethod + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYMENT_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPaymentMethod() { + return paymentMethod; + } + + + @JsonProperty(JSON_PROPERTY_PAYMENT_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + } + + + public PurchaseAuthorizationRequestAllOfAttributes digitalWallet(String digitalWallet) { + this.digitalWallet = digitalWallet; + return this; + } + + /** + * Get digitalWallet + * @return digitalWallet + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DIGITAL_WALLET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDigitalWallet() { + return digitalWallet; + } + + + @JsonProperty(JSON_PROPERTY_DIGITAL_WALLET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDigitalWallet(String digitalWallet) { + this.digitalWallet = digitalWallet; + } + + + public PurchaseAuthorizationRequestAllOfAttributes cardVerificationData(CardVerificationData cardVerificationData) { + this.cardVerificationData = cardVerificationData; + return this; + } + + /** + * Get cardVerificationData + * @return cardVerificationData + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_VERIFICATION_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CardVerificationData getCardVerificationData() { + return cardVerificationData; + } + + + @JsonProperty(JSON_PROPERTY_CARD_VERIFICATION_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardVerificationData(CardVerificationData cardVerificationData) { + this.cardVerificationData = cardVerificationData; + } + + + public PurchaseAuthorizationRequestAllOfAttributes ecommerce(Boolean ecommerce) { + this.ecommerce = ecommerce; + return this; + } + + /** + * Get ecommerce + * @return ecommerce + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ECOMMERCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getEcommerce() { + return ecommerce; + } + + + @JsonProperty(JSON_PROPERTY_ECOMMERCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEcommerce(Boolean ecommerce) { + this.ecommerce = ecommerce; + } + + + public PurchaseAuthorizationRequestAllOfAttributes cardPresent(Boolean cardPresent) { + this.cardPresent = cardPresent; + return this; + } + + /** + * Get cardPresent + * @return cardPresent + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_PRESENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getCardPresent() { + return cardPresent; + } + + + @JsonProperty(JSON_PROPERTY_CARD_PRESENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardPresent(Boolean cardPresent) { + this.cardPresent = cardPresent; + } + + + public PurchaseAuthorizationRequestAllOfAttributes cardNetwork(String cardNetwork) { + this.cardNetwork = cardNetwork; + return this; + } + + /** + * Get cardNetwork + * @return cardNetwork + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_NETWORK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCardNetwork() { + return cardNetwork; + } + + + @JsonProperty(JSON_PROPERTY_CARD_NETWORK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardNetwork(String cardNetwork) { + this.cardNetwork = cardNetwork; + } + + + public PurchaseAuthorizationRequestAllOfAttributes cashWithdrawalAmount(Integer cashWithdrawalAmount) { + this.cashWithdrawalAmount = cashWithdrawalAmount; + return this; + } + + /** + * Get cashWithdrawalAmount + * @return cashWithdrawalAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CASH_WITHDRAWAL_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getCashWithdrawalAmount() { + return cashWithdrawalAmount; + } + + + @JsonProperty(JSON_PROPERTY_CASH_WITHDRAWAL_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCashWithdrawalAmount(Integer cashWithdrawalAmount) { + this.cashWithdrawalAmount = cashWithdrawalAmount; + } + + + /** + * Return true if this PurchaseAuthorizationRequest_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PurchaseAuthorizationRequestAllOfAttributes purchaseAuthorizationRequestAllOfAttributes = (PurchaseAuthorizationRequestAllOfAttributes) o; + return Objects.equals(this.createdAt, purchaseAuthorizationRequestAllOfAttributes.createdAt) && + Objects.equals(this.amount, purchaseAuthorizationRequestAllOfAttributes.amount) && + Objects.equals(this.status, purchaseAuthorizationRequestAllOfAttributes.status) && + Objects.equals(this.partialApprovalAllowed, purchaseAuthorizationRequestAllOfAttributes.partialApprovalAllowed) && + Objects.equals(this.approvedAmount, purchaseAuthorizationRequestAllOfAttributes.approvedAmount) && + Objects.equals(this.declineReason, purchaseAuthorizationRequestAllOfAttributes.declineReason) && + Objects.equals(this.merchant, purchaseAuthorizationRequestAllOfAttributes.merchant) && + Objects.equals(this.recurring, purchaseAuthorizationRequestAllOfAttributes.recurring) && + Objects.equals(this.tags, purchaseAuthorizationRequestAllOfAttributes.tags) && + Objects.equals(this.healthcareAmounts, purchaseAuthorizationRequestAllOfAttributes.healthcareAmounts) && + Objects.equals(this.paymentMethod, purchaseAuthorizationRequestAllOfAttributes.paymentMethod) && + Objects.equals(this.digitalWallet, purchaseAuthorizationRequestAllOfAttributes.digitalWallet) && + Objects.equals(this.cardVerificationData, purchaseAuthorizationRequestAllOfAttributes.cardVerificationData) && + Objects.equals(this.ecommerce, purchaseAuthorizationRequestAllOfAttributes.ecommerce) && + Objects.equals(this.cardPresent, purchaseAuthorizationRequestAllOfAttributes.cardPresent) && + Objects.equals(this.cardNetwork, purchaseAuthorizationRequestAllOfAttributes.cardNetwork) && + Objects.equals(this.cashWithdrawalAmount, purchaseAuthorizationRequestAllOfAttributes.cashWithdrawalAmount); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, amount, status, partialApprovalAllowed, approvedAmount, declineReason, merchant, recurring, tags, healthcareAmounts, paymentMethod, digitalWallet, cardVerificationData, ecommerce, cardPresent, cardNetwork, cashWithdrawalAmount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PurchaseAuthorizationRequestAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" partialApprovalAllowed: ").append(toIndentedString(partialApprovalAllowed)).append("\n"); + sb.append(" approvedAmount: ").append(toIndentedString(approvedAmount)).append("\n"); + sb.append(" declineReason: ").append(toIndentedString(declineReason)).append("\n"); + sb.append(" merchant: ").append(toIndentedString(merchant)).append("\n"); + sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" healthcareAmounts: ").append(toIndentedString(healthcareAmounts)).append("\n"); + sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n"); + sb.append(" digitalWallet: ").append(toIndentedString(digitalWallet)).append("\n"); + sb.append(" cardVerificationData: ").append(toIndentedString(cardVerificationData)).append("\n"); + sb.append(" ecommerce: ").append(toIndentedString(ecommerce)).append("\n"); + sb.append(" cardPresent: ").append(toIndentedString(cardPresent)).append("\n"); + sb.append(" cardNetwork: ").append(toIndentedString(cardNetwork)).append("\n"); + sb.append(" cashWithdrawalAmount: ").append(toIndentedString(cashWithdrawalAmount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `partialApprovalAllowed` to the URL query string + if (getPartialApprovalAllowed() != null) { + joiner.add(String.format("%spartialApprovalAllowed%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPartialApprovalAllowed()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `approvedAmount` to the URL query string + if (getApprovedAmount() != null) { + joiner.add(String.format("%sapprovedAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getApprovedAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `declineReason` to the URL query string + if (getDeclineReason() != null) { + joiner.add(String.format("%sdeclineReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDeclineReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `merchant` to the URL query string + if (getMerchant() != null) { + joiner.add(getMerchant().toUrlQueryString(prefix + "merchant" + suffix)); + } + + // add `recurring` to the URL query string + if (getRecurring() != null) { + joiner.add(String.format("%srecurring%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRecurring()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `healthcareAmounts` to the URL query string + if (getHealthcareAmounts() != null) { + joiner.add(getHealthcareAmounts().toUrlQueryString(prefix + "healthcareAmounts" + suffix)); + } + + // add `paymentMethod` to the URL query string + if (getPaymentMethod() != null) { + joiner.add(String.format("%spaymentMethod%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPaymentMethod()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `digitalWallet` to the URL query string + if (getDigitalWallet() != null) { + joiner.add(String.format("%sdigitalWallet%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDigitalWallet()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardVerificationData` to the URL query string + if (getCardVerificationData() != null) { + joiner.add(getCardVerificationData().toUrlQueryString(prefix + "cardVerificationData" + suffix)); + } + + // add `ecommerce` to the URL query string + if (getEcommerce() != null) { + joiner.add(String.format("%secommerce%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEcommerce()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardPresent` to the URL query string + if (getCardPresent() != null) { + joiner.add(String.format("%scardPresent%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardPresent()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardNetwork` to the URL query string + if (getCardNetwork() != null) { + joiner.add(String.format("%scardNetwork%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardNetwork()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cashWithdrawalAmount` to the URL query string + if (getCashWithdrawalAmount() != null) { + joiner.add(String.format("%scashWithdrawalAmount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCashWithdrawalAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/PurchaseTransaction.java b/src/main/java/unit/java/sdk/model/PurchaseTransaction.java new file mode 100644 index 00000000..f4c65171 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PurchaseTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PurchaseTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * PurchaseTransaction + */ +@JsonPropertyOrder({ + PurchaseTransaction.JSON_PROPERTY_ATTRIBUTES, + PurchaseTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class PurchaseTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PurchaseTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public PurchaseTransaction() { + } + + public PurchaseTransaction attributes(PurchaseTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PurchaseTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(PurchaseTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public PurchaseTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public PurchaseTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public PurchaseTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this PurchaseTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PurchaseTransaction purchaseTransaction = (PurchaseTransaction) o; + return Objects.equals(this.attributes, purchaseTransaction.attributes) && + Objects.equals(this.relationships, purchaseTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PurchaseTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("PurchaseTransaction", PurchaseTransaction.class); + JSON.registerDiscriminator(PurchaseTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/PurchaseTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/PurchaseTransactionAllOfAttributes.java new file mode 100644 index 00000000..e1ec0e56 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/PurchaseTransactionAllOfAttributes.java @@ -0,0 +1,868 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.CardVerificationData; +import unit.java.sdk.model.Coordinates; +import unit.java.sdk.model.Merchant; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * PurchaseTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_CARD_LAST4_DIGITS, + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_MERCHANT, + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_COORDINATES, + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_RECURRING, + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_TAGS, + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_NETWORK_TRANSACTION_ID, + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_INTERCHANGE, + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_ECOMMERCE, + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_CARD_PRESENT, + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE, + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_PAYMENT_METHOD, + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_DIGITAL_WALLET, + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_CARD_VERIFICATION_DATA, + PurchaseTransactionAllOfAttributes.JSON_PROPERTY_CARD_NETWORK +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PurchaseTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_CARD_LAST4_DIGITS = "cardLast4Digits"; + private String cardLast4Digits; + + public static final String JSON_PROPERTY_MERCHANT = "merchant"; + private Merchant merchant; + + public static final String JSON_PROPERTY_COORDINATES = "coordinates"; + private Coordinates coordinates; + + public static final String JSON_PROPERTY_RECURRING = "recurring"; + private Boolean recurring; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_NETWORK_TRANSACTION_ID = "networkTransactionId"; + private String networkTransactionId; + + public static final String JSON_PROPERTY_INTERCHANGE = "interchange"; + private JsonNullable interchange = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ECOMMERCE = "ecommerce"; + private Boolean ecommerce; + + public static final String JSON_PROPERTY_CARD_PRESENT = "cardPresent"; + private Boolean cardPresent; + + public static final String JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE = "internationalServiceFee"; + private JsonNullable internationalServiceFee = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PAYMENT_METHOD = "paymentMethod"; + private String paymentMethod; + + public static final String JSON_PROPERTY_DIGITAL_WALLET = "digitalWallet"; + private String digitalWallet; + + public static final String JSON_PROPERTY_CARD_VERIFICATION_DATA = "cardVerificationData"; + private CardVerificationData cardVerificationData; + + public static final String JSON_PROPERTY_CARD_NETWORK = "cardNetwork"; + private String cardNetwork; + + public PurchaseTransactionAllOfAttributes() { + } + + public PurchaseTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public PurchaseTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public PurchaseTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public PurchaseTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public PurchaseTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public PurchaseTransactionAllOfAttributes cardLast4Digits(String cardLast4Digits) { + this.cardLast4Digits = cardLast4Digits; + return this; + } + + /** + * Get cardLast4Digits + * @return cardLast4Digits + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CARD_LAST4_DIGITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCardLast4Digits() { + return cardLast4Digits; + } + + + @JsonProperty(JSON_PROPERTY_CARD_LAST4_DIGITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCardLast4Digits(String cardLast4Digits) { + this.cardLast4Digits = cardLast4Digits; + } + + + public PurchaseTransactionAllOfAttributes merchant(Merchant merchant) { + this.merchant = merchant; + return this; + } + + /** + * Get merchant + * @return merchant + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MERCHANT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Merchant getMerchant() { + return merchant; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMerchant(Merchant merchant) { + this.merchant = merchant; + } + + + public PurchaseTransactionAllOfAttributes coordinates(Coordinates coordinates) { + this.coordinates = coordinates; + return this; + } + + /** + * Get coordinates + * @return coordinates + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COORDINATES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Coordinates getCoordinates() { + return coordinates; + } + + + @JsonProperty(JSON_PROPERTY_COORDINATES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCoordinates(Coordinates coordinates) { + this.coordinates = coordinates; + } + + + public PurchaseTransactionAllOfAttributes recurring(Boolean recurring) { + this.recurring = recurring; + return this; + } + + /** + * Get recurring + * @return recurring + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECURRING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getRecurring() { + return recurring; + } + + + @JsonProperty(JSON_PROPERTY_RECURRING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRecurring(Boolean recurring) { + this.recurring = recurring; + } + + + public PurchaseTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public PurchaseTransactionAllOfAttributes networkTransactionId(String networkTransactionId) { + this.networkTransactionId = networkTransactionId; + return this; + } + + /** + * Get networkTransactionId + * @return networkTransactionId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNetworkTransactionId() { + return networkTransactionId; + } + + + @JsonProperty(JSON_PROPERTY_NETWORK_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNetworkTransactionId(String networkTransactionId) { + this.networkTransactionId = networkTransactionId; + } + + + public PurchaseTransactionAllOfAttributes interchange(String interchange) { + this.interchange = JsonNullable.of(interchange); + return this; + } + + /** + * Get interchange + * @return interchange + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getInterchange() { + return interchange.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTERCHANGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getInterchange_JsonNullable() { + return interchange; + } + + @JsonProperty(JSON_PROPERTY_INTERCHANGE) + public void setInterchange_JsonNullable(JsonNullable interchange) { + this.interchange = interchange; + } + + public void setInterchange(String interchange) { + this.interchange = JsonNullable.of(interchange); + } + + + public PurchaseTransactionAllOfAttributes ecommerce(Boolean ecommerce) { + this.ecommerce = ecommerce; + return this; + } + + /** + * Get ecommerce + * @return ecommerce + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ECOMMERCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getEcommerce() { + return ecommerce; + } + + + @JsonProperty(JSON_PROPERTY_ECOMMERCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEcommerce(Boolean ecommerce) { + this.ecommerce = ecommerce; + } + + + public PurchaseTransactionAllOfAttributes cardPresent(Boolean cardPresent) { + this.cardPresent = cardPresent; + return this; + } + + /** + * Get cardPresent + * @return cardPresent + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CARD_PRESENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getCardPresent() { + return cardPresent; + } + + + @JsonProperty(JSON_PROPERTY_CARD_PRESENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCardPresent(Boolean cardPresent) { + this.cardPresent = cardPresent; + } + + + public PurchaseTransactionAllOfAttributes internationalServiceFee(Integer internationalServiceFee) { + this.internationalServiceFee = JsonNullable.of(internationalServiceFee); + return this; + } + + /** + * Get internationalServiceFee + * @return internationalServiceFee + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public Integer getInternationalServiceFee() { + return internationalServiceFee.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getInternationalServiceFee_JsonNullable() { + return internationalServiceFee; + } + + @JsonProperty(JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE) + public void setInternationalServiceFee_JsonNullable(JsonNullable internationalServiceFee) { + this.internationalServiceFee = internationalServiceFee; + } + + public void setInternationalServiceFee(Integer internationalServiceFee) { + this.internationalServiceFee = JsonNullable.of(internationalServiceFee); + } + + + public PurchaseTransactionAllOfAttributes paymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + + /** + * Get paymentMethod + * @return paymentMethod + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYMENT_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPaymentMethod() { + return paymentMethod; + } + + + @JsonProperty(JSON_PROPERTY_PAYMENT_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + } + + + public PurchaseTransactionAllOfAttributes digitalWallet(String digitalWallet) { + this.digitalWallet = digitalWallet; + return this; + } + + /** + * Get digitalWallet + * @return digitalWallet + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DIGITAL_WALLET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDigitalWallet() { + return digitalWallet; + } + + + @JsonProperty(JSON_PROPERTY_DIGITAL_WALLET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDigitalWallet(String digitalWallet) { + this.digitalWallet = digitalWallet; + } + + + public PurchaseTransactionAllOfAttributes cardVerificationData(CardVerificationData cardVerificationData) { + this.cardVerificationData = cardVerificationData; + return this; + } + + /** + * Get cardVerificationData + * @return cardVerificationData + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_VERIFICATION_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CardVerificationData getCardVerificationData() { + return cardVerificationData; + } + + + @JsonProperty(JSON_PROPERTY_CARD_VERIFICATION_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardVerificationData(CardVerificationData cardVerificationData) { + this.cardVerificationData = cardVerificationData; + } + + + public PurchaseTransactionAllOfAttributes cardNetwork(String cardNetwork) { + this.cardNetwork = cardNetwork; + return this; + } + + /** + * Get cardNetwork + * @return cardNetwork + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD_NETWORK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCardNetwork() { + return cardNetwork; + } + + + @JsonProperty(JSON_PROPERTY_CARD_NETWORK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardNetwork(String cardNetwork) { + this.cardNetwork = cardNetwork; + } + + + /** + * Return true if this PurchaseTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PurchaseTransactionAllOfAttributes purchaseTransactionAllOfAttributes = (PurchaseTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, purchaseTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, purchaseTransactionAllOfAttributes.direction) && + Objects.equals(this.amount, purchaseTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, purchaseTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, purchaseTransactionAllOfAttributes.summary) && + Objects.equals(this.cardLast4Digits, purchaseTransactionAllOfAttributes.cardLast4Digits) && + Objects.equals(this.merchant, purchaseTransactionAllOfAttributes.merchant) && + Objects.equals(this.coordinates, purchaseTransactionAllOfAttributes.coordinates) && + Objects.equals(this.recurring, purchaseTransactionAllOfAttributes.recurring) && + Objects.equals(this.tags, purchaseTransactionAllOfAttributes.tags) && + Objects.equals(this.networkTransactionId, purchaseTransactionAllOfAttributes.networkTransactionId) && + equalsNullable(this.interchange, purchaseTransactionAllOfAttributes.interchange) && + Objects.equals(this.ecommerce, purchaseTransactionAllOfAttributes.ecommerce) && + Objects.equals(this.cardPresent, purchaseTransactionAllOfAttributes.cardPresent) && + equalsNullable(this.internationalServiceFee, purchaseTransactionAllOfAttributes.internationalServiceFee) && + Objects.equals(this.paymentMethod, purchaseTransactionAllOfAttributes.paymentMethod) && + Objects.equals(this.digitalWallet, purchaseTransactionAllOfAttributes.digitalWallet) && + Objects.equals(this.cardVerificationData, purchaseTransactionAllOfAttributes.cardVerificationData) && + Objects.equals(this.cardNetwork, purchaseTransactionAllOfAttributes.cardNetwork); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, amount, balance, summary, cardLast4Digits, merchant, coordinates, recurring, tags, networkTransactionId, hashCodeNullable(interchange), ecommerce, cardPresent, hashCodeNullable(internationalServiceFee), paymentMethod, digitalWallet, cardVerificationData, cardNetwork); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PurchaseTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" cardLast4Digits: ").append(toIndentedString(cardLast4Digits)).append("\n"); + sb.append(" merchant: ").append(toIndentedString(merchant)).append("\n"); + sb.append(" coordinates: ").append(toIndentedString(coordinates)).append("\n"); + sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" networkTransactionId: ").append(toIndentedString(networkTransactionId)).append("\n"); + sb.append(" interchange: ").append(toIndentedString(interchange)).append("\n"); + sb.append(" ecommerce: ").append(toIndentedString(ecommerce)).append("\n"); + sb.append(" cardPresent: ").append(toIndentedString(cardPresent)).append("\n"); + sb.append(" internationalServiceFee: ").append(toIndentedString(internationalServiceFee)).append("\n"); + sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n"); + sb.append(" digitalWallet: ").append(toIndentedString(digitalWallet)).append("\n"); + sb.append(" cardVerificationData: ").append(toIndentedString(cardVerificationData)).append("\n"); + sb.append(" cardNetwork: ").append(toIndentedString(cardNetwork)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardLast4Digits` to the URL query string + if (getCardLast4Digits() != null) { + joiner.add(String.format("%scardLast4Digits%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardLast4Digits()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `merchant` to the URL query string + if (getMerchant() != null) { + joiner.add(getMerchant().toUrlQueryString(prefix + "merchant" + suffix)); + } + + // add `coordinates` to the URL query string + if (getCoordinates() != null) { + joiner.add(getCoordinates().toUrlQueryString(prefix + "coordinates" + suffix)); + } + + // add `recurring` to the URL query string + if (getRecurring() != null) { + joiner.add(String.format("%srecurring%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRecurring()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `networkTransactionId` to the URL query string + if (getNetworkTransactionId() != null) { + joiner.add(String.format("%snetworkTransactionId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNetworkTransactionId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `interchange` to the URL query string + if (getInterchange() != null) { + joiner.add(String.format("%sinterchange%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getInterchange()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ecommerce` to the URL query string + if (getEcommerce() != null) { + joiner.add(String.format("%secommerce%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEcommerce()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardPresent` to the URL query string + if (getCardPresent() != null) { + joiner.add(String.format("%scardPresent%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardPresent()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `internationalServiceFee` to the URL query string + if (getInternationalServiceFee() != null) { + joiner.add(String.format("%sinternationalServiceFee%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getInternationalServiceFee()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `paymentMethod` to the URL query string + if (getPaymentMethod() != null) { + joiner.add(String.format("%spaymentMethod%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPaymentMethod()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `digitalWallet` to the URL query string + if (getDigitalWallet() != null) { + joiner.add(String.format("%sdigitalWallet%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDigitalWallet()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardVerificationData` to the URL query string + if (getCardVerificationData() != null) { + joiner.add(getCardVerificationData().toUrlQueryString(prefix + "cardVerificationData" + suffix)); + } + + // add `cardNetwork` to the URL query string + if (getCardNetwork() != null) { + joiner.add(String.format("%scardNetwork%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardNetwork()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReceivedAchTransaction.java b/src/main/java/unit/java/sdk/model/ReceivedAchTransaction.java new file mode 100644 index 00000000..e242878f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReceivedAchTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedAchTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * ReceivedAchTransaction + */ +@JsonPropertyOrder({ + ReceivedAchTransaction.JSON_PROPERTY_ATTRIBUTES, + ReceivedAchTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class ReceivedAchTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ReceivedAchTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public ReceivedAchTransaction() { + } + + public ReceivedAchTransaction attributes(ReceivedAchTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ReceivedAchTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(ReceivedAchTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public ReceivedAchTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public ReceivedAchTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public ReceivedAchTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this ReceivedAchTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReceivedAchTransaction receivedAchTransaction = (ReceivedAchTransaction) o; + return Objects.equals(this.attributes, receivedAchTransaction.attributes) && + Objects.equals(this.relationships, receivedAchTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReceivedAchTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ReceivedAchTransaction", ReceivedAchTransaction.class); + JSON.registerDiscriminator(ReceivedAchTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/ReceivedAchTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/ReceivedAchTransactionAllOfAttributes.java new file mode 100644 index 00000000..fd7c0e71 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReceivedAchTransactionAllOfAttributes.java @@ -0,0 +1,618 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReceivedAchTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + ReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + ReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + ReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + ReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + ReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + ReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_DESCRIPTION, + ReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_ADDENDA, + ReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_COMPANY_NAME, + ReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_COUNTERPARTY_NAME, + ReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER, + ReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_TRACE_NUMBER, + ReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_SEC_CODE, + ReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReceivedAchTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ADDENDA = "addenda"; + private String addenda; + + public static final String JSON_PROPERTY_COMPANY_NAME = "companyName"; + private String companyName; + + public static final String JSON_PROPERTY_COUNTERPARTY_NAME = "counterpartyName"; + private String counterpartyName; + + public static final String JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER = "counterpartyRoutingNumber"; + private String counterpartyRoutingNumber; + + public static final String JSON_PROPERTY_TRACE_NUMBER = "traceNumber"; + private String traceNumber; + + public static final String JSON_PROPERTY_SEC_CODE = "secCode"; + private String secCode; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public ReceivedAchTransactionAllOfAttributes() { + } + + public ReceivedAchTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public ReceivedAchTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public ReceivedAchTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public ReceivedAchTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public ReceivedAchTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public ReceivedAchTransactionAllOfAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public ReceivedAchTransactionAllOfAttributes addenda(String addenda) { + this.addenda = addenda; + return this; + } + + /** + * Get addenda + * @return addenda + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAddenda() { + return addenda; + } + + + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddenda(String addenda) { + this.addenda = addenda; + } + + + public ReceivedAchTransactionAllOfAttributes companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * Get companyName + * @return companyName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPANY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCompanyName() { + return companyName; + } + + + @JsonProperty(JSON_PROPERTY_COMPANY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public ReceivedAchTransactionAllOfAttributes counterpartyName(String counterpartyName) { + this.counterpartyName = counterpartyName; + return this; + } + + /** + * Get counterpartyName + * @return counterpartyName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCounterpartyName() { + return counterpartyName; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterpartyName(String counterpartyName) { + this.counterpartyName = counterpartyName; + } + + + public ReceivedAchTransactionAllOfAttributes counterpartyRoutingNumber(String counterpartyRoutingNumber) { + this.counterpartyRoutingNumber = counterpartyRoutingNumber; + return this; + } + + /** + * Get counterpartyRoutingNumber + * @return counterpartyRoutingNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCounterpartyRoutingNumber() { + return counterpartyRoutingNumber; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCounterpartyRoutingNumber(String counterpartyRoutingNumber) { + this.counterpartyRoutingNumber = counterpartyRoutingNumber; + } + + + public ReceivedAchTransactionAllOfAttributes traceNumber(String traceNumber) { + this.traceNumber = traceNumber; + return this; + } + + /** + * Get traceNumber + * @return traceNumber + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTraceNumber() { + return traceNumber; + } + + + @JsonProperty(JSON_PROPERTY_TRACE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTraceNumber(String traceNumber) { + this.traceNumber = traceNumber; + } + + + public ReceivedAchTransactionAllOfAttributes secCode(String secCode) { + this.secCode = secCode; + return this; + } + + /** + * Get secCode + * @return secCode + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEC_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSecCode() { + return secCode; + } + + + @JsonProperty(JSON_PROPERTY_SEC_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSecCode(String secCode) { + this.secCode = secCode; + } + + + public ReceivedAchTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this ReceivedAchTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReceivedAchTransactionAllOfAttributes receivedAchTransactionAllOfAttributes = (ReceivedAchTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, receivedAchTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, receivedAchTransactionAllOfAttributes.direction) && + Objects.equals(this.amount, receivedAchTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, receivedAchTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, receivedAchTransactionAllOfAttributes.summary) && + Objects.equals(this.description, receivedAchTransactionAllOfAttributes.description) && + Objects.equals(this.addenda, receivedAchTransactionAllOfAttributes.addenda) && + Objects.equals(this.companyName, receivedAchTransactionAllOfAttributes.companyName) && + Objects.equals(this.counterpartyName, receivedAchTransactionAllOfAttributes.counterpartyName) && + Objects.equals(this.counterpartyRoutingNumber, receivedAchTransactionAllOfAttributes.counterpartyRoutingNumber) && + Objects.equals(this.traceNumber, receivedAchTransactionAllOfAttributes.traceNumber) && + Objects.equals(this.secCode, receivedAchTransactionAllOfAttributes.secCode) && + Objects.equals(this.tags, receivedAchTransactionAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, amount, balance, summary, description, addenda, companyName, counterpartyName, counterpartyRoutingNumber, traceNumber, secCode, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReceivedAchTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" counterpartyName: ").append(toIndentedString(counterpartyName)).append("\n"); + sb.append(" counterpartyRoutingNumber: ").append(toIndentedString(counterpartyRoutingNumber)).append("\n"); + sb.append(" traceNumber: ").append(toIndentedString(traceNumber)).append("\n"); + sb.append(" secCode: ").append(toIndentedString(secCode)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `addenda` to the URL query string + if (getAddenda() != null) { + joiner.add(String.format("%saddenda%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAddenda()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `companyName` to the URL query string + if (getCompanyName() != null) { + joiner.add(String.format("%scompanyName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCompanyName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterpartyName` to the URL query string + if (getCounterpartyName() != null) { + joiner.add(String.format("%scounterpartyName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCounterpartyName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterpartyRoutingNumber` to the URL query string + if (getCounterpartyRoutingNumber() != null) { + joiner.add(String.format("%scounterpartyRoutingNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCounterpartyRoutingNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `traceNumber` to the URL query string + if (getTraceNumber() != null) { + joiner.add(String.format("%straceNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTraceNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `secCode` to the URL query string + if (getSecCode() != null) { + joiner.add(String.format("%ssecCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSecCode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReceivedPayment.java b/src/main/java/unit/java/sdk/model/ReceivedPayment.java new file mode 100644 index 00000000..98f22fb6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReceivedPayment.java @@ -0,0 +1,260 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentAttributes; +import unit.java.sdk.model.ReceivedPaymentRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReceivedPayment + */ +@JsonPropertyOrder({ + ReceivedPayment.JSON_PROPERTY_TYPE, + ReceivedPayment.JSON_PROPERTY_ID, + ReceivedPayment.JSON_PROPERTY_ATTRIBUTES, + ReceivedPayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReceivedPayment { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ReceivedPaymentAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private ReceivedPaymentRelationships relationships; + + public ReceivedPayment() { + } + + public ReceivedPayment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public ReceivedPayment id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public ReceivedPayment attributes(ReceivedPaymentAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReceivedPaymentAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(ReceivedPaymentAttributes attributes) { + this.attributes = attributes; + } + + + public ReceivedPayment relationships(ReceivedPaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReceivedPaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(ReceivedPaymentRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this received_payment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReceivedPayment receivedPayment = (ReceivedPayment) o; + return Objects.equals(this.type, receivedPayment.type) && + Objects.equals(this.id, receivedPayment.id) && + Objects.equals(this.attributes, receivedPayment.attributes) && + Objects.equals(this.relationships, receivedPayment.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReceivedPayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(String.format("%srelationships%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRelationships()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReceivedPaymentAttributes.java b/src/main/java/unit/java/sdk/model/ReceivedPaymentAttributes.java new file mode 100644 index 00000000..77e83e6f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReceivedPaymentAttributes.java @@ -0,0 +1,802 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReceivedPaymentAttributes + */ +@JsonPropertyOrder({ + ReceivedPaymentAttributes.JSON_PROPERTY_CREATED_AT, + ReceivedPaymentAttributes.JSON_PROPERTY_STATUS, + ReceivedPaymentAttributes.JSON_PROPERTY_AMOUNT, + ReceivedPaymentAttributes.JSON_PROPERTY_COMPLETION_DATE, + ReceivedPaymentAttributes.JSON_PROPERTY_DIRECTION, + ReceivedPaymentAttributes.JSON_PROPERTY_WAS_ADVANCED, + ReceivedPaymentAttributes.JSON_PROPERTY_IS_ADVANCEABLE, + ReceivedPaymentAttributes.JSON_PROPERTY_IS_ADVACEABLE, + ReceivedPaymentAttributes.JSON_PROPERTY_COMPANY_NAME, + ReceivedPaymentAttributes.JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER, + ReceivedPaymentAttributes.JSON_PROPERTY_DESCRIPTION, + ReceivedPaymentAttributes.JSON_PROPERTY_ADDENDA, + ReceivedPaymentAttributes.JSON_PROPERTY_TRACE_NUMBER, + ReceivedPaymentAttributes.JSON_PROPERTY_SEC_CODE, + ReceivedPaymentAttributes.JSON_PROPERTY_RETURN_REASON, + ReceivedPaymentAttributes.JSON_PROPERTY_RECEIVING_ENTITY_NAME, + ReceivedPaymentAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReceivedPaymentAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + PENDING("Pending"), + + ADVANCED("Advanced"), + + COMPLETED("Completed"), + + RETURNED("Returned"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_COMPLETION_DATE = "completionDate"; + private String completionDate; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + DEBIT("Debit"), + + CREDIT("Credit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_WAS_ADVANCED = "wasAdvanced"; + private Boolean wasAdvanced; + + public static final String JSON_PROPERTY_IS_ADVANCEABLE = "isAdvanceable"; + private Boolean isAdvanceable; + + public static final String JSON_PROPERTY_IS_ADVACEABLE = "isAdvaceable"; + private Boolean isAdvaceable; + + public static final String JSON_PROPERTY_COMPANY_NAME = "companyName"; + private String companyName; + + public static final String JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER = "counterpartyRoutingNumber"; + private String counterpartyRoutingNumber; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ADDENDA = "addenda"; + private String addenda; + + public static final String JSON_PROPERTY_TRACE_NUMBER = "traceNumber"; + private String traceNumber; + + public static final String JSON_PROPERTY_SEC_CODE = "secCode"; + private String secCode; + + public static final String JSON_PROPERTY_RETURN_REASON = "returnReason"; + private String returnReason; + + public static final String JSON_PROPERTY_RECEIVING_ENTITY_NAME = "receivingEntityName"; + private String receivingEntityName; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public ReceivedPaymentAttributes() { + } + + public ReceivedPaymentAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public ReceivedPaymentAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public ReceivedPaymentAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public ReceivedPaymentAttributes completionDate(String completionDate) { + this.completionDate = completionDate; + return this; + } + + /** + * Get completionDate + * @return completionDate + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPLETION_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCompletionDate() { + return completionDate; + } + + + @JsonProperty(JSON_PROPERTY_COMPLETION_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompletionDate(String completionDate) { + this.completionDate = completionDate; + } + + + public ReceivedPaymentAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public ReceivedPaymentAttributes wasAdvanced(Boolean wasAdvanced) { + this.wasAdvanced = wasAdvanced; + return this; + } + + /** + * Get wasAdvanced + * @return wasAdvanced + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WAS_ADVANCED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getWasAdvanced() { + return wasAdvanced; + } + + + @JsonProperty(JSON_PROPERTY_WAS_ADVANCED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWasAdvanced(Boolean wasAdvanced) { + this.wasAdvanced = wasAdvanced; + } + + + public ReceivedPaymentAttributes isAdvanceable(Boolean isAdvanceable) { + this.isAdvanceable = isAdvanceable; + return this; + } + + /** + * Get isAdvanceable + * @return isAdvanceable + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ADVANCEABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIsAdvanceable() { + return isAdvanceable; + } + + + @JsonProperty(JSON_PROPERTY_IS_ADVANCEABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsAdvanceable(Boolean isAdvanceable) { + this.isAdvanceable = isAdvanceable; + } + + + public ReceivedPaymentAttributes isAdvaceable(Boolean isAdvaceable) { + this.isAdvaceable = isAdvaceable; + return this; + } + + /** + * Get isAdvaceable + * @return isAdvaceable + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ADVACEABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIsAdvaceable() { + return isAdvaceable; + } + + + @JsonProperty(JSON_PROPERTY_IS_ADVACEABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsAdvaceable(Boolean isAdvaceable) { + this.isAdvaceable = isAdvaceable; + } + + + public ReceivedPaymentAttributes companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * Get companyName + * @return companyName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPANY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCompanyName() { + return companyName; + } + + + @JsonProperty(JSON_PROPERTY_COMPANY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public ReceivedPaymentAttributes counterpartyRoutingNumber(String counterpartyRoutingNumber) { + this.counterpartyRoutingNumber = counterpartyRoutingNumber; + return this; + } + + /** + * Get counterpartyRoutingNumber + * @return counterpartyRoutingNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCounterpartyRoutingNumber() { + return counterpartyRoutingNumber; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCounterpartyRoutingNumber(String counterpartyRoutingNumber) { + this.counterpartyRoutingNumber = counterpartyRoutingNumber; + } + + + public ReceivedPaymentAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public ReceivedPaymentAttributes addenda(String addenda) { + this.addenda = addenda; + return this; + } + + /** + * Get addenda + * @return addenda + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAddenda() { + return addenda; + } + + + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddenda(String addenda) { + this.addenda = addenda; + } + + + public ReceivedPaymentAttributes traceNumber(String traceNumber) { + this.traceNumber = traceNumber; + return this; + } + + /** + * Get traceNumber + * @return traceNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRACE_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getTraceNumber() { + return traceNumber; + } + + + @JsonProperty(JSON_PROPERTY_TRACE_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTraceNumber(String traceNumber) { + this.traceNumber = traceNumber; + } + + + public ReceivedPaymentAttributes secCode(String secCode) { + this.secCode = secCode; + return this; + } + + /** + * Get secCode + * @return secCode + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SEC_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSecCode() { + return secCode; + } + + + @JsonProperty(JSON_PROPERTY_SEC_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSecCode(String secCode) { + this.secCode = secCode; + } + + + public ReceivedPaymentAttributes returnReason(String returnReason) { + this.returnReason = returnReason; + return this; + } + + /** + * Get returnReason + * @return returnReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RETURN_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReturnReason() { + return returnReason; + } + + + @JsonProperty(JSON_PROPERTY_RETURN_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReturnReason(String returnReason) { + this.returnReason = returnReason; + } + + + public ReceivedPaymentAttributes receivingEntityName(String receivingEntityName) { + this.receivingEntityName = receivingEntityName; + return this; + } + + /** + * Get receivingEntityName + * @return receivingEntityName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECEIVING_ENTITY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReceivingEntityName() { + return receivingEntityName; + } + + + @JsonProperty(JSON_PROPERTY_RECEIVING_ENTITY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReceivingEntityName(String receivingEntityName) { + this.receivingEntityName = receivingEntityName; + } + + + public ReceivedPaymentAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this received_payment_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReceivedPaymentAttributes receivedPaymentAttributes = (ReceivedPaymentAttributes) o; + return Objects.equals(this.createdAt, receivedPaymentAttributes.createdAt) && + Objects.equals(this.status, receivedPaymentAttributes.status) && + Objects.equals(this.amount, receivedPaymentAttributes.amount) && + Objects.equals(this.completionDate, receivedPaymentAttributes.completionDate) && + Objects.equals(this.direction, receivedPaymentAttributes.direction) && + Objects.equals(this.wasAdvanced, receivedPaymentAttributes.wasAdvanced) && + Objects.equals(this.isAdvanceable, receivedPaymentAttributes.isAdvanceable) && + Objects.equals(this.isAdvaceable, receivedPaymentAttributes.isAdvaceable) && + Objects.equals(this.companyName, receivedPaymentAttributes.companyName) && + Objects.equals(this.counterpartyRoutingNumber, receivedPaymentAttributes.counterpartyRoutingNumber) && + Objects.equals(this.description, receivedPaymentAttributes.description) && + Objects.equals(this.addenda, receivedPaymentAttributes.addenda) && + Objects.equals(this.traceNumber, receivedPaymentAttributes.traceNumber) && + Objects.equals(this.secCode, receivedPaymentAttributes.secCode) && + Objects.equals(this.returnReason, receivedPaymentAttributes.returnReason) && + Objects.equals(this.receivingEntityName, receivedPaymentAttributes.receivingEntityName) && + Objects.equals(this.tags, receivedPaymentAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, status, amount, completionDate, direction, wasAdvanced, isAdvanceable, isAdvaceable, companyName, counterpartyRoutingNumber, description, addenda, traceNumber, secCode, returnReason, receivingEntityName, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReceivedPaymentAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" completionDate: ").append(toIndentedString(completionDate)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" wasAdvanced: ").append(toIndentedString(wasAdvanced)).append("\n"); + sb.append(" isAdvanceable: ").append(toIndentedString(isAdvanceable)).append("\n"); + sb.append(" isAdvaceable: ").append(toIndentedString(isAdvaceable)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" counterpartyRoutingNumber: ").append(toIndentedString(counterpartyRoutingNumber)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); + sb.append(" traceNumber: ").append(toIndentedString(traceNumber)).append("\n"); + sb.append(" secCode: ").append(toIndentedString(secCode)).append("\n"); + sb.append(" returnReason: ").append(toIndentedString(returnReason)).append("\n"); + sb.append(" receivingEntityName: ").append(toIndentedString(receivingEntityName)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `completionDate` to the URL query string + if (getCompletionDate() != null) { + joiner.add(String.format("%scompletionDate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCompletionDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `wasAdvanced` to the URL query string + if (getWasAdvanced() != null) { + joiner.add(String.format("%swasAdvanced%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getWasAdvanced()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `isAdvanceable` to the URL query string + if (getIsAdvanceable() != null) { + joiner.add(String.format("%sisAdvanceable%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIsAdvanceable()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `isAdvaceable` to the URL query string + if (getIsAdvaceable() != null) { + joiner.add(String.format("%sisAdvaceable%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIsAdvaceable()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `companyName` to the URL query string + if (getCompanyName() != null) { + joiner.add(String.format("%scompanyName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCompanyName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterpartyRoutingNumber` to the URL query string + if (getCounterpartyRoutingNumber() != null) { + joiner.add(String.format("%scounterpartyRoutingNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCounterpartyRoutingNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `addenda` to the URL query string + if (getAddenda() != null) { + joiner.add(String.format("%saddenda%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAddenda()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `traceNumber` to the URL query string + if (getTraceNumber() != null) { + joiner.add(String.format("%straceNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTraceNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `secCode` to the URL query string + if (getSecCode() != null) { + joiner.add(String.format("%ssecCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSecCode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `returnReason` to the URL query string + if (getReturnReason() != null) { + joiner.add(String.format("%sreturnReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReturnReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `receivingEntityName` to the URL query string + if (getReceivingEntityName() != null) { + joiner.add(String.format("%sreceivingEntityName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReceivingEntityName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationship.java b/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationship.java new file mode 100644 index 00000000..053809a2 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReceivedPaymentRelationship + */ +@JsonPropertyOrder({ + ReceivedPaymentRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReceivedPaymentRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private ReceivedPaymentRelationshipData data; + + public ReceivedPaymentRelationship() { + } + + public ReceivedPaymentRelationship data(ReceivedPaymentRelationshipData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ReceivedPaymentRelationshipData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(ReceivedPaymentRelationshipData data) { + this.data = data; + } + + + /** + * Return true if this receivedPaymentRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReceivedPaymentRelationship receivedPaymentRelationship = (ReceivedPaymentRelationship) o; + return Objects.equals(this.data, receivedPaymentRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReceivedPaymentRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationshipData.java b/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationshipData.java new file mode 100644 index 00000000..d3d7bdc0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationshipData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReceivedPaymentRelationshipData + */ +@JsonPropertyOrder({ + ReceivedPaymentRelationshipData.JSON_PROPERTY_TYPE, + ReceivedPaymentRelationshipData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReceivedPaymentRelationshipData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "receivedPayment"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public ReceivedPaymentRelationshipData() { + } + + public ReceivedPaymentRelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public ReceivedPaymentRelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this receivedPaymentRelationship_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReceivedPaymentRelationshipData receivedPaymentRelationshipData = (ReceivedPaymentRelationshipData) o; + return Objects.equals(this.type, receivedPaymentRelationshipData.type) && + Objects.equals(this.id, receivedPaymentRelationshipData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReceivedPaymentRelationshipData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationships.java b/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationships.java new file mode 100644 index 00000000..3dcf8c66 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationships.java @@ -0,0 +1,350 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import unit.java.sdk.model.ReceivedPaymentRelationshipsCustomer; +import unit.java.sdk.model.ReceivedPaymentRelationshipsReceivePaymentTransaction; +import unit.java.sdk.model.RelationshipsAccount; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReceivedPaymentRelationships + */ +@JsonPropertyOrder({ + ReceivedPaymentRelationships.JSON_PROPERTY_ACCOUNT, + ReceivedPaymentRelationships.JSON_PROPERTY_CUSTOMER, + ReceivedPaymentRelationships.JSON_PROPERTY_RECEIVE_PAYMENT_TRANSACTION, + ReceivedPaymentRelationships.JSON_PROPERTY_PAYMENT_ADVANCE_TRANSACTION, + ReceivedPaymentRelationships.JSON_PROPERTY_REPAY_PAYMENT_ADVANCE_TRANSACTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReceivedPaymentRelationships extends HashMap { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private RelationshipsAccount account; + + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private ReceivedPaymentRelationshipsCustomer customer; + + public static final String JSON_PROPERTY_RECEIVE_PAYMENT_TRANSACTION = "receivePaymentTransaction"; + private ReceivedPaymentRelationshipsReceivePaymentTransaction receivePaymentTransaction; + + public static final String JSON_PROPERTY_PAYMENT_ADVANCE_TRANSACTION = "paymentAdvanceTransaction"; + private ReceivedPaymentRelationshipsReceivePaymentTransaction paymentAdvanceTransaction; + + public static final String JSON_PROPERTY_REPAY_PAYMENT_ADVANCE_TRANSACTION = "repayPaymentAdvanceTransaction"; + private ReceivedPaymentRelationshipsReceivePaymentTransaction repayPaymentAdvanceTransaction; + + public ReceivedPaymentRelationships() { + } + + public ReceivedPaymentRelationships account(RelationshipsAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RelationshipsAccount getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(RelationshipsAccount account) { + this.account = account; + } + + + public ReceivedPaymentRelationships customer(ReceivedPaymentRelationshipsCustomer customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ReceivedPaymentRelationshipsCustomer getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomer(ReceivedPaymentRelationshipsCustomer customer) { + this.customer = customer; + } + + + public ReceivedPaymentRelationships receivePaymentTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction receivePaymentTransaction) { + this.receivePaymentTransaction = receivePaymentTransaction; + return this; + } + + /** + * Get receivePaymentTransaction + * @return receivePaymentTransaction + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECEIVE_PAYMENT_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReceivedPaymentRelationshipsReceivePaymentTransaction getReceivePaymentTransaction() { + return receivePaymentTransaction; + } + + + @JsonProperty(JSON_PROPERTY_RECEIVE_PAYMENT_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReceivePaymentTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction receivePaymentTransaction) { + this.receivePaymentTransaction = receivePaymentTransaction; + } + + + public ReceivedPaymentRelationships paymentAdvanceTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction paymentAdvanceTransaction) { + this.paymentAdvanceTransaction = paymentAdvanceTransaction; + return this; + } + + /** + * Get paymentAdvanceTransaction + * @return paymentAdvanceTransaction + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYMENT_ADVANCE_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReceivedPaymentRelationshipsReceivePaymentTransaction getPaymentAdvanceTransaction() { + return paymentAdvanceTransaction; + } + + + @JsonProperty(JSON_PROPERTY_PAYMENT_ADVANCE_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaymentAdvanceTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction paymentAdvanceTransaction) { + this.paymentAdvanceTransaction = paymentAdvanceTransaction; + } + + + public ReceivedPaymentRelationships repayPaymentAdvanceTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction repayPaymentAdvanceTransaction) { + this.repayPaymentAdvanceTransaction = repayPaymentAdvanceTransaction; + return this; + } + + /** + * Get repayPaymentAdvanceTransaction + * @return repayPaymentAdvanceTransaction + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REPAY_PAYMENT_ADVANCE_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReceivedPaymentRelationshipsReceivePaymentTransaction getRepayPaymentAdvanceTransaction() { + return repayPaymentAdvanceTransaction; + } + + + @JsonProperty(JSON_PROPERTY_REPAY_PAYMENT_ADVANCE_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRepayPaymentAdvanceTransaction(ReceivedPaymentRelationshipsReceivePaymentTransaction repayPaymentAdvanceTransaction) { + this.repayPaymentAdvanceTransaction = repayPaymentAdvanceTransaction; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public ReceivedPaymentRelationships putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this receivedPaymentRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReceivedPaymentRelationships receivedPaymentRelationships = (ReceivedPaymentRelationships) o; + return Objects.equals(this.account, receivedPaymentRelationships.account) && + Objects.equals(this.customer, receivedPaymentRelationships.customer) && + Objects.equals(this.receivePaymentTransaction, receivedPaymentRelationships.receivePaymentTransaction) && + Objects.equals(this.paymentAdvanceTransaction, receivedPaymentRelationships.paymentAdvanceTransaction) && + Objects.equals(this.repayPaymentAdvanceTransaction, receivedPaymentRelationships.repayPaymentAdvanceTransaction)&& + Objects.equals(this.additionalProperties, receivedPaymentRelationships.additionalProperties) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(account, customer, receivePaymentTransaction, paymentAdvanceTransaction, repayPaymentAdvanceTransaction, super.hashCode(), additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReceivedPaymentRelationships {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" receivePaymentTransaction: ").append(toIndentedString(receivePaymentTransaction)).append("\n"); + sb.append(" paymentAdvanceTransaction: ").append(toIndentedString(paymentAdvanceTransaction)).append("\n"); + sb.append(" repayPaymentAdvanceTransaction: ").append(toIndentedString(repayPaymentAdvanceTransaction)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + // add `receivePaymentTransaction` to the URL query string + if (getReceivePaymentTransaction() != null) { + joiner.add(getReceivePaymentTransaction().toUrlQueryString(prefix + "receivePaymentTransaction" + suffix)); + } + + // add `paymentAdvanceTransaction` to the URL query string + if (getPaymentAdvanceTransaction() != null) { + joiner.add(getPaymentAdvanceTransaction().toUrlQueryString(prefix + "paymentAdvanceTransaction" + suffix)); + } + + // add `repayPaymentAdvanceTransaction` to the URL query string + if (getRepayPaymentAdvanceTransaction() != null) { + joiner.add(getRepayPaymentAdvanceTransaction().toUrlQueryString(prefix + "repayPaymentAdvanceTransaction" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationshipsCustomer.java b/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationshipsCustomer.java new file mode 100644 index 00000000..cd3baf24 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationshipsCustomer.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsCustomerData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReceivedPaymentRelationshipsCustomer + */ +@JsonPropertyOrder({ + ReceivedPaymentRelationshipsCustomer.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReceivedPaymentRelationshipsCustomer { + public static final String JSON_PROPERTY_DATA = "data"; + private ReceivedPaymentRelationshipsCustomerData data; + + public ReceivedPaymentRelationshipsCustomer() { + } + + public ReceivedPaymentRelationshipsCustomer data(ReceivedPaymentRelationshipsCustomerData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ReceivedPaymentRelationshipsCustomerData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(ReceivedPaymentRelationshipsCustomerData data) { + this.data = data; + } + + + /** + * Return true if this receivedPaymentRelationships_customer object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReceivedPaymentRelationshipsCustomer receivedPaymentRelationshipsCustomer = (ReceivedPaymentRelationshipsCustomer) o; + return Objects.equals(this.data, receivedPaymentRelationshipsCustomer.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReceivedPaymentRelationshipsCustomer {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationshipsCustomerData.java b/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationshipsCustomerData.java new file mode 100644 index 00000000..0de5180c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationshipsCustomerData.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReceivedPaymentRelationshipsCustomerData + */ +@JsonPropertyOrder({ + ReceivedPaymentRelationshipsCustomerData.JSON_PROPERTY_TYPE, + ReceivedPaymentRelationshipsCustomerData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReceivedPaymentRelationshipsCustomerData { + /** + * Gets or Sets type + */ + public enum TypeEnum { + BUSINESSCUSTOMER("businessCustomer"), + + INDIVIDUALCUSTOMER("individualCustomer"), + + CUSTOMER("customer"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public ReceivedPaymentRelationshipsCustomerData() { + } + + public ReceivedPaymentRelationshipsCustomerData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public ReceivedPaymentRelationshipsCustomerData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this receivedPaymentRelationships_customer_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReceivedPaymentRelationshipsCustomerData receivedPaymentRelationshipsCustomerData = (ReceivedPaymentRelationshipsCustomerData) o; + return Objects.equals(this.type, receivedPaymentRelationshipsCustomerData.type) && + Objects.equals(this.id, receivedPaymentRelationshipsCustomerData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReceivedPaymentRelationshipsCustomerData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationshipsReceivePaymentTransaction.java b/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationshipsReceivePaymentTransaction.java new file mode 100644 index 00000000..1f055269 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationshipsReceivePaymentTransaction.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsReceivePaymentTransactionData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReceivedPaymentRelationshipsReceivePaymentTransaction + */ +@JsonPropertyOrder({ + ReceivedPaymentRelationshipsReceivePaymentTransaction.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReceivedPaymentRelationshipsReceivePaymentTransaction { + public static final String JSON_PROPERTY_DATA = "data"; + private ReceivedPaymentRelationshipsReceivePaymentTransactionData data; + + public ReceivedPaymentRelationshipsReceivePaymentTransaction() { + } + + public ReceivedPaymentRelationshipsReceivePaymentTransaction data(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ReceivedPaymentRelationshipsReceivePaymentTransactionData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { + this.data = data; + } + + + /** + * Return true if this receivedPaymentRelationships_receivePaymentTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReceivedPaymentRelationshipsReceivePaymentTransaction receivedPaymentRelationshipsReceivePaymentTransaction = (ReceivedPaymentRelationshipsReceivePaymentTransaction) o; + return Objects.equals(this.data, receivedPaymentRelationshipsReceivePaymentTransaction.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReceivedPaymentRelationshipsReceivePaymentTransaction {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationshipsReceivePaymentTransactionData.java b/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationshipsReceivePaymentTransactionData.java new file mode 100644 index 00000000..e07e6695 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReceivedPaymentRelationshipsReceivePaymentTransactionData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReceivedPaymentRelationshipsReceivePaymentTransactionData + */ +@JsonPropertyOrder({ + ReceivedPaymentRelationshipsReceivePaymentTransactionData.JSON_PROPERTY_TYPE, + ReceivedPaymentRelationshipsReceivePaymentTransactionData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReceivedPaymentRelationshipsReceivePaymentTransactionData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "transaction"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public ReceivedPaymentRelationshipsReceivePaymentTransactionData() { + } + + public ReceivedPaymentRelationshipsReceivePaymentTransactionData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public ReceivedPaymentRelationshipsReceivePaymentTransactionData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this receivedPaymentRelationships_receivePaymentTransaction_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReceivedPaymentRelationshipsReceivePaymentTransactionData receivedPaymentRelationshipsReceivePaymentTransactionData = (ReceivedPaymentRelationshipsReceivePaymentTransactionData) o; + return Objects.equals(this.type, receivedPaymentRelationshipsReceivePaymentTransactionData.type) && + Objects.equals(this.id, receivedPaymentRelationshipsReceivePaymentTransactionData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReceivedPaymentRelationshipsReceivePaymentTransactionData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReceivingAccountRelationship.java b/src/main/java/unit/java/sdk/model/ReceivingAccountRelationship.java new file mode 100644 index 00000000..2e13f321 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReceivingAccountRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsAccountData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReceivingAccountRelationship + */ +@JsonPropertyOrder({ + ReceivingAccountRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReceivingAccountRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private RecurringAchPaymentRelationshipsAccountData data; + + public ReceivingAccountRelationship() { + } + + public ReceivingAccountRelationship data(RecurringAchPaymentRelationshipsAccountData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RecurringAchPaymentRelationshipsAccountData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(RecurringAchPaymentRelationshipsAccountData data) { + this.data = data; + } + + + /** + * Return true if this receivingAccountRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReceivingAccountRelationship receivingAccountRelationship = (ReceivingAccountRelationship) o; + return Objects.equals(this.data, receivingAccountRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReceivingAccountRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationships.java b/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationships.java new file mode 100644 index 00000000..78c89c28 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationships.java @@ -0,0 +1,262 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsCustomer; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsAccount; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsCounterparty; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsOrg; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RecurringAchPaymentRelationships + */ +@JsonPropertyOrder({ + RecurringAchPaymentRelationships.JSON_PROPERTY_ACCOUNT, + RecurringAchPaymentRelationships.JSON_PROPERTY_COUNTERPARTY, + RecurringAchPaymentRelationships.JSON_PROPERTY_CUSTOMER, + RecurringAchPaymentRelationships.JSON_PROPERTY_ORG +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RecurringAchPaymentRelationships { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private RecurringAchPaymentRelationshipsAccount account; + + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; + private RecurringAchPaymentRelationshipsCounterparty counterparty; + + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private ReceivedPaymentRelationshipsCustomer customer; + + public static final String JSON_PROPERTY_ORG = "org"; + private RecurringAchPaymentRelationshipsOrg org; + + public RecurringAchPaymentRelationships() { + } + + public RecurringAchPaymentRelationships account(RecurringAchPaymentRelationshipsAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RecurringAchPaymentRelationshipsAccount getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccount(RecurringAchPaymentRelationshipsAccount account) { + this.account = account; + } + + + public RecurringAchPaymentRelationships counterparty(RecurringAchPaymentRelationshipsCounterparty counterparty) { + this.counterparty = counterparty; + return this; + } + + /** + * Get counterparty + * @return counterparty + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RecurringAchPaymentRelationshipsCounterparty getCounterparty() { + return counterparty; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterparty(RecurringAchPaymentRelationshipsCounterparty counterparty) { + this.counterparty = counterparty; + } + + + public RecurringAchPaymentRelationships customer(ReceivedPaymentRelationshipsCustomer customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReceivedPaymentRelationshipsCustomer getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomer(ReceivedPaymentRelationshipsCustomer customer) { + this.customer = customer; + } + + + public RecurringAchPaymentRelationships org(RecurringAchPaymentRelationshipsOrg org) { + this.org = org; + return this; + } + + /** + * Get org + * @return org + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RecurringAchPaymentRelationshipsOrg getOrg() { + return org; + } + + + @JsonProperty(JSON_PROPERTY_ORG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOrg(RecurringAchPaymentRelationshipsOrg org) { + this.org = org; + } + + + /** + * Return true if this recurringAchPaymentRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringAchPaymentRelationships recurringAchPaymentRelationships = (RecurringAchPaymentRelationships) o; + return Objects.equals(this.account, recurringAchPaymentRelationships.account) && + Objects.equals(this.counterparty, recurringAchPaymentRelationships.counterparty) && + Objects.equals(this.customer, recurringAchPaymentRelationships.customer) && + Objects.equals(this.org, recurringAchPaymentRelationships.org); + } + + @Override + public int hashCode() { + return Objects.hash(account, counterparty, customer, org); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringAchPaymentRelationships {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `counterparty` to the URL query string + if (getCounterparty() != null) { + joiner.add(getCounterparty().toUrlQueryString(prefix + "counterparty" + suffix)); + } + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + // add `org` to the URL query string + if (getOrg() != null) { + joiner.add(getOrg().toUrlQueryString(prefix + "org" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsAccount.java b/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsAccount.java new file mode 100644 index 00000000..d6a48768 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsAccount.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsAccountData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RecurringAchPaymentRelationshipsAccount + */ +@JsonPropertyOrder({ + RecurringAchPaymentRelationshipsAccount.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RecurringAchPaymentRelationshipsAccount { + public static final String JSON_PROPERTY_DATA = "data"; + private RecurringAchPaymentRelationshipsAccountData data; + + public RecurringAchPaymentRelationshipsAccount() { + } + + public RecurringAchPaymentRelationshipsAccount data(RecurringAchPaymentRelationshipsAccountData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RecurringAchPaymentRelationshipsAccountData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(RecurringAchPaymentRelationshipsAccountData data) { + this.data = data; + } + + + /** + * Return true if this recurringAchPaymentRelationships_account object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringAchPaymentRelationshipsAccount recurringAchPaymentRelationshipsAccount = (RecurringAchPaymentRelationshipsAccount) o; + return Objects.equals(this.data, recurringAchPaymentRelationshipsAccount.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringAchPaymentRelationshipsAccount {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsAccountData.java b/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsAccountData.java new file mode 100644 index 00000000..a83e4384 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsAccountData.java @@ -0,0 +1,221 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RecurringAchPaymentRelationshipsAccountData + */ +@JsonPropertyOrder({ + RecurringAchPaymentRelationshipsAccountData.JSON_PROPERTY_TYPE, + RecurringAchPaymentRelationshipsAccountData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RecurringAchPaymentRelationshipsAccountData { + /** + * Gets or Sets type + */ + public enum TypeEnum { + DEPOSITACCOUNT("depositAccount"), + + ACCOUNT("account"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public RecurringAchPaymentRelationshipsAccountData() { + } + + public RecurringAchPaymentRelationshipsAccountData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public RecurringAchPaymentRelationshipsAccountData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this recurringAchPaymentRelationships_account_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringAchPaymentRelationshipsAccountData recurringAchPaymentRelationshipsAccountData = (RecurringAchPaymentRelationshipsAccountData) o; + return Objects.equals(this.type, recurringAchPaymentRelationshipsAccountData.type) && + Objects.equals(this.id, recurringAchPaymentRelationshipsAccountData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringAchPaymentRelationshipsAccountData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsCounterparty.java b/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsCounterparty.java new file mode 100644 index 00000000..1b095b78 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsCounterparty.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsCounterpartyData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RecurringAchPaymentRelationshipsCounterparty + */ +@JsonPropertyOrder({ + RecurringAchPaymentRelationshipsCounterparty.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RecurringAchPaymentRelationshipsCounterparty { + public static final String JSON_PROPERTY_DATA = "data"; + private RecurringAchPaymentRelationshipsCounterpartyData data; + + public RecurringAchPaymentRelationshipsCounterparty() { + } + + public RecurringAchPaymentRelationshipsCounterparty data(RecurringAchPaymentRelationshipsCounterpartyData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RecurringAchPaymentRelationshipsCounterpartyData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(RecurringAchPaymentRelationshipsCounterpartyData data) { + this.data = data; + } + + + /** + * Return true if this recurringAchPaymentRelationships_counterparty object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringAchPaymentRelationshipsCounterparty recurringAchPaymentRelationshipsCounterparty = (RecurringAchPaymentRelationshipsCounterparty) o; + return Objects.equals(this.data, recurringAchPaymentRelationshipsCounterparty.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringAchPaymentRelationshipsCounterparty {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsCounterpartyData.java b/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsCounterpartyData.java new file mode 100644 index 00000000..efe54f7e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsCounterpartyData.java @@ -0,0 +1,221 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RecurringAchPaymentRelationshipsCounterpartyData + */ +@JsonPropertyOrder({ + RecurringAchPaymentRelationshipsCounterpartyData.JSON_PROPERTY_TYPE, + RecurringAchPaymentRelationshipsCounterpartyData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RecurringAchPaymentRelationshipsCounterpartyData { + /** + * Gets or Sets type + */ + public enum TypeEnum { + ACCOUNT("account"), + + COUNTERPARTY("counterparty"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public RecurringAchPaymentRelationshipsCounterpartyData() { + } + + public RecurringAchPaymentRelationshipsCounterpartyData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public RecurringAchPaymentRelationshipsCounterpartyData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this recurringAchPaymentRelationships_counterparty_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringAchPaymentRelationshipsCounterpartyData recurringAchPaymentRelationshipsCounterpartyData = (RecurringAchPaymentRelationshipsCounterpartyData) o; + return Objects.equals(this.type, recurringAchPaymentRelationshipsCounterpartyData.type) && + Objects.equals(this.id, recurringAchPaymentRelationshipsCounterpartyData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringAchPaymentRelationshipsCounterpartyData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsOrg.java b/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsOrg.java new file mode 100644 index 00000000..2bc5e1d0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsOrg.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsOrgData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RecurringAchPaymentRelationshipsOrg + */ +@JsonPropertyOrder({ + RecurringAchPaymentRelationshipsOrg.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RecurringAchPaymentRelationshipsOrg { + public static final String JSON_PROPERTY_DATA = "data"; + private RecurringAchPaymentRelationshipsOrgData data; + + public RecurringAchPaymentRelationshipsOrg() { + } + + public RecurringAchPaymentRelationshipsOrg data(RecurringAchPaymentRelationshipsOrgData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RecurringAchPaymentRelationshipsOrgData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(RecurringAchPaymentRelationshipsOrgData data) { + this.data = data; + } + + + /** + * Return true if this recurringAchPaymentRelationships_org object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringAchPaymentRelationshipsOrg recurringAchPaymentRelationshipsOrg = (RecurringAchPaymentRelationshipsOrg) o; + return Objects.equals(this.data, recurringAchPaymentRelationshipsOrg.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringAchPaymentRelationshipsOrg {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsOrgData.java b/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsOrgData.java new file mode 100644 index 00000000..73f4ec3f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsOrgData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RecurringAchPaymentRelationshipsOrgData + */ +@JsonPropertyOrder({ + RecurringAchPaymentRelationshipsOrgData.JSON_PROPERTY_TYPE, + RecurringAchPaymentRelationshipsOrgData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RecurringAchPaymentRelationshipsOrgData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public RecurringAchPaymentRelationshipsOrgData() { + } + + public RecurringAchPaymentRelationshipsOrgData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public RecurringAchPaymentRelationshipsOrgData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this recurringAchPaymentRelationships_org_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringAchPaymentRelationshipsOrgData recurringAchPaymentRelationshipsOrgData = (RecurringAchPaymentRelationshipsOrgData) o; + return Objects.equals(this.type, recurringAchPaymentRelationshipsOrgData.type) && + Objects.equals(this.id, recurringAchPaymentRelationshipsOrgData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringAchPaymentRelationshipsOrgData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringBookPaymentRelationships.java b/src/main/java/unit/java/sdk/model/RecurringBookPaymentRelationships.java new file mode 100644 index 00000000..46ba3f38 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringBookPaymentRelationships.java @@ -0,0 +1,262 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsCustomer; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsAccount; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsOrg; +import unit.java.sdk.model.RecurringBookPaymentRelationshipsCounterpartyAccount; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RecurringBookPaymentRelationships + */ +@JsonPropertyOrder({ + RecurringBookPaymentRelationships.JSON_PROPERTY_ACCOUNT, + RecurringBookPaymentRelationships.JSON_PROPERTY_COUNTERPARTY_ACCOUNT, + RecurringBookPaymentRelationships.JSON_PROPERTY_CUSTOMER, + RecurringBookPaymentRelationships.JSON_PROPERTY_ORG +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RecurringBookPaymentRelationships { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private RecurringAchPaymentRelationshipsAccount account; + + public static final String JSON_PROPERTY_COUNTERPARTY_ACCOUNT = "counterpartyAccount"; + private RecurringBookPaymentRelationshipsCounterpartyAccount counterpartyAccount; + + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private ReceivedPaymentRelationshipsCustomer customer; + + public static final String JSON_PROPERTY_ORG = "org"; + private RecurringAchPaymentRelationshipsOrg org; + + public RecurringBookPaymentRelationships() { + } + + public RecurringBookPaymentRelationships account(RecurringAchPaymentRelationshipsAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RecurringAchPaymentRelationshipsAccount getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccount(RecurringAchPaymentRelationshipsAccount account) { + this.account = account; + } + + + public RecurringBookPaymentRelationships counterpartyAccount(RecurringBookPaymentRelationshipsCounterpartyAccount counterpartyAccount) { + this.counterpartyAccount = counterpartyAccount; + return this; + } + + /** + * Get counterpartyAccount + * @return counterpartyAccount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RecurringBookPaymentRelationshipsCounterpartyAccount getCounterpartyAccount() { + return counterpartyAccount; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterpartyAccount(RecurringBookPaymentRelationshipsCounterpartyAccount counterpartyAccount) { + this.counterpartyAccount = counterpartyAccount; + } + + + public RecurringBookPaymentRelationships customer(ReceivedPaymentRelationshipsCustomer customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReceivedPaymentRelationshipsCustomer getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomer(ReceivedPaymentRelationshipsCustomer customer) { + this.customer = customer; + } + + + public RecurringBookPaymentRelationships org(RecurringAchPaymentRelationshipsOrg org) { + this.org = org; + return this; + } + + /** + * Get org + * @return org + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RecurringAchPaymentRelationshipsOrg getOrg() { + return org; + } + + + @JsonProperty(JSON_PROPERTY_ORG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOrg(RecurringAchPaymentRelationshipsOrg org) { + this.org = org; + } + + + /** + * Return true if this recurringBookPaymentRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringBookPaymentRelationships recurringBookPaymentRelationships = (RecurringBookPaymentRelationships) o; + return Objects.equals(this.account, recurringBookPaymentRelationships.account) && + Objects.equals(this.counterpartyAccount, recurringBookPaymentRelationships.counterpartyAccount) && + Objects.equals(this.customer, recurringBookPaymentRelationships.customer) && + Objects.equals(this.org, recurringBookPaymentRelationships.org); + } + + @Override + public int hashCode() { + return Objects.hash(account, counterpartyAccount, customer, org); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringBookPaymentRelationships {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" counterpartyAccount: ").append(toIndentedString(counterpartyAccount)).append("\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `counterpartyAccount` to the URL query string + if (getCounterpartyAccount() != null) { + joiner.add(getCounterpartyAccount().toUrlQueryString(prefix + "counterpartyAccount" + suffix)); + } + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + // add `org` to the URL query string + if (getOrg() != null) { + joiner.add(getOrg().toUrlQueryString(prefix + "org" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringBookPaymentRelationshipsCounterpartyAccount.java b/src/main/java/unit/java/sdk/model/RecurringBookPaymentRelationshipsCounterpartyAccount.java new file mode 100644 index 00000000..e8a0eaa8 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringBookPaymentRelationshipsCounterpartyAccount.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringBookPaymentRelationshipsCounterpartyAccountData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RecurringBookPaymentRelationshipsCounterpartyAccount + */ +@JsonPropertyOrder({ + RecurringBookPaymentRelationshipsCounterpartyAccount.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RecurringBookPaymentRelationshipsCounterpartyAccount { + public static final String JSON_PROPERTY_DATA = "data"; + private RecurringBookPaymentRelationshipsCounterpartyAccountData data; + + public RecurringBookPaymentRelationshipsCounterpartyAccount() { + } + + public RecurringBookPaymentRelationshipsCounterpartyAccount data(RecurringBookPaymentRelationshipsCounterpartyAccountData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RecurringBookPaymentRelationshipsCounterpartyAccountData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(RecurringBookPaymentRelationshipsCounterpartyAccountData data) { + this.data = data; + } + + + /** + * Return true if this recurringBookPaymentRelationships_counterpartyAccount object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringBookPaymentRelationshipsCounterpartyAccount recurringBookPaymentRelationshipsCounterpartyAccount = (RecurringBookPaymentRelationshipsCounterpartyAccount) o; + return Objects.equals(this.data, recurringBookPaymentRelationshipsCounterpartyAccount.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringBookPaymentRelationshipsCounterpartyAccount {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringBookPaymentRelationshipsCounterpartyAccountData.java b/src/main/java/unit/java/sdk/model/RecurringBookPaymentRelationshipsCounterpartyAccountData.java new file mode 100644 index 00000000..f5ad41ab --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringBookPaymentRelationshipsCounterpartyAccountData.java @@ -0,0 +1,219 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RecurringBookPaymentRelationshipsCounterpartyAccountData + */ +@JsonPropertyOrder({ + RecurringBookPaymentRelationshipsCounterpartyAccountData.JSON_PROPERTY_TYPE, + RecurringBookPaymentRelationshipsCounterpartyAccountData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RecurringBookPaymentRelationshipsCounterpartyAccountData { + /** + * Gets or Sets type + */ + public enum TypeEnum { + ACCOUNT("account"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public RecurringBookPaymentRelationshipsCounterpartyAccountData() { + } + + public RecurringBookPaymentRelationshipsCounterpartyAccountData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public RecurringBookPaymentRelationshipsCounterpartyAccountData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this recurringBookPaymentRelationships_counterpartyAccount_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringBookPaymentRelationshipsCounterpartyAccountData recurringBookPaymentRelationshipsCounterpartyAccountData = (RecurringBookPaymentRelationshipsCounterpartyAccountData) o; + return Objects.equals(this.type, recurringBookPaymentRelationshipsCounterpartyAccountData.type) && + Objects.equals(this.id, recurringBookPaymentRelationshipsCounterpartyAccountData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringBookPaymentRelationshipsCounterpartyAccountData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringCreditAchPayment.java b/src/main/java/unit/java/sdk/model/RecurringCreditAchPayment.java new file mode 100644 index 00000000..00f1593a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringCreditAchPayment.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringAchPaymentRelationships; +import unit.java.sdk.model.RecurringCreditAchPaymentAllOfAttributes; +import unit.java.sdk.model.RecurringPayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * RecurringCreditAchPayment + */ +@JsonPropertyOrder({ + RecurringCreditAchPayment.JSON_PROPERTY_ATTRIBUTES, + RecurringCreditAchPayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class RecurringCreditAchPayment extends RecurringPayment { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RecurringCreditAchPaymentAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private RecurringAchPaymentRelationships relationships; + + public RecurringCreditAchPayment() { + } + + public RecurringCreditAchPayment attributes(RecurringCreditAchPaymentAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RecurringCreditAchPaymentAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(RecurringCreditAchPaymentAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public RecurringCreditAchPayment relationships(RecurringAchPaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RecurringAchPaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(RecurringAchPaymentRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public RecurringCreditAchPayment type(String type) { + this.setType(type); + return this; + } + + @Override + public RecurringCreditAchPayment id(String id) { + this.setId(id); + return this; + } + + /** + * Return true if this RecurringCreditAchPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringCreditAchPayment recurringCreditAchPayment = (RecurringCreditAchPayment) o; + return Objects.equals(this.attributes, recurringCreditAchPayment.attributes) && + Objects.equals(this.relationships, recurringCreditAchPayment.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringCreditAchPayment {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RecurringCreditAchPayment", RecurringCreditAchPayment.class); + JSON.registerDiscriminator(RecurringCreditAchPayment.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringCreditAchPaymentAllOfAttributes.java b/src/main/java/unit/java/sdk/model/RecurringCreditAchPaymentAllOfAttributes.java new file mode 100644 index 00000000..f60c7854 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringCreditAchPaymentAllOfAttributes.java @@ -0,0 +1,480 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Schedule; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RecurringCreditAchPaymentAllOfAttributes + */ +@JsonPropertyOrder({ + RecurringCreditAchPaymentAllOfAttributes.JSON_PROPERTY_CREATED_AT, + RecurringCreditAchPaymentAllOfAttributes.JSON_PROPERTY_UPDATED_AT, + RecurringCreditAchPaymentAllOfAttributes.JSON_PROPERTY_AMOUNT, + RecurringCreditAchPaymentAllOfAttributes.JSON_PROPERTY_DESCRIPTION, + RecurringCreditAchPaymentAllOfAttributes.JSON_PROPERTY_ADDENDA, + RecurringCreditAchPaymentAllOfAttributes.JSON_PROPERTY_TAGS, + RecurringCreditAchPaymentAllOfAttributes.JSON_PROPERTY_STATUS, + RecurringCreditAchPaymentAllOfAttributes.JSON_PROPERTY_SCHEDULE, + RecurringCreditAchPaymentAllOfAttributes.JSON_PROPERTY_NUMBER_OF_PAYMENTS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RecurringCreditAchPaymentAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ADDENDA = "addenda"; + private String addenda; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + PENDING("Pending"), + + ACTIVE("Active"), + + COMPLETED("Completed"), + + DISABLED("Disabled"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_SCHEDULE = "schedule"; + private Schedule schedule; + + public static final String JSON_PROPERTY_NUMBER_OF_PAYMENTS = "numberOfPayments"; + private Integer numberOfPayments; + + public RecurringCreditAchPaymentAllOfAttributes() { + } + + public RecurringCreditAchPaymentAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public RecurringCreditAchPaymentAllOfAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public RecurringCreditAchPaymentAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public RecurringCreditAchPaymentAllOfAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public RecurringCreditAchPaymentAllOfAttributes addenda(String addenda) { + this.addenda = addenda; + return this; + } + + /** + * Get addenda + * @return addenda + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAddenda() { + return addenda; + } + + + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddenda(String addenda) { + this.addenda = addenda; + } + + + public RecurringCreditAchPaymentAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public RecurringCreditAchPaymentAllOfAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public RecurringCreditAchPaymentAllOfAttributes schedule(Schedule schedule) { + this.schedule = schedule; + return this; + } + + /** + * Get schedule + * @return schedule + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Schedule getSchedule() { + return schedule; + } + + + @JsonProperty(JSON_PROPERTY_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSchedule(Schedule schedule) { + this.schedule = schedule; + } + + + public RecurringCreditAchPaymentAllOfAttributes numberOfPayments(Integer numberOfPayments) { + this.numberOfPayments = numberOfPayments; + return this; + } + + /** + * Get numberOfPayments + * @return numberOfPayments + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NUMBER_OF_PAYMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getNumberOfPayments() { + return numberOfPayments; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER_OF_PAYMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumberOfPayments(Integer numberOfPayments) { + this.numberOfPayments = numberOfPayments; + } + + + /** + * Return true if this RecurringCreditAchPayment_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringCreditAchPaymentAllOfAttributes recurringCreditAchPaymentAllOfAttributes = (RecurringCreditAchPaymentAllOfAttributes) o; + return Objects.equals(this.createdAt, recurringCreditAchPaymentAllOfAttributes.createdAt) && + Objects.equals(this.updatedAt, recurringCreditAchPaymentAllOfAttributes.updatedAt) && + Objects.equals(this.amount, recurringCreditAchPaymentAllOfAttributes.amount) && + Objects.equals(this.description, recurringCreditAchPaymentAllOfAttributes.description) && + Objects.equals(this.addenda, recurringCreditAchPaymentAllOfAttributes.addenda) && + Objects.equals(this.tags, recurringCreditAchPaymentAllOfAttributes.tags) && + Objects.equals(this.status, recurringCreditAchPaymentAllOfAttributes.status) && + Objects.equals(this.schedule, recurringCreditAchPaymentAllOfAttributes.schedule) && + Objects.equals(this.numberOfPayments, recurringCreditAchPaymentAllOfAttributes.numberOfPayments); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, updatedAt, amount, description, addenda, tags, status, schedule, numberOfPayments); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringCreditAchPaymentAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); + sb.append(" numberOfPayments: ").append(toIndentedString(numberOfPayments)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `addenda` to the URL query string + if (getAddenda() != null) { + joiner.add(String.format("%saddenda%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAddenda()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `schedule` to the URL query string + if (getSchedule() != null) { + joiner.add(getSchedule().toUrlQueryString(prefix + "schedule" + suffix)); + } + + // add `numberOfPayments` to the URL query string + if (getNumberOfPayments() != null) { + joiner.add(String.format("%snumberOfPayments%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNumberOfPayments()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringCreditBookPayment.java b/src/main/java/unit/java/sdk/model/RecurringCreditBookPayment.java new file mode 100644 index 00000000..29356b93 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringCreditBookPayment.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringBookPaymentRelationships; +import unit.java.sdk.model.RecurringCreditBookPaymentAllOfAttributes; +import unit.java.sdk.model.RecurringPayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * RecurringCreditBookPayment + */ +@JsonPropertyOrder({ + RecurringCreditBookPayment.JSON_PROPERTY_ATTRIBUTES, + RecurringCreditBookPayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class RecurringCreditBookPayment extends RecurringPayment { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RecurringCreditBookPaymentAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private RecurringBookPaymentRelationships relationships; + + public RecurringCreditBookPayment() { + } + + public RecurringCreditBookPayment attributes(RecurringCreditBookPaymentAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RecurringCreditBookPaymentAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(RecurringCreditBookPaymentAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public RecurringCreditBookPayment relationships(RecurringBookPaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RecurringBookPaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(RecurringBookPaymentRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public RecurringCreditBookPayment type(String type) { + this.setType(type); + return this; + } + + @Override + public RecurringCreditBookPayment id(String id) { + this.setId(id); + return this; + } + + /** + * Return true if this RecurringCreditBookPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringCreditBookPayment recurringCreditBookPayment = (RecurringCreditBookPayment) o; + return Objects.equals(this.attributes, recurringCreditBookPayment.attributes) && + Objects.equals(this.relationships, recurringCreditBookPayment.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringCreditBookPayment {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RecurringCreditBookPayment", RecurringCreditBookPayment.class); + JSON.registerDiscriminator(RecurringCreditBookPayment.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringCreditBookPaymentAllOfAttributes.java b/src/main/java/unit/java/sdk/model/RecurringCreditBookPaymentAllOfAttributes.java new file mode 100644 index 00000000..d3212323 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringCreditBookPaymentAllOfAttributes.java @@ -0,0 +1,444 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Schedule; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RecurringCreditBookPaymentAllOfAttributes + */ +@JsonPropertyOrder({ + RecurringCreditBookPaymentAllOfAttributes.JSON_PROPERTY_CREATED_AT, + RecurringCreditBookPaymentAllOfAttributes.JSON_PROPERTY_UPDATED_AT, + RecurringCreditBookPaymentAllOfAttributes.JSON_PROPERTY_AMOUNT, + RecurringCreditBookPaymentAllOfAttributes.JSON_PROPERTY_DESCRIPTION, + RecurringCreditBookPaymentAllOfAttributes.JSON_PROPERTY_STATUS, + RecurringCreditBookPaymentAllOfAttributes.JSON_PROPERTY_SCHEDULE, + RecurringCreditBookPaymentAllOfAttributes.JSON_PROPERTY_NUMBER_OF_PAYMENTS, + RecurringCreditBookPaymentAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RecurringCreditBookPaymentAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + PENDING("Pending"), + + ACTIVE("Active"), + + COMPLETED("Completed"), + + DISABLED("Disabled"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_SCHEDULE = "schedule"; + private Schedule schedule; + + public static final String JSON_PROPERTY_NUMBER_OF_PAYMENTS = "numberOfPayments"; + private Integer numberOfPayments; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public RecurringCreditBookPaymentAllOfAttributes() { + } + + public RecurringCreditBookPaymentAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public RecurringCreditBookPaymentAllOfAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public RecurringCreditBookPaymentAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public RecurringCreditBookPaymentAllOfAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public RecurringCreditBookPaymentAllOfAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public RecurringCreditBookPaymentAllOfAttributes schedule(Schedule schedule) { + this.schedule = schedule; + return this; + } + + /** + * Get schedule + * @return schedule + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Schedule getSchedule() { + return schedule; + } + + + @JsonProperty(JSON_PROPERTY_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSchedule(Schedule schedule) { + this.schedule = schedule; + } + + + public RecurringCreditBookPaymentAllOfAttributes numberOfPayments(Integer numberOfPayments) { + this.numberOfPayments = numberOfPayments; + return this; + } + + /** + * Get numberOfPayments + * @return numberOfPayments + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NUMBER_OF_PAYMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getNumberOfPayments() { + return numberOfPayments; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER_OF_PAYMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumberOfPayments(Integer numberOfPayments) { + this.numberOfPayments = numberOfPayments; + } + + + public RecurringCreditBookPaymentAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this RecurringCreditBookPayment_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringCreditBookPaymentAllOfAttributes recurringCreditBookPaymentAllOfAttributes = (RecurringCreditBookPaymentAllOfAttributes) o; + return Objects.equals(this.createdAt, recurringCreditBookPaymentAllOfAttributes.createdAt) && + Objects.equals(this.updatedAt, recurringCreditBookPaymentAllOfAttributes.updatedAt) && + Objects.equals(this.amount, recurringCreditBookPaymentAllOfAttributes.amount) && + Objects.equals(this.description, recurringCreditBookPaymentAllOfAttributes.description) && + Objects.equals(this.status, recurringCreditBookPaymentAllOfAttributes.status) && + Objects.equals(this.schedule, recurringCreditBookPaymentAllOfAttributes.schedule) && + Objects.equals(this.numberOfPayments, recurringCreditBookPaymentAllOfAttributes.numberOfPayments) && + Objects.equals(this.tags, recurringCreditBookPaymentAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, updatedAt, amount, description, status, schedule, numberOfPayments, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringCreditBookPaymentAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); + sb.append(" numberOfPayments: ").append(toIndentedString(numberOfPayments)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `schedule` to the URL query string + if (getSchedule() != null) { + joiner.add(getSchedule().toUrlQueryString(prefix + "schedule" + suffix)); + } + + // add `numberOfPayments` to the URL query string + if (getNumberOfPayments() != null) { + joiner.add(String.format("%snumberOfPayments%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNumberOfPayments()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringDebitAchPayment.java b/src/main/java/unit/java/sdk/model/RecurringDebitAchPayment.java new file mode 100644 index 00000000..9bdd0982 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringDebitAchPayment.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringAchPaymentRelationships; +import unit.java.sdk.model.RecurringDebitAchPaymentAllOfAttributes; +import unit.java.sdk.model.RecurringPayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * RecurringDebitAchPayment + */ +@JsonPropertyOrder({ + RecurringDebitAchPayment.JSON_PROPERTY_ATTRIBUTES, + RecurringDebitAchPayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class RecurringDebitAchPayment extends RecurringPayment { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RecurringDebitAchPaymentAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private RecurringAchPaymentRelationships relationships; + + public RecurringDebitAchPayment() { + } + + public RecurringDebitAchPayment attributes(RecurringDebitAchPaymentAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RecurringDebitAchPaymentAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(RecurringDebitAchPaymentAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public RecurringDebitAchPayment relationships(RecurringAchPaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RecurringAchPaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(RecurringAchPaymentRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public RecurringDebitAchPayment type(String type) { + this.setType(type); + return this; + } + + @Override + public RecurringDebitAchPayment id(String id) { + this.setId(id); + return this; + } + + /** + * Return true if this RecurringDebitAchPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringDebitAchPayment recurringDebitAchPayment = (RecurringDebitAchPayment) o; + return Objects.equals(this.attributes, recurringDebitAchPayment.attributes) && + Objects.equals(this.relationships, recurringDebitAchPayment.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringDebitAchPayment {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RecurringDebitAchPayment", RecurringDebitAchPayment.class); + JSON.registerDiscriminator(RecurringDebitAchPayment.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringDebitAchPaymentAllOfAttributes.java b/src/main/java/unit/java/sdk/model/RecurringDebitAchPaymentAllOfAttributes.java new file mode 100644 index 00000000..cbd6ac28 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringDebitAchPaymentAllOfAttributes.java @@ -0,0 +1,552 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Schedule; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RecurringDebitAchPaymentAllOfAttributes + */ +@JsonPropertyOrder({ + RecurringDebitAchPaymentAllOfAttributes.JSON_PROPERTY_CREATED_AT, + RecurringDebitAchPaymentAllOfAttributes.JSON_PROPERTY_UPDATED_AT, + RecurringDebitAchPaymentAllOfAttributes.JSON_PROPERTY_AMOUNT, + RecurringDebitAchPaymentAllOfAttributes.JSON_PROPERTY_DESCRIPTION, + RecurringDebitAchPaymentAllOfAttributes.JSON_PROPERTY_ADDENDA, + RecurringDebitAchPaymentAllOfAttributes.JSON_PROPERTY_TAGS, + RecurringDebitAchPaymentAllOfAttributes.JSON_PROPERTY_STATUS, + RecurringDebitAchPaymentAllOfAttributes.JSON_PROPERTY_SCHEDULE, + RecurringDebitAchPaymentAllOfAttributes.JSON_PROPERTY_NUMBER_OF_PAYMENTS, + RecurringDebitAchPaymentAllOfAttributes.JSON_PROPERTY_VERIFY_COUNTERPARTY_BALANCE, + RecurringDebitAchPaymentAllOfAttributes.JSON_PROPERTY_SAME_DAY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RecurringDebitAchPaymentAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ADDENDA = "addenda"; + private String addenda; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + PENDING("Pending"), + + ACTIVE("Active"), + + COMPLETED("Completed"), + + DISABLED("Disabled"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_SCHEDULE = "schedule"; + private Schedule schedule; + + public static final String JSON_PROPERTY_NUMBER_OF_PAYMENTS = "numberOfPayments"; + private Integer numberOfPayments; + + public static final String JSON_PROPERTY_VERIFY_COUNTERPARTY_BALANCE = "verifyCounterpartyBalance"; + private Boolean verifyCounterpartyBalance = false; + + public static final String JSON_PROPERTY_SAME_DAY = "sameDay"; + private Boolean sameDay = false; + + public RecurringDebitAchPaymentAllOfAttributes() { + } + + public RecurringDebitAchPaymentAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public RecurringDebitAchPaymentAllOfAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public RecurringDebitAchPaymentAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public RecurringDebitAchPaymentAllOfAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public RecurringDebitAchPaymentAllOfAttributes addenda(String addenda) { + this.addenda = addenda; + return this; + } + + /** + * Get addenda + * @return addenda + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAddenda() { + return addenda; + } + + + @JsonProperty(JSON_PROPERTY_ADDENDA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddenda(String addenda) { + this.addenda = addenda; + } + + + public RecurringDebitAchPaymentAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public RecurringDebitAchPaymentAllOfAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public RecurringDebitAchPaymentAllOfAttributes schedule(Schedule schedule) { + this.schedule = schedule; + return this; + } + + /** + * Get schedule + * @return schedule + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Schedule getSchedule() { + return schedule; + } + + + @JsonProperty(JSON_PROPERTY_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSchedule(Schedule schedule) { + this.schedule = schedule; + } + + + public RecurringDebitAchPaymentAllOfAttributes numberOfPayments(Integer numberOfPayments) { + this.numberOfPayments = numberOfPayments; + return this; + } + + /** + * Get numberOfPayments + * @return numberOfPayments + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NUMBER_OF_PAYMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getNumberOfPayments() { + return numberOfPayments; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER_OF_PAYMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumberOfPayments(Integer numberOfPayments) { + this.numberOfPayments = numberOfPayments; + } + + + public RecurringDebitAchPaymentAllOfAttributes verifyCounterpartyBalance(Boolean verifyCounterpartyBalance) { + this.verifyCounterpartyBalance = verifyCounterpartyBalance; + return this; + } + + /** + * Get verifyCounterpartyBalance + * @return verifyCounterpartyBalance + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERIFY_COUNTERPARTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getVerifyCounterpartyBalance() { + return verifyCounterpartyBalance; + } + + + @JsonProperty(JSON_PROPERTY_VERIFY_COUNTERPARTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVerifyCounterpartyBalance(Boolean verifyCounterpartyBalance) { + this.verifyCounterpartyBalance = verifyCounterpartyBalance; + } + + + public RecurringDebitAchPaymentAllOfAttributes sameDay(Boolean sameDay) { + this.sameDay = sameDay; + return this; + } + + /** + * Get sameDay + * @return sameDay + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAME_DAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSameDay() { + return sameDay; + } + + + @JsonProperty(JSON_PROPERTY_SAME_DAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSameDay(Boolean sameDay) { + this.sameDay = sameDay; + } + + + /** + * Return true if this RecurringDebitAchPayment_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringDebitAchPaymentAllOfAttributes recurringDebitAchPaymentAllOfAttributes = (RecurringDebitAchPaymentAllOfAttributes) o; + return Objects.equals(this.createdAt, recurringDebitAchPaymentAllOfAttributes.createdAt) && + Objects.equals(this.updatedAt, recurringDebitAchPaymentAllOfAttributes.updatedAt) && + Objects.equals(this.amount, recurringDebitAchPaymentAllOfAttributes.amount) && + Objects.equals(this.description, recurringDebitAchPaymentAllOfAttributes.description) && + Objects.equals(this.addenda, recurringDebitAchPaymentAllOfAttributes.addenda) && + Objects.equals(this.tags, recurringDebitAchPaymentAllOfAttributes.tags) && + Objects.equals(this.status, recurringDebitAchPaymentAllOfAttributes.status) && + Objects.equals(this.schedule, recurringDebitAchPaymentAllOfAttributes.schedule) && + Objects.equals(this.numberOfPayments, recurringDebitAchPaymentAllOfAttributes.numberOfPayments) && + Objects.equals(this.verifyCounterpartyBalance, recurringDebitAchPaymentAllOfAttributes.verifyCounterpartyBalance) && + Objects.equals(this.sameDay, recurringDebitAchPaymentAllOfAttributes.sameDay); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, updatedAt, amount, description, addenda, tags, status, schedule, numberOfPayments, verifyCounterpartyBalance, sameDay); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringDebitAchPaymentAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" addenda: ").append(toIndentedString(addenda)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); + sb.append(" numberOfPayments: ").append(toIndentedString(numberOfPayments)).append("\n"); + sb.append(" verifyCounterpartyBalance: ").append(toIndentedString(verifyCounterpartyBalance)).append("\n"); + sb.append(" sameDay: ").append(toIndentedString(sameDay)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `addenda` to the URL query string + if (getAddenda() != null) { + joiner.add(String.format("%saddenda%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAddenda()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `schedule` to the URL query string + if (getSchedule() != null) { + joiner.add(getSchedule().toUrlQueryString(prefix + "schedule" + suffix)); + } + + // add `numberOfPayments` to the URL query string + if (getNumberOfPayments() != null) { + joiner.add(String.format("%snumberOfPayments%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNumberOfPayments()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `verifyCounterpartyBalance` to the URL query string + if (getVerifyCounterpartyBalance() != null) { + joiner.add(String.format("%sverifyCounterpartyBalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVerifyCounterpartyBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sameDay` to the URL query string + if (getSameDay() != null) { + joiner.add(String.format("%ssameDay%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSameDay()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringPayment.java b/src/main/java/unit/java/sdk/model/RecurringPayment.java new file mode 100644 index 00000000..99d31fc5 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringPayment.java @@ -0,0 +1,210 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * RecurringPayment + */ +@JsonPropertyOrder({ + RecurringPayment.JSON_PROPERTY_TYPE, + RecurringPayment.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = RecurringCreditAchPayment.class, name = "recurringCreditAchPayment"), + @JsonSubTypes.Type(value = RecurringCreditBookPayment.class, name = "recurringCreditBookPayment"), + @JsonSubTypes.Type(value = RecurringDebitAchPayment.class, name = "recurringDebitAchPayment"), +}) + +public class RecurringPayment { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public RecurringPayment() { + } + + public RecurringPayment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public RecurringPayment id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this recurring_payment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringPayment recurringPayment = (RecurringPayment) o; + return Objects.equals(this.type, recurringPayment.type) && + Objects.equals(this.id, recurringPayment.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringPayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("recurringCreditAchPayment", RecurringCreditAchPayment.class); + mappings.put("recurringCreditBookPayment", RecurringCreditBookPayment.class); + mappings.put("recurringDebitAchPayment", RecurringDebitAchPayment.class); + mappings.put("recurring_payment", RecurringPayment.class); + JSON.registerDiscriminator(RecurringPayment.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringPaymentRelationship.java b/src/main/java/unit/java/sdk/model/RecurringPaymentRelationship.java new file mode 100644 index 00000000..514d2abd --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringPaymentRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringPaymentRelationshipData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RecurringPaymentRelationship + */ +@JsonPropertyOrder({ + RecurringPaymentRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RecurringPaymentRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private RecurringPaymentRelationshipData data; + + public RecurringPaymentRelationship() { + } + + public RecurringPaymentRelationship data(RecurringPaymentRelationshipData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RecurringPaymentRelationshipData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(RecurringPaymentRelationshipData data) { + this.data = data; + } + + + /** + * Return true if this recurringPaymentRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringPaymentRelationship recurringPaymentRelationship = (RecurringPaymentRelationship) o; + return Objects.equals(this.data, recurringPaymentRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringPaymentRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RecurringPaymentRelationshipData.java b/src/main/java/unit/java/sdk/model/RecurringPaymentRelationshipData.java new file mode 100644 index 00000000..7b3159d5 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RecurringPaymentRelationshipData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RecurringPaymentRelationshipData + */ +@JsonPropertyOrder({ + RecurringPaymentRelationshipData.JSON_PROPERTY_TYPE, + RecurringPaymentRelationshipData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RecurringPaymentRelationshipData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "recurringPayment"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public RecurringPaymentRelationshipData() { + } + + public RecurringPaymentRelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public RecurringPaymentRelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this recurringPaymentRelationship_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecurringPaymentRelationshipData recurringPaymentRelationshipData = (RecurringPaymentRelationshipData) o; + return Objects.equals(this.type, recurringPaymentRelationshipData.type) && + Objects.equals(this.id, recurringPaymentRelationshipData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecurringPaymentRelationshipData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RelatedTransaction.java b/src/main/java/unit/java/sdk/model/RelatedTransaction.java new file mode 100644 index 00000000..e08d5b87 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RelatedTransaction.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsReceivePaymentTransactionData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RelatedTransaction + */ +@JsonPropertyOrder({ + RelatedTransaction.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RelatedTransaction { + public static final String JSON_PROPERTY_DATA = "data"; + private ReceivedPaymentRelationshipsReceivePaymentTransactionData data; + + public RelatedTransaction() { + } + + public RelatedTransaction data(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ReceivedPaymentRelationshipsReceivePaymentTransactionData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { + this.data = data; + } + + + /** + * Return true if this relatedTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RelatedTransaction relatedTransaction = (RelatedTransaction) o; + return Objects.equals(this.data, relatedTransaction.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelatedTransaction {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RelatedTransactionRelationship.java b/src/main/java/unit/java/sdk/model/RelatedTransactionRelationship.java new file mode 100644 index 00000000..467a6b39 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RelatedTransactionRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsReceivePaymentTransactionData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RelatedTransactionRelationship + */ +@JsonPropertyOrder({ + RelatedTransactionRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RelatedTransactionRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private ReceivedPaymentRelationshipsReceivePaymentTransactionData data; + + public RelatedTransactionRelationship() { + } + + public RelatedTransactionRelationship data(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ReceivedPaymentRelationshipsReceivePaymentTransactionData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { + this.data = data; + } + + + /** + * Return true if this relatedTransactionRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RelatedTransactionRelationship relatedTransactionRelationship = (RelatedTransactionRelationship) o; + return Objects.equals(this.data, relatedTransactionRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelatedTransactionRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Relationship.java b/src/main/java/unit/java/sdk/model/Relationship.java new file mode 100644 index 00000000..a8781610 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Relationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RelationshipData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Relationship + */ +@JsonPropertyOrder({ + Relationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Relationship { + public static final String JSON_PROPERTY_DATA = "data"; + private RelationshipData data; + + public Relationship() { + } + + public Relationship data(RelationshipData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RelationshipData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(RelationshipData data) { + this.data = data; + } + + + /** + * Return true if this Relationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Relationship relationship = (Relationship) o; + return Objects.equals(this.data, relationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Relationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RelationshipData.java b/src/main/java/unit/java/sdk/model/RelationshipData.java new file mode 100644 index 00000000..7eebd31f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RelationshipData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RelationshipData + */ +@JsonPropertyOrder({ + RelationshipData.JSON_PROPERTY_ID, + RelationshipData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RelationshipData { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public RelationshipData() { + } + + public RelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + public RelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + /** + * Return true if this Relationship_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RelationshipData relationshipData = (RelationshipData) o; + return Objects.equals(this.id, relationshipData.id) && + Objects.equals(this.type, relationshipData.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelationshipData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Relationships.java b/src/main/java/unit/java/sdk/model/Relationships.java new file mode 100644 index 00000000..4d610c18 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Relationships.java @@ -0,0 +1,188 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RelationshipsAccount; +import unit.java.sdk.model.RelationshipsCustomer; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Relationships + */ +@JsonPropertyOrder({ + Relationships.JSON_PROPERTY_CUSTOMER, + Relationships.JSON_PROPERTY_ACCOUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Relationships { + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private RelationshipsCustomer customer; + + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private RelationshipsAccount account; + + public Relationships() { + } + + public Relationships customer(RelationshipsCustomer customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RelationshipsCustomer getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomer(RelationshipsCustomer customer) { + this.customer = customer; + } + + + public Relationships account(RelationshipsAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RelationshipsAccount getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(RelationshipsAccount account) { + this.account = account; + } + + + /** + * Return true if this relationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Relationships relationships = (Relationships) o; + return Objects.equals(this.customer, relationships.customer) && + Objects.equals(this.account, relationships.account); + } + + @Override + public int hashCode() { + return Objects.hash(customer, account); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Relationships {\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Relationships1.java b/src/main/java/unit/java/sdk/model/Relationships1.java new file mode 100644 index 00000000..44a56614 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Relationships1.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationships1Account; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Relationships1 + */ +@JsonPropertyOrder({ + Relationships1.JSON_PROPERTY_ACCOUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Relationships1 { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private Relationships1Account account; + + public Relationships1() { + } + + public Relationships1 account(Relationships1Account account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationships1Account getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(Relationships1Account account) { + this.account = account; + } + + + /** + * Return true if this relationships_1 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Relationships1 relationships1 = (Relationships1) o; + return Objects.equals(this.account, relationships1.account); + } + + @Override + public int hashCode() { + return Objects.hash(account); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Relationships1 {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Relationships1Account.java b/src/main/java/unit/java/sdk/model/Relationships1Account.java new file mode 100644 index 00000000..8d1cead5 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Relationships1Account.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationships1AccountData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Relationships1Account + */ +@JsonPropertyOrder({ + Relationships1Account.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Relationships1Account { + public static final String JSON_PROPERTY_DATA = "data"; + private Relationships1AccountData data; + + public Relationships1Account() { + } + + public Relationships1Account data(Relationships1AccountData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationships1AccountData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(Relationships1AccountData data) { + this.data = data; + } + + + /** + * Return true if this relationships_1_account object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Relationships1Account relationships1Account = (Relationships1Account) o; + return Objects.equals(this.data, relationships1Account.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Relationships1Account {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Relationships1AccountData.java b/src/main/java/unit/java/sdk/model/Relationships1AccountData.java new file mode 100644 index 00000000..27ddae00 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Relationships1AccountData.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Relationships1AccountData + */ +@JsonPropertyOrder({ + Relationships1AccountData.JSON_PROPERTY_TYPE, + Relationships1AccountData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Relationships1AccountData { + /** + * Gets or Sets type + */ + public enum TypeEnum { + ACCOUNT("account"), + + DEPOSITACCOUNT("depositAccount"), + + FINANCIALBUSINESSFBOACCOUNT("financialBusinessFBOAccount"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public Relationships1AccountData() { + } + + public Relationships1AccountData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public Relationships1AccountData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this relationships_1_account_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Relationships1AccountData relationships1AccountData = (Relationships1AccountData) o; + return Objects.equals(this.type, relationships1AccountData.type) && + Objects.equals(this.id, relationships1AccountData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Relationships1AccountData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RelationshipsAccount.java b/src/main/java/unit/java/sdk/model/RelationshipsAccount.java new file mode 100644 index 00000000..1022f034 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RelationshipsAccount.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RelationshipsAccountData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RelationshipsAccount + */ +@JsonPropertyOrder({ + RelationshipsAccount.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RelationshipsAccount { + public static final String JSON_PROPERTY_DATA = "data"; + private RelationshipsAccountData data; + + public RelationshipsAccount() { + } + + public RelationshipsAccount data(RelationshipsAccountData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RelationshipsAccountData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(RelationshipsAccountData data) { + this.data = data; + } + + + /** + * Return true if this relationships_account object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RelationshipsAccount relationshipsAccount = (RelationshipsAccount) o; + return Objects.equals(this.data, relationshipsAccount.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelationshipsAccount {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RelationshipsAccountData.java b/src/main/java/unit/java/sdk/model/RelationshipsAccountData.java new file mode 100644 index 00000000..b1765db9 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RelationshipsAccountData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RelationshipsAccountData + */ +@JsonPropertyOrder({ + RelationshipsAccountData.JSON_PROPERTY_TYPE, + RelationshipsAccountData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RelationshipsAccountData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "account"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public RelationshipsAccountData() { + } + + public RelationshipsAccountData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public RelationshipsAccountData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this relationships_account_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RelationshipsAccountData relationshipsAccountData = (RelationshipsAccountData) o; + return Objects.equals(this.type, relationshipsAccountData.type) && + Objects.equals(this.id, relationshipsAccountData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelationshipsAccountData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RelationshipsCustomer.java b/src/main/java/unit/java/sdk/model/RelationshipsCustomer.java new file mode 100644 index 00000000..1160543d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RelationshipsCustomer.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RelationshipsCustomerData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RelationshipsCustomer + */ +@JsonPropertyOrder({ + RelationshipsCustomer.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RelationshipsCustomer { + public static final String JSON_PROPERTY_DATA = "data"; + private RelationshipsCustomerData data; + + public RelationshipsCustomer() { + } + + public RelationshipsCustomer data(RelationshipsCustomerData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RelationshipsCustomerData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(RelationshipsCustomerData data) { + this.data = data; + } + + + /** + * Return true if this relationships_customer object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RelationshipsCustomer relationshipsCustomer = (RelationshipsCustomer) o; + return Objects.equals(this.data, relationshipsCustomer.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelationshipsCustomer {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RelationshipsCustomerData.java b/src/main/java/unit/java/sdk/model/RelationshipsCustomerData.java new file mode 100644 index 00000000..dabef958 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RelationshipsCustomerData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RelationshipsCustomerData + */ +@JsonPropertyOrder({ + RelationshipsCustomerData.JSON_PROPERTY_TYPE, + RelationshipsCustomerData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RelationshipsCustomerData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "customer"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public RelationshipsCustomerData() { + } + + public RelationshipsCustomerData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public RelationshipsCustomerData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this relationships_customer_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RelationshipsCustomerData relationshipsCustomerData = (RelationshipsCustomerData) o; + return Objects.equals(this.type, relationshipsCustomerData.type) && + Objects.equals(this.id, relationshipsCustomerData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelationshipsCustomerData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReleaseTransaction.java b/src/main/java/unit/java/sdk/model/ReleaseTransaction.java new file mode 100644 index 00000000..b4961be3 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReleaseTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReleaseTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * ReleaseTransaction + */ +@JsonPropertyOrder({ + ReleaseTransaction.JSON_PROPERTY_ATTRIBUTES, + ReleaseTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class ReleaseTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ReleaseTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public ReleaseTransaction() { + } + + public ReleaseTransaction attributes(ReleaseTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ReleaseTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(ReleaseTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public ReleaseTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public ReleaseTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public ReleaseTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this ReleaseTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReleaseTransaction releaseTransaction = (ReleaseTransaction) o; + return Objects.equals(this.attributes, releaseTransaction.attributes) && + Objects.equals(this.relationships, releaseTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReleaseTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ReleaseTransaction", ReleaseTransaction.class); + JSON.registerDiscriminator(ReleaseTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/ReleaseTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/ReleaseTransactionAllOfAttributes.java new file mode 100644 index 00000000..21341b75 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReleaseTransactionAllOfAttributes.java @@ -0,0 +1,548 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.Counterparty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReleaseTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + ReleaseTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + ReleaseTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + ReleaseTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + ReleaseTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + ReleaseTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + ReleaseTransactionAllOfAttributes.JSON_PROPERTY_SENDER_NAME, + ReleaseTransactionAllOfAttributes.JSON_PROPERTY_DESCRIPTION, + ReleaseTransactionAllOfAttributes.JSON_PROPERTY_SENDER_ACCOUNT_NUMBER, + ReleaseTransactionAllOfAttributes.JSON_PROPERTY_SENDER_ADDRESS, + ReleaseTransactionAllOfAttributes.JSON_PROPERTY_COUNTERPARTY, + ReleaseTransactionAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReleaseTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_SENDER_NAME = "senderName"; + private String senderName; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_SENDER_ACCOUNT_NUMBER = "senderAccountNumber"; + private String senderAccountNumber; + + public static final String JSON_PROPERTY_SENDER_ADDRESS = "senderAddress"; + private Address senderAddress; + + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; + private Counterparty counterparty; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public ReleaseTransactionAllOfAttributes() { + } + + public ReleaseTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public ReleaseTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public ReleaseTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public ReleaseTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public ReleaseTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public ReleaseTransactionAllOfAttributes senderName(String senderName) { + this.senderName = senderName; + return this; + } + + /** + * Get senderName + * @return senderName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SENDER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSenderName() { + return senderName; + } + + + @JsonProperty(JSON_PROPERTY_SENDER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSenderName(String senderName) { + this.senderName = senderName; + } + + + public ReleaseTransactionAllOfAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + + public ReleaseTransactionAllOfAttributes senderAccountNumber(String senderAccountNumber) { + this.senderAccountNumber = senderAccountNumber; + return this; + } + + /** + * Get senderAccountNumber + * @return senderAccountNumber + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SENDER_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSenderAccountNumber() { + return senderAccountNumber; + } + + + @JsonProperty(JSON_PROPERTY_SENDER_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSenderAccountNumber(String senderAccountNumber) { + this.senderAccountNumber = senderAccountNumber; + } + + + public ReleaseTransactionAllOfAttributes senderAddress(Address senderAddress) { + this.senderAddress = senderAddress; + return this; + } + + /** + * Get senderAddress + * @return senderAddress + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SENDER_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Address getSenderAddress() { + return senderAddress; + } + + + @JsonProperty(JSON_PROPERTY_SENDER_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSenderAddress(Address senderAddress) { + this.senderAddress = senderAddress; + } + + + public ReleaseTransactionAllOfAttributes counterparty(Counterparty counterparty) { + this.counterparty = counterparty; + return this; + } + + /** + * Get counterparty + * @return counterparty + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Counterparty getCounterparty() { + return counterparty; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCounterparty(Counterparty counterparty) { + this.counterparty = counterparty; + } + + + public ReleaseTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this ReleaseTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReleaseTransactionAllOfAttributes releaseTransactionAllOfAttributes = (ReleaseTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, releaseTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, releaseTransactionAllOfAttributes.direction) && + Objects.equals(this.amount, releaseTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, releaseTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, releaseTransactionAllOfAttributes.summary) && + Objects.equals(this.senderName, releaseTransactionAllOfAttributes.senderName) && + Objects.equals(this.description, releaseTransactionAllOfAttributes.description) && + Objects.equals(this.senderAccountNumber, releaseTransactionAllOfAttributes.senderAccountNumber) && + Objects.equals(this.senderAddress, releaseTransactionAllOfAttributes.senderAddress) && + Objects.equals(this.counterparty, releaseTransactionAllOfAttributes.counterparty) && + Objects.equals(this.tags, releaseTransactionAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, amount, balance, summary, senderName, description, senderAccountNumber, senderAddress, counterparty, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReleaseTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" senderName: ").append(toIndentedString(senderName)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" senderAccountNumber: ").append(toIndentedString(senderAccountNumber)).append("\n"); + sb.append(" senderAddress: ").append(toIndentedString(senderAddress)).append("\n"); + sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `senderName` to the URL query string + if (getSenderName() != null) { + joiner.add(String.format("%ssenderName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSenderName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `senderAccountNumber` to the URL query string + if (getSenderAccountNumber() != null) { + joiner.add(String.format("%ssenderAccountNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSenderAccountNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `senderAddress` to the URL query string + if (getSenderAddress() != null) { + joiner.add(getSenderAddress().toUrlQueryString(prefix + "senderAddress" + suffix)); + } + + // add `counterparty` to the URL query string + if (getCounterparty() != null) { + joiner.add(getCounterparty().toUrlQueryString(prefix + "counterparty" + suffix)); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RepaidPaymentAdvanceTransaction.java b/src/main/java/unit/java/sdk/model/RepaidPaymentAdvanceTransaction.java new file mode 100644 index 00000000..4c5846f1 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RepaidPaymentAdvanceTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * RepaidPaymentAdvanceTransaction + */ +@JsonPropertyOrder({ + RepaidPaymentAdvanceTransaction.JSON_PROPERTY_ATTRIBUTES, + RepaidPaymentAdvanceTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class RepaidPaymentAdvanceTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CheckDepositTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public RepaidPaymentAdvanceTransaction() { + } + + public RepaidPaymentAdvanceTransaction attributes(CheckDepositTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CheckDepositTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CheckDepositTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public RepaidPaymentAdvanceTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public RepaidPaymentAdvanceTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public RepaidPaymentAdvanceTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this RepaidPaymentAdvanceTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RepaidPaymentAdvanceTransaction repaidPaymentAdvanceTransaction = (RepaidPaymentAdvanceTransaction) o; + return Objects.equals(this.attributes, repaidPaymentAdvanceTransaction.attributes) && + Objects.equals(this.relationships, repaidPaymentAdvanceTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RepaidPaymentAdvanceTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RepaidPaymentAdvanceTransaction", RepaidPaymentAdvanceTransaction.class); + JSON.registerDiscriminator(RepaidPaymentAdvanceTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/Repayment.java b/src/main/java/unit/java/sdk/model/Repayment.java new file mode 100644 index 00000000..a175a5d5 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Repayment.java @@ -0,0 +1,208 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * Repayment + */ +@JsonPropertyOrder({ + Repayment.JSON_PROPERTY_ID, + Repayment.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = AchRepayment.class, name = "achRepayment"), + @JsonSubTypes.Type(value = BookRepayment.class, name = "bookRepayment"), +}) + +public class Repayment { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public Repayment() { + } + + public Repayment id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public Repayment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + /** + * Return true if this repayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Repayment repayment = (Repayment) o; + return Objects.equals(this.id, repayment.id) && + Objects.equals(this.type, repayment.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Repayment {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("achRepayment", AchRepayment.class); + mappings.put("bookRepayment", BookRepayment.class); + mappings.put("repayment", Repayment.class); + JSON.registerDiscriminator(Repayment.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/RepaymentRelationship.java b/src/main/java/unit/java/sdk/model/RepaymentRelationship.java new file mode 100644 index 00000000..a3af47ed --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RepaymentRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RepaymentRelationshipData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RepaymentRelationship + */ +@JsonPropertyOrder({ + RepaymentRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RepaymentRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private RepaymentRelationshipData data; + + public RepaymentRelationship() { + } + + public RepaymentRelationship data(RepaymentRelationshipData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RepaymentRelationshipData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(RepaymentRelationshipData data) { + this.data = data; + } + + + /** + * Return true if this repaymentRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RepaymentRelationship repaymentRelationship = (RepaymentRelationship) o; + return Objects.equals(this.data, repaymentRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RepaymentRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RepaymentRelationshipData.java b/src/main/java/unit/java/sdk/model/RepaymentRelationshipData.java new file mode 100644 index 00000000..f689aa96 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RepaymentRelationshipData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RepaymentRelationshipData + */ +@JsonPropertyOrder({ + RepaymentRelationshipData.JSON_PROPERTY_TYPE, + RepaymentRelationshipData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RepaymentRelationshipData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "repayment"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public RepaymentRelationshipData() { + } + + public RepaymentRelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public RepaymentRelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this repaymentRelationship_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RepaymentRelationshipData repaymentRelationshipData = (RepaymentRelationshipData) o; + return Objects.equals(this.type, repaymentRelationshipData.type) && + Objects.equals(this.id, repaymentRelationshipData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RepaymentRelationshipData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RequireIdVerification.java b/src/main/java/unit/java/sdk/model/RequireIdVerification.java new file mode 100644 index 00000000..18addcfd --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RequireIdVerification.java @@ -0,0 +1,222 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RequireIdVerification + */ +@JsonPropertyOrder({ + RequireIdVerification.JSON_PROPERTY_INDIVIDUAL, + RequireIdVerification.JSON_PROPERTY_OFFICER, + RequireIdVerification.JSON_PROPERTY_BENEFICIAL_OWNERS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RequireIdVerification { + public static final String JSON_PROPERTY_INDIVIDUAL = "individual"; + private Boolean individual = false; + + public static final String JSON_PROPERTY_OFFICER = "officer"; + private Boolean officer = false; + + public static final String JSON_PROPERTY_BENEFICIAL_OWNERS = "beneficialOwners"; + private Boolean beneficialOwners = false; + + public RequireIdVerification() { + } + + public RequireIdVerification individual(Boolean individual) { + this.individual = individual; + return this; + } + + /** + * Get individual + * @return individual + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDIVIDUAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIndividual() { + return individual; + } + + + @JsonProperty(JSON_PROPERTY_INDIVIDUAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIndividual(Boolean individual) { + this.individual = individual; + } + + + public RequireIdVerification officer(Boolean officer) { + this.officer = officer; + return this; + } + + /** + * Get officer + * @return officer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OFFICER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getOfficer() { + return officer; + } + + + @JsonProperty(JSON_PROPERTY_OFFICER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOfficer(Boolean officer) { + this.officer = officer; + } + + + public RequireIdVerification beneficialOwners(Boolean beneficialOwners) { + this.beneficialOwners = beneficialOwners; + return this; + } + + /** + * Get beneficialOwners + * @return beneficialOwners + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BENEFICIAL_OWNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getBeneficialOwners() { + return beneficialOwners; + } + + + @JsonProperty(JSON_PROPERTY_BENEFICIAL_OWNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBeneficialOwners(Boolean beneficialOwners) { + this.beneficialOwners = beneficialOwners; + } + + + /** + * Return true if this requireIdVerification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RequireIdVerification requireIdVerification = (RequireIdVerification) o; + return Objects.equals(this.individual, requireIdVerification.individual) && + Objects.equals(this.officer, requireIdVerification.officer) && + Objects.equals(this.beneficialOwners, requireIdVerification.beneficialOwners); + } + + @Override + public int hashCode() { + return Objects.hash(individual, officer, beneficialOwners); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RequireIdVerification {\n"); + sb.append(" individual: ").append(toIndentedString(individual)).append("\n"); + sb.append(" officer: ").append(toIndentedString(officer)).append("\n"); + sb.append(" beneficialOwners: ").append(toIndentedString(beneficialOwners)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `individual` to the URL query string + if (getIndividual() != null) { + joiner.add(String.format("%sindividual%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIndividual()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `officer` to the URL query string + if (getOfficer() != null) { + joiner.add(String.format("%sofficer%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOfficer()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `beneficialOwners` to the URL query string + if (getBeneficialOwners() != null) { + joiner.add(String.format("%sbeneficialOwners%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBeneficialOwners()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ResponseContact.java b/src/main/java/unit/java/sdk/model/ResponseContact.java new file mode 100644 index 00000000..c7e5bddb --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ResponseContact.java @@ -0,0 +1,283 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ResponseContact + */ +@JsonPropertyOrder({ + ResponseContact.JSON_PROPERTY_FULL_NAME, + ResponseContact.JSON_PROPERTY_EMAIL, + ResponseContact.JSON_PROPERTY_PHONE, + ResponseContact.JSON_PROPERTY_JWT_SUBJECT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResponseContact { + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_JWT_SUBJECT = "jwtSubject"; + private JsonNullable jwtSubject = JsonNullable.undefined(); + + public ResponseContact() { + } + + public ResponseContact fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public ResponseContact email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public ResponseContact phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public ResponseContact jwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + return this; + } + + /** + * Get jwtSubject + * @return jwtSubject + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getJwtSubject() { + return jwtSubject.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getJwtSubject_JsonNullable() { + return jwtSubject; + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + public void setJwtSubject_JsonNullable(JsonNullable jwtSubject) { + this.jwtSubject = jwtSubject; + } + + public void setJwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + } + + + /** + * Return true if this responseContact object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseContact responseContact = (ResponseContact) o; + return Objects.equals(this.fullName, responseContact.fullName) && + Objects.equals(this.email, responseContact.email) && + Objects.equals(this.phone, responseContact.phone) && + equalsNullable(this.jwtSubject, responseContact.jwtSubject); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(fullName, email, phone, hashCodeNullable(jwtSubject)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseContact {\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `jwtSubject` to the URL query string + if (getJwtSubject() != null) { + joiner.add(String.format("%sjwtSubject%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getJwtSubject()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReturnCheckPaymentRequest.java b/src/main/java/unit/java/sdk/model/ReturnCheckPaymentRequest.java new file mode 100644 index 00000000..3c8dca74 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReturnCheckPaymentRequest.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReturnCheckPaymentRequestData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReturnCheckPaymentRequest + */ +@JsonPropertyOrder({ + ReturnCheckPaymentRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReturnCheckPaymentRequest { + public static final String JSON_PROPERTY_DATA = "data"; + private ReturnCheckPaymentRequestData data; + + public ReturnCheckPaymentRequest() { + } + + public ReturnCheckPaymentRequest data(ReturnCheckPaymentRequestData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReturnCheckPaymentRequestData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(ReturnCheckPaymentRequestData data) { + this.data = data; + } + + + /** + * Return true if this ReturnCheckPaymentRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnCheckPaymentRequest returnCheckPaymentRequest = (ReturnCheckPaymentRequest) o; + return Objects.equals(this.data, returnCheckPaymentRequest.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnCheckPaymentRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReturnCheckPaymentRequestData.java b/src/main/java/unit/java/sdk/model/ReturnCheckPaymentRequestData.java new file mode 100644 index 00000000..8f6b24f4 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReturnCheckPaymentRequestData.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReturnCheckPaymentRequestDataAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReturnCheckPaymentRequestData + */ +@JsonPropertyOrder({ + ReturnCheckPaymentRequestData.JSON_PROPERTY_TYPE, + ReturnCheckPaymentRequestData.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReturnCheckPaymentRequestData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "checkPaymentReturn"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ReturnCheckPaymentRequestDataAttributes attributes; + + public ReturnCheckPaymentRequestData() { + } + + public ReturnCheckPaymentRequestData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public ReturnCheckPaymentRequestData attributes(ReturnCheckPaymentRequestDataAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReturnCheckPaymentRequestDataAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(ReturnCheckPaymentRequestDataAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this ReturnCheckPaymentRequest_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnCheckPaymentRequestData returnCheckPaymentRequestData = (ReturnCheckPaymentRequestData) o; + return Objects.equals(this.type, returnCheckPaymentRequestData.type) && + Objects.equals(this.attributes, returnCheckPaymentRequestData.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnCheckPaymentRequestData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReturnCheckPaymentRequestDataAttributes.java b/src/main/java/unit/java/sdk/model/ReturnCheckPaymentRequestDataAttributes.java new file mode 100644 index 00000000..efbfe91f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReturnCheckPaymentRequestDataAttributes.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReturnReason; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReturnCheckPaymentRequestDataAttributes + */ +@JsonPropertyOrder({ + ReturnCheckPaymentRequestDataAttributes.JSON_PROPERTY_REASON +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReturnCheckPaymentRequestDataAttributes { + public static final String JSON_PROPERTY_REASON = "reason"; + private ReturnReason reason; + + public ReturnCheckPaymentRequestDataAttributes() { + } + + public ReturnCheckPaymentRequestDataAttributes reason(ReturnReason reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReturnReason getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(ReturnReason reason) { + this.reason = reason; + } + + + /** + * Return true if this ReturnCheckPaymentRequest_data_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnCheckPaymentRequestDataAttributes returnCheckPaymentRequestDataAttributes = (ReturnCheckPaymentRequestDataAttributes) o; + return Objects.equals(this.reason, returnCheckPaymentRequestDataAttributes.reason); + } + + @Override + public int hashCode() { + return Objects.hash(reason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnCheckPaymentRequestDataAttributes {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReturnReason.java b/src/main/java/unit/java/sdk/model/ReturnReason.java new file mode 100644 index 00000000..7b987229 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReturnReason.java @@ -0,0 +1,98 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets returnReason + */ +public enum ReturnReason { + + INSUFFICIENTFUNDS("InsufficientFunds"), + + ACCOUNTCLOSED("AccountClosed"), + + ALTEREDCHECK("AlteredCheck"), + + FORGEDSIGNATURE("ForgedSignature"), + + POSTDATEDCHECK("PostdatedCheck"), + + STOPPAYMENTORDER("StopPaymentOrder"), + + UNAUTHORIZEDDEBIT("UnauthorizedDebit"), + + WRONGAMOUNT("WrongAmount"), + + DUPLICATEPAYMENT("DuplicatePayment"), + + MISSINGSIGNATURE("MissingSignature"), + + IRREGULARENDORSEMENT("IrregularEndorsement"), + + OTHER("Other"); + + private String value; + + ReturnReason(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ReturnReason fromValue(String value) { + for (ReturnReason b : ReturnReason.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } + +} + diff --git a/src/main/java/unit/java/sdk/model/ReturnedAchTransaction.java b/src/main/java/unit/java/sdk/model/ReturnedAchTransaction.java new file mode 100644 index 00000000..5ec1bcd0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReturnedAchTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReturnedAchTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * ReturnedAchTransaction + */ +@JsonPropertyOrder({ + ReturnedAchTransaction.JSON_PROPERTY_ATTRIBUTES, + ReturnedAchTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class ReturnedAchTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ReturnedAchTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public ReturnedAchTransaction() { + } + + public ReturnedAchTransaction attributes(ReturnedAchTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ReturnedAchTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(ReturnedAchTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public ReturnedAchTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public ReturnedAchTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public ReturnedAchTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this ReturnedAchTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnedAchTransaction returnedAchTransaction = (ReturnedAchTransaction) o; + return Objects.equals(this.attributes, returnedAchTransaction.attributes) && + Objects.equals(this.relationships, returnedAchTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnedAchTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ReturnedAchTransaction", ReturnedAchTransaction.class); + JSON.registerDiscriminator(ReturnedAchTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/ReturnedAchTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/ReturnedAchTransactionAllOfAttributes.java new file mode 100644 index 00000000..e6e710b7 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReturnedAchTransactionAllOfAttributes.java @@ -0,0 +1,546 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReturnedAchTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + ReturnedAchTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + ReturnedAchTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + ReturnedAchTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + ReturnedAchTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + ReturnedAchTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + ReturnedAchTransactionAllOfAttributes.JSON_PROPERTY_COMPANY_NAME, + ReturnedAchTransactionAllOfAttributes.JSON_PROPERTY_COUNTERPARTY_NAME, + ReturnedAchTransactionAllOfAttributes.JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER, + ReturnedAchTransactionAllOfAttributes.JSON_PROPERTY_REASON, + ReturnedAchTransactionAllOfAttributes.JSON_PROPERTY_ACH_REASON, + ReturnedAchTransactionAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReturnedAchTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_COMPANY_NAME = "companyName"; + private String companyName; + + public static final String JSON_PROPERTY_COUNTERPARTY_NAME = "counterpartyName"; + private String counterpartyName; + + public static final String JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER = "counterpartyRoutingNumber"; + private String counterpartyRoutingNumber; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public static final String JSON_PROPERTY_ACH_REASON = "achReason"; + private String achReason; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public ReturnedAchTransactionAllOfAttributes() { + } + + public ReturnedAchTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public ReturnedAchTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public ReturnedAchTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public ReturnedAchTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public ReturnedAchTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public ReturnedAchTransactionAllOfAttributes companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * Get companyName + * @return companyName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPANY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCompanyName() { + return companyName; + } + + + @JsonProperty(JSON_PROPERTY_COMPANY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public ReturnedAchTransactionAllOfAttributes counterpartyName(String counterpartyName) { + this.counterpartyName = counterpartyName; + return this; + } + + /** + * Get counterpartyName + * @return counterpartyName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCounterpartyName() { + return counterpartyName; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCounterpartyName(String counterpartyName) { + this.counterpartyName = counterpartyName; + } + + + public ReturnedAchTransactionAllOfAttributes counterpartyRoutingNumber(String counterpartyRoutingNumber) { + this.counterpartyRoutingNumber = counterpartyRoutingNumber; + return this; + } + + /** + * Get counterpartyRoutingNumber + * @return counterpartyRoutingNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCounterpartyRoutingNumber() { + return counterpartyRoutingNumber; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCounterpartyRoutingNumber(String counterpartyRoutingNumber) { + this.counterpartyRoutingNumber = counterpartyRoutingNumber; + } + + + public ReturnedAchTransactionAllOfAttributes reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReason(String reason) { + this.reason = reason; + } + + + public ReturnedAchTransactionAllOfAttributes achReason(String achReason) { + this.achReason = achReason; + return this; + } + + /** + * Get achReason + * @return achReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACH_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAchReason() { + return achReason; + } + + + @JsonProperty(JSON_PROPERTY_ACH_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAchReason(String achReason) { + this.achReason = achReason; + } + + + public ReturnedAchTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this ReturnedAchTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnedAchTransactionAllOfAttributes returnedAchTransactionAllOfAttributes = (ReturnedAchTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, returnedAchTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, returnedAchTransactionAllOfAttributes.direction) && + Objects.equals(this.amount, returnedAchTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, returnedAchTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, returnedAchTransactionAllOfAttributes.summary) && + Objects.equals(this.companyName, returnedAchTransactionAllOfAttributes.companyName) && + Objects.equals(this.counterpartyName, returnedAchTransactionAllOfAttributes.counterpartyName) && + Objects.equals(this.counterpartyRoutingNumber, returnedAchTransactionAllOfAttributes.counterpartyRoutingNumber) && + Objects.equals(this.reason, returnedAchTransactionAllOfAttributes.reason) && + Objects.equals(this.achReason, returnedAchTransactionAllOfAttributes.achReason) && + Objects.equals(this.tags, returnedAchTransactionAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, amount, balance, summary, companyName, counterpartyName, counterpartyRoutingNumber, reason, achReason, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnedAchTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" counterpartyName: ").append(toIndentedString(counterpartyName)).append("\n"); + sb.append(" counterpartyRoutingNumber: ").append(toIndentedString(counterpartyRoutingNumber)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" achReason: ").append(toIndentedString(achReason)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `companyName` to the URL query string + if (getCompanyName() != null) { + joiner.add(String.format("%scompanyName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCompanyName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterpartyName` to the URL query string + if (getCounterpartyName() != null) { + joiner.add(String.format("%scounterpartyName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCounterpartyName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterpartyRoutingNumber` to the URL query string + if (getCounterpartyRoutingNumber() != null) { + joiner.add(String.format("%scounterpartyRoutingNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCounterpartyRoutingNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `achReason` to the URL query string + if (getAchReason() != null) { + joiner.add(String.format("%sachReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAchReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReturnedCheckDepositTransaction.java b/src/main/java/unit/java/sdk/model/ReturnedCheckDepositTransaction.java new file mode 100644 index 00000000..ed735292 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReturnedCheckDepositTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReturnedCheckDepositTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * ReturnedCheckDepositTransaction + */ +@JsonPropertyOrder({ + ReturnedCheckDepositTransaction.JSON_PROPERTY_ATTRIBUTES, + ReturnedCheckDepositTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class ReturnedCheckDepositTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ReturnedCheckDepositTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public ReturnedCheckDepositTransaction() { + } + + public ReturnedCheckDepositTransaction attributes(ReturnedCheckDepositTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ReturnedCheckDepositTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(ReturnedCheckDepositTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public ReturnedCheckDepositTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public ReturnedCheckDepositTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public ReturnedCheckDepositTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this ReturnedCheckDepositTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnedCheckDepositTransaction returnedCheckDepositTransaction = (ReturnedCheckDepositTransaction) o; + return Objects.equals(this.attributes, returnedCheckDepositTransaction.attributes) && + Objects.equals(this.relationships, returnedCheckDepositTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnedCheckDepositTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ReturnedCheckDepositTransaction", ReturnedCheckDepositTransaction.class); + JSON.registerDiscriminator(ReturnedCheckDepositTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/ReturnedCheckDepositTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/ReturnedCheckDepositTransactionAllOfAttributes.java new file mode 100644 index 00000000..9ab389cb --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReturnedCheckDepositTransactionAllOfAttributes.java @@ -0,0 +1,402 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReturnedCheckDepositTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + ReturnedCheckDepositTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + ReturnedCheckDepositTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + ReturnedCheckDepositTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + ReturnedCheckDepositTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + ReturnedCheckDepositTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + ReturnedCheckDepositTransactionAllOfAttributes.JSON_PROPERTY_REASON, + ReturnedCheckDepositTransactionAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReturnedCheckDepositTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public ReturnedCheckDepositTransactionAllOfAttributes() { + } + + public ReturnedCheckDepositTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public ReturnedCheckDepositTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public ReturnedCheckDepositTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public ReturnedCheckDepositTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public ReturnedCheckDepositTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public ReturnedCheckDepositTransactionAllOfAttributes reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(String reason) { + this.reason = reason; + } + + + public ReturnedCheckDepositTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this ReturnedCheckDepositTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnedCheckDepositTransactionAllOfAttributes returnedCheckDepositTransactionAllOfAttributes = (ReturnedCheckDepositTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, returnedCheckDepositTransactionAllOfAttributes.createdAt) && + Objects.equals(this.amount, returnedCheckDepositTransactionAllOfAttributes.amount) && + Objects.equals(this.direction, returnedCheckDepositTransactionAllOfAttributes.direction) && + Objects.equals(this.balance, returnedCheckDepositTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, returnedCheckDepositTransactionAllOfAttributes.summary) && + Objects.equals(this.reason, returnedCheckDepositTransactionAllOfAttributes.reason) && + Objects.equals(this.tags, returnedCheckDepositTransactionAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, amount, direction, balance, summary, reason, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnedCheckDepositTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReturnedCheckPaymentTransaction.java b/src/main/java/unit/java/sdk/model/ReturnedCheckPaymentTransaction.java new file mode 100644 index 00000000..9e6cba60 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReturnedCheckPaymentTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReturnedCheckPaymentTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * ReturnedCheckPaymentTransaction + */ +@JsonPropertyOrder({ + ReturnedCheckPaymentTransaction.JSON_PROPERTY_ATTRIBUTES, + ReturnedCheckPaymentTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class ReturnedCheckPaymentTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ReturnedCheckPaymentTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public ReturnedCheckPaymentTransaction() { + } + + public ReturnedCheckPaymentTransaction attributes(ReturnedCheckPaymentTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ReturnedCheckPaymentTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(ReturnedCheckPaymentTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public ReturnedCheckPaymentTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public ReturnedCheckPaymentTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public ReturnedCheckPaymentTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this ReturnedCheckPaymentTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnedCheckPaymentTransaction returnedCheckPaymentTransaction = (ReturnedCheckPaymentTransaction) o; + return Objects.equals(this.attributes, returnedCheckPaymentTransaction.attributes) && + Objects.equals(this.relationships, returnedCheckPaymentTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnedCheckPaymentTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ReturnedCheckPaymentTransaction", ReturnedCheckPaymentTransaction.class); + JSON.registerDiscriminator(ReturnedCheckPaymentTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/ReturnedCheckPaymentTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/ReturnedCheckPaymentTransactionAllOfAttributes.java new file mode 100644 index 00000000..572fa3ba --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReturnedCheckPaymentTransactionAllOfAttributes.java @@ -0,0 +1,402 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReturnedCheckPaymentTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + ReturnedCheckPaymentTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + ReturnedCheckPaymentTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + ReturnedCheckPaymentTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + ReturnedCheckPaymentTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + ReturnedCheckPaymentTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + ReturnedCheckPaymentTransactionAllOfAttributes.JSON_PROPERTY_REASON, + ReturnedCheckPaymentTransactionAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReturnedCheckPaymentTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public ReturnedCheckPaymentTransactionAllOfAttributes() { + } + + public ReturnedCheckPaymentTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public ReturnedCheckPaymentTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public ReturnedCheckPaymentTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public ReturnedCheckPaymentTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public ReturnedCheckPaymentTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public ReturnedCheckPaymentTransactionAllOfAttributes reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReason(String reason) { + this.reason = reason; + } + + + public ReturnedCheckPaymentTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this ReturnedCheckPaymentTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnedCheckPaymentTransactionAllOfAttributes returnedCheckPaymentTransactionAllOfAttributes = (ReturnedCheckPaymentTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, returnedCheckPaymentTransactionAllOfAttributes.createdAt) && + Objects.equals(this.amount, returnedCheckPaymentTransactionAllOfAttributes.amount) && + Objects.equals(this.direction, returnedCheckPaymentTransactionAllOfAttributes.direction) && + Objects.equals(this.balance, returnedCheckPaymentTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, returnedCheckPaymentTransactionAllOfAttributes.summary) && + Objects.equals(this.reason, returnedCheckPaymentTransactionAllOfAttributes.reason) && + Objects.equals(this.tags, returnedCheckPaymentTransactionAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, amount, direction, balance, summary, reason, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnedCheckPaymentTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReturnedReceivedAchTransaction.java b/src/main/java/unit/java/sdk/model/ReturnedReceivedAchTransaction.java new file mode 100644 index 00000000..cc425e17 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReturnedReceivedAchTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReturnedReceivedAchTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * ReturnedReceivedAchTransaction + */ +@JsonPropertyOrder({ + ReturnedReceivedAchTransaction.JSON_PROPERTY_ATTRIBUTES, + ReturnedReceivedAchTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class ReturnedReceivedAchTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ReturnedReceivedAchTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public ReturnedReceivedAchTransaction() { + } + + public ReturnedReceivedAchTransaction attributes(ReturnedReceivedAchTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ReturnedReceivedAchTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(ReturnedReceivedAchTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public ReturnedReceivedAchTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public ReturnedReceivedAchTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public ReturnedReceivedAchTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this ReturnedReceivedAchTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnedReceivedAchTransaction returnedReceivedAchTransaction = (ReturnedReceivedAchTransaction) o; + return Objects.equals(this.attributes, returnedReceivedAchTransaction.attributes) && + Objects.equals(this.relationships, returnedReceivedAchTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnedReceivedAchTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ReturnedReceivedAchTransaction", ReturnedReceivedAchTransaction.class); + JSON.registerDiscriminator(ReturnedReceivedAchTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/ReturnedReceivedAchTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/ReturnedReceivedAchTransactionAllOfAttributes.java new file mode 100644 index 00000000..9958a93a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReturnedReceivedAchTransactionAllOfAttributes.java @@ -0,0 +1,438 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReturnedReceivedAchTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + ReturnedReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + ReturnedReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + ReturnedReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + ReturnedReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + ReturnedReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + ReturnedReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_COMPANY_NAME, + ReturnedReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_REASON, + ReturnedReceivedAchTransactionAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReturnedReceivedAchTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_COMPANY_NAME = "companyName"; + private String companyName; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public ReturnedReceivedAchTransactionAllOfAttributes() { + } + + public ReturnedReceivedAchTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public ReturnedReceivedAchTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public ReturnedReceivedAchTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public ReturnedReceivedAchTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public ReturnedReceivedAchTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public ReturnedReceivedAchTransactionAllOfAttributes companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * Get companyName + * @return companyName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPANY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCompanyName() { + return companyName; + } + + + @JsonProperty(JSON_PROPERTY_COMPANY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public ReturnedReceivedAchTransactionAllOfAttributes reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReason(String reason) { + this.reason = reason; + } + + + public ReturnedReceivedAchTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this ReturnedReceivedAchTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnedReceivedAchTransactionAllOfAttributes returnedReceivedAchTransactionAllOfAttributes = (ReturnedReceivedAchTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, returnedReceivedAchTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, returnedReceivedAchTransactionAllOfAttributes.direction) && + Objects.equals(this.amount, returnedReceivedAchTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, returnedReceivedAchTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, returnedReceivedAchTransactionAllOfAttributes.summary) && + Objects.equals(this.companyName, returnedReceivedAchTransactionAllOfAttributes.companyName) && + Objects.equals(this.reason, returnedReceivedAchTransactionAllOfAttributes.reason) && + Objects.equals(this.tags, returnedReceivedAchTransactionAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, amount, balance, summary, companyName, reason, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnedReceivedAchTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `companyName` to the URL query string + if (getCompanyName() != null) { + joiner.add(String.format("%scompanyName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCompanyName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReturnedRelationship.java b/src/main/java/unit/java/sdk/model/ReturnedRelationship.java new file mode 100644 index 00000000..aba77a87 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReturnedRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsReceivePaymentTransactionData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReturnedRelationship + */ +@JsonPropertyOrder({ + ReturnedRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReturnedRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private ReceivedPaymentRelationshipsReceivePaymentTransactionData data; + + public ReturnedRelationship() { + } + + public ReturnedRelationship data(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ReceivedPaymentRelationshipsReceivePaymentTransactionData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { + this.data = data; + } + + + /** + * Return true if this returnedRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnedRelationship returnedRelationship = (ReturnedRelationship) o; + return Objects.equals(this.data, returnedRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnedRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/ReversalTransaction.java b/src/main/java/unit/java/sdk/model/ReversalTransaction.java new file mode 100644 index 00000000..c2e996d2 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReversalTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReversalTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * ReversalTransaction + */ +@JsonPropertyOrder({ + ReversalTransaction.JSON_PROPERTY_ATTRIBUTES, + ReversalTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class ReversalTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ReversalTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public ReversalTransaction() { + } + + public ReversalTransaction attributes(ReversalTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ReversalTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(ReversalTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public ReversalTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public ReversalTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public ReversalTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this ReversalTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReversalTransaction reversalTransaction = (ReversalTransaction) o; + return Objects.equals(this.attributes, reversalTransaction.attributes) && + Objects.equals(this.relationships, reversalTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReversalTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ReversalTransaction", ReversalTransaction.class); + JSON.registerDiscriminator(ReversalTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/ReversalTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/ReversalTransactionAllOfAttributes.java new file mode 100644 index 00000000..2176df1a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/ReversalTransactionAllOfAttributes.java @@ -0,0 +1,497 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ReversalTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + ReversalTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + ReversalTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + ReversalTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + ReversalTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + ReversalTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + ReversalTransactionAllOfAttributes.JSON_PROPERTY_CARD_LAST4_DIGITS, + ReversalTransactionAllOfAttributes.JSON_PROPERTY_TAGS, + ReversalTransactionAllOfAttributes.JSON_PROPERTY_NETWORK_TRANSACTION_ID, + ReversalTransactionAllOfAttributes.JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReversalTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_CARD_LAST4_DIGITS = "cardLast4Digits"; + private String cardLast4Digits; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_NETWORK_TRANSACTION_ID = "networkTransactionId"; + private String networkTransactionId; + + public static final String JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE = "internationalServiceFee"; + private JsonNullable internationalServiceFee = JsonNullable.undefined(); + + public ReversalTransactionAllOfAttributes() { + } + + public ReversalTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public ReversalTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public ReversalTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public ReversalTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public ReversalTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public ReversalTransactionAllOfAttributes cardLast4Digits(String cardLast4Digits) { + this.cardLast4Digits = cardLast4Digits; + return this; + } + + /** + * Get cardLast4Digits + * @return cardLast4Digits + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CARD_LAST4_DIGITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCardLast4Digits() { + return cardLast4Digits; + } + + + @JsonProperty(JSON_PROPERTY_CARD_LAST4_DIGITS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCardLast4Digits(String cardLast4Digits) { + this.cardLast4Digits = cardLast4Digits; + } + + + public ReversalTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public ReversalTransactionAllOfAttributes networkTransactionId(String networkTransactionId) { + this.networkTransactionId = networkTransactionId; + return this; + } + + /** + * Get networkTransactionId + * @return networkTransactionId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNetworkTransactionId() { + return networkTransactionId; + } + + + @JsonProperty(JSON_PROPERTY_NETWORK_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNetworkTransactionId(String networkTransactionId) { + this.networkTransactionId = networkTransactionId; + } + + + public ReversalTransactionAllOfAttributes internationalServiceFee(Integer internationalServiceFee) { + this.internationalServiceFee = JsonNullable.of(internationalServiceFee); + return this; + } + + /** + * Get internationalServiceFee + * @return internationalServiceFee + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public Integer getInternationalServiceFee() { + return internationalServiceFee.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getInternationalServiceFee_JsonNullable() { + return internationalServiceFee; + } + + @JsonProperty(JSON_PROPERTY_INTERNATIONAL_SERVICE_FEE) + public void setInternationalServiceFee_JsonNullable(JsonNullable internationalServiceFee) { + this.internationalServiceFee = internationalServiceFee; + } + + public void setInternationalServiceFee(Integer internationalServiceFee) { + this.internationalServiceFee = JsonNullable.of(internationalServiceFee); + } + + + /** + * Return true if this ReversalTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReversalTransactionAllOfAttributes reversalTransactionAllOfAttributes = (ReversalTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, reversalTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, reversalTransactionAllOfAttributes.direction) && + Objects.equals(this.amount, reversalTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, reversalTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, reversalTransactionAllOfAttributes.summary) && + Objects.equals(this.cardLast4Digits, reversalTransactionAllOfAttributes.cardLast4Digits) && + Objects.equals(this.tags, reversalTransactionAllOfAttributes.tags) && + Objects.equals(this.networkTransactionId, reversalTransactionAllOfAttributes.networkTransactionId) && + equalsNullable(this.internationalServiceFee, reversalTransactionAllOfAttributes.internationalServiceFee); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, amount, balance, summary, cardLast4Digits, tags, networkTransactionId, hashCodeNullable(internationalServiceFee)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReversalTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" cardLast4Digits: ").append(toIndentedString(cardLast4Digits)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" networkTransactionId: ").append(toIndentedString(networkTransactionId)).append("\n"); + sb.append(" internationalServiceFee: ").append(toIndentedString(internationalServiceFee)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `cardLast4Digits` to the URL query string + if (getCardLast4Digits() != null) { + joiner.add(String.format("%scardLast4Digits%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCardLast4Digits()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `networkTransactionId` to the URL query string + if (getNetworkTransactionId() != null) { + joiner.add(String.format("%snetworkTransactionId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNetworkTransactionId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `internationalServiceFee` to the URL query string + if (getInternationalServiceFee() != null) { + joiner.add(String.format("%sinternationalServiceFee%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getInternationalServiceFee()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Revocability.java b/src/main/java/unit/java/sdk/model/Revocability.java new file mode 100644 index 00000000..5a03a7cc --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Revocability.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets revocability + */ +public enum Revocability { + + REVOCABLE("Revocable"), + + IRREVOCABLE("Irrevocable"); + + private String value; + + Revocability(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static Revocability fromValue(String value) { + for (Revocability b : Revocability.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } + +} + diff --git a/src/main/java/unit/java/sdk/model/Reward.java b/src/main/java/unit/java/sdk/model/Reward.java new file mode 100644 index 00000000..d219bce6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Reward.java @@ -0,0 +1,260 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RewardAttributes; +import unit.java.sdk.model.RewardRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Reward + */ +@JsonPropertyOrder({ + Reward.JSON_PROPERTY_TYPE, + Reward.JSON_PROPERTY_ID, + Reward.JSON_PROPERTY_ATTRIBUTES, + Reward.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Reward { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "reward"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RewardAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private RewardRelationships relationships; + + public Reward() { + } + + public Reward type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public Reward id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + public Reward attributes(RewardAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RewardAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(RewardAttributes attributes) { + this.attributes = attributes; + } + + + public Reward relationships(RewardRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RewardRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(RewardRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this reward object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Reward reward = (Reward) o; + return Objects.equals(this.type, reward.type) && + Objects.equals(this.id, reward.id) && + Objects.equals(this.attributes, reward.attributes) && + Objects.equals(this.relationships, reward.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Reward {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RewardAttributes.java b/src/main/java/unit/java/sdk/model/RewardAttributes.java new file mode 100644 index 00000000..415970e3 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RewardAttributes.java @@ -0,0 +1,367 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RewardAttributes + */ +@JsonPropertyOrder({ + RewardAttributes.JSON_PROPERTY_CREATED_AT, + RewardAttributes.JSON_PROPERTY_AMOUNT, + RewardAttributes.JSON_PROPERTY_DESCRIPTION, + RewardAttributes.JSON_PROPERTY_STATUS, + RewardAttributes.JSON_PROPERTY_REJECT_REASON, + RewardAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RewardAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + REJECTED("Rejected"), + + SENT("Sent"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_REJECT_REASON = "rejectReason"; + private String rejectReason; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public RewardAttributes() { + } + + public RewardAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public RewardAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public RewardAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public RewardAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public RewardAttributes rejectReason(String rejectReason) { + this.rejectReason = rejectReason; + return this; + } + + /** + * Get rejectReason + * @return rejectReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REJECT_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRejectReason() { + return rejectReason; + } + + + @JsonProperty(JSON_PROPERTY_REJECT_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRejectReason(String rejectReason) { + this.rejectReason = rejectReason; + } + + + public RewardAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this reward_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RewardAttributes rewardAttributes = (RewardAttributes) o; + return Objects.equals(this.createdAt, rewardAttributes.createdAt) && + Objects.equals(this.amount, rewardAttributes.amount) && + Objects.equals(this.description, rewardAttributes.description) && + Objects.equals(this.status, rewardAttributes.status) && + Objects.equals(this.rejectReason, rewardAttributes.rejectReason) && + Objects.equals(this.tags, rewardAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, amount, description, status, rejectReason, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RewardAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" rejectReason: ").append(toIndentedString(rejectReason)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `rejectReason` to the URL query string + if (getRejectReason() != null) { + joiner.add(String.format("%srejectReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRejectReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RewardRelationship.java b/src/main/java/unit/java/sdk/model/RewardRelationship.java new file mode 100644 index 00000000..2cbd1e61 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RewardRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RewardRelationshipData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RewardRelationship + */ +@JsonPropertyOrder({ + RewardRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RewardRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private RewardRelationshipData data; + + public RewardRelationship() { + } + + public RewardRelationship data(RewardRelationshipData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RewardRelationshipData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(RewardRelationshipData data) { + this.data = data; + } + + + /** + * Return true if this rewardRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RewardRelationship rewardRelationship = (RewardRelationship) o; + return Objects.equals(this.data, rewardRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RewardRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RewardRelationshipData.java b/src/main/java/unit/java/sdk/model/RewardRelationshipData.java new file mode 100644 index 00000000..a3691100 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RewardRelationshipData.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RewardRelationshipData + */ +@JsonPropertyOrder({ + RewardRelationshipData.JSON_PROPERTY_TYPE, + RewardRelationshipData.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RewardRelationshipData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "reward"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public RewardRelationshipData() { + } + + public RewardRelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public RewardRelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this rewardRelationship_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RewardRelationshipData rewardRelationshipData = (RewardRelationshipData) o; + return Objects.equals(this.type, rewardRelationshipData.type) && + Objects.equals(this.id, rewardRelationshipData.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RewardRelationshipData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RewardRelationships.java b/src/main/java/unit/java/sdk/model/RewardRelationships.java new file mode 100644 index 00000000..9be9dc7a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RewardRelationships.java @@ -0,0 +1,333 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CardRelationship; +import unit.java.sdk.model.Relationship; +import unit.java.sdk.model.TransactionRelationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RewardRelationships + */ +@JsonPropertyOrder({ + RewardRelationships.JSON_PROPERTY_RECEIVING_ACCOUNT, + RewardRelationships.JSON_PROPERTY_FUNDING_ACCOUNT, + RewardRelationships.JSON_PROPERTY_CUSTOMER, + RewardRelationships.JSON_PROPERTY_REWARDED_TRANSACTION, + RewardRelationships.JSON_PROPERTY_TRANSACTION, + RewardRelationships.JSON_PROPERTY_CARD +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RewardRelationships { + public static final String JSON_PROPERTY_RECEIVING_ACCOUNT = "receivingAccount"; + private Relationship receivingAccount; + + public static final String JSON_PROPERTY_FUNDING_ACCOUNT = "fundingAccount"; + private Relationship fundingAccount; + + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private Relationship customer; + + public static final String JSON_PROPERTY_REWARDED_TRANSACTION = "rewardedTransaction"; + private Relationship rewardedTransaction; + + public static final String JSON_PROPERTY_TRANSACTION = "transaction"; + private TransactionRelationship transaction; + + public static final String JSON_PROPERTY_CARD = "card"; + private CardRelationship card; + + public RewardRelationships() { + } + + public RewardRelationships receivingAccount(Relationship receivingAccount) { + this.receivingAccount = receivingAccount; + return this; + } + + /** + * Get receivingAccount + * @return receivingAccount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECEIVING_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationship getReceivingAccount() { + return receivingAccount; + } + + + @JsonProperty(JSON_PROPERTY_RECEIVING_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReceivingAccount(Relationship receivingAccount) { + this.receivingAccount = receivingAccount; + } + + + public RewardRelationships fundingAccount(Relationship fundingAccount) { + this.fundingAccount = fundingAccount; + return this; + } + + /** + * Get fundingAccount + * @return fundingAccount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FUNDING_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationship getFundingAccount() { + return fundingAccount; + } + + + @JsonProperty(JSON_PROPERTY_FUNDING_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFundingAccount(Relationship fundingAccount) { + this.fundingAccount = fundingAccount; + } + + + public RewardRelationships customer(Relationship customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Relationship getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomer(Relationship customer) { + this.customer = customer; + } + + + public RewardRelationships rewardedTransaction(Relationship rewardedTransaction) { + this.rewardedTransaction = rewardedTransaction; + return this; + } + + /** + * Get rewardedTransaction + * @return rewardedTransaction + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REWARDED_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Relationship getRewardedTransaction() { + return rewardedTransaction; + } + + + @JsonProperty(JSON_PROPERTY_REWARDED_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRewardedTransaction(Relationship rewardedTransaction) { + this.rewardedTransaction = rewardedTransaction; + } + + + public RewardRelationships transaction(TransactionRelationship transaction) { + this.transaction = transaction; + return this; + } + + /** + * Get transaction + * @return transaction + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TransactionRelationship getTransaction() { + return transaction; + } + + + @JsonProperty(JSON_PROPERTY_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransaction(TransactionRelationship transaction) { + this.transaction = transaction; + } + + + public RewardRelationships card(CardRelationship card) { + this.card = card; + return this; + } + + /** + * Get card + * @return card + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CardRelationship getCard() { + return card; + } + + + @JsonProperty(JSON_PROPERTY_CARD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCard(CardRelationship card) { + this.card = card; + } + + + /** + * Return true if this rewardRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RewardRelationships rewardRelationships = (RewardRelationships) o; + return Objects.equals(this.receivingAccount, rewardRelationships.receivingAccount) && + Objects.equals(this.fundingAccount, rewardRelationships.fundingAccount) && + Objects.equals(this.customer, rewardRelationships.customer) && + Objects.equals(this.rewardedTransaction, rewardRelationships.rewardedTransaction) && + Objects.equals(this.transaction, rewardRelationships.transaction) && + Objects.equals(this.card, rewardRelationships.card); + } + + @Override + public int hashCode() { + return Objects.hash(receivingAccount, fundingAccount, customer, rewardedTransaction, transaction, card); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RewardRelationships {\n"); + sb.append(" receivingAccount: ").append(toIndentedString(receivingAccount)).append("\n"); + sb.append(" fundingAccount: ").append(toIndentedString(fundingAccount)).append("\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" rewardedTransaction: ").append(toIndentedString(rewardedTransaction)).append("\n"); + sb.append(" transaction: ").append(toIndentedString(transaction)).append("\n"); + sb.append(" card: ").append(toIndentedString(card)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `receivingAccount` to the URL query string + if (getReceivingAccount() != null) { + joiner.add(getReceivingAccount().toUrlQueryString(prefix + "receivingAccount" + suffix)); + } + + // add `fundingAccount` to the URL query string + if (getFundingAccount() != null) { + joiner.add(getFundingAccount().toUrlQueryString(prefix + "fundingAccount" + suffix)); + } + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + // add `rewardedTransaction` to the URL query string + if (getRewardedTransaction() != null) { + joiner.add(getRewardedTransaction().toUrlQueryString(prefix + "rewardedTransaction" + suffix)); + } + + // add `transaction` to the URL query string + if (getTransaction() != null) { + joiner.add(getTransaction().toUrlQueryString(prefix + "transaction" + suffix)); + } + + // add `card` to the URL query string + if (getCard() != null) { + joiner.add(getCard().toUrlQueryString(prefix + "card" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/RewardTransaction.java b/src/main/java/unit/java/sdk/model/RewardTransaction.java new file mode 100644 index 00000000..75815ea3 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RewardTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RewardTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * RewardTransaction + */ +@JsonPropertyOrder({ + RewardTransaction.JSON_PROPERTY_ATTRIBUTES, + RewardTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class RewardTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RewardTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public RewardTransaction() { + } + + public RewardTransaction attributes(RewardTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RewardTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(RewardTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public RewardTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public RewardTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public RewardTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this RewardTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RewardTransaction rewardTransaction = (RewardTransaction) o; + return Objects.equals(this.attributes, rewardTransaction.attributes) && + Objects.equals(this.relationships, rewardTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RewardTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RewardTransaction", RewardTransaction.class); + JSON.registerDiscriminator(RewardTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/RewardTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/RewardTransactionAllOfAttributes.java new file mode 100644 index 00000000..e2d612ba --- /dev/null +++ b/src/main/java/unit/java/sdk/model/RewardTransactionAllOfAttributes.java @@ -0,0 +1,403 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * RewardTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + RewardTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + RewardTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + RewardTransactionAllOfAttributes.JSON_PROPERTY_RECEIVER_COUNTERPARTY, + RewardTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + RewardTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + RewardTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + RewardTransactionAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RewardTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_RECEIVER_COUNTERPARTY = "receiverCounterparty"; + private Counterparty receiverCounterparty; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public RewardTransactionAllOfAttributes() { + } + + public RewardTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public RewardTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public RewardTransactionAllOfAttributes receiverCounterparty(Counterparty receiverCounterparty) { + this.receiverCounterparty = receiverCounterparty; + return this; + } + + /** + * Get receiverCounterparty + * @return receiverCounterparty + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECEIVER_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Counterparty getReceiverCounterparty() { + return receiverCounterparty; + } + + + @JsonProperty(JSON_PROPERTY_RECEIVER_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReceiverCounterparty(Counterparty receiverCounterparty) { + this.receiverCounterparty = receiverCounterparty; + } + + + public RewardTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public RewardTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public RewardTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public RewardTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this RewardTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RewardTransactionAllOfAttributes rewardTransactionAllOfAttributes = (RewardTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, rewardTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, rewardTransactionAllOfAttributes.direction) && + Objects.equals(this.receiverCounterparty, rewardTransactionAllOfAttributes.receiverCounterparty) && + Objects.equals(this.amount, rewardTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, rewardTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, rewardTransactionAllOfAttributes.summary) && + Objects.equals(this.tags, rewardTransactionAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, receiverCounterparty, amount, balance, summary, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RewardTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" receiverCounterparty: ").append(toIndentedString(receiverCounterparty)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `receiverCounterparty` to the URL query string + if (getReceiverCounterparty() != null) { + joiner.add(getReceiverCounterparty().toUrlQueryString(prefix + "receiverCounterparty" + suffix)); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Schedule.java b/src/main/java/unit/java/sdk/model/Schedule.java new file mode 100644 index 00000000..2ea14afd --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Schedule.java @@ -0,0 +1,367 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Schedule + */ +@JsonPropertyOrder({ + Schedule.JSON_PROPERTY_START_TIME, + Schedule.JSON_PROPERTY_END_TIME, + Schedule.JSON_PROPERTY_INTERVAL, + Schedule.JSON_PROPERTY_DAY_OF_MONTH, + Schedule.JSON_PROPERTY_NEXT_SCHEDULED_ACTION, + Schedule.JSON_PROPERTY_TOTAL_NUMBER_OF_PAYMENTS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Schedule { + public static final String JSON_PROPERTY_START_TIME = "startTime"; + private LocalDate startTime; + + public static final String JSON_PROPERTY_END_TIME = "endTime"; + private LocalDate endTime; + + /** + * Gets or Sets interval + */ + public enum IntervalEnum { + MONTHLY("Monthly"); + + private String value; + + IntervalEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IntervalEnum fromValue(String value) { + for (IntervalEnum b : IntervalEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_INTERVAL = "interval"; + private IntervalEnum interval; + + public static final String JSON_PROPERTY_DAY_OF_MONTH = "dayOfMonth"; + private Integer dayOfMonth; + + public static final String JSON_PROPERTY_NEXT_SCHEDULED_ACTION = "nextScheduledAction"; + private LocalDate nextScheduledAction; + + public static final String JSON_PROPERTY_TOTAL_NUMBER_OF_PAYMENTS = "totalNumberOfPayments"; + private Integer totalNumberOfPayments; + + public Schedule() { + } + + public Schedule startTime(LocalDate startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get startTime + * @return startTime + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getStartTime() { + return startTime; + } + + + @JsonProperty(JSON_PROPERTY_START_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStartTime(LocalDate startTime) { + this.startTime = startTime; + } + + + public Schedule endTime(LocalDate endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get endTime + * @return endTime + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getEndTime() { + return endTime; + } + + + @JsonProperty(JSON_PROPERTY_END_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEndTime(LocalDate endTime) { + this.endTime = endTime; + } + + + public Schedule interval(IntervalEnum interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * @return interval + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public IntervalEnum getInterval() { + return interval; + } + + + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInterval(IntervalEnum interval) { + this.interval = interval; + } + + + public Schedule dayOfMonth(Integer dayOfMonth) { + this.dayOfMonth = dayOfMonth; + return this; + } + + /** + * Get dayOfMonth + * minimum: -5 + * maximum: 28 + * @return dayOfMonth + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DAY_OF_MONTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getDayOfMonth() { + return dayOfMonth; + } + + + @JsonProperty(JSON_PROPERTY_DAY_OF_MONTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDayOfMonth(Integer dayOfMonth) { + this.dayOfMonth = dayOfMonth; + } + + + public Schedule nextScheduledAction(LocalDate nextScheduledAction) { + this.nextScheduledAction = nextScheduledAction; + return this; + } + + /** + * Get nextScheduledAction + * @return nextScheduledAction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NEXT_SCHEDULED_ACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LocalDate getNextScheduledAction() { + return nextScheduledAction; + } + + + @JsonProperty(JSON_PROPERTY_NEXT_SCHEDULED_ACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNextScheduledAction(LocalDate nextScheduledAction) { + this.nextScheduledAction = nextScheduledAction; + } + + + public Schedule totalNumberOfPayments(Integer totalNumberOfPayments) { + this.totalNumberOfPayments = totalNumberOfPayments; + return this; + } + + /** + * Get totalNumberOfPayments + * minimum: 1 + * @return totalNumberOfPayments + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_NUMBER_OF_PAYMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getTotalNumberOfPayments() { + return totalNumberOfPayments; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_NUMBER_OF_PAYMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalNumberOfPayments(Integer totalNumberOfPayments) { + this.totalNumberOfPayments = totalNumberOfPayments; + } + + + /** + * Return true if this schedule object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Schedule schedule = (Schedule) o; + return Objects.equals(this.startTime, schedule.startTime) && + Objects.equals(this.endTime, schedule.endTime) && + Objects.equals(this.interval, schedule.interval) && + Objects.equals(this.dayOfMonth, schedule.dayOfMonth) && + Objects.equals(this.nextScheduledAction, schedule.nextScheduledAction) && + Objects.equals(this.totalNumberOfPayments, schedule.totalNumberOfPayments); + } + + @Override + public int hashCode() { + return Objects.hash(startTime, endTime, interval, dayOfMonth, nextScheduledAction, totalNumberOfPayments); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Schedule {\n"); + sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); + sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" dayOfMonth: ").append(toIndentedString(dayOfMonth)).append("\n"); + sb.append(" nextScheduledAction: ").append(toIndentedString(nextScheduledAction)).append("\n"); + sb.append(" totalNumberOfPayments: ").append(toIndentedString(totalNumberOfPayments)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `startTime` to the URL query string + if (getStartTime() != null) { + joiner.add(String.format("%sstartTime%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStartTime()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `endTime` to the URL query string + if (getEndTime() != null) { + joiner.add(String.format("%sendTime%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEndTime()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `interval` to the URL query string + if (getInterval() != null) { + joiner.add(String.format("%sinterval%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getInterval()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dayOfMonth` to the URL query string + if (getDayOfMonth() != null) { + joiner.add(String.format("%sdayOfMonth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDayOfMonth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nextScheduledAction` to the URL query string + if (getNextScheduledAction() != null) { + joiner.add(String.format("%snextScheduledAction%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNextScheduledAction()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `totalNumberOfPayments` to the URL query string + if (getTotalNumberOfPayments() != null) { + joiner.add(String.format("%stotalNumberOfPayments%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTotalNumberOfPayments()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Schedule1.java b/src/main/java/unit/java/sdk/model/Schedule1.java new file mode 100644 index 00000000..eaa502d9 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Schedule1.java @@ -0,0 +1,242 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import unit.java.sdk.model.MonthlySchedule; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import unit.java.sdk.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = Schedule1.Schedule1Deserializer.class) +@JsonSerialize(using = Schedule1.Schedule1Serializer.class) +public class Schedule1 extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(Schedule1.class.getName()); + + public static class Schedule1Serializer extends StdSerializer { + public Schedule1Serializer(Class t) { + super(t); + } + + public Schedule1Serializer() { + this(null); + } + + @Override + public void serialize(Schedule1 value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class Schedule1Deserializer extends StdDeserializer { + public Schedule1Deserializer() { + this(Schedule1.class); + } + + public Schedule1Deserializer(Class vc) { + super(vc); + } + + @Override + public Schedule1 deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize MonthlySchedule + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MonthlySchedule.class.equals(Integer.class) || MonthlySchedule.class.equals(Long.class) || MonthlySchedule.class.equals(Float.class) || MonthlySchedule.class.equals(Double.class) || MonthlySchedule.class.equals(Boolean.class) || MonthlySchedule.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((MonthlySchedule.class.equals(Integer.class) || MonthlySchedule.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((MonthlySchedule.class.equals(Float.class) || MonthlySchedule.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (MonthlySchedule.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (MonthlySchedule.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(MonthlySchedule.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'MonthlySchedule'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'MonthlySchedule'", e); + } + + if (match == 1) { + Schedule1 ret = new Schedule1(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for Schedule1: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public Schedule1 getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "Schedule1 cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public Schedule1() { + super("oneOf", Boolean.FALSE); + } + + public Schedule1(MonthlySchedule o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("MonthlySchedule", MonthlySchedule.class); + JSON.registerDescendants(Schedule1.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return Schedule1.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * MonthlySchedule + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(MonthlySchedule.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be MonthlySchedule"); + } + + /** + * Get the actual instance, which can be the following: + * MonthlySchedule + * + * @return The actual instance (MonthlySchedule) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `MonthlySchedule`. If the actual instance is not `MonthlySchedule`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MonthlySchedule` + * @throws ClassCastException if the instance is not `MonthlySchedule` + */ + public MonthlySchedule getMonthlySchedule() throws ClassCastException { + return (MonthlySchedule)super.getActualInstance(); + } + + + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof MonthlySchedule) { + if (getActualInstance() != null) { + joiner.add(((MonthlySchedule)getActualInstance()).toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + return null; + } + +} + diff --git a/src/main/java/unit/java/sdk/model/SettlementTransaction.java b/src/main/java/unit/java/sdk/model/SettlementTransaction.java new file mode 100644 index 00000000..15e604ad --- /dev/null +++ b/src/main/java/unit/java/sdk/model/SettlementTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * SettlementTransaction + */ +@JsonPropertyOrder({ + SettlementTransaction.JSON_PROPERTY_ATTRIBUTES, + SettlementTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class SettlementTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CheckDepositTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public SettlementTransaction() { + } + + public SettlementTransaction attributes(CheckDepositTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CheckDepositTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CheckDepositTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public SettlementTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public SettlementTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public SettlementTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this SettlementTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SettlementTransaction settlementTransaction = (SettlementTransaction) o; + return Objects.equals(this.attributes, settlementTransaction.attributes) && + Objects.equals(this.relationships, settlementTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SettlementTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("SettlementTransaction", SettlementTransaction.class); + JSON.registerDiscriminator(SettlementTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/SoleProprietorshipAnnualRevenue.java b/src/main/java/unit/java/sdk/model/SoleProprietorshipAnnualRevenue.java new file mode 100644 index 00000000..062d405a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/SoleProprietorshipAnnualRevenue.java @@ -0,0 +1,84 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets soleProprietorshipAnnualRevenue + */ +public enum SoleProprietorshipAnnualRevenue { + + UPTO50K("UpTo50k"), + + BETWEEN50KAND100K("Between50kAnd100k"), + + BETWEEN100KAND200K("Between100kAnd200k"), + + BETWEEN200KAND500K("Between200kAnd500k"), + + OVER500K("Over500k"); + + private String value; + + SoleProprietorshipAnnualRevenue(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SoleProprietorshipAnnualRevenue fromValue(String value) { + for (SoleProprietorshipAnnualRevenue b : SoleProprietorshipAnnualRevenue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } + +} + diff --git a/src/main/java/unit/java/sdk/model/SoleProprietorshipNumberOfEmployees.java b/src/main/java/unit/java/sdk/model/SoleProprietorshipNumberOfEmployees.java new file mode 100644 index 00000000..4f38d51a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/SoleProprietorshipNumberOfEmployees.java @@ -0,0 +1,82 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets soleProprietorshipNumberOfEmployees + */ +public enum SoleProprietorshipNumberOfEmployees { + + ONE("One"), + + BETWEEN2AND5("Between2And5"), + + BETWEEN5AND10("Between5And10"), + + OVER10("Over10"); + + private String value; + + SoleProprietorshipNumberOfEmployees(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SoleProprietorshipNumberOfEmployees fromValue(String value) { + for (SoleProprietorshipNumberOfEmployees b : SoleProprietorshipNumberOfEmployees.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } + +} + diff --git a/src/main/java/unit/java/sdk/model/SourceOfFunds.java b/src/main/java/unit/java/sdk/model/SourceOfFunds.java new file mode 100644 index 00000000..4ef6332b --- /dev/null +++ b/src/main/java/unit/java/sdk/model/SourceOfFunds.java @@ -0,0 +1,84 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets sourceOfFunds + */ +public enum SourceOfFunds { + + INHERITANCE("Inheritance"), + + SALARY("Salary"), + + SAVINGS("Savings"), + + INVESTMENTRETURNS("InvestmentReturns"), + + GIFTS("Gifts"); + + private String value; + + SourceOfFunds(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceOfFunds fromValue(String value) { + for (SourceOfFunds b : SourceOfFunds.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } + +} + diff --git a/src/main/java/unit/java/sdk/model/SourceOfIncome.java b/src/main/java/unit/java/sdk/model/SourceOfIncome.java new file mode 100644 index 00000000..8e2bd065 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/SourceOfIncome.java @@ -0,0 +1,86 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets sourceOfIncome + */ +public enum SourceOfIncome { + + EMPLOYMENTORPAYROLLINCOME("EmploymentOrPayrollIncome"), + + PARTTIMEORCONTRACTORINCOME("PartTimeOrContractorIncome"), + + INHERITANCESANDGIFTS("InheritancesAndGifts"), + + PERSONALINVESTMENTS("PersonalInvestments"), + + BUSINESSOWNERSHIPINTERESTS("BusinessOwnershipInterests"), + + GOVERNMENTBENEFITS("GovernmentBenefits"); + + private String value; + + SourceOfIncome(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceOfIncome fromValue(String value) { + for (SourceOfIncome b : SourceOfIncome.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } + +} + diff --git a/src/main/java/unit/java/sdk/model/SponsoredInterestTransaction.java b/src/main/java/unit/java/sdk/model/SponsoredInterestTransaction.java new file mode 100644 index 00000000..206e3efd --- /dev/null +++ b/src/main/java/unit/java/sdk/model/SponsoredInterestTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * SponsoredInterestTransaction + */ +@JsonPropertyOrder({ + SponsoredInterestTransaction.JSON_PROPERTY_ATTRIBUTES, + SponsoredInterestTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class SponsoredInterestTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CheckDepositTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public SponsoredInterestTransaction() { + } + + public SponsoredInterestTransaction attributes(CheckDepositTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CheckDepositTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(CheckDepositTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public SponsoredInterestTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public SponsoredInterestTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public SponsoredInterestTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this SponsoredInterestTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SponsoredInterestTransaction sponsoredInterestTransaction = (SponsoredInterestTransaction) o; + return Objects.equals(this.attributes, sponsoredInterestTransaction.attributes) && + Objects.equals(this.relationships, sponsoredInterestTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SponsoredInterestTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("SponsoredInterestTransaction", SponsoredInterestTransaction.class); + JSON.registerDiscriminator(SponsoredInterestTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/Statement.java b/src/main/java/unit/java/sdk/model/Statement.java new file mode 100644 index 00000000..5c302134 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Statement.java @@ -0,0 +1,260 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.StatementAttributes; +import unit.java.sdk.model.StatementRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Statement + */ +@JsonPropertyOrder({ + Statement.JSON_PROPERTY_TYPE, + Statement.JSON_PROPERTY_ID, + Statement.JSON_PROPERTY_ATTRIBUTES, + Statement.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Statement { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private StatementAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private StatementRelationships relationships; + + public Statement() { + } + + public Statement type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public Statement id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + public Statement attributes(StatementAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatementAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(StatementAttributes attributes) { + this.attributes = attributes; + } + + + public Statement relationships(StatementRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatementRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(StatementRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this statement object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Statement statement = (Statement) o; + return Objects.equals(this.type, statement.type) && + Objects.equals(this.id, statement.id) && + Objects.equals(this.attributes, statement.attributes) && + Objects.equals(this.relationships, statement.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Statement {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/StatementAttributes.java b/src/main/java/unit/java/sdk/model/StatementAttributes.java new file mode 100644 index 00000000..f5804ce0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/StatementAttributes.java @@ -0,0 +1,150 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * StatementAttributes + */ +@JsonPropertyOrder({ + StatementAttributes.JSON_PROPERTY_PERIOD +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class StatementAttributes { + public static final String JSON_PROPERTY_PERIOD = "period"; + private String period; + + public StatementAttributes() { + } + + public StatementAttributes period(String period) { + this.period = period; + return this; + } + + /** + * Get period + * @return period + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERIOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPeriod() { + return period; + } + + + @JsonProperty(JSON_PROPERTY_PERIOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPeriod(String period) { + this.period = period; + } + + + /** + * Return true if this statement_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatementAttributes statementAttributes = (StatementAttributes) o; + return Objects.equals(this.period, statementAttributes.period); + } + + @Override + public int hashCode() { + return Objects.hash(period); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatementAttributes {\n"); + sb.append(" period: ").append(toIndentedString(period)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `period` to the URL query string + if (getPeriod() != null) { + joiner.add(String.format("%speriod%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPeriod()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/StatementRelationships.java b/src/main/java/unit/java/sdk/model/StatementRelationships.java new file mode 100644 index 00000000..5a58ed10 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/StatementRelationships.java @@ -0,0 +1,224 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomersRelationship; +import unit.java.sdk.model.Relationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * StatementRelationships + */ +@JsonPropertyOrder({ + StatementRelationships.JSON_PROPERTY_ACCOUNT, + StatementRelationships.JSON_PROPERTY_CUSTOMER, + StatementRelationships.JSON_PROPERTY_CUSTOMERS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class StatementRelationships { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private Relationship account; + + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private Relationship customer; + + public static final String JSON_PROPERTY_CUSTOMERS = "customers"; + private CustomersRelationship customers; + + public StatementRelationships() { + } + + public StatementRelationships account(Relationship account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Relationship getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccount(Relationship account) { + this.account = account; + } + + + public StatementRelationships customer(Relationship customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Relationship getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomer(Relationship customer) { + this.customer = customer; + } + + + public StatementRelationships customers(CustomersRelationship customers) { + this.customers = customers; + return this; + } + + /** + * Get customers + * @return customers + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CustomersRelationship getCustomers() { + return customers; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomers(CustomersRelationship customers) { + this.customers = customers; + } + + + /** + * Return true if this statementRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatementRelationships statementRelationships = (StatementRelationships) o; + return Objects.equals(this.account, statementRelationships.account) && + Objects.equals(this.customer, statementRelationships.customer) && + Objects.equals(this.customers, statementRelationships.customers); + } + + @Override + public int hashCode() { + return Objects.hash(account, customer, customers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatementRelationships {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" customers: ").append(toIndentedString(customers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + // add `customers` to the URL query string + if (getCustomers() != null) { + joiner.add(getCustomers().toUrlQueryString(prefix + "customers" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/StatusEvent.java b/src/main/java/unit/java/sdk/model/StatusEvent.java new file mode 100644 index 00000000..6ae514bf --- /dev/null +++ b/src/main/java/unit/java/sdk/model/StatusEvent.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.StatusEventStatus; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * StatusEvent + */ +@JsonPropertyOrder({ + StatusEvent.JSON_PROPERTY_UPDATED_AT, + StatusEvent.JSON_PROPERTY_UPDATED_BY, + StatusEvent.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class StatusEvent { + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private String updatedAt; + + public static final String JSON_PROPERTY_UPDATED_BY = "updatedBy"; + private String updatedBy; + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEventStatus status; + + public StatusEvent() { + } + + public StatusEvent updatedAt(String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + + + public StatusEvent updatedBy(String updatedBy) { + this.updatedBy = updatedBy; + return this; + } + + /** + * Get updatedBy + * @return updatedBy + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUpdatedBy() { + return updatedBy; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedBy(String updatedBy) { + this.updatedBy = updatedBy; + } + + + public StatusEvent status(StatusEventStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEventStatus getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEventStatus status) { + this.status = status; + } + + + /** + * Return true if this statusEvent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusEvent statusEvent = (StatusEvent) o; + return Objects.equals(this.updatedAt, statusEvent.updatedAt) && + Objects.equals(this.updatedBy, statusEvent.updatedBy) && + Objects.equals(this.status, statusEvent.status); + } + + @Override + public int hashCode() { + return Objects.hash(updatedAt, updatedBy, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusEvent {\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" updatedBy: ").append(toIndentedString(updatedBy)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `updatedBy` to the URL query string + if (getUpdatedBy() != null) { + joiner.add(String.format("%supdatedBy%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedBy()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(getStatus().toUrlQueryString(prefix + "status" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/StatusEventStatus.java b/src/main/java/unit/java/sdk/model/StatusEventStatus.java new file mode 100644 index 00000000..346f792e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/StatusEventStatus.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositStatus; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * StatusEventStatus + */ +@JsonPropertyOrder({ + StatusEventStatus.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class StatusEventStatus { + public static final String JSON_PROPERTY_TYPE = "type"; + private CheckDepositStatus type; + + public StatusEventStatus() { + } + + public StatusEventStatus type(CheckDepositStatus type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CheckDepositStatus getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(CheckDepositStatus type) { + this.type = type; + } + + + /** + * Return true if this statusEvent_status object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusEventStatus statusEventStatus = (StatusEventStatus) o; + return Objects.equals(this.type, statusEventStatus.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusEventStatus {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/StopPayment.java b/src/main/java/unit/java/sdk/model/StopPayment.java new file mode 100644 index 00000000..4de13fc9 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/StopPayment.java @@ -0,0 +1,260 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.StopPaymentAttributes; +import unit.java.sdk.model.StopPaymentRelationships; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * StopPayment + */ +@JsonPropertyOrder({ + StopPayment.JSON_PROPERTY_TYPE, + StopPayment.JSON_PROPERTY_ID, + StopPayment.JSON_PROPERTY_ATTRIBUTES, + StopPayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class StopPayment { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "stopPayment"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private StopPaymentAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private StopPaymentRelationships relationships; + + public StopPayment() { + } + + public StopPayment type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public StopPayment id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + public StopPayment attributes(StopPaymentAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StopPaymentAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(StopPaymentAttributes attributes) { + this.attributes = attributes; + } + + + public StopPayment relationships(StopPaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StopPaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(StopPaymentRelationships relationships) { + this.relationships = relationships; + } + + + /** + * Return true if this stop_payment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopPayment stopPayment = (StopPayment) o; + return Objects.equals(this.type, stopPayment.type) && + Objects.equals(this.id, stopPayment.id) && + Objects.equals(this.attributes, stopPayment.attributes) && + Objects.equals(this.relationships, stopPayment.relationships); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, attributes, relationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StopPayment {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/StopPaymentAttributes.java b/src/main/java/unit/java/sdk/model/StopPaymentAttributes.java new file mode 100644 index 00000000..28c67aef --- /dev/null +++ b/src/main/java/unit/java/sdk/model/StopPaymentAttributes.java @@ -0,0 +1,367 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * StopPaymentAttributes + */ +@JsonPropertyOrder({ + StopPaymentAttributes.JSON_PROPERTY_CREATED_AT, + StopPaymentAttributes.JSON_PROPERTY_UPDATED_AT, + StopPaymentAttributes.JSON_PROPERTY_AMOUNT, + StopPaymentAttributes.JSON_PROPERTY_STATUS, + StopPaymentAttributes.JSON_PROPERTY_TAGS, + StopPaymentAttributes.JSON_PROPERTY_CHECK_NUMBER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class StopPaymentAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + ACTIVE("Active"), + + DISABLED("Disabled"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_CHECK_NUMBER = "checkNumber"; + private String checkNumber; + + public StopPaymentAttributes() { + } + + public StopPaymentAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public StopPaymentAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public StopPaymentAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public StopPaymentAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public StopPaymentAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public StopPaymentAttributes checkNumber(String checkNumber) { + this.checkNumber = checkNumber; + return this; + } + + /** + * Get checkNumber + * @return checkNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHECK_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCheckNumber() { + return checkNumber; + } + + + @JsonProperty(JSON_PROPERTY_CHECK_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCheckNumber(String checkNumber) { + this.checkNumber = checkNumber; + } + + + /** + * Return true if this stop_payment_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopPaymentAttributes stopPaymentAttributes = (StopPaymentAttributes) o; + return Objects.equals(this.createdAt, stopPaymentAttributes.createdAt) && + Objects.equals(this.updatedAt, stopPaymentAttributes.updatedAt) && + Objects.equals(this.amount, stopPaymentAttributes.amount) && + Objects.equals(this.status, stopPaymentAttributes.status) && + Objects.equals(this.tags, stopPaymentAttributes.tags) && + Objects.equals(this.checkNumber, stopPaymentAttributes.checkNumber); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, updatedAt, amount, status, tags, checkNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StopPaymentAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" checkNumber: ").append(toIndentedString(checkNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `checkNumber` to the URL query string + if (getCheckNumber() != null) { + joiner.add(String.format("%scheckNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCheckNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/StopPaymentListResponse.java b/src/main/java/unit/java/sdk/model/StopPaymentListResponse.java new file mode 100644 index 00000000..e5d15869 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/StopPaymentListResponse.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.StopPayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * StopPaymentListResponse + */ +@JsonPropertyOrder({ + StopPaymentListResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class StopPaymentListResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public StopPaymentListResponse() { + } + + public StopPaymentListResponse data(List data) { + this.data = data; + return this; + } + + public StopPaymentListResponse addDataItem(StopPayment dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this StopPaymentListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopPaymentListResponse stopPaymentListResponse = (StopPaymentListResponse) o; + return Objects.equals(this.data, stopPaymentListResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StopPaymentListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/StopPaymentRelationships.java b/src/main/java/unit/java/sdk/model/StopPaymentRelationships.java new file mode 100644 index 00000000..7f9eadb1 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/StopPaymentRelationships.java @@ -0,0 +1,262 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomersRelationship; +import unit.java.sdk.model.ReceivedPaymentRelationshipsCustomer; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsAccount; +import unit.java.sdk.model.StopPaymentRelationshipsCheckPayments; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * StopPaymentRelationships + */ +@JsonPropertyOrder({ + StopPaymentRelationships.JSON_PROPERTY_ACCOUNT, + StopPaymentRelationships.JSON_PROPERTY_CUSTOMER, + StopPaymentRelationships.JSON_PROPERTY_CUSTOMERS, + StopPaymentRelationships.JSON_PROPERTY_CHECK_PAYMENTS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class StopPaymentRelationships { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private RecurringAchPaymentRelationshipsAccount account; + + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private ReceivedPaymentRelationshipsCustomer customer; + + public static final String JSON_PROPERTY_CUSTOMERS = "customers"; + private CustomersRelationship customers; + + public static final String JSON_PROPERTY_CHECK_PAYMENTS = "checkPayments"; + private StopPaymentRelationshipsCheckPayments checkPayments; + + public StopPaymentRelationships() { + } + + public StopPaymentRelationships account(RecurringAchPaymentRelationshipsAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public RecurringAchPaymentRelationshipsAccount getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(RecurringAchPaymentRelationshipsAccount account) { + this.account = account; + } + + + public StopPaymentRelationships customer(ReceivedPaymentRelationshipsCustomer customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ReceivedPaymentRelationshipsCustomer getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomer(ReceivedPaymentRelationshipsCustomer customer) { + this.customer = customer; + } + + + public StopPaymentRelationships customers(CustomersRelationship customers) { + this.customers = customers; + return this; + } + + /** + * Get customers + * @return customers + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CustomersRelationship getCustomers() { + return customers; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomers(CustomersRelationship customers) { + this.customers = customers; + } + + + public StopPaymentRelationships checkPayments(StopPaymentRelationshipsCheckPayments checkPayments) { + this.checkPayments = checkPayments; + return this; + } + + /** + * Get checkPayments + * @return checkPayments + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK_PAYMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StopPaymentRelationshipsCheckPayments getCheckPayments() { + return checkPayments; + } + + + @JsonProperty(JSON_PROPERTY_CHECK_PAYMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCheckPayments(StopPaymentRelationshipsCheckPayments checkPayments) { + this.checkPayments = checkPayments; + } + + + /** + * Return true if this stop_payment_relationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopPaymentRelationships stopPaymentRelationships = (StopPaymentRelationships) o; + return Objects.equals(this.account, stopPaymentRelationships.account) && + Objects.equals(this.customer, stopPaymentRelationships.customer) && + Objects.equals(this.customers, stopPaymentRelationships.customers) && + Objects.equals(this.checkPayments, stopPaymentRelationships.checkPayments); + } + + @Override + public int hashCode() { + return Objects.hash(account, customer, customers, checkPayments); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StopPaymentRelationships {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" customers: ").append(toIndentedString(customers)).append("\n"); + sb.append(" checkPayments: ").append(toIndentedString(checkPayments)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + // add `customers` to the URL query string + if (getCustomers() != null) { + joiner.add(getCustomers().toUrlQueryString(prefix + "customers" + suffix)); + } + + // add `checkPayments` to the URL query string + if (getCheckPayments() != null) { + joiner.add(getCheckPayments().toUrlQueryString(prefix + "checkPayments" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/StopPaymentRelationshipsCheckPayments.java b/src/main/java/unit/java/sdk/model/StopPaymentRelationshipsCheckPayments.java new file mode 100644 index 00000000..00f80f31 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/StopPaymentRelationshipsCheckPayments.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.StopPaymentRelationshipsCheckPaymentsDataInner; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * StopPaymentRelationshipsCheckPayments + */ +@JsonPropertyOrder({ + StopPaymentRelationshipsCheckPayments.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class StopPaymentRelationshipsCheckPayments { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public StopPaymentRelationshipsCheckPayments() { + } + + public StopPaymentRelationshipsCheckPayments data(List data) { + this.data = data; + return this; + } + + public StopPaymentRelationshipsCheckPayments addDataItem(StopPaymentRelationshipsCheckPaymentsDataInner dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this stop_payment_relationships_checkPayments object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopPaymentRelationshipsCheckPayments stopPaymentRelationshipsCheckPayments = (StopPaymentRelationshipsCheckPayments) o; + return Objects.equals(this.data, stopPaymentRelationshipsCheckPayments.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StopPaymentRelationshipsCheckPayments {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/StopPaymentRelationshipsCheckPaymentsDataInner.java b/src/main/java/unit/java/sdk/model/StopPaymentRelationshipsCheckPaymentsDataInner.java new file mode 100644 index 00000000..17a83c43 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/StopPaymentRelationshipsCheckPaymentsDataInner.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * StopPaymentRelationshipsCheckPaymentsDataInner + */ +@JsonPropertyOrder({ + StopPaymentRelationshipsCheckPaymentsDataInner.JSON_PROPERTY_ID, + StopPaymentRelationshipsCheckPaymentsDataInner.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class StopPaymentRelationshipsCheckPaymentsDataInner { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "checkPayment"; + + public StopPaymentRelationshipsCheckPaymentsDataInner() { + } + + public StopPaymentRelationshipsCheckPaymentsDataInner id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public StopPaymentRelationshipsCheckPaymentsDataInner type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + /** + * Return true if this stop_payment_relationships_checkPayments_data_inner object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopPaymentRelationshipsCheckPaymentsDataInner stopPaymentRelationshipsCheckPaymentsDataInner = (StopPaymentRelationshipsCheckPaymentsDataInner) o; + return Objects.equals(this.id, stopPaymentRelationshipsCheckPaymentsDataInner.id) && + Objects.equals(this.type, stopPaymentRelationshipsCheckPaymentsDataInner.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StopPaymentRelationshipsCheckPaymentsDataInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/StopPaymentResponse.java b/src/main/java/unit/java/sdk/model/StopPaymentResponse.java new file mode 100644 index 00000000..f1817ecb --- /dev/null +++ b/src/main/java/unit/java/sdk/model/StopPaymentResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.StopPayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * StopPaymentResponse + */ +@JsonPropertyOrder({ + StopPaymentResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class StopPaymentResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private StopPayment data; + + public StopPaymentResponse() { + } + + public StopPaymentResponse data(StopPayment data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StopPayment getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(StopPayment data) { + this.data = data; + } + + + /** + * Return true if this StopPaymentResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopPaymentResponse stopPaymentResponse = (StopPaymentResponse) o; + return Objects.equals(this.data, stopPaymentResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StopPaymentResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Transaction.java b/src/main/java/unit/java/sdk/model/Transaction.java new file mode 100644 index 00000000..9b31936c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Transaction.java @@ -0,0 +1,276 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * Transaction + */ +@JsonPropertyOrder({ + Transaction.JSON_PROPERTY_ID, + Transaction.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = AccountLowBalanceClosureTransaction.class, name = "accountLowBalanceClosureTransaction"), + @JsonSubTypes.Type(value = AdjustmentTransaction.class, name = "adjustmentTransaction"), + @JsonSubTypes.Type(value = AtmTransaction.class, name = "atmTransaction"), + @JsonSubTypes.Type(value = BankRepaymentTransaction.class, name = "bankRepaymentTransaction"), + @JsonSubTypes.Type(value = BillPayTransaction.class, name = "billPayTransaction"), + @JsonSubTypes.Type(value = BookTransaction.class, name = "bookTransaction"), + @JsonSubTypes.Type(value = CardTransaction.class, name = "cardTransaction"), + @JsonSubTypes.Type(value = CashDepositTransaction.class, name = "cashDepositTransaction"), + @JsonSubTypes.Type(value = ChargebackTransaction.class, name = "chargebackTransaction"), + @JsonSubTypes.Type(value = CheckDepositTransaction.class, name = "checkDepositTransaction"), + @JsonSubTypes.Type(value = CheckPaymentTransaction.class, name = "checkPaymentTransaction"), + @JsonSubTypes.Type(value = CustomerRepaymentReturnedTransaction.class, name = "customerRepaymentReturnedTransaction"), + @JsonSubTypes.Type(value = CustomerRepaymentTransaction.class, name = "customerRepaymentTransaction"), + @JsonSubTypes.Type(value = DishonoredAchTransaction.class, name = "dishonoredAchTransaction"), + @JsonSubTypes.Type(value = DisputeSettlementTransaction.class, name = "disputeSettlementTransaction"), + @JsonSubTypes.Type(value = DisputeTransaction.class, name = "disputeTransaction"), + @JsonSubTypes.Type(value = FeeTransaction.class, name = "feeTransaction"), + @JsonSubTypes.Type(value = InterchangeTransaction.class, name = "interchangeTransaction"), + @JsonSubTypes.Type(value = InterestShareTransaction.class, name = "interestShareTransaction"), + @JsonSubTypes.Type(value = InterestTransaction.class, name = "interestTransaction"), + @JsonSubTypes.Type(value = NegativeBalanceCoverageTransaction.class, name = "negativeBalanceCoverageTransaction"), + @JsonSubTypes.Type(value = OriginatedAchTransaction.class, name = "originatedAchTransaction"), + @JsonSubTypes.Type(value = PaymentAdvanceTransaction.class, name = "paymentAdvanceTransaction"), + @JsonSubTypes.Type(value = PurchaseTransaction.class, name = "purchaseTransaction"), + @JsonSubTypes.Type(value = ReceivedAchTransaction.class, name = "receivedAchTransaction"), + @JsonSubTypes.Type(value = ReleaseTransaction.class, name = "releaseTransaction"), + @JsonSubTypes.Type(value = RepaidPaymentAdvanceTransaction.class, name = "repaidPaymentAdvanceTransaction"), + @JsonSubTypes.Type(value = ReturnedAchTransaction.class, name = "returnedAchTransaction"), + @JsonSubTypes.Type(value = ReturnedCheckDepositTransaction.class, name = "returnedCheckDepositTransaction"), + @JsonSubTypes.Type(value = ReturnedCheckPaymentTransaction.class, name = "returnedCheckPaymentTransaction"), + @JsonSubTypes.Type(value = ReturnedReceivedAchTransaction.class, name = "returnedReceivedAchTransaction"), + @JsonSubTypes.Type(value = ReversalTransaction.class, name = "reversalTransaction"), + @JsonSubTypes.Type(value = RewardTransaction.class, name = "rewardTransaction"), + @JsonSubTypes.Type(value = SettlementTransaction.class, name = "settlementTransaction"), + @JsonSubTypes.Type(value = SponsoredInterestTransaction.class, name = "sponsoredInterestTransaction"), + @JsonSubTypes.Type(value = WireTransaction.class, name = "wireTransaction"), +}) + +public class Transaction { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public Transaction() { + } + + public Transaction id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public Transaction type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + /** + * Return true if this transaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Transaction transaction = (Transaction) o; + return Objects.equals(this.id, transaction.id) && + Objects.equals(this.type, transaction.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Transaction {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("accountLowBalanceClosureTransaction", AccountLowBalanceClosureTransaction.class); + mappings.put("adjustmentTransaction", AdjustmentTransaction.class); + mappings.put("atmTransaction", AtmTransaction.class); + mappings.put("bankRepaymentTransaction", BankRepaymentTransaction.class); + mappings.put("billPayTransaction", BillPayTransaction.class); + mappings.put("bookTransaction", BookTransaction.class); + mappings.put("cardTransaction", CardTransaction.class); + mappings.put("cashDepositTransaction", CashDepositTransaction.class); + mappings.put("chargebackTransaction", ChargebackTransaction.class); + mappings.put("checkDepositTransaction", CheckDepositTransaction.class); + mappings.put("checkPaymentTransaction", CheckPaymentTransaction.class); + mappings.put("customerRepaymentReturnedTransaction", CustomerRepaymentReturnedTransaction.class); + mappings.put("customerRepaymentTransaction", CustomerRepaymentTransaction.class); + mappings.put("dishonoredAchTransaction", DishonoredAchTransaction.class); + mappings.put("disputeSettlementTransaction", DisputeSettlementTransaction.class); + mappings.put("disputeTransaction", DisputeTransaction.class); + mappings.put("feeTransaction", FeeTransaction.class); + mappings.put("interchangeTransaction", InterchangeTransaction.class); + mappings.put("interestShareTransaction", InterestShareTransaction.class); + mappings.put("interestTransaction", InterestTransaction.class); + mappings.put("negativeBalanceCoverageTransaction", NegativeBalanceCoverageTransaction.class); + mappings.put("originatedAchTransaction", OriginatedAchTransaction.class); + mappings.put("paymentAdvanceTransaction", PaymentAdvanceTransaction.class); + mappings.put("purchaseTransaction", PurchaseTransaction.class); + mappings.put("receivedAchTransaction", ReceivedAchTransaction.class); + mappings.put("releaseTransaction", ReleaseTransaction.class); + mappings.put("repaidPaymentAdvanceTransaction", RepaidPaymentAdvanceTransaction.class); + mappings.put("returnedAchTransaction", ReturnedAchTransaction.class); + mappings.put("returnedCheckDepositTransaction", ReturnedCheckDepositTransaction.class); + mappings.put("returnedCheckPaymentTransaction", ReturnedCheckPaymentTransaction.class); + mappings.put("returnedReceivedAchTransaction", ReturnedReceivedAchTransaction.class); + mappings.put("reversalTransaction", ReversalTransaction.class); + mappings.put("rewardTransaction", RewardTransaction.class); + mappings.put("settlementTransaction", SettlementTransaction.class); + mappings.put("sponsoredInterestTransaction", SponsoredInterestTransaction.class); + mappings.put("wireTransaction", WireTransaction.class); + mappings.put("transaction", Transaction.class); + JSON.registerDiscriminator(Transaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/TransactionRelationship.java b/src/main/java/unit/java/sdk/model/TransactionRelationship.java new file mode 100644 index 00000000..03812a7c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/TransactionRelationship.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsReceivePaymentTransactionData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * TransactionRelationship + */ +@JsonPropertyOrder({ + TransactionRelationship.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TransactionRelationship { + public static final String JSON_PROPERTY_DATA = "data"; + private ReceivedPaymentRelationshipsReceivePaymentTransactionData data; + + public TransactionRelationship() { + } + + public TransactionRelationship data(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ReceivedPaymentRelationshipsReceivePaymentTransactionData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(ReceivedPaymentRelationshipsReceivePaymentTransactionData data) { + this.data = data; + } + + + /** + * Return true if this transactionRelationship object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransactionRelationship transactionRelationship = (TransactionRelationship) o; + return Objects.equals(this.data, transactionRelationship.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransactionRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/TransactionRelationships.java b/src/main/java/unit/java/sdk/model/TransactionRelationships.java new file mode 100644 index 00000000..0864e1c0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/TransactionRelationships.java @@ -0,0 +1,964 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountRelationship2; +import unit.java.sdk.model.AuthorizationRelationship; +import unit.java.sdk.model.AuthorizationRequestRelationship; +import unit.java.sdk.model.CardRelationship; +import unit.java.sdk.model.ChargebackRelationship; +import unit.java.sdk.model.CheckDepositRelationship; +import unit.java.sdk.model.CheckPaymentRelationship; +import unit.java.sdk.model.CounterpartyAccountRelationship1; +import unit.java.sdk.model.CounterpartyCustomerRelationship; +import unit.java.sdk.model.CustomerRelationship; +import unit.java.sdk.model.CustomersRelationship; +import unit.java.sdk.model.IncomingAchRelationship; +import unit.java.sdk.model.OrgRelationship; +import unit.java.sdk.model.PaymentRelationship; +import unit.java.sdk.model.ReceivedPaymentRelationship; +import unit.java.sdk.model.ReceivingAccountRelationship; +import unit.java.sdk.model.RecurringPaymentRelationship; +import unit.java.sdk.model.RelatedTransaction; +import unit.java.sdk.model.RelatedTransactionRelationship; +import unit.java.sdk.model.RepaymentRelationship; +import unit.java.sdk.model.ReturnedRelationship; +import unit.java.sdk.model.RewardRelationship; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * TransactionRelationships + */ +@JsonPropertyOrder({ + TransactionRelationships.JSON_PROPERTY_ACCOUNT, + TransactionRelationships.JSON_PROPERTY_RECEIVING_ACCOUNT, + TransactionRelationships.JSON_PROPERTY_CUSTOMER, + TransactionRelationships.JSON_PROPERTY_CUSTOMERS, + TransactionRelationships.JSON_PROPERTY_COUNTERPARTY_ACCOUNT, + TransactionRelationships.JSON_PROPERTY_COUNTERPARTY_CUSTOMER, + TransactionRelationships.JSON_PROPERTY_RELATED_TRANSACTION, + TransactionRelationships.JSON_PROPERTY_DISPUTED_TRANSACTION, + TransactionRelationships.JSON_PROPERTY_AUTHORIZATION, + TransactionRelationships.JSON_PROPERTY_RETURNED, + TransactionRelationships.JSON_PROPERTY_PAYMENT, + TransactionRelationships.JSON_PROPERTY_CHECK_PAYMENT, + TransactionRelationships.JSON_PROPERTY_REPAYMENT, + TransactionRelationships.JSON_PROPERTY_RECURRING_PAYMENT, + TransactionRelationships.JSON_PROPERTY_ORG, + TransactionRelationships.JSON_PROPERTY_CARD, + TransactionRelationships.JSON_PROPERTY_INCOMING_ACH, + TransactionRelationships.JSON_PROPERTY_CHECK_DEPOSIT, + TransactionRelationships.JSON_PROPERTY_AUTHORIZATION_REQUEST, + TransactionRelationships.JSON_PROPERTY_PAYMENT_ADVANCE_TRANSACTION, + TransactionRelationships.JSON_PROPERTY_RECEIVED_PAYMENT, + TransactionRelationships.JSON_PROPERTY_CHARGEBACK, + TransactionRelationships.JSON_PROPERTY_REWARD +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TransactionRelationships { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private AccountRelationship2 account; + + public static final String JSON_PROPERTY_RECEIVING_ACCOUNT = "receivingAccount"; + private ReceivingAccountRelationship receivingAccount; + + public static final String JSON_PROPERTY_CUSTOMER = "customer"; + private CustomerRelationship customer; + + public static final String JSON_PROPERTY_CUSTOMERS = "customers"; + private CustomersRelationship customers; + + public static final String JSON_PROPERTY_COUNTERPARTY_ACCOUNT = "counterpartyAccount"; + private CounterpartyAccountRelationship1 counterpartyAccount; + + public static final String JSON_PROPERTY_COUNTERPARTY_CUSTOMER = "counterpartyCustomer"; + private CounterpartyCustomerRelationship counterpartyCustomer; + + public static final String JSON_PROPERTY_RELATED_TRANSACTION = "relatedTransaction"; + private RelatedTransactionRelationship relatedTransaction; + + public static final String JSON_PROPERTY_DISPUTED_TRANSACTION = "disputedTransaction"; + private RelatedTransaction disputedTransaction; + + public static final String JSON_PROPERTY_AUTHORIZATION = "authorization"; + private AuthorizationRelationship authorization; + + public static final String JSON_PROPERTY_RETURNED = "returned"; + private ReturnedRelationship returned; + + public static final String JSON_PROPERTY_PAYMENT = "payment"; + private PaymentRelationship payment; + + public static final String JSON_PROPERTY_CHECK_PAYMENT = "checkPayment"; + private CheckPaymentRelationship checkPayment; + + public static final String JSON_PROPERTY_REPAYMENT = "repayment"; + private RepaymentRelationship repayment; + + public static final String JSON_PROPERTY_RECURRING_PAYMENT = "recurringPayment"; + private RecurringPaymentRelationship recurringPayment; + + public static final String JSON_PROPERTY_ORG = "org"; + private OrgRelationship org; + + public static final String JSON_PROPERTY_CARD = "card"; + private CardRelationship card; + + public static final String JSON_PROPERTY_INCOMING_ACH = "incomingAch"; + private IncomingAchRelationship incomingAch; + + public static final String JSON_PROPERTY_CHECK_DEPOSIT = "checkDeposit"; + private CheckDepositRelationship checkDeposit; + + public static final String JSON_PROPERTY_AUTHORIZATION_REQUEST = "authorizationRequest"; + private AuthorizationRequestRelationship authorizationRequest; + + public static final String JSON_PROPERTY_PAYMENT_ADVANCE_TRANSACTION = "paymentAdvanceTransaction"; + private RelatedTransaction paymentAdvanceTransaction; + + public static final String JSON_PROPERTY_RECEIVED_PAYMENT = "receivedPayment"; + private ReceivedPaymentRelationship receivedPayment; + + public static final String JSON_PROPERTY_CHARGEBACK = "chargeback"; + private ChargebackRelationship chargeback; + + public static final String JSON_PROPERTY_REWARD = "reward"; + private RewardRelationship reward; + + public TransactionRelationships() { + } + + public TransactionRelationships account(AccountRelationship2 account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AccountRelationship2 getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccount(AccountRelationship2 account) { + this.account = account; + } + + + public TransactionRelationships receivingAccount(ReceivingAccountRelationship receivingAccount) { + this.receivingAccount = receivingAccount; + return this; + } + + /** + * Get receivingAccount + * @return receivingAccount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECEIVING_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReceivingAccountRelationship getReceivingAccount() { + return receivingAccount; + } + + + @JsonProperty(JSON_PROPERTY_RECEIVING_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReceivingAccount(ReceivingAccountRelationship receivingAccount) { + this.receivingAccount = receivingAccount; + } + + + public TransactionRelationships customer(CustomerRelationship customer) { + this.customer = customer; + return this; + } + + /** + * Get customer + * @return customer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CustomerRelationship getCustomer() { + return customer; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomer(CustomerRelationship customer) { + this.customer = customer; + } + + + public TransactionRelationships customers(CustomersRelationship customers) { + this.customers = customers; + return this; + } + + /** + * Get customers + * @return customers + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CustomersRelationship getCustomers() { + return customers; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomers(CustomersRelationship customers) { + this.customers = customers; + } + + + public TransactionRelationships counterpartyAccount(CounterpartyAccountRelationship1 counterpartyAccount) { + this.counterpartyAccount = counterpartyAccount; + return this; + } + + /** + * Get counterpartyAccount + * @return counterpartyAccount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CounterpartyAccountRelationship1 getCounterpartyAccount() { + return counterpartyAccount; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterpartyAccount(CounterpartyAccountRelationship1 counterpartyAccount) { + this.counterpartyAccount = counterpartyAccount; + } + + + public TransactionRelationships counterpartyCustomer(CounterpartyCustomerRelationship counterpartyCustomer) { + this.counterpartyCustomer = counterpartyCustomer; + return this; + } + + /** + * Get counterpartyCustomer + * @return counterpartyCustomer + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CounterpartyCustomerRelationship getCounterpartyCustomer() { + return counterpartyCustomer; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_CUSTOMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterpartyCustomer(CounterpartyCustomerRelationship counterpartyCustomer) { + this.counterpartyCustomer = counterpartyCustomer; + } + + + public TransactionRelationships relatedTransaction(RelatedTransactionRelationship relatedTransaction) { + this.relatedTransaction = relatedTransaction; + return this; + } + + /** + * Get relatedTransaction + * @return relatedTransaction + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATED_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RelatedTransactionRelationship getRelatedTransaction() { + return relatedTransaction; + } + + + @JsonProperty(JSON_PROPERTY_RELATED_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelatedTransaction(RelatedTransactionRelationship relatedTransaction) { + this.relatedTransaction = relatedTransaction; + } + + + public TransactionRelationships disputedTransaction(RelatedTransaction disputedTransaction) { + this.disputedTransaction = disputedTransaction; + return this; + } + + /** + * Get disputedTransaction + * @return disputedTransaction + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPUTED_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RelatedTransaction getDisputedTransaction() { + return disputedTransaction; + } + + + @JsonProperty(JSON_PROPERTY_DISPUTED_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisputedTransaction(RelatedTransaction disputedTransaction) { + this.disputedTransaction = disputedTransaction; + } + + + public TransactionRelationships authorization(AuthorizationRelationship authorization) { + this.authorization = authorization; + return this; + } + + /** + * Get authorization + * @return authorization + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHORIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AuthorizationRelationship getAuthorization() { + return authorization; + } + + + @JsonProperty(JSON_PROPERTY_AUTHORIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAuthorization(AuthorizationRelationship authorization) { + this.authorization = authorization; + } + + + public TransactionRelationships returned(ReturnedRelationship returned) { + this.returned = returned; + return this; + } + + /** + * Get returned + * @return returned + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RETURNED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReturnedRelationship getReturned() { + return returned; + } + + + @JsonProperty(JSON_PROPERTY_RETURNED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReturned(ReturnedRelationship returned) { + this.returned = returned; + } + + + public TransactionRelationships payment(PaymentRelationship payment) { + this.payment = payment; + return this; + } + + /** + * Get payment + * @return payment + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaymentRelationship getPayment() { + return payment; + } + + + @JsonProperty(JSON_PROPERTY_PAYMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayment(PaymentRelationship payment) { + this.payment = payment; + } + + + public TransactionRelationships checkPayment(CheckPaymentRelationship checkPayment) { + this.checkPayment = checkPayment; + return this; + } + + /** + * Get checkPayment + * @return checkPayment + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK_PAYMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CheckPaymentRelationship getCheckPayment() { + return checkPayment; + } + + + @JsonProperty(JSON_PROPERTY_CHECK_PAYMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCheckPayment(CheckPaymentRelationship checkPayment) { + this.checkPayment = checkPayment; + } + + + public TransactionRelationships repayment(RepaymentRelationship repayment) { + this.repayment = repayment; + return this; + } + + /** + * Get repayment + * @return repayment + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REPAYMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RepaymentRelationship getRepayment() { + return repayment; + } + + + @JsonProperty(JSON_PROPERTY_REPAYMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRepayment(RepaymentRelationship repayment) { + this.repayment = repayment; + } + + + public TransactionRelationships recurringPayment(RecurringPaymentRelationship recurringPayment) { + this.recurringPayment = recurringPayment; + return this; + } + + /** + * Get recurringPayment + * @return recurringPayment + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECURRING_PAYMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RecurringPaymentRelationship getRecurringPayment() { + return recurringPayment; + } + + + @JsonProperty(JSON_PROPERTY_RECURRING_PAYMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRecurringPayment(RecurringPaymentRelationship recurringPayment) { + this.recurringPayment = recurringPayment; + } + + + public TransactionRelationships org(OrgRelationship org) { + this.org = org; + return this; + } + + /** + * Get org + * @return org + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OrgRelationship getOrg() { + return org; + } + + + @JsonProperty(JSON_PROPERTY_ORG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOrg(OrgRelationship org) { + this.org = org; + } + + + public TransactionRelationships card(CardRelationship card) { + this.card = card; + return this; + } + + /** + * Get card + * @return card + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CardRelationship getCard() { + return card; + } + + + @JsonProperty(JSON_PROPERTY_CARD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCard(CardRelationship card) { + this.card = card; + } + + + public TransactionRelationships incomingAch(IncomingAchRelationship incomingAch) { + this.incomingAch = incomingAch; + return this; + } + + /** + * Get incomingAch + * @return incomingAch + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCOMING_ACH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public IncomingAchRelationship getIncomingAch() { + return incomingAch; + } + + + @JsonProperty(JSON_PROPERTY_INCOMING_ACH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncomingAch(IncomingAchRelationship incomingAch) { + this.incomingAch = incomingAch; + } + + + public TransactionRelationships checkDeposit(CheckDepositRelationship checkDeposit) { + this.checkDeposit = checkDeposit; + return this; + } + + /** + * Get checkDeposit + * @return checkDeposit + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK_DEPOSIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CheckDepositRelationship getCheckDeposit() { + return checkDeposit; + } + + + @JsonProperty(JSON_PROPERTY_CHECK_DEPOSIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCheckDeposit(CheckDepositRelationship checkDeposit) { + this.checkDeposit = checkDeposit; + } + + + public TransactionRelationships authorizationRequest(AuthorizationRequestRelationship authorizationRequest) { + this.authorizationRequest = authorizationRequest; + return this; + } + + /** + * Get authorizationRequest + * @return authorizationRequest + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHORIZATION_REQUEST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AuthorizationRequestRelationship getAuthorizationRequest() { + return authorizationRequest; + } + + + @JsonProperty(JSON_PROPERTY_AUTHORIZATION_REQUEST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAuthorizationRequest(AuthorizationRequestRelationship authorizationRequest) { + this.authorizationRequest = authorizationRequest; + } + + + public TransactionRelationships paymentAdvanceTransaction(RelatedTransaction paymentAdvanceTransaction) { + this.paymentAdvanceTransaction = paymentAdvanceTransaction; + return this; + } + + /** + * Get paymentAdvanceTransaction + * @return paymentAdvanceTransaction + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYMENT_ADVANCE_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RelatedTransaction getPaymentAdvanceTransaction() { + return paymentAdvanceTransaction; + } + + + @JsonProperty(JSON_PROPERTY_PAYMENT_ADVANCE_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaymentAdvanceTransaction(RelatedTransaction paymentAdvanceTransaction) { + this.paymentAdvanceTransaction = paymentAdvanceTransaction; + } + + + public TransactionRelationships receivedPayment(ReceivedPaymentRelationship receivedPayment) { + this.receivedPayment = receivedPayment; + return this; + } + + /** + * Get receivedPayment + * @return receivedPayment + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECEIVED_PAYMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReceivedPaymentRelationship getReceivedPayment() { + return receivedPayment; + } + + + @JsonProperty(JSON_PROPERTY_RECEIVED_PAYMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReceivedPayment(ReceivedPaymentRelationship receivedPayment) { + this.receivedPayment = receivedPayment; + } + + + public TransactionRelationships chargeback(ChargebackRelationship chargeback) { + this.chargeback = chargeback; + return this; + } + + /** + * Get chargeback + * @return chargeback + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHARGEBACK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ChargebackRelationship getChargeback() { + return chargeback; + } + + + @JsonProperty(JSON_PROPERTY_CHARGEBACK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setChargeback(ChargebackRelationship chargeback) { + this.chargeback = chargeback; + } + + + public TransactionRelationships reward(RewardRelationship reward) { + this.reward = reward; + return this; + } + + /** + * Get reward + * @return reward + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REWARD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RewardRelationship getReward() { + return reward; + } + + + @JsonProperty(JSON_PROPERTY_REWARD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReward(RewardRelationship reward) { + this.reward = reward; + } + + + /** + * Return true if this transactionRelationships object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransactionRelationships transactionRelationships = (TransactionRelationships) o; + return Objects.equals(this.account, transactionRelationships.account) && + Objects.equals(this.receivingAccount, transactionRelationships.receivingAccount) && + Objects.equals(this.customer, transactionRelationships.customer) && + Objects.equals(this.customers, transactionRelationships.customers) && + Objects.equals(this.counterpartyAccount, transactionRelationships.counterpartyAccount) && + Objects.equals(this.counterpartyCustomer, transactionRelationships.counterpartyCustomer) && + Objects.equals(this.relatedTransaction, transactionRelationships.relatedTransaction) && + Objects.equals(this.disputedTransaction, transactionRelationships.disputedTransaction) && + Objects.equals(this.authorization, transactionRelationships.authorization) && + Objects.equals(this.returned, transactionRelationships.returned) && + Objects.equals(this.payment, transactionRelationships.payment) && + Objects.equals(this.checkPayment, transactionRelationships.checkPayment) && + Objects.equals(this.repayment, transactionRelationships.repayment) && + Objects.equals(this.recurringPayment, transactionRelationships.recurringPayment) && + Objects.equals(this.org, transactionRelationships.org) && + Objects.equals(this.card, transactionRelationships.card) && + Objects.equals(this.incomingAch, transactionRelationships.incomingAch) && + Objects.equals(this.checkDeposit, transactionRelationships.checkDeposit) && + Objects.equals(this.authorizationRequest, transactionRelationships.authorizationRequest) && + Objects.equals(this.paymentAdvanceTransaction, transactionRelationships.paymentAdvanceTransaction) && + Objects.equals(this.receivedPayment, transactionRelationships.receivedPayment) && + Objects.equals(this.chargeback, transactionRelationships.chargeback) && + Objects.equals(this.reward, transactionRelationships.reward); + } + + @Override + public int hashCode() { + return Objects.hash(account, receivingAccount, customer, customers, counterpartyAccount, counterpartyCustomer, relatedTransaction, disputedTransaction, authorization, returned, payment, checkPayment, repayment, recurringPayment, org, card, incomingAch, checkDeposit, authorizationRequest, paymentAdvanceTransaction, receivedPayment, chargeback, reward); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransactionRelationships {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" receivingAccount: ").append(toIndentedString(receivingAccount)).append("\n"); + sb.append(" customer: ").append(toIndentedString(customer)).append("\n"); + sb.append(" customers: ").append(toIndentedString(customers)).append("\n"); + sb.append(" counterpartyAccount: ").append(toIndentedString(counterpartyAccount)).append("\n"); + sb.append(" counterpartyCustomer: ").append(toIndentedString(counterpartyCustomer)).append("\n"); + sb.append(" relatedTransaction: ").append(toIndentedString(relatedTransaction)).append("\n"); + sb.append(" disputedTransaction: ").append(toIndentedString(disputedTransaction)).append("\n"); + sb.append(" authorization: ").append(toIndentedString(authorization)).append("\n"); + sb.append(" returned: ").append(toIndentedString(returned)).append("\n"); + sb.append(" payment: ").append(toIndentedString(payment)).append("\n"); + sb.append(" checkPayment: ").append(toIndentedString(checkPayment)).append("\n"); + sb.append(" repayment: ").append(toIndentedString(repayment)).append("\n"); + sb.append(" recurringPayment: ").append(toIndentedString(recurringPayment)).append("\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append(" card: ").append(toIndentedString(card)).append("\n"); + sb.append(" incomingAch: ").append(toIndentedString(incomingAch)).append("\n"); + sb.append(" checkDeposit: ").append(toIndentedString(checkDeposit)).append("\n"); + sb.append(" authorizationRequest: ").append(toIndentedString(authorizationRequest)).append("\n"); + sb.append(" paymentAdvanceTransaction: ").append(toIndentedString(paymentAdvanceTransaction)).append("\n"); + sb.append(" receivedPayment: ").append(toIndentedString(receivedPayment)).append("\n"); + sb.append(" chargeback: ").append(toIndentedString(chargeback)).append("\n"); + sb.append(" reward: ").append(toIndentedString(reward)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `account` to the URL query string + if (getAccount() != null) { + joiner.add(getAccount().toUrlQueryString(prefix + "account" + suffix)); + } + + // add `receivingAccount` to the URL query string + if (getReceivingAccount() != null) { + joiner.add(getReceivingAccount().toUrlQueryString(prefix + "receivingAccount" + suffix)); + } + + // add `customer` to the URL query string + if (getCustomer() != null) { + joiner.add(getCustomer().toUrlQueryString(prefix + "customer" + suffix)); + } + + // add `customers` to the URL query string + if (getCustomers() != null) { + joiner.add(getCustomers().toUrlQueryString(prefix + "customers" + suffix)); + } + + // add `counterpartyAccount` to the URL query string + if (getCounterpartyAccount() != null) { + joiner.add(getCounterpartyAccount().toUrlQueryString(prefix + "counterpartyAccount" + suffix)); + } + + // add `counterpartyCustomer` to the URL query string + if (getCounterpartyCustomer() != null) { + joiner.add(getCounterpartyCustomer().toUrlQueryString(prefix + "counterpartyCustomer" + suffix)); + } + + // add `relatedTransaction` to the URL query string + if (getRelatedTransaction() != null) { + joiner.add(getRelatedTransaction().toUrlQueryString(prefix + "relatedTransaction" + suffix)); + } + + // add `disputedTransaction` to the URL query string + if (getDisputedTransaction() != null) { + joiner.add(getDisputedTransaction().toUrlQueryString(prefix + "disputedTransaction" + suffix)); + } + + // add `authorization` to the URL query string + if (getAuthorization() != null) { + joiner.add(getAuthorization().toUrlQueryString(prefix + "authorization" + suffix)); + } + + // add `returned` to the URL query string + if (getReturned() != null) { + joiner.add(getReturned().toUrlQueryString(prefix + "returned" + suffix)); + } + + // add `payment` to the URL query string + if (getPayment() != null) { + joiner.add(getPayment().toUrlQueryString(prefix + "payment" + suffix)); + } + + // add `checkPayment` to the URL query string + if (getCheckPayment() != null) { + joiner.add(getCheckPayment().toUrlQueryString(prefix + "checkPayment" + suffix)); + } + + // add `repayment` to the URL query string + if (getRepayment() != null) { + joiner.add(getRepayment().toUrlQueryString(prefix + "repayment" + suffix)); + } + + // add `recurringPayment` to the URL query string + if (getRecurringPayment() != null) { + joiner.add(getRecurringPayment().toUrlQueryString(prefix + "recurringPayment" + suffix)); + } + + // add `org` to the URL query string + if (getOrg() != null) { + joiner.add(getOrg().toUrlQueryString(prefix + "org" + suffix)); + } + + // add `card` to the URL query string + if (getCard() != null) { + joiner.add(getCard().toUrlQueryString(prefix + "card" + suffix)); + } + + // add `incomingAch` to the URL query string + if (getIncomingAch() != null) { + joiner.add(getIncomingAch().toUrlQueryString(prefix + "incomingAch" + suffix)); + } + + // add `checkDeposit` to the URL query string + if (getCheckDeposit() != null) { + joiner.add(getCheckDeposit().toUrlQueryString(prefix + "checkDeposit" + suffix)); + } + + // add `authorizationRequest` to the URL query string + if (getAuthorizationRequest() != null) { + joiner.add(getAuthorizationRequest().toUrlQueryString(prefix + "authorizationRequest" + suffix)); + } + + // add `paymentAdvanceTransaction` to the URL query string + if (getPaymentAdvanceTransaction() != null) { + joiner.add(getPaymentAdvanceTransaction().toUrlQueryString(prefix + "paymentAdvanceTransaction" + suffix)); + } + + // add `receivedPayment` to the URL query string + if (getReceivedPayment() != null) { + joiner.add(getReceivedPayment().toUrlQueryString(prefix + "receivedPayment" + suffix)); + } + + // add `chargeback` to the URL query string + if (getChargeback() != null) { + joiner.add(getChargeback().toUrlQueryString(prefix + "chargeback" + suffix)); + } + + // add `reward` to the URL query string + if (getReward() != null) { + joiner.add(getReward().toUrlQueryString(prefix + "reward" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/TrustApplication.java b/src/main/java/unit/java/sdk/model/TrustApplication.java new file mode 100644 index 00000000..7f0f6783 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/TrustApplication.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Application; +import unit.java.sdk.model.ApplicationRelationships; +import unit.java.sdk.model.TrustApplicationAllOfAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * TrustApplication + */ +@JsonPropertyOrder({ + TrustApplication.JSON_PROPERTY_ATTRIBUTES, + TrustApplication.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class TrustApplication extends Application { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private TrustApplicationAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private ApplicationRelationships relationships; + + public TrustApplication() { + } + + public TrustApplication attributes(TrustApplicationAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TrustApplicationAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(TrustApplicationAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public TrustApplication relationships(ApplicationRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApplicationRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(ApplicationRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public TrustApplication id(String id) { + this.setId(id); + return this; + } + + @Override + public TrustApplication type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this TrustApplication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TrustApplication trustApplication = (TrustApplication) o; + return Objects.equals(this.attributes, trustApplication.attributes) && + Objects.equals(this.relationships, trustApplication.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TrustApplication {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TrustApplication", TrustApplication.class); + JSON.registerDiscriminator(TrustApplication.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/TrustApplicationAllOfAttributes.java b/src/main/java/unit/java/sdk/model/TrustApplicationAllOfAttributes.java new file mode 100644 index 00000000..4c118576 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/TrustApplicationAllOfAttributes.java @@ -0,0 +1,1193 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.ApplicationStatus; +import unit.java.sdk.model.Grantor; +import unit.java.sdk.model.Revocability; +import unit.java.sdk.model.SourceOfFunds; +import unit.java.sdk.model.TrustContact; +import unit.java.sdk.model.Trustee; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * TrustApplicationAllOfAttributes + */ +@JsonPropertyOrder({ + TrustApplicationAllOfAttributes.JSON_PROPERTY_CREATED_AT, + TrustApplicationAllOfAttributes.JSON_PROPERTY_UPDATED_AT, + TrustApplicationAllOfAttributes.JSON_PROPERTY_STATUS, + TrustApplicationAllOfAttributes.JSON_PROPERTY_MESSAGE, + TrustApplicationAllOfAttributes.JSON_PROPERTY_EVALUATION_OUTCOME, + TrustApplicationAllOfAttributes.JSON_PROPERTY_EVALUATION_ID, + TrustApplicationAllOfAttributes.JSON_PROPERTY_EVALUATION_ENTITY_ID, + TrustApplicationAllOfAttributes.JSON_PROPERTY_NAME, + TrustApplicationAllOfAttributes.JSON_PROPERTY_DATE_OF_INCORPORATION, + TrustApplicationAllOfAttributes.JSON_PROPERTY_STATE_OF_INCORPORATION, + TrustApplicationAllOfAttributes.JSON_PROPERTY_REVOCABILITY, + TrustApplicationAllOfAttributes.JSON_PROPERTY_SOURCE_OF_FUNDS, + TrustApplicationAllOfAttributes.JSON_PROPERTY_TAX_ID, + TrustApplicationAllOfAttributes.JSON_PROPERTY_CONTACT, + TrustApplicationAllOfAttributes.JSON_PROPERTY_TRUSTEES, + TrustApplicationAllOfAttributes.JSON_PROPERTY_GRANTOR, + TrustApplicationAllOfAttributes.JSON_PROPERTY_IP, + TrustApplicationAllOfAttributes.JSON_PROPERTY_DECISION_METHOD, + TrustApplicationAllOfAttributes.JSON_PROPERTY_DECISION_USER_ID, + TrustApplicationAllOfAttributes.JSON_PROPERTY_DECISION_REASON, + TrustApplicationAllOfAttributes.JSON_PROPERTY_DECISION_DATE_TIME, + TrustApplicationAllOfAttributes.JSON_PROPERTY_TAGS, + TrustApplicationAllOfAttributes.JSON_PROPERTY_RISK_RATE, + TrustApplicationAllOfAttributes.JSON_PROPERTY_EVALUATION_FLAGS, + TrustApplicationAllOfAttributes.JSON_PROPERTY_IP_LOCATION_DETAILS, + TrustApplicationAllOfAttributes.JSON_PROPERTY_PHONE_LOCATION_DETAILS, + TrustApplicationAllOfAttributes.JSON_PROPERTY_ARCHIVED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TrustApplicationAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_STATUS = "status"; + private ApplicationStatus status; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_EVALUATION_OUTCOME = "evaluationOutcome"; + private String evaluationOutcome; + + public static final String JSON_PROPERTY_EVALUATION_ID = "evaluationId"; + private String evaluationId; + + public static final String JSON_PROPERTY_EVALUATION_ENTITY_ID = "evaluationEntityId"; + private String evaluationEntityId; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_DATE_OF_INCORPORATION = "dateOfIncorporation"; + private LocalDate dateOfIncorporation; + + public static final String JSON_PROPERTY_STATE_OF_INCORPORATION = "stateOfIncorporation"; + private String stateOfIncorporation; + + public static final String JSON_PROPERTY_REVOCABILITY = "revocability"; + private Revocability revocability; + + public static final String JSON_PROPERTY_SOURCE_OF_FUNDS = "sourceOfFunds"; + private SourceOfFunds sourceOfFunds; + + public static final String JSON_PROPERTY_TAX_ID = "taxId"; + private String taxId; + + public static final String JSON_PROPERTY_CONTACT = "contact"; + private TrustContact contact; + + public static final String JSON_PROPERTY_TRUSTEES = "trustees"; + private List trustees; + + public static final String JSON_PROPERTY_GRANTOR = "grantor"; + private Grantor grantor; + + public static final String JSON_PROPERTY_IP = "ip"; + private String ip; + + /** + * Gets or Sets decisionMethod + */ + public enum DecisionMethodEnum { + MANUALLY("Manually"), + + AUTOMATICALLY("Automatically"); + + private String value; + + DecisionMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DecisionMethodEnum fromValue(String value) { + for (DecisionMethodEnum b : DecisionMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DECISION_METHOD = "decisionMethod"; + private DecisionMethodEnum decisionMethod; + + public static final String JSON_PROPERTY_DECISION_USER_ID = "decisionUserId"; + private String decisionUserId; + + public static final String JSON_PROPERTY_DECISION_REASON = "decisionReason"; + private String decisionReason; + + public static final String JSON_PROPERTY_DECISION_DATE_TIME = "decisionDateTime"; + private OffsetDateTime decisionDateTime; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + /** + * Gets or Sets riskRate + */ + public enum RiskRateEnum { + LOW("low"), + + MEDIUM("medium"), + + HIGH("high"); + + private String value; + + RiskRateEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RiskRateEnum fromValue(String value) { + for (RiskRateEnum b : RiskRateEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RISK_RATE = "riskRate"; + private RiskRateEnum riskRate; + + public static final String JSON_PROPERTY_EVALUATION_FLAGS = "evaluationFlags"; + private List evaluationFlags; + + public static final String JSON_PROPERTY_IP_LOCATION_DETAILS = "ipLocationDetails"; + private Object ipLocationDetails; + + public static final String JSON_PROPERTY_PHONE_LOCATION_DETAILS = "phoneLocationDetails"; + private Object phoneLocationDetails; + + public static final String JSON_PROPERTY_ARCHIVED = "archived"; + private Boolean archived; + + public TrustApplicationAllOfAttributes() { + } + + public TrustApplicationAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public TrustApplicationAllOfAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public TrustApplicationAllOfAttributes status(ApplicationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ApplicationStatus getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(ApplicationStatus status) { + this.status = status; + } + + + public TrustApplicationAllOfAttributes message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + + public TrustApplicationAllOfAttributes evaluationOutcome(String evaluationOutcome) { + this.evaluationOutcome = evaluationOutcome; + return this; + } + + /** + * Get evaluationOutcome + * @return evaluationOutcome + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_OUTCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEvaluationOutcome() { + return evaluationOutcome; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_OUTCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationOutcome(String evaluationOutcome) { + this.evaluationOutcome = evaluationOutcome; + } + + + public TrustApplicationAllOfAttributes evaluationId(String evaluationId) { + this.evaluationId = evaluationId; + return this; + } + + /** + * Get evaluationId + * @return evaluationId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEvaluationId() { + return evaluationId; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationId(String evaluationId) { + this.evaluationId = evaluationId; + } + + + public TrustApplicationAllOfAttributes evaluationEntityId(String evaluationEntityId) { + this.evaluationEntityId = evaluationEntityId; + return this; + } + + /** + * Get evaluationEntityId + * @return evaluationEntityId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_ENTITY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEvaluationEntityId() { + return evaluationEntityId; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_ENTITY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationEntityId(String evaluationEntityId) { + this.evaluationEntityId = evaluationEntityId; + } + + + public TrustApplicationAllOfAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public TrustApplicationAllOfAttributes dateOfIncorporation(LocalDate dateOfIncorporation) { + this.dateOfIncorporation = dateOfIncorporation; + return this; + } + + /** + * Get dateOfIncorporation + * @return dateOfIncorporation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getDateOfIncorporation() { + return dateOfIncorporation; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfIncorporation(LocalDate dateOfIncorporation) { + this.dateOfIncorporation = dateOfIncorporation; + } + + + public TrustApplicationAllOfAttributes stateOfIncorporation(String stateOfIncorporation) { + this.stateOfIncorporation = stateOfIncorporation; + return this; + } + + /** + * Get stateOfIncorporation + * @return stateOfIncorporation + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getStateOfIncorporation() { + return stateOfIncorporation; + } + + + @JsonProperty(JSON_PROPERTY_STATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStateOfIncorporation(String stateOfIncorporation) { + this.stateOfIncorporation = stateOfIncorporation; + } + + + public TrustApplicationAllOfAttributes revocability(Revocability revocability) { + this.revocability = revocability; + return this; + } + + /** + * Get revocability + * @return revocability + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REVOCABILITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Revocability getRevocability() { + return revocability; + } + + + @JsonProperty(JSON_PROPERTY_REVOCABILITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRevocability(Revocability revocability) { + this.revocability = revocability; + } + + + public TrustApplicationAllOfAttributes sourceOfFunds(SourceOfFunds sourceOfFunds) { + this.sourceOfFunds = sourceOfFunds; + return this; + } + + /** + * Get sourceOfFunds + * @return sourceOfFunds + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_OF_FUNDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SourceOfFunds getSourceOfFunds() { + return sourceOfFunds; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_OF_FUNDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceOfFunds(SourceOfFunds sourceOfFunds) { + this.sourceOfFunds = sourceOfFunds; + } + + + public TrustApplicationAllOfAttributes taxId(String taxId) { + this.taxId = taxId; + return this; + } + + /** + * Get taxId + * @return taxId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAX_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTaxId() { + return taxId; + } + + + @JsonProperty(JSON_PROPERTY_TAX_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTaxId(String taxId) { + this.taxId = taxId; + } + + + public TrustApplicationAllOfAttributes contact(TrustContact contact) { + this.contact = contact; + return this; + } + + /** + * Get contact + * @return contact + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TrustContact getContact() { + return contact; + } + + + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setContact(TrustContact contact) { + this.contact = contact; + } + + + public TrustApplicationAllOfAttributes trustees(List trustees) { + this.trustees = trustees; + return this; + } + + public TrustApplicationAllOfAttributes addTrusteesItem(Trustee trusteesItem) { + if (this.trustees == null) { + this.trustees = new ArrayList<>(); + } + this.trustees.add(trusteesItem); + return this; + } + + /** + * Get trustees + * @return trustees + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRUSTEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getTrustees() { + return trustees; + } + + + @JsonProperty(JSON_PROPERTY_TRUSTEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTrustees(List trustees) { + this.trustees = trustees; + } + + + public TrustApplicationAllOfAttributes grantor(Grantor grantor) { + this.grantor = grantor; + return this; + } + + /** + * Get grantor + * @return grantor + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GRANTOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Grantor getGrantor() { + return grantor; + } + + + @JsonProperty(JSON_PROPERTY_GRANTOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGrantor(Grantor grantor) { + this.grantor = grantor; + } + + + public TrustApplicationAllOfAttributes ip(String ip) { + this.ip = ip; + return this; + } + + /** + * Get ip + * @return ip + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIp() { + return ip; + } + + + @JsonProperty(JSON_PROPERTY_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIp(String ip) { + this.ip = ip; + } + + + public TrustApplicationAllOfAttributes decisionMethod(DecisionMethodEnum decisionMethod) { + this.decisionMethod = decisionMethod; + return this; + } + + /** + * Get decisionMethod + * @return decisionMethod + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECISION_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DecisionMethodEnum getDecisionMethod() { + return decisionMethod; + } + + + @JsonProperty(JSON_PROPERTY_DECISION_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecisionMethod(DecisionMethodEnum decisionMethod) { + this.decisionMethod = decisionMethod; + } + + + public TrustApplicationAllOfAttributes decisionUserId(String decisionUserId) { + this.decisionUserId = decisionUserId; + return this; + } + + /** + * Get decisionUserId + * @return decisionUserId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECISION_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDecisionUserId() { + return decisionUserId; + } + + + @JsonProperty(JSON_PROPERTY_DECISION_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecisionUserId(String decisionUserId) { + this.decisionUserId = decisionUserId; + } + + + public TrustApplicationAllOfAttributes decisionReason(String decisionReason) { + this.decisionReason = decisionReason; + return this; + } + + /** + * Get decisionReason + * @return decisionReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECISION_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDecisionReason() { + return decisionReason; + } + + + @JsonProperty(JSON_PROPERTY_DECISION_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecisionReason(String decisionReason) { + this.decisionReason = decisionReason; + } + + + public TrustApplicationAllOfAttributes decisionDateTime(OffsetDateTime decisionDateTime) { + this.decisionDateTime = decisionDateTime; + return this; + } + + /** + * Get decisionDateTime + * @return decisionDateTime + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECISION_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getDecisionDateTime() { + return decisionDateTime; + } + + + @JsonProperty(JSON_PROPERTY_DECISION_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecisionDateTime(OffsetDateTime decisionDateTime) { + this.decisionDateTime = decisionDateTime; + } + + + public TrustApplicationAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public TrustApplicationAllOfAttributes riskRate(RiskRateEnum riskRate) { + this.riskRate = riskRate; + return this; + } + + /** + * Get riskRate + * @return riskRate + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RISK_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RiskRateEnum getRiskRate() { + return riskRate; + } + + + @JsonProperty(JSON_PROPERTY_RISK_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRiskRate(RiskRateEnum riskRate) { + this.riskRate = riskRate; + } + + + public TrustApplicationAllOfAttributes evaluationFlags(List evaluationFlags) { + this.evaluationFlags = evaluationFlags; + return this; + } + + public TrustApplicationAllOfAttributes addEvaluationFlagsItem(String evaluationFlagsItem) { + if (this.evaluationFlags == null) { + this.evaluationFlags = new ArrayList<>(); + } + this.evaluationFlags.add(evaluationFlagsItem); + return this; + } + + /** + * Get evaluationFlags + * @return evaluationFlags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_FLAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getEvaluationFlags() { + return evaluationFlags; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_FLAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationFlags(List evaluationFlags) { + this.evaluationFlags = evaluationFlags; + } + + + public TrustApplicationAllOfAttributes ipLocationDetails(Object ipLocationDetails) { + this.ipLocationDetails = ipLocationDetails; + return this; + } + + /** + * Get ipLocationDetails + * @return ipLocationDetails + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IP_LOCATION_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getIpLocationDetails() { + return ipLocationDetails; + } + + + @JsonProperty(JSON_PROPERTY_IP_LOCATION_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIpLocationDetails(Object ipLocationDetails) { + this.ipLocationDetails = ipLocationDetails; + } + + + public TrustApplicationAllOfAttributes phoneLocationDetails(Object phoneLocationDetails) { + this.phoneLocationDetails = phoneLocationDetails; + return this; + } + + /** + * Get phoneLocationDetails + * @return phoneLocationDetails + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE_LOCATION_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getPhoneLocationDetails() { + return phoneLocationDetails; + } + + + @JsonProperty(JSON_PROPERTY_PHONE_LOCATION_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhoneLocationDetails(Object phoneLocationDetails) { + this.phoneLocationDetails = phoneLocationDetails; + } + + + public TrustApplicationAllOfAttributes archived(Boolean archived) { + this.archived = archived; + return this; + } + + /** + * Get archived + * @return archived + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getArchived() { + return archived; + } + + + @JsonProperty(JSON_PROPERTY_ARCHIVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArchived(Boolean archived) { + this.archived = archived; + } + + + /** + * Return true if this TrustApplication_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TrustApplicationAllOfAttributes trustApplicationAllOfAttributes = (TrustApplicationAllOfAttributes) o; + return Objects.equals(this.createdAt, trustApplicationAllOfAttributes.createdAt) && + Objects.equals(this.updatedAt, trustApplicationAllOfAttributes.updatedAt) && + Objects.equals(this.status, trustApplicationAllOfAttributes.status) && + Objects.equals(this.message, trustApplicationAllOfAttributes.message) && + Objects.equals(this.evaluationOutcome, trustApplicationAllOfAttributes.evaluationOutcome) && + Objects.equals(this.evaluationId, trustApplicationAllOfAttributes.evaluationId) && + Objects.equals(this.evaluationEntityId, trustApplicationAllOfAttributes.evaluationEntityId) && + Objects.equals(this.name, trustApplicationAllOfAttributes.name) && + Objects.equals(this.dateOfIncorporation, trustApplicationAllOfAttributes.dateOfIncorporation) && + Objects.equals(this.stateOfIncorporation, trustApplicationAllOfAttributes.stateOfIncorporation) && + Objects.equals(this.revocability, trustApplicationAllOfAttributes.revocability) && + Objects.equals(this.sourceOfFunds, trustApplicationAllOfAttributes.sourceOfFunds) && + Objects.equals(this.taxId, trustApplicationAllOfAttributes.taxId) && + Objects.equals(this.contact, trustApplicationAllOfAttributes.contact) && + Objects.equals(this.trustees, trustApplicationAllOfAttributes.trustees) && + Objects.equals(this.grantor, trustApplicationAllOfAttributes.grantor) && + Objects.equals(this.ip, trustApplicationAllOfAttributes.ip) && + Objects.equals(this.decisionMethod, trustApplicationAllOfAttributes.decisionMethod) && + Objects.equals(this.decisionUserId, trustApplicationAllOfAttributes.decisionUserId) && + Objects.equals(this.decisionReason, trustApplicationAllOfAttributes.decisionReason) && + Objects.equals(this.decisionDateTime, trustApplicationAllOfAttributes.decisionDateTime) && + Objects.equals(this.tags, trustApplicationAllOfAttributes.tags) && + Objects.equals(this.riskRate, trustApplicationAllOfAttributes.riskRate) && + Objects.equals(this.evaluationFlags, trustApplicationAllOfAttributes.evaluationFlags) && + Objects.equals(this.ipLocationDetails, trustApplicationAllOfAttributes.ipLocationDetails) && + Objects.equals(this.phoneLocationDetails, trustApplicationAllOfAttributes.phoneLocationDetails) && + Objects.equals(this.archived, trustApplicationAllOfAttributes.archived); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, updatedAt, status, message, evaluationOutcome, evaluationId, evaluationEntityId, name, dateOfIncorporation, stateOfIncorporation, revocability, sourceOfFunds, taxId, contact, trustees, grantor, ip, decisionMethod, decisionUserId, decisionReason, decisionDateTime, tags, riskRate, evaluationFlags, ipLocationDetails, phoneLocationDetails, archived); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TrustApplicationAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" evaluationOutcome: ").append(toIndentedString(evaluationOutcome)).append("\n"); + sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); + sb.append(" evaluationEntityId: ").append(toIndentedString(evaluationEntityId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" dateOfIncorporation: ").append(toIndentedString(dateOfIncorporation)).append("\n"); + sb.append(" stateOfIncorporation: ").append(toIndentedString(stateOfIncorporation)).append("\n"); + sb.append(" revocability: ").append(toIndentedString(revocability)).append("\n"); + sb.append(" sourceOfFunds: ").append(toIndentedString(sourceOfFunds)).append("\n"); + sb.append(" taxId: ").append(toIndentedString(taxId)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" trustees: ").append(toIndentedString(trustees)).append("\n"); + sb.append(" grantor: ").append(toIndentedString(grantor)).append("\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append(" decisionMethod: ").append(toIndentedString(decisionMethod)).append("\n"); + sb.append(" decisionUserId: ").append(toIndentedString(decisionUserId)).append("\n"); + sb.append(" decisionReason: ").append(toIndentedString(decisionReason)).append("\n"); + sb.append(" decisionDateTime: ").append(toIndentedString(decisionDateTime)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" riskRate: ").append(toIndentedString(riskRate)).append("\n"); + sb.append(" evaluationFlags: ").append(toIndentedString(evaluationFlags)).append("\n"); + sb.append(" ipLocationDetails: ").append(toIndentedString(ipLocationDetails)).append("\n"); + sb.append(" phoneLocationDetails: ").append(toIndentedString(phoneLocationDetails)).append("\n"); + sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationOutcome` to the URL query string + if (getEvaluationOutcome() != null) { + joiner.add(String.format("%sevaluationOutcome%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEvaluationOutcome()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationId` to the URL query string + if (getEvaluationId() != null) { + joiner.add(String.format("%sevaluationId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEvaluationId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationEntityId` to the URL query string + if (getEvaluationEntityId() != null) { + joiner.add(String.format("%sevaluationEntityId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEvaluationEntityId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `dateOfIncorporation` to the URL query string + if (getDateOfIncorporation() != null) { + joiner.add(String.format("%sdateOfIncorporation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfIncorporation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `stateOfIncorporation` to the URL query string + if (getStateOfIncorporation() != null) { + joiner.add(String.format("%sstateOfIncorporation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStateOfIncorporation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `revocability` to the URL query string + if (getRevocability() != null) { + joiner.add(String.format("%srevocability%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRevocability()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sourceOfFunds` to the URL query string + if (getSourceOfFunds() != null) { + joiner.add(String.format("%ssourceOfFunds%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSourceOfFunds()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `taxId` to the URL query string + if (getTaxId() != null) { + joiner.add(String.format("%staxId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTaxId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `contact` to the URL query string + if (getContact() != null) { + joiner.add(getContact().toUrlQueryString(prefix + "contact" + suffix)); + } + + // add `trustees` to the URL query string + if (getTrustees() != null) { + for (int i = 0; i < getTrustees().size(); i++) { + if (getTrustees().get(i) != null) { + joiner.add(getTrustees().get(i).toUrlQueryString(String.format("%strustees%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `grantor` to the URL query string + if (getGrantor() != null) { + joiner.add(getGrantor().toUrlQueryString(prefix + "grantor" + suffix)); + } + + // add `ip` to the URL query string + if (getIp() != null) { + joiner.add(String.format("%sip%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIp()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `decisionMethod` to the URL query string + if (getDecisionMethod() != null) { + joiner.add(String.format("%sdecisionMethod%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDecisionMethod()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `decisionUserId` to the URL query string + if (getDecisionUserId() != null) { + joiner.add(String.format("%sdecisionUserId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDecisionUserId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `decisionReason` to the URL query string + if (getDecisionReason() != null) { + joiner.add(String.format("%sdecisionReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDecisionReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `decisionDateTime` to the URL query string + if (getDecisionDateTime() != null) { + joiner.add(String.format("%sdecisionDateTime%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDecisionDateTime()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `riskRate` to the URL query string + if (getRiskRate() != null) { + joiner.add(String.format("%sriskRate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRiskRate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `evaluationFlags` to the URL query string + if (getEvaluationFlags() != null) { + for (int i = 0; i < getEvaluationFlags().size(); i++) { + joiner.add(String.format("%sevaluationFlags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getEvaluationFlags().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + + // add `ipLocationDetails` to the URL query string + if (getIpLocationDetails() != null) { + joiner.add(String.format("%sipLocationDetails%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIpLocationDetails()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phoneLocationDetails` to the URL query string + if (getPhoneLocationDetails() != null) { + joiner.add(String.format("%sphoneLocationDetails%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPhoneLocationDetails()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `archived` to the URL query string + if (getArchived() != null) { + joiner.add(String.format("%sarchived%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getArchived()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/TrustContact.java b/src/main/java/unit/java/sdk/model/TrustContact.java new file mode 100644 index 00000000..89fcbe56 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/TrustContact.java @@ -0,0 +1,320 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * TrustContact + */ +@JsonPropertyOrder({ + TrustContact.JSON_PROPERTY_FULL_NAME, + TrustContact.JSON_PROPERTY_EMAIL, + TrustContact.JSON_PROPERTY_PHONE, + TrustContact.JSON_PROPERTY_ADDRESS, + TrustContact.JSON_PROPERTY_JWT_SUBJECT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TrustContact { + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_JWT_SUBJECT = "jwtSubject"; + private JsonNullable jwtSubject = JsonNullable.undefined(); + + public TrustContact() { + } + + public TrustContact fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public TrustContact email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public TrustContact phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public TrustContact address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(Address address) { + this.address = address; + } + + + public TrustContact jwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + return this; + } + + /** + * Get jwtSubject + * @return jwtSubject + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getJwtSubject() { + return jwtSubject.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getJwtSubject_JsonNullable() { + return jwtSubject; + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + public void setJwtSubject_JsonNullable(JsonNullable jwtSubject) { + this.jwtSubject = jwtSubject; + } + + public void setJwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + } + + + /** + * Return true if this trustContact object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TrustContact trustContact = (TrustContact) o; + return Objects.equals(this.fullName, trustContact.fullName) && + Objects.equals(this.email, trustContact.email) && + Objects.equals(this.phone, trustContact.phone) && + Objects.equals(this.address, trustContact.address) && + equalsNullable(this.jwtSubject, trustContact.jwtSubject); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(fullName, email, phone, address, hashCodeNullable(jwtSubject)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TrustContact {\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `jwtSubject` to the URL query string + if (getJwtSubject() != null) { + joiner.add(String.format("%sjwtSubject%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getJwtSubject()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/TrustCustomer.java b/src/main/java/unit/java/sdk/model/TrustCustomer.java new file mode 100644 index 00000000..f35c38a3 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/TrustCustomer.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Customer; +import unit.java.sdk.model.CustomerRelationships; +import unit.java.sdk.model.TrustCustomerAllOfAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * TrustCustomer + */ +@JsonPropertyOrder({ + TrustCustomer.JSON_PROPERTY_ATTRIBUTES, + TrustCustomer.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class TrustCustomer extends Customer { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private TrustCustomerAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CustomerRelationships relationships; + + public TrustCustomer() { + } + + public TrustCustomer attributes(TrustCustomerAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TrustCustomerAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(TrustCustomerAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public TrustCustomer relationships(CustomerRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CustomerRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelationships(CustomerRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public TrustCustomer id(String id) { + this.setId(id); + return this; + } + + @Override + public TrustCustomer type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this TrustCustomer object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TrustCustomer trustCustomer = (TrustCustomer) o; + return Objects.equals(this.attributes, trustCustomer.attributes) && + Objects.equals(this.relationships, trustCustomer.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TrustCustomer {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(String.format("%srelationships%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRelationships()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TrustCustomer", TrustCustomer.class); + JSON.registerDiscriminator(TrustCustomer.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/TrustCustomerAllOfAttributes.java b/src/main/java/unit/java/sdk/model/TrustCustomerAllOfAttributes.java new file mode 100644 index 00000000..81625ac0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/TrustCustomerAllOfAttributes.java @@ -0,0 +1,685 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.AuthorizedUser; +import unit.java.sdk.model.Revocability; +import unit.java.sdk.model.SourceOfFunds; +import unit.java.sdk.model.TrustContact; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * TrustCustomerAllOfAttributes + */ +@JsonPropertyOrder({ + TrustCustomerAllOfAttributes.JSON_PROPERTY_CREATED_AT, + TrustCustomerAllOfAttributes.JSON_PROPERTY_NAME, + TrustCustomerAllOfAttributes.JSON_PROPERTY_STATE_OF_INCORPORATION, + TrustCustomerAllOfAttributes.JSON_PROPERTY_CONTACT, + TrustCustomerAllOfAttributes.JSON_PROPERTY_TAGS, + TrustCustomerAllOfAttributes.JSON_PROPERTY_REVOCABILITY, + TrustCustomerAllOfAttributes.JSON_PROPERTY_SOURCE_OF_FUNDS, + TrustCustomerAllOfAttributes.JSON_PROPERTY_TAX_ID, + TrustCustomerAllOfAttributes.JSON_PROPERTY_RISK_RATE, + TrustCustomerAllOfAttributes.JSON_PROPERTY_AUTHORIZED_USERS, + TrustCustomerAllOfAttributes.JSON_PROPERTY_STATUS, + TrustCustomerAllOfAttributes.JSON_PROPERTY_ARCHIVE_REASON +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TrustCustomerAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_STATE_OF_INCORPORATION = "stateOfIncorporation"; + private String stateOfIncorporation; + + public static final String JSON_PROPERTY_CONTACT = "contact"; + private TrustContact contact; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_REVOCABILITY = "revocability"; + private Revocability revocability; + + public static final String JSON_PROPERTY_SOURCE_OF_FUNDS = "sourceOfFunds"; + private SourceOfFunds sourceOfFunds; + + public static final String JSON_PROPERTY_TAX_ID = "taxId"; + private String taxId; + + /** + * Gets or Sets riskRate + */ + public enum RiskRateEnum { + LOW("low"), + + MEDIUM("medium"), + + HIGH("high"); + + private String value; + + RiskRateEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RiskRateEnum fromValue(String value) { + for (RiskRateEnum b : RiskRateEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RISK_RATE = "riskRate"; + private RiskRateEnum riskRate; + + public static final String JSON_PROPERTY_AUTHORIZED_USERS = "authorizedUsers"; + private List authorizedUsers; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + ACTIVE("Active"), + + ARCHIVED("Archived"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + /** + * Gets or Sets archiveReason + */ + public enum ArchiveReasonEnum { + INACTIVE("Inactive"), + + FRAUDACHACTIVITY("FraudACHActivity"), + + FRAUDCARDACTIVITY("FraudCardActivity"), + + FRAUDCHECKACTIVITY("FraudCheckActivity"), + + FRAUDAPPLICATIONHISTORY("FraudApplicationHistory"), + + FRAUDACCOUNTACTIVITY("FraudAccountActivity"), + + FRAUDCLIENTIDENTIFIED("FraudClientIdentified"), + + FRAUDLINKEDTOFRAUDULENTCUSTOMER("FraudLinkedToFraudulentCustomer"); + + private String value; + + ArchiveReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArchiveReasonEnum fromValue(String value) { + for (ArchiveReasonEnum b : ArchiveReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ARCHIVE_REASON = "archiveReason"; + private ArchiveReasonEnum archiveReason; + + public TrustCustomerAllOfAttributes() { + } + + public TrustCustomerAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public TrustCustomerAllOfAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public TrustCustomerAllOfAttributes stateOfIncorporation(String stateOfIncorporation) { + this.stateOfIncorporation = stateOfIncorporation; + return this; + } + + /** + * Get stateOfIncorporation + * @return stateOfIncorporation + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getStateOfIncorporation() { + return stateOfIncorporation; + } + + + @JsonProperty(JSON_PROPERTY_STATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStateOfIncorporation(String stateOfIncorporation) { + this.stateOfIncorporation = stateOfIncorporation; + } + + + public TrustCustomerAllOfAttributes contact(TrustContact contact) { + this.contact = contact; + return this; + } + + /** + * Get contact + * @return contact + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TrustContact getContact() { + return contact; + } + + + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setContact(TrustContact contact) { + this.contact = contact; + } + + + public TrustCustomerAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public TrustCustomerAllOfAttributes revocability(Revocability revocability) { + this.revocability = revocability; + return this; + } + + /** + * Get revocability + * @return revocability + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REVOCABILITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Revocability getRevocability() { + return revocability; + } + + + @JsonProperty(JSON_PROPERTY_REVOCABILITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRevocability(Revocability revocability) { + this.revocability = revocability; + } + + + public TrustCustomerAllOfAttributes sourceOfFunds(SourceOfFunds sourceOfFunds) { + this.sourceOfFunds = sourceOfFunds; + return this; + } + + /** + * Get sourceOfFunds + * @return sourceOfFunds + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_OF_FUNDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SourceOfFunds getSourceOfFunds() { + return sourceOfFunds; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_OF_FUNDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceOfFunds(SourceOfFunds sourceOfFunds) { + this.sourceOfFunds = sourceOfFunds; + } + + + public TrustCustomerAllOfAttributes taxId(String taxId) { + this.taxId = taxId; + return this; + } + + /** + * Get taxId + * @return taxId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAX_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTaxId() { + return taxId; + } + + + @JsonProperty(JSON_PROPERTY_TAX_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTaxId(String taxId) { + this.taxId = taxId; + } + + + public TrustCustomerAllOfAttributes riskRate(RiskRateEnum riskRate) { + this.riskRate = riskRate; + return this; + } + + /** + * Get riskRate + * @return riskRate + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RISK_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RiskRateEnum getRiskRate() { + return riskRate; + } + + + @JsonProperty(JSON_PROPERTY_RISK_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRiskRate(RiskRateEnum riskRate) { + this.riskRate = riskRate; + } + + + public TrustCustomerAllOfAttributes authorizedUsers(List authorizedUsers) { + this.authorizedUsers = authorizedUsers; + return this; + } + + public TrustCustomerAllOfAttributes addAuthorizedUsersItem(AuthorizedUser authorizedUsersItem) { + if (this.authorizedUsers == null) { + this.authorizedUsers = new ArrayList<>(); + } + this.authorizedUsers.add(authorizedUsersItem); + return this; + } + + /** + * Get authorizedUsers + * @return authorizedUsers + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHORIZED_USERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getAuthorizedUsers() { + return authorizedUsers; + } + + + @JsonProperty(JSON_PROPERTY_AUTHORIZED_USERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAuthorizedUsers(List authorizedUsers) { + this.authorizedUsers = authorizedUsers; + } + + + public TrustCustomerAllOfAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public TrustCustomerAllOfAttributes archiveReason(ArchiveReasonEnum archiveReason) { + this.archiveReason = archiveReason; + return this; + } + + /** + * Get archiveReason + * @return archiveReason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ArchiveReasonEnum getArchiveReason() { + return archiveReason; + } + + + @JsonProperty(JSON_PROPERTY_ARCHIVE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArchiveReason(ArchiveReasonEnum archiveReason) { + this.archiveReason = archiveReason; + } + + + /** + * Return true if this TrustCustomer_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TrustCustomerAllOfAttributes trustCustomerAllOfAttributes = (TrustCustomerAllOfAttributes) o; + return Objects.equals(this.createdAt, trustCustomerAllOfAttributes.createdAt) && + Objects.equals(this.name, trustCustomerAllOfAttributes.name) && + Objects.equals(this.stateOfIncorporation, trustCustomerAllOfAttributes.stateOfIncorporation) && + Objects.equals(this.contact, trustCustomerAllOfAttributes.contact) && + Objects.equals(this.tags, trustCustomerAllOfAttributes.tags) && + Objects.equals(this.revocability, trustCustomerAllOfAttributes.revocability) && + Objects.equals(this.sourceOfFunds, trustCustomerAllOfAttributes.sourceOfFunds) && + Objects.equals(this.taxId, trustCustomerAllOfAttributes.taxId) && + Objects.equals(this.riskRate, trustCustomerAllOfAttributes.riskRate) && + Objects.equals(this.authorizedUsers, trustCustomerAllOfAttributes.authorizedUsers) && + Objects.equals(this.status, trustCustomerAllOfAttributes.status) && + Objects.equals(this.archiveReason, trustCustomerAllOfAttributes.archiveReason); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, name, stateOfIncorporation, contact, tags, revocability, sourceOfFunds, taxId, riskRate, authorizedUsers, status, archiveReason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TrustCustomerAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" stateOfIncorporation: ").append(toIndentedString(stateOfIncorporation)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" revocability: ").append(toIndentedString(revocability)).append("\n"); + sb.append(" sourceOfFunds: ").append(toIndentedString(sourceOfFunds)).append("\n"); + sb.append(" taxId: ").append(toIndentedString(taxId)).append("\n"); + sb.append(" riskRate: ").append(toIndentedString(riskRate)).append("\n"); + sb.append(" authorizedUsers: ").append(toIndentedString(authorizedUsers)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" archiveReason: ").append(toIndentedString(archiveReason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `stateOfIncorporation` to the URL query string + if (getStateOfIncorporation() != null) { + joiner.add(String.format("%sstateOfIncorporation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStateOfIncorporation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `contact` to the URL query string + if (getContact() != null) { + joiner.add(getContact().toUrlQueryString(prefix + "contact" + suffix)); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `revocability` to the URL query string + if (getRevocability() != null) { + joiner.add(String.format("%srevocability%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRevocability()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `sourceOfFunds` to the URL query string + if (getSourceOfFunds() != null) { + joiner.add(String.format("%ssourceOfFunds%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSourceOfFunds()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `taxId` to the URL query string + if (getTaxId() != null) { + joiner.add(String.format("%staxId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTaxId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `riskRate` to the URL query string + if (getRiskRate() != null) { + joiner.add(String.format("%sriskRate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRiskRate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `authorizedUsers` to the URL query string + if (getAuthorizedUsers() != null) { + for (int i = 0; i < getAuthorizedUsers().size(); i++) { + if (getAuthorizedUsers().get(i) != null) { + joiner.add(getAuthorizedUsers().get(i).toUrlQueryString(String.format("%sauthorizedUsers%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `archiveReason` to the URL query string + if (getArchiveReason() != null) { + joiner.add(String.format("%sarchiveReason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getArchiveReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/Trustee.java b/src/main/java/unit/java/sdk/model/Trustee.java new file mode 100644 index 00000000..9acf6528 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Trustee.java @@ -0,0 +1,442 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Trustee + */ +@JsonPropertyOrder({ + Trustee.JSON_PROPERTY_FULL_NAME, + Trustee.JSON_PROPERTY_EMAIL, + Trustee.JSON_PROPERTY_PHONE, + Trustee.JSON_PROPERTY_SSN, + Trustee.JSON_PROPERTY_PASSPORT, + Trustee.JSON_PROPERTY_NATIONALITY, + Trustee.JSON_PROPERTY_MATRICULA_CONSULAR, + Trustee.JSON_PROPERTY_ADDRESS, + Trustee.JSON_PROPERTY_DATE_OF_BIRTH +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Trustee { + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + private FullName fullName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_SSN = "ssn"; + private String ssn; + + public static final String JSON_PROPERTY_PASSPORT = "passport"; + private String passport; + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public static final String JSON_PROPERTY_MATRICULA_CONSULAR = "matriculaConsular"; + private String matriculaConsular; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private LocalDate dateOfBirth; + + public Trustee() { + } + + public Trustee fullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * @return fullName + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FullName getFullName() { + return fullName; + } + + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFullName(FullName fullName) { + this.fullName = fullName; + } + + + public Trustee email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEmail(String email) { + this.email = email; + } + + + public Trustee phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public Trustee ssn(String ssn) { + this.ssn = ssn; + return this; + } + + /** + * Get ssn + * @return ssn + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSsn() { + return ssn; + } + + + @JsonProperty(JSON_PROPERTY_SSN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSsn(String ssn) { + this.ssn = ssn; + } + + + public Trustee passport(String passport) { + this.passport = passport; + return this; + } + + /** + * Get passport + * @return passport + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassport() { + return passport; + } + + + @JsonProperty(JSON_PROPERTY_PASSPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassport(String passport) { + this.passport = passport; + } + + + public Trustee nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * Get nationality + * @return nationality + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + public Trustee matriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + return this; + } + + /** + * Get matriculaConsular + * @return matriculaConsular + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMatriculaConsular() { + return matriculaConsular; + } + + + @JsonProperty(JSON_PROPERTY_MATRICULA_CONSULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMatriculaConsular(String matriculaConsular) { + this.matriculaConsular = matriculaConsular; + } + + + public Trustee address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(Address address) { + this.address = address; + } + + + public Trustee dateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * @return dateOfBirth + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDateOfBirth(LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + /** + * Return true if this trustee object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Trustee trustee = (Trustee) o; + return Objects.equals(this.fullName, trustee.fullName) && + Objects.equals(this.email, trustee.email) && + Objects.equals(this.phone, trustee.phone) && + Objects.equals(this.ssn, trustee.ssn) && + Objects.equals(this.passport, trustee.passport) && + Objects.equals(this.nationality, trustee.nationality) && + Objects.equals(this.matriculaConsular, trustee.matriculaConsular) && + Objects.equals(this.address, trustee.address) && + Objects.equals(this.dateOfBirth, trustee.dateOfBirth); + } + + @Override + public int hashCode() { + return Objects.hash(fullName, email, phone, ssn, passport, nationality, matriculaConsular, address, dateOfBirth); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Trustee {\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" ssn: ").append(toIndentedString(ssn)).append("\n"); + sb.append(" passport: ").append(toIndentedString(passport)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append(" matriculaConsular: ").append(toIndentedString(matriculaConsular)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `ssn` to the URL query string + if (getSsn() != null) { + joiner.add(String.format("%sssn%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSsn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `passport` to the URL query string + if (getPassport() != null) { + joiner.add(String.format("%spassport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPassport()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `nationality` to the URL query string + if (getNationality() != null) { + joiner.add(String.format("%snationality%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNationality()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `matriculaConsular` to the URL query string + if (getMatriculaConsular() != null) { + joiner.add(String.format("%smatriculaConsular%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMatriculaConsular()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add(String.format("%sdateOfBirth%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDateOfBirth()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitAccountResponse.java b/src/main/java/unit/java/sdk/model/UnitAccountResponse.java new file mode 100644 index 00000000..27ea187a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitAccountResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Account; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitAccountResponse + */ +@JsonPropertyOrder({ + UnitAccountResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitAccountResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Account data; + + public UnitAccountResponse() { + } + + public UnitAccountResponse data(Account data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Account getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Account data) { + this.data = data; + } + + + /** + * Return true if this UnitAccountResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitAccountResponse unitAccountResponse = (UnitAccountResponse) o; + return Objects.equals(this.data, unitAccountResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitAccountResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitAccountResponseWithIncluded.java b/src/main/java/unit/java/sdk/model/UnitAccountResponseWithIncluded.java new file mode 100644 index 00000000..bd8726f2 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitAccountResponseWithIncluded.java @@ -0,0 +1,203 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Account; +import unit.java.sdk.model.Customer; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitAccountResponseWithIncluded + */ +@JsonPropertyOrder({ + UnitAccountResponseWithIncluded.JSON_PROPERTY_DATA, + UnitAccountResponseWithIncluded.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitAccountResponseWithIncluded { + public static final String JSON_PROPERTY_DATA = "data"; + private Account data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included; + + public UnitAccountResponseWithIncluded() { + } + + public UnitAccountResponseWithIncluded data(Account data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Account getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Account data) { + this.data = data; + } + + + public UnitAccountResponseWithIncluded included(List included) { + this.included = included; + return this; + } + + public UnitAccountResponseWithIncluded addIncludedItem(Customer includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + return this; + } + + /** + * Get included + * @return included + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getIncluded() { + return included; + } + + + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncluded(List included) { + this.included = included; + } + + + /** + * Return true if this UnitAccountResponseWithIncluded object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitAccountResponseWithIncluded unitAccountResponseWithIncluded = (UnitAccountResponseWithIncluded) o; + return Objects.equals(this.data, unitAccountResponseWithIncluded.data) && + Objects.equals(this.included, unitAccountResponseWithIncluded.included); + } + + @Override + public int hashCode() { + return Objects.hash(data, included); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitAccountResponseWithIncluded {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + // add `included` to the URL query string + if (getIncluded() != null) { + for (int i = 0; i < getIncluded().size(); i++) { + if (getIncluded().get(i) != null) { + joiner.add(getIncluded().get(i).toUrlQueryString(String.format("%sincluded%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitAccountsListResponse.java b/src/main/java/unit/java/sdk/model/UnitAccountsListResponse.java new file mode 100644 index 00000000..8e784d04 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitAccountsListResponse.java @@ -0,0 +1,253 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Account; +import unit.java.sdk.model.Customer; +import unit.java.sdk.model.PaginationMeta; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitAccountsListResponse + */ +@JsonPropertyOrder({ + UnitAccountsListResponse.JSON_PROPERTY_DATA, + UnitAccountsListResponse.JSON_PROPERTY_INCLUDED, + UnitAccountsListResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitAccountsListResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included; + + public static final String JSON_PROPERTY_META = "meta"; + private PaginationMeta meta; + + public UnitAccountsListResponse() { + } + + public UnitAccountsListResponse data(List data) { + this.data = data; + return this; + } + + public UnitAccountsListResponse addDataItem(Account dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + public UnitAccountsListResponse included(List included) { + this.included = included; + return this; + } + + public UnitAccountsListResponse addIncludedItem(Customer includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + return this; + } + + /** + * Get included + * @return included + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getIncluded() { + return included; + } + + + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncluded(List included) { + this.included = included; + } + + + public UnitAccountsListResponse meta(PaginationMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMeta getMeta() { + return meta; + } + + + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMeta(PaginationMeta meta) { + this.meta = meta; + } + + + /** + * Return true if this UnitAccountsListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitAccountsListResponse unitAccountsListResponse = (UnitAccountsListResponse) o; + return Objects.equals(this.data, unitAccountsListResponse.data) && + Objects.equals(this.included, unitAccountsListResponse.included) && + Objects.equals(this.meta, unitAccountsListResponse.meta); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, meta); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitAccountsListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `included` to the URL query string + if (getIncluded() != null) { + for (int i = 0; i < getIncluded().size(); i++) { + if (getIncluded().get(i) != null) { + joiner.add(getIncluded().get(i).toUrlQueryString(String.format("%sincluded%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `meta` to the URL query string + if (getMeta() != null) { + joiner.add(getMeta().toUrlQueryString(prefix + "meta" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitApiTokenResponse.java b/src/main/java/unit/java/sdk/model/UnitApiTokenResponse.java new file mode 100644 index 00000000..11840335 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitApiTokenResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ApiToken; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitApiTokenResponse + */ +@JsonPropertyOrder({ + UnitApiTokenResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitApiTokenResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private ApiToken data; + + public UnitApiTokenResponse() { + } + + public UnitApiTokenResponse data(ApiToken data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApiToken getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(ApiToken data) { + this.data = data; + } + + + /** + * Return true if this UnitApiTokenResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitApiTokenResponse unitApiTokenResponse = (UnitApiTokenResponse) o; + return Objects.equals(this.data, unitApiTokenResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitApiTokenResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitApplicationFormResponse.java b/src/main/java/unit/java/sdk/model/UnitApplicationFormResponse.java new file mode 100644 index 00000000..aed76d6b --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitApplicationFormResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ApplicationForm; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitApplicationFormResponse + */ +@JsonPropertyOrder({ + UnitApplicationFormResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitApplicationFormResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private ApplicationForm data; + + public UnitApplicationFormResponse() { + } + + public UnitApplicationFormResponse data(ApplicationForm data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApplicationForm getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(ApplicationForm data) { + this.data = data; + } + + + /** + * Return true if this UnitApplicationFormResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitApplicationFormResponse unitApplicationFormResponse = (UnitApplicationFormResponse) o; + return Objects.equals(this.data, unitApplicationFormResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitApplicationFormResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitApplicationFormResponseWithIncluded.java b/src/main/java/unit/java/sdk/model/UnitApplicationFormResponseWithIncluded.java new file mode 100644 index 00000000..d41d47db --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitApplicationFormResponseWithIncluded.java @@ -0,0 +1,188 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Application; +import unit.java.sdk.model.ApplicationForm; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitApplicationFormResponseWithIncluded + */ +@JsonPropertyOrder({ + UnitApplicationFormResponseWithIncluded.JSON_PROPERTY_DATA, + UnitApplicationFormResponseWithIncluded.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitApplicationFormResponseWithIncluded { + public static final String JSON_PROPERTY_DATA = "data"; + private ApplicationForm data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private Application included; + + public UnitApplicationFormResponseWithIncluded() { + } + + public UnitApplicationFormResponseWithIncluded data(ApplicationForm data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ApplicationForm getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(ApplicationForm data) { + this.data = data; + } + + + public UnitApplicationFormResponseWithIncluded included(Application included) { + this.included = included; + return this; + } + + /** + * Get included + * @return included + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Application getIncluded() { + return included; + } + + + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncluded(Application included) { + this.included = included; + } + + + /** + * Return true if this UnitApplicationFormResponseWithIncluded object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitApplicationFormResponseWithIncluded unitApplicationFormResponseWithIncluded = (UnitApplicationFormResponseWithIncluded) o; + return Objects.equals(this.data, unitApplicationFormResponseWithIncluded.data) && + Objects.equals(this.included, unitApplicationFormResponseWithIncluded.included); + } + + @Override + public int hashCode() { + return Objects.hash(data, included); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitApplicationFormResponseWithIncluded {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + // add `included` to the URL query string + if (getIncluded() != null) { + joiner.add(getIncluded().toUrlQueryString(prefix + "included" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitApplicationFormsListResponse.java b/src/main/java/unit/java/sdk/model/UnitApplicationFormsListResponse.java new file mode 100644 index 00000000..83968a21 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitApplicationFormsListResponse.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.ApplicationForm; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitApplicationFormsListResponse + */ +@JsonPropertyOrder({ + UnitApplicationFormsListResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitApplicationFormsListResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public UnitApplicationFormsListResponse() { + } + + public UnitApplicationFormsListResponse data(List data) { + this.data = data; + return this; + } + + public UnitApplicationFormsListResponse addDataItem(ApplicationForm dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this UnitApplicationFormsListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitApplicationFormsListResponse unitApplicationFormsListResponse = (UnitApplicationFormsListResponse) o; + return Objects.equals(this.data, unitApplicationFormsListResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitApplicationFormsListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitApplicationResponseWithIncluded.java b/src/main/java/unit/java/sdk/model/UnitApplicationResponseWithIncluded.java new file mode 100644 index 00000000..96d4e5f0 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitApplicationResponseWithIncluded.java @@ -0,0 +1,203 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Application; +import unit.java.sdk.model.IncludedResourceInner; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitApplicationResponseWithIncluded + */ +@JsonPropertyOrder({ + UnitApplicationResponseWithIncluded.JSON_PROPERTY_DATA, + UnitApplicationResponseWithIncluded.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitApplicationResponseWithIncluded { + public static final String JSON_PROPERTY_DATA = "data"; + private Application data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included; + + public UnitApplicationResponseWithIncluded() { + } + + public UnitApplicationResponseWithIncluded data(Application data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Application getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Application data) { + this.data = data; + } + + + public UnitApplicationResponseWithIncluded included(List included) { + this.included = included; + return this; + } + + public UnitApplicationResponseWithIncluded addIncludedItem(IncludedResourceInner includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + return this; + } + + /** + * Get included + * @return included + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getIncluded() { + return included; + } + + + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncluded(List included) { + this.included = included; + } + + + /** + * Return true if this UnitApplicationResponseWithIncluded object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitApplicationResponseWithIncluded unitApplicationResponseWithIncluded = (UnitApplicationResponseWithIncluded) o; + return Objects.equals(this.data, unitApplicationResponseWithIncluded.data) && + Objects.equals(this.included, unitApplicationResponseWithIncluded.included); + } + + @Override + public int hashCode() { + return Objects.hash(data, included); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitApplicationResponseWithIncluded {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + // add `included` to the URL query string + if (getIncluded() != null) { + for (int i = 0; i < getIncluded().size(); i++) { + if (getIncluded().get(i) != null) { + joiner.add(getIncluded().get(i).toUrlQueryString(String.format("%sincluded%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitAuthorizationRequestResponse.java b/src/main/java/unit/java/sdk/model/UnitAuthorizationRequestResponse.java new file mode 100644 index 00000000..183d1c43 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitAuthorizationRequestResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationRequest; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitAuthorizationRequestResponse + */ +@JsonPropertyOrder({ + UnitAuthorizationRequestResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitAuthorizationRequestResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private AuthorizationRequest data; + + public UnitAuthorizationRequestResponse() { + } + + public UnitAuthorizationRequestResponse data(AuthorizationRequest data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AuthorizationRequest getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(AuthorizationRequest data) { + this.data = data; + } + + + /** + * Return true if this UnitAuthorizationRequestResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitAuthorizationRequestResponse unitAuthorizationRequestResponse = (UnitAuthorizationRequestResponse) o; + return Objects.equals(this.data, unitAuthorizationRequestResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitAuthorizationRequestResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitAuthorizationRequestsResponse.java b/src/main/java/unit/java/sdk/model/UnitAuthorizationRequestsResponse.java new file mode 100644 index 00000000..798ab2fa --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitAuthorizationRequestsResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationRequest; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitAuthorizationRequestsResponse + */ +@JsonPropertyOrder({ + UnitAuthorizationRequestsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitAuthorizationRequestsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private AuthorizationRequest data; + + public UnitAuthorizationRequestsResponse() { + } + + public UnitAuthorizationRequestsResponse data(AuthorizationRequest data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AuthorizationRequest getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(AuthorizationRequest data) { + this.data = data; + } + + + /** + * Return true if this UnitAuthorizationRequestsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitAuthorizationRequestsResponse unitAuthorizationRequestsResponse = (UnitAuthorizationRequestsResponse) o; + return Objects.equals(this.data, unitAuthorizationRequestsResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitAuthorizationRequestsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitAuthorizationResponse.java b/src/main/java/unit/java/sdk/model/UnitAuthorizationResponse.java new file mode 100644 index 00000000..cbf2cdef --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitAuthorizationResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Authorization; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitAuthorizationResponse + */ +@JsonPropertyOrder({ + UnitAuthorizationResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitAuthorizationResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Authorization data; + + public UnitAuthorizationResponse() { + } + + public UnitAuthorizationResponse data(Authorization data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Authorization getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Authorization data) { + this.data = data; + } + + + /** + * Return true if this UnitAuthorizationResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitAuthorizationResponse unitAuthorizationResponse = (UnitAuthorizationResponse) o; + return Objects.equals(this.data, unitAuthorizationResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitAuthorizationResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitCancelApplicationResponse.java b/src/main/java/unit/java/sdk/model/UnitCancelApplicationResponse.java new file mode 100644 index 00000000..2a88864a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitCancelApplicationResponse.java @@ -0,0 +1,203 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Application; +import unit.java.sdk.model.Document; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitCancelApplicationResponse + */ +@JsonPropertyOrder({ + UnitCancelApplicationResponse.JSON_PROPERTY_DATA, + UnitCancelApplicationResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitCancelApplicationResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Application data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included; + + public UnitCancelApplicationResponse() { + } + + public UnitCancelApplicationResponse data(Application data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Application getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Application data) { + this.data = data; + } + + + public UnitCancelApplicationResponse included(List included) { + this.included = included; + return this; + } + + public UnitCancelApplicationResponse addIncludedItem(Document includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + return this; + } + + /** + * Get included + * @return included + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getIncluded() { + return included; + } + + + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncluded(List included) { + this.included = included; + } + + + /** + * Return true if this UnitCancelApplicationResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitCancelApplicationResponse unitCancelApplicationResponse = (UnitCancelApplicationResponse) o; + return Objects.equals(this.data, unitCancelApplicationResponse.data) && + Objects.equals(this.included, unitCancelApplicationResponse.included); + } + + @Override + public int hashCode() { + return Objects.hash(data, included); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitCancelApplicationResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + // add `included` to the URL query string + if (getIncluded() != null) { + for (int i = 0; i < getIncluded().size(); i++) { + if (getIncluded().get(i) != null) { + joiner.add(getIncluded().get(i).toUrlQueryString(String.format("%sincluded%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitCardResponse.java b/src/main/java/unit/java/sdk/model/UnitCardResponse.java new file mode 100644 index 00000000..e6b73f44 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitCardResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Card; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitCardResponse + */ +@JsonPropertyOrder({ + UnitCardResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitCardResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Card data; + + public UnitCardResponse() { + } + + public UnitCardResponse data(Card data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Card getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Card data) { + this.data = data; + } + + + /** + * Return true if this UnitCardResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitCardResponse unitCardResponse = (UnitCardResponse) o; + return Objects.equals(this.data, unitCardResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitCardResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitCardResponse1.java b/src/main/java/unit/java/sdk/model/UnitCardResponse1.java new file mode 100644 index 00000000..345028a6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitCardResponse1.java @@ -0,0 +1,204 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Card; +import unit.java.sdk.model.IncludedResourceInner; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitCardResponse1 + */ +@JsonPropertyOrder({ + UnitCardResponse1.JSON_PROPERTY_DATA, + UnitCardResponse1.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitCardResponse1 { + public static final String JSON_PROPERTY_DATA = "data"; + private Card data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List> included; + + public UnitCardResponse1() { + } + + public UnitCardResponse1 data(Card data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Card getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Card data) { + this.data = data; + } + + + public UnitCardResponse1 included(List> included) { + this.included = included; + return this; + } + + public UnitCardResponse1 addIncludedItem(List includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + return this; + } + + /** + * Get included + * @return included + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List> getIncluded() { + return included; + } + + + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncluded(List> included) { + this.included = included; + } + + + /** + * Return true if this UnitCardResponse_1 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitCardResponse1 unitCardResponse1 = (UnitCardResponse1) o; + return Objects.equals(this.data, unitCardResponse1.data) && + Objects.equals(this.included, unitCardResponse1.included); + } + + @Override + public int hashCode() { + return Objects.hash(data, included); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitCardResponse1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + // add `included` to the URL query string + if (getIncluded() != null) { + for (int i = 0; i < getIncluded().size(); i++) { + if (getIncluded().get(i) != null) { + joiner.add(String.format("%sincluded%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getIncluded().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitCardResponse2.java b/src/main/java/unit/java/sdk/model/UnitCardResponse2.java new file mode 100644 index 00000000..093bea2a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitCardResponse2.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PinStatus; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitCardResponse2 + */ +@JsonPropertyOrder({ + UnitCardResponse2.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitCardResponse2 { + public static final String JSON_PROPERTY_DATA = "data"; + private PinStatus data; + + public UnitCardResponse2() { + } + + public UnitCardResponse2 data(PinStatus data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PinStatus getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(PinStatus data) { + this.data = data; + } + + + /** + * Return true if this UnitCardResponse_2 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitCardResponse2 unitCardResponse2 = (UnitCardResponse2) o; + return Objects.equals(this.data, unitCardResponse2.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitCardResponse2 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitCardResponse3.java b/src/main/java/unit/java/sdk/model/UnitCardResponse3.java new file mode 100644 index 00000000..adc12b0c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitCardResponse3.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Limits1; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitCardResponse3 + */ +@JsonPropertyOrder({ + UnitCardResponse3.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitCardResponse3 { + public static final String JSON_PROPERTY_DATA = "data"; + private Limits1 data; + + public UnitCardResponse3() { + } + + public UnitCardResponse3 data(Limits1 data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Limits1 getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Limits1 data) { + this.data = data; + } + + + /** + * Return true if this UnitCardResponse_3 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitCardResponse3 unitCardResponse3 = (UnitCardResponse3) o; + return Objects.equals(this.data, unitCardResponse3.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitCardResponse3 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitCardResponseCardsList.java b/src/main/java/unit/java/sdk/model/UnitCardResponseCardsList.java new file mode 100644 index 00000000..575e1278 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitCardResponseCardsList.java @@ -0,0 +1,217 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Card; +import unit.java.sdk.model.IncludedResourceInner; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitCardResponseCardsList + */ +@JsonPropertyOrder({ + UnitCardResponseCardsList.JSON_PROPERTY_DATA, + UnitCardResponseCardsList.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitCardResponseCardsList { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List> included; + + public UnitCardResponseCardsList() { + } + + public UnitCardResponseCardsList data(List data) { + this.data = data; + return this; + } + + public UnitCardResponseCardsList addDataItem(Card dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + public UnitCardResponseCardsList included(List> included) { + this.included = included; + return this; + } + + public UnitCardResponseCardsList addIncludedItem(List includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + return this; + } + + /** + * Get included + * @return included + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List> getIncluded() { + return included; + } + + + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncluded(List> included) { + this.included = included; + } + + + /** + * Return true if this UnitCardResponseCardsList object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitCardResponseCardsList unitCardResponseCardsList = (UnitCardResponseCardsList) o; + return Objects.equals(this.data, unitCardResponseCardsList.data) && + Objects.equals(this.included, unitCardResponseCardsList.included); + } + + @Override + public int hashCode() { + return Objects.hash(data, included); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitCardResponseCardsList {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `included` to the URL query string + if (getIncluded() != null) { + for (int i = 0; i < getIncluded().size(); i++) { + if (getIncluded().get(i) != null) { + joiner.add(String.format("%sincluded%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getIncluded().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitCheckDepositResponse.java b/src/main/java/unit/java/sdk/model/UnitCheckDepositResponse.java new file mode 100644 index 00000000..29c696e2 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitCheckDepositResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDeposit; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitCheckDepositResponse + */ +@JsonPropertyOrder({ + UnitCheckDepositResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitCheckDepositResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private CheckDeposit data; + + public UnitCheckDepositResponse() { + } + + public UnitCheckDepositResponse data(CheckDeposit data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CheckDeposit getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(CheckDeposit data) { + this.data = data; + } + + + /** + * Return true if this UnitCheckDepositResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitCheckDepositResponse unitCheckDepositResponse = (UnitCheckDepositResponse) o; + return Objects.equals(this.data, unitCheckDepositResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitCheckDepositResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitCheckDepositResponse1.java b/src/main/java/unit/java/sdk/model/UnitCheckDepositResponse1.java new file mode 100644 index 00000000..9e2c131b --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitCheckDepositResponse1.java @@ -0,0 +1,150 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitCheckDepositResponse1 + */ +@JsonPropertyOrder({ + UnitCheckDepositResponse1.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitCheckDepositResponse1 { + public static final String JSON_PROPERTY_DATA = "data"; + private String data; + + public UnitCheckDepositResponse1() { + } + + public UnitCheckDepositResponse1 data(String data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(String data) { + this.data = data; + } + + + /** + * Return true if this UnitCheckDepositResponse_1 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitCheckDepositResponse1 unitCheckDepositResponse1 = (UnitCheckDepositResponse1) o; + return Objects.equals(this.data, unitCheckDepositResponse1.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitCheckDepositResponse1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(String.format("%sdata%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getData()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitCheckPaymentResponse.java b/src/main/java/unit/java/sdk/model/UnitCheckPaymentResponse.java new file mode 100644 index 00000000..d08544ad --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitCheckPaymentResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckPayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitCheckPaymentResponse + */ +@JsonPropertyOrder({ + UnitCheckPaymentResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitCheckPaymentResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private CheckPayment data; + + public UnitCheckPaymentResponse() { + } + + public UnitCheckPaymentResponse data(CheckPayment data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CheckPayment getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(CheckPayment data) { + this.data = data; + } + + + /** + * Return true if this UnitCheckPaymentResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitCheckPaymentResponse unitCheckPaymentResponse = (UnitCheckPaymentResponse) o; + return Objects.equals(this.data, unitCheckPaymentResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitCheckPaymentResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitCounterpartiesListResponse.java b/src/main/java/unit/java/sdk/model/UnitCounterpartiesListResponse.java new file mode 100644 index 00000000..92244411 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitCounterpartiesListResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty1; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitCounterpartiesListResponse + */ +@JsonPropertyOrder({ + UnitCounterpartiesListResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitCounterpartiesListResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Counterparty1 data; + + public UnitCounterpartiesListResponse() { + } + + public UnitCounterpartiesListResponse data(Counterparty1 data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Counterparty1 getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Counterparty1 data) { + this.data = data; + } + + + /** + * Return true if this UnitCounterpartiesListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitCounterpartiesListResponse unitCounterpartiesListResponse = (UnitCounterpartiesListResponse) o; + return Objects.equals(this.data, unitCounterpartiesListResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitCounterpartiesListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitCounterpartyResponse.java b/src/main/java/unit/java/sdk/model/UnitCounterpartyResponse.java new file mode 100644 index 00000000..025705fb --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitCounterpartyResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty1; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitCounterpartyResponse + */ +@JsonPropertyOrder({ + UnitCounterpartyResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitCounterpartyResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Counterparty1 data; + + public UnitCounterpartyResponse() { + } + + public UnitCounterpartyResponse data(Counterparty1 data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Counterparty1 getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Counterparty1 data) { + this.data = data; + } + + + /** + * Return true if this UnitCounterpartyResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitCounterpartyResponse unitCounterpartyResponse = (UnitCounterpartyResponse) o; + return Objects.equals(this.data, unitCounterpartyResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitCounterpartyResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitCounterpartyResponse1.java b/src/main/java/unit/java/sdk/model/UnitCounterpartyResponse1.java new file mode 100644 index 00000000..6dd1a35b --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitCounterpartyResponse1.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CounterpartyBalance; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitCounterpartyResponse1 + */ +@JsonPropertyOrder({ + UnitCounterpartyResponse1.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitCounterpartyResponse1 { + public static final String JSON_PROPERTY_DATA = "data"; + private CounterpartyBalance data; + + public UnitCounterpartyResponse1() { + } + + public UnitCounterpartyResponse1 data(CounterpartyBalance data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CounterpartyBalance getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(CounterpartyBalance data) { + this.data = data; + } + + + /** + * Return true if this UnitCounterpartyResponse_1 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitCounterpartyResponse1 unitCounterpartyResponse1 = (UnitCounterpartyResponse1) o; + return Objects.equals(this.data, unitCounterpartyResponse1.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitCounterpartyResponse1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitCreateApplicationResponse.java b/src/main/java/unit/java/sdk/model/UnitCreateApplicationResponse.java new file mode 100644 index 00000000..3f12ae79 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitCreateApplicationResponse.java @@ -0,0 +1,203 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Application; +import unit.java.sdk.model.Document; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitCreateApplicationResponse + */ +@JsonPropertyOrder({ + UnitCreateApplicationResponse.JSON_PROPERTY_DATA, + UnitCreateApplicationResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitCreateApplicationResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Application data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included; + + public UnitCreateApplicationResponse() { + } + + public UnitCreateApplicationResponse data(Application data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Application getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Application data) { + this.data = data; + } + + + public UnitCreateApplicationResponse included(List included) { + this.included = included; + return this; + } + + public UnitCreateApplicationResponse addIncludedItem(Document includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + return this; + } + + /** + * Get included + * @return included + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getIncluded() { + return included; + } + + + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncluded(List included) { + this.included = included; + } + + + /** + * Return true if this UnitCreateApplicationResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitCreateApplicationResponse unitCreateApplicationResponse = (UnitCreateApplicationResponse) o; + return Objects.equals(this.data, unitCreateApplicationResponse.data) && + Objects.equals(this.included, unitCreateApplicationResponse.included); + } + + @Override + public int hashCode() { + return Objects.hash(data, included); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitCreateApplicationResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + // add `included` to the URL query string + if (getIncluded() != null) { + for (int i = 0; i < getIncluded().size(); i++) { + if (getIncluded().get(i) != null) { + joiner.add(getIncluded().get(i).toUrlQueryString(String.format("%sincluded%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitCustomerResponse.java b/src/main/java/unit/java/sdk/model/UnitCustomerResponse.java new file mode 100644 index 00000000..b2e23017 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitCustomerResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Customer; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitCustomerResponse + */ +@JsonPropertyOrder({ + UnitCustomerResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitCustomerResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Customer data; + + public UnitCustomerResponse() { + } + + public UnitCustomerResponse data(Customer data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Customer getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Customer data) { + this.data = data; + } + + + /** + * Return true if this UnitCustomerResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitCustomerResponse unitCustomerResponse = (UnitCustomerResponse) o; + return Objects.equals(this.data, unitCustomerResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitCustomerResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitCustomerTokenResponse.java b/src/main/java/unit/java/sdk/model/UnitCustomerTokenResponse.java new file mode 100644 index 00000000..3714c4bc --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitCustomerTokenResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomerToken; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitCustomerTokenResponse + */ +@JsonPropertyOrder({ + UnitCustomerTokenResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitCustomerTokenResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private CustomerToken data; + + public UnitCustomerTokenResponse() { + } + + public UnitCustomerTokenResponse data(CustomerToken data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CustomerToken getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(CustomerToken data) { + this.data = data; + } + + + /** + * Return true if this UnitCustomerTokenResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitCustomerTokenResponse unitCustomerTokenResponse = (UnitCustomerTokenResponse) o; + return Objects.equals(this.data, unitCustomerTokenResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitCustomerTokenResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitCustomerTokenVerificationResponse.java b/src/main/java/unit/java/sdk/model/UnitCustomerTokenVerificationResponse.java new file mode 100644 index 00000000..ba6e73de --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitCustomerTokenVerificationResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomerTokenVerification; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitCustomerTokenVerificationResponse + */ +@JsonPropertyOrder({ + UnitCustomerTokenVerificationResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitCustomerTokenVerificationResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private CustomerTokenVerification data; + + public UnitCustomerTokenVerificationResponse() { + } + + public UnitCustomerTokenVerificationResponse data(CustomerTokenVerification data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CustomerTokenVerification getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(CustomerTokenVerification data) { + this.data = data; + } + + + /** + * Return true if this UnitCustomerTokenVerificationResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitCustomerTokenVerificationResponse unitCustomerTokenVerificationResponse = (UnitCustomerTokenVerificationResponse) o; + return Objects.equals(this.data, unitCustomerTokenVerificationResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitCustomerTokenVerificationResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitCustomersListResponse.java b/src/main/java/unit/java/sdk/model/UnitCustomersListResponse.java new file mode 100644 index 00000000..4ab61503 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitCustomersListResponse.java @@ -0,0 +1,203 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Customer; +import unit.java.sdk.model.PaginationMeta; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitCustomersListResponse + */ +@JsonPropertyOrder({ + UnitCustomersListResponse.JSON_PROPERTY_DATA, + UnitCustomersListResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitCustomersListResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public static final String JSON_PROPERTY_META = "meta"; + private PaginationMeta meta; + + public UnitCustomersListResponse() { + } + + public UnitCustomersListResponse data(List data) { + this.data = data; + return this; + } + + public UnitCustomersListResponse addDataItem(Customer dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + public UnitCustomersListResponse meta(PaginationMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMeta getMeta() { + return meta; + } + + + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMeta(PaginationMeta meta) { + this.meta = meta; + } + + + /** + * Return true if this UnitCustomersListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitCustomersListResponse unitCustomersListResponse = (UnitCustomersListResponse) o; + return Objects.equals(this.data, unitCustomersListResponse.data) && + Objects.equals(this.meta, unitCustomersListResponse.meta); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitCustomersListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `meta` to the URL query string + if (getMeta() != null) { + joiner.add(getMeta().toUrlQueryString(prefix + "meta" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitDisputeResponse.java b/src/main/java/unit/java/sdk/model/UnitDisputeResponse.java new file mode 100644 index 00000000..148598b3 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitDisputeResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Dispute; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitDisputeResponse + */ +@JsonPropertyOrder({ + UnitDisputeResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitDisputeResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Dispute data; + + public UnitDisputeResponse() { + } + + public UnitDisputeResponse data(Dispute data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Dispute getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Dispute data) { + this.data = data; + } + + + /** + * Return true if this UnitDisputeResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitDisputeResponse unitDisputeResponse = (UnitDisputeResponse) o; + return Objects.equals(this.data, unitDisputeResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitDisputeResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitDocumentResponse.java b/src/main/java/unit/java/sdk/model/UnitDocumentResponse.java new file mode 100644 index 00000000..7a432112 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitDocumentResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Document; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitDocumentResponse + */ +@JsonPropertyOrder({ + UnitDocumentResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitDocumentResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Document data; + + public UnitDocumentResponse() { + } + + public UnitDocumentResponse data(Document data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Document getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Document data) { + this.data = data; + } + + + /** + * Return true if this UnitDocumentResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitDocumentResponse unitDocumentResponse = (UnitDocumentResponse) o; + return Objects.equals(this.data, unitDocumentResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitDocumentResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitEventListResponse.java b/src/main/java/unit/java/sdk/model/UnitEventListResponse.java new file mode 100644 index 00000000..537858e8 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitEventListResponse.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Event; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitEventListResponse + */ +@JsonPropertyOrder({ + UnitEventListResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitEventListResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public UnitEventListResponse() { + } + + public UnitEventListResponse data(List data) { + this.data = data; + return this; + } + + public UnitEventListResponse addDataItem(Event dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this UnitEventListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitEventListResponse unitEventListResponse = (UnitEventListResponse) o; + return Objects.equals(this.data, unitEventListResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitEventListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitEventResponse.java b/src/main/java/unit/java/sdk/model/UnitEventResponse.java new file mode 100644 index 00000000..5cc83047 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitEventResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Event; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitEventResponse + */ +@JsonPropertyOrder({ + UnitEventResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitEventResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Event data; + + public UnitEventResponse() { + } + + public UnitEventResponse data(Event data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Event getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Event data) { + this.data = data; + } + + + /** + * Return true if this UnitEventResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitEventResponse unitEventResponse = (UnitEventResponse) o; + return Objects.equals(this.data, unitEventResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitEventResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitEventResponse1.java b/src/main/java/unit/java/sdk/model/UnitEventResponse1.java new file mode 100644 index 00000000..b86ac6e4 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitEventResponse1.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Event; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitEventResponse1 + */ +@JsonPropertyOrder({ + UnitEventResponse1.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitEventResponse1 { + public static final String JSON_PROPERTY_DATA = "data"; + private Event data; + + public UnitEventResponse1() { + } + + public UnitEventResponse1 data(Event data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Event getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Event data) { + this.data = data; + } + + + /** + * Return true if this UnitEventResponse_1 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitEventResponse1 unitEventResponse1 = (UnitEventResponse1) o; + return Objects.equals(this.data, unitEventResponse1.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitEventResponse1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitFeeResponse.java b/src/main/java/unit/java/sdk/model/UnitFeeResponse.java new file mode 100644 index 00000000..dd9fb3d5 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitFeeResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Fee; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitFeeResponse + */ +@JsonPropertyOrder({ + UnitFeeResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitFeeResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Fee data; + + public UnitFeeResponse() { + } + + public UnitFeeResponse data(Fee data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Fee getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Fee data) { + this.data = data; + } + + + /** + * Return true if this UnitFeeResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitFeeResponse unitFeeResponse = (UnitFeeResponse) o; + return Objects.equals(this.data, unitFeeResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitFeeResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitGetAccountEndOfDayListResponse.java b/src/main/java/unit/java/sdk/model/UnitGetAccountEndOfDayListResponse.java new file mode 100644 index 00000000..d49ac348 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitGetAccountEndOfDayListResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountEndOfDay; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitGetAccountEndOfDayListResponse + */ +@JsonPropertyOrder({ + UnitGetAccountEndOfDayListResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitGetAccountEndOfDayListResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private AccountEndOfDay data; + + public UnitGetAccountEndOfDayListResponse() { + } + + public UnitGetAccountEndOfDayListResponse data(AccountEndOfDay data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountEndOfDay getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(AccountEndOfDay data) { + this.data = data; + } + + + /** + * Return true if this UnitGetAccountEndOfDayListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitGetAccountEndOfDayListResponse unitGetAccountEndOfDayListResponse = (UnitGetAccountEndOfDayListResponse) o; + return Objects.equals(this.data, unitGetAccountEndOfDayListResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitGetAccountEndOfDayListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitGetAccountLimitsResponse.java b/src/main/java/unit/java/sdk/model/UnitGetAccountLimitsResponse.java new file mode 100644 index 00000000..31645ab2 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitGetAccountLimitsResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Limits; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitGetAccountLimitsResponse + */ +@JsonPropertyOrder({ + UnitGetAccountLimitsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitGetAccountLimitsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Limits data; + + public UnitGetAccountLimitsResponse() { + } + + public UnitGetAccountLimitsResponse data(Limits data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Limits getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Limits data) { + this.data = data; + } + + + /** + * Return true if this UnitGetAccountLimitsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitGetAccountLimitsResponse unitGetAccountLimitsResponse = (UnitGetAccountLimitsResponse) o; + return Objects.equals(this.data, unitGetAccountLimitsResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitGetAccountLimitsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitInstitutionResponse.java b/src/main/java/unit/java/sdk/model/UnitInstitutionResponse.java new file mode 100644 index 00000000..b0601f6e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitInstitutionResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Institution; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitInstitutionResponse + */ +@JsonPropertyOrder({ + UnitInstitutionResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitInstitutionResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Institution data; + + public UnitInstitutionResponse() { + } + + public UnitInstitutionResponse data(Institution data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Institution getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Institution data) { + this.data = data; + } + + + /** + * Return true if this UnitInstitutionResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitInstitutionResponse unitInstitutionResponse = (UnitInstitutionResponse) o; + return Objects.equals(this.data, unitInstitutionResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitInstitutionResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitListApplicationsResponse.java b/src/main/java/unit/java/sdk/model/UnitListApplicationsResponse.java new file mode 100644 index 00000000..ac36be68 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitListApplicationsResponse.java @@ -0,0 +1,203 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Application; +import unit.java.sdk.model.PaginationMeta; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitListApplicationsResponse + */ +@JsonPropertyOrder({ + UnitListApplicationsResponse.JSON_PROPERTY_DATA, + UnitListApplicationsResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitListApplicationsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public static final String JSON_PROPERTY_META = "meta"; + private PaginationMeta meta; + + public UnitListApplicationsResponse() { + } + + public UnitListApplicationsResponse data(List data) { + this.data = data; + return this; + } + + public UnitListApplicationsResponse addDataItem(Application dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + public UnitListApplicationsResponse meta(PaginationMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMeta getMeta() { + return meta; + } + + + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMeta(PaginationMeta meta) { + this.meta = meta; + } + + + /** + * Return true if this UnitListApplicationsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitListApplicationsResponse unitListApplicationsResponse = (UnitListApplicationsResponse) o; + return Objects.equals(this.data, unitListApplicationsResponse.data) && + Objects.equals(this.meta, unitListApplicationsResponse.meta); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitListApplicationsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `meta` to the URL query string + if (getMeta() != null) { + joiner.add(getMeta().toUrlQueryString(prefix + "meta" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitListAuthorizationRequestsResponse.java b/src/main/java/unit/java/sdk/model/UnitListAuthorizationRequestsResponse.java new file mode 100644 index 00000000..620865d6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitListAuthorizationRequestsResponse.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.AuthorizationRequest; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitListAuthorizationRequestsResponse + */ +@JsonPropertyOrder({ + UnitListAuthorizationRequestsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitListAuthorizationRequestsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public UnitListAuthorizationRequestsResponse() { + } + + public UnitListAuthorizationRequestsResponse data(List data) { + this.data = data; + return this; + } + + public UnitListAuthorizationRequestsResponse addDataItem(AuthorizationRequest dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this UnitListAuthorizationRequestsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitListAuthorizationRequestsResponse unitListAuthorizationRequestsResponse = (UnitListAuthorizationRequestsResponse) o; + return Objects.equals(this.data, unitListAuthorizationRequestsResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitListAuthorizationRequestsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitListAuthorizationsResponse.java b/src/main/java/unit/java/sdk/model/UnitListAuthorizationsResponse.java new file mode 100644 index 00000000..b2c723a4 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitListAuthorizationsResponse.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Authorization; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitListAuthorizationsResponse + */ +@JsonPropertyOrder({ + UnitListAuthorizationsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitListAuthorizationsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public UnitListAuthorizationsResponse() { + } + + public UnitListAuthorizationsResponse data(List data) { + this.data = data; + return this; + } + + public UnitListAuthorizationsResponse addDataItem(Authorization dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this UnitListAuthorizationsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitListAuthorizationsResponse unitListAuthorizationsResponse = (UnitListAuthorizationsResponse) o; + return Objects.equals(this.data, unitListAuthorizationsResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitListAuthorizationsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitListCheckDepositsResponse.java b/src/main/java/unit/java/sdk/model/UnitListCheckDepositsResponse.java new file mode 100644 index 00000000..ffcd45c3 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitListCheckDepositsResponse.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.CheckDeposit; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitListCheckDepositsResponse + */ +@JsonPropertyOrder({ + UnitListCheckDepositsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitListCheckDepositsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public UnitListCheckDepositsResponse() { + } + + public UnitListCheckDepositsResponse data(List data) { + this.data = data; + return this; + } + + public UnitListCheckDepositsResponse addDataItem(CheckDeposit dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this UnitListCheckDepositsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitListCheckDepositsResponse unitListCheckDepositsResponse = (UnitListCheckDepositsResponse) o; + return Objects.equals(this.data, unitListCheckDepositsResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitListCheckDepositsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitListCheckPaymentsResponse.java b/src/main/java/unit/java/sdk/model/UnitListCheckPaymentsResponse.java new file mode 100644 index 00000000..8e634673 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitListCheckPaymentsResponse.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.CheckPayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitListCheckPaymentsResponse + */ +@JsonPropertyOrder({ + UnitListCheckPaymentsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitListCheckPaymentsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public UnitListCheckPaymentsResponse() { + } + + public UnitListCheckPaymentsResponse data(List data) { + this.data = data; + return this; + } + + public UnitListCheckPaymentsResponse addDataItem(CheckPayment dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this UnitListCheckPaymentsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitListCheckPaymentsResponse unitListCheckPaymentsResponse = (UnitListCheckPaymentsResponse) o; + return Objects.equals(this.data, unitListCheckPaymentsResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitListCheckPaymentsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitListDocumentsResponse.java b/src/main/java/unit/java/sdk/model/UnitListDocumentsResponse.java new file mode 100644 index 00000000..154e0f5d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitListDocumentsResponse.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Document; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitListDocumentsResponse + */ +@JsonPropertyOrder({ + UnitListDocumentsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitListDocumentsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public UnitListDocumentsResponse() { + } + + public UnitListDocumentsResponse data(List data) { + this.data = data; + return this; + } + + public UnitListDocumentsResponse addDataItem(Document dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this UnitListDocumentsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitListDocumentsResponse unitListDocumentsResponse = (UnitListDocumentsResponse) o; + return Objects.equals(this.data, unitListDocumentsResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitListDocumentsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitOrgApiTokensListResponse.java b/src/main/java/unit/java/sdk/model/UnitOrgApiTokensListResponse.java new file mode 100644 index 00000000..ae8de39a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitOrgApiTokensListResponse.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.ApiToken; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitOrgApiTokensListResponse + */ +@JsonPropertyOrder({ + UnitOrgApiTokensListResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitOrgApiTokensListResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public UnitOrgApiTokensListResponse() { + } + + public UnitOrgApiTokensListResponse data(List data) { + this.data = data; + return this; + } + + public UnitOrgApiTokensListResponse addDataItem(ApiToken dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this UnitOrgApiTokensListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitOrgApiTokensListResponse unitOrgApiTokensListResponse = (UnitOrgApiTokensListResponse) o; + return Objects.equals(this.data, unitOrgApiTokensListResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitOrgApiTokensListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitPaymentResponse.java b/src/main/java/unit/java/sdk/model/UnitPaymentResponse.java new file mode 100644 index 00000000..2aa9a969 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitPaymentResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Payment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitPaymentResponse + */ +@JsonPropertyOrder({ + UnitPaymentResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitPaymentResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Payment data; + + public UnitPaymentResponse() { + } + + public UnitPaymentResponse data(Payment data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Payment getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Payment data) { + this.data = data; + } + + + /** + * Return true if this UnitPaymentResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitPaymentResponse unitPaymentResponse = (UnitPaymentResponse) o; + return Objects.equals(this.data, unitPaymentResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitPaymentResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitPaymentResponseWithIncluded.java b/src/main/java/unit/java/sdk/model/UnitPaymentResponseWithIncluded.java new file mode 100644 index 00000000..bd920f60 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitPaymentResponseWithIncluded.java @@ -0,0 +1,203 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.IncludedResourceInner; +import unit.java.sdk.model.Payment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitPaymentResponseWithIncluded + */ +@JsonPropertyOrder({ + UnitPaymentResponseWithIncluded.JSON_PROPERTY_DATA, + UnitPaymentResponseWithIncluded.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitPaymentResponseWithIncluded { + public static final String JSON_PROPERTY_DATA = "data"; + private Payment data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included; + + public UnitPaymentResponseWithIncluded() { + } + + public UnitPaymentResponseWithIncluded data(Payment data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Payment getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Payment data) { + this.data = data; + } + + + public UnitPaymentResponseWithIncluded included(List included) { + this.included = included; + return this; + } + + public UnitPaymentResponseWithIncluded addIncludedItem(IncludedResourceInner includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + return this; + } + + /** + * Get included + * @return included + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getIncluded() { + return included; + } + + + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncluded(List included) { + this.included = included; + } + + + /** + * Return true if this UnitPaymentResponseWithIncluded object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitPaymentResponseWithIncluded unitPaymentResponseWithIncluded = (UnitPaymentResponseWithIncluded) o; + return Objects.equals(this.data, unitPaymentResponseWithIncluded.data) && + Objects.equals(this.included, unitPaymentResponseWithIncluded.included); + } + + @Override + public int hashCode() { + return Objects.hash(data, included); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitPaymentResponseWithIncluded {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + // add `included` to the URL query string + if (getIncluded() != null) { + for (int i = 0; i < getIncluded().size(); i++) { + if (getIncluded().get(i) != null) { + joiner.add(getIncluded().get(i).toUrlQueryString(String.format("%sincluded%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitPaymentsListResponse.java b/src/main/java/unit/java/sdk/model/UnitPaymentsListResponse.java new file mode 100644 index 00000000..0930ccfe --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitPaymentsListResponse.java @@ -0,0 +1,253 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.IncludedResourceInner; +import unit.java.sdk.model.PaginationMeta; +import unit.java.sdk.model.Payment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitPaymentsListResponse + */ +@JsonPropertyOrder({ + UnitPaymentsListResponse.JSON_PROPERTY_DATA, + UnitPaymentsListResponse.JSON_PROPERTY_INCLUDED, + UnitPaymentsListResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitPaymentsListResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included; + + public static final String JSON_PROPERTY_META = "meta"; + private PaginationMeta meta; + + public UnitPaymentsListResponse() { + } + + public UnitPaymentsListResponse data(List data) { + this.data = data; + return this; + } + + public UnitPaymentsListResponse addDataItem(Payment dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + public UnitPaymentsListResponse included(List included) { + this.included = included; + return this; + } + + public UnitPaymentsListResponse addIncludedItem(IncludedResourceInner includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + return this; + } + + /** + * Get included + * @return included + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getIncluded() { + return included; + } + + + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncluded(List included) { + this.included = included; + } + + + public UnitPaymentsListResponse meta(PaginationMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMeta getMeta() { + return meta; + } + + + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMeta(PaginationMeta meta) { + this.meta = meta; + } + + + /** + * Return true if this UnitPaymentsListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitPaymentsListResponse unitPaymentsListResponse = (UnitPaymentsListResponse) o; + return Objects.equals(this.data, unitPaymentsListResponse.data) && + Objects.equals(this.included, unitPaymentsListResponse.included) && + Objects.equals(this.meta, unitPaymentsListResponse.meta); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, meta); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitPaymentsListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `included` to the URL query string + if (getIncluded() != null) { + for (int i = 0; i < getIncluded().size(); i++) { + if (getIncluded().get(i) != null) { + joiner.add(getIncluded().get(i).toUrlQueryString(String.format("%sincluded%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `meta` to the URL query string + if (getMeta() != null) { + joiner.add(getMeta().toUrlQueryString(prefix + "meta" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitReceivedPaymentListResponse.java b/src/main/java/unit/java/sdk/model/UnitReceivedPaymentListResponse.java new file mode 100644 index 00000000..4beddb80 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitReceivedPaymentListResponse.java @@ -0,0 +1,253 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.IncludedResourceInner; +import unit.java.sdk.model.PaginationMeta; +import unit.java.sdk.model.ReceivedPayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitReceivedPaymentListResponse + */ +@JsonPropertyOrder({ + UnitReceivedPaymentListResponse.JSON_PROPERTY_DATA, + UnitReceivedPaymentListResponse.JSON_PROPERTY_INCLUDED, + UnitReceivedPaymentListResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitReceivedPaymentListResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included; + + public static final String JSON_PROPERTY_META = "meta"; + private PaginationMeta meta; + + public UnitReceivedPaymentListResponse() { + } + + public UnitReceivedPaymentListResponse data(List data) { + this.data = data; + return this; + } + + public UnitReceivedPaymentListResponse addDataItem(ReceivedPayment dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + public UnitReceivedPaymentListResponse included(List included) { + this.included = included; + return this; + } + + public UnitReceivedPaymentListResponse addIncludedItem(IncludedResourceInner includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + return this; + } + + /** + * Get included + * @return included + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getIncluded() { + return included; + } + + + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncluded(List included) { + this.included = included; + } + + + public UnitReceivedPaymentListResponse meta(PaginationMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMeta getMeta() { + return meta; + } + + + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMeta(PaginationMeta meta) { + this.meta = meta; + } + + + /** + * Return true if this UnitReceivedPaymentListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitReceivedPaymentListResponse unitReceivedPaymentListResponse = (UnitReceivedPaymentListResponse) o; + return Objects.equals(this.data, unitReceivedPaymentListResponse.data) && + Objects.equals(this.included, unitReceivedPaymentListResponse.included) && + Objects.equals(this.meta, unitReceivedPaymentListResponse.meta); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, meta); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitReceivedPaymentListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `included` to the URL query string + if (getIncluded() != null) { + for (int i = 0; i < getIncluded().size(); i++) { + if (getIncluded().get(i) != null) { + joiner.add(getIncluded().get(i).toUrlQueryString(String.format("%sincluded%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `meta` to the URL query string + if (getMeta() != null) { + joiner.add(getMeta().toUrlQueryString(prefix + "meta" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitReceivedPaymentResponse.java b/src/main/java/unit/java/sdk/model/UnitReceivedPaymentResponse.java new file mode 100644 index 00000000..1a607dd7 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitReceivedPaymentResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitReceivedPaymentResponse + */ +@JsonPropertyOrder({ + UnitReceivedPaymentResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitReceivedPaymentResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private ReceivedPayment data; + + public UnitReceivedPaymentResponse() { + } + + public UnitReceivedPaymentResponse data(ReceivedPayment data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReceivedPayment getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(ReceivedPayment data) { + this.data = data; + } + + + /** + * Return true if this UnitReceivedPaymentResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitReceivedPaymentResponse unitReceivedPaymentResponse = (UnitReceivedPaymentResponse) o; + return Objects.equals(this.data, unitReceivedPaymentResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitReceivedPaymentResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitReceivedPaymentResponseWithIncluded.java b/src/main/java/unit/java/sdk/model/UnitReceivedPaymentResponseWithIncluded.java new file mode 100644 index 00000000..e5b4497e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitReceivedPaymentResponseWithIncluded.java @@ -0,0 +1,203 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.IncludedResourceInner; +import unit.java.sdk.model.ReceivedPayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitReceivedPaymentResponseWithIncluded + */ +@JsonPropertyOrder({ + UnitReceivedPaymentResponseWithIncluded.JSON_PROPERTY_DATA, + UnitReceivedPaymentResponseWithIncluded.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitReceivedPaymentResponseWithIncluded { + public static final String JSON_PROPERTY_DATA = "data"; + private ReceivedPayment data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included; + + public UnitReceivedPaymentResponseWithIncluded() { + } + + public UnitReceivedPaymentResponseWithIncluded data(ReceivedPayment data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReceivedPayment getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(ReceivedPayment data) { + this.data = data; + } + + + public UnitReceivedPaymentResponseWithIncluded included(List included) { + this.included = included; + return this; + } + + public UnitReceivedPaymentResponseWithIncluded addIncludedItem(IncludedResourceInner includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + return this; + } + + /** + * Get included + * @return included + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getIncluded() { + return included; + } + + + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncluded(List included) { + this.included = included; + } + + + /** + * Return true if this UnitReceivedPaymentResponseWithIncluded object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitReceivedPaymentResponseWithIncluded unitReceivedPaymentResponseWithIncluded = (UnitReceivedPaymentResponseWithIncluded) o; + return Objects.equals(this.data, unitReceivedPaymentResponseWithIncluded.data) && + Objects.equals(this.included, unitReceivedPaymentResponseWithIncluded.included); + } + + @Override + public int hashCode() { + return Objects.hash(data, included); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitReceivedPaymentResponseWithIncluded {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + // add `included` to the URL query string + if (getIncluded() != null) { + for (int i = 0; i < getIncluded().size(); i++) { + if (getIncluded().get(i) != null) { + joiner.add(getIncluded().get(i).toUrlQueryString(String.format("%sincluded%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitRecurringPaymentListResponse.java b/src/main/java/unit/java/sdk/model/UnitRecurringPaymentListResponse.java new file mode 100644 index 00000000..8ef575b9 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitRecurringPaymentListResponse.java @@ -0,0 +1,203 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.PaginationMeta; +import unit.java.sdk.model.RecurringPayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitRecurringPaymentListResponse + */ +@JsonPropertyOrder({ + UnitRecurringPaymentListResponse.JSON_PROPERTY_DATA, + UnitRecurringPaymentListResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitRecurringPaymentListResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public static final String JSON_PROPERTY_META = "meta"; + private PaginationMeta meta; + + public UnitRecurringPaymentListResponse() { + } + + public UnitRecurringPaymentListResponse data(List data) { + this.data = data; + return this; + } + + public UnitRecurringPaymentListResponse addDataItem(RecurringPayment dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + public UnitRecurringPaymentListResponse meta(PaginationMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMeta getMeta() { + return meta; + } + + + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMeta(PaginationMeta meta) { + this.meta = meta; + } + + + /** + * Return true if this UnitRecurringPaymentListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitRecurringPaymentListResponse unitRecurringPaymentListResponse = (UnitRecurringPaymentListResponse) o; + return Objects.equals(this.data, unitRecurringPaymentListResponse.data) && + Objects.equals(this.meta, unitRecurringPaymentListResponse.meta); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitRecurringPaymentListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `meta` to the URL query string + if (getMeta() != null) { + joiner.add(getMeta().toUrlQueryString(prefix + "meta" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitRecurringPaymentResponse.java b/src/main/java/unit/java/sdk/model/UnitRecurringPaymentResponse.java new file mode 100644 index 00000000..811a953d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitRecurringPaymentResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringPayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitRecurringPaymentResponse + */ +@JsonPropertyOrder({ + UnitRecurringPaymentResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitRecurringPaymentResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private RecurringPayment data; + + public UnitRecurringPaymentResponse() { + } + + public UnitRecurringPaymentResponse data(RecurringPayment data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RecurringPayment getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(RecurringPayment data) { + this.data = data; + } + + + /** + * Return true if this UnitRecurringPaymentResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitRecurringPaymentResponse unitRecurringPaymentResponse = (UnitRecurringPaymentResponse) o; + return Objects.equals(this.data, unitRecurringPaymentResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitRecurringPaymentResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitRepaymentResponse.java b/src/main/java/unit/java/sdk/model/UnitRepaymentResponse.java new file mode 100644 index 00000000..270614b7 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitRepaymentResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Repayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitRepaymentResponse + */ +@JsonPropertyOrder({ + UnitRepaymentResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitRepaymentResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Repayment data; + + public UnitRepaymentResponse() { + } + + public UnitRepaymentResponse data(Repayment data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Repayment getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Repayment data) { + this.data = data; + } + + + /** + * Return true if this UnitRepaymentResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitRepaymentResponse unitRepaymentResponse = (UnitRepaymentResponse) o; + return Objects.equals(this.data, unitRepaymentResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitRepaymentResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitRepaymentsListResponse.java b/src/main/java/unit/java/sdk/model/UnitRepaymentsListResponse.java new file mode 100644 index 00000000..53771053 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitRepaymentsListResponse.java @@ -0,0 +1,203 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.PaginationMeta; +import unit.java.sdk.model.Repayment; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitRepaymentsListResponse + */ +@JsonPropertyOrder({ + UnitRepaymentsListResponse.JSON_PROPERTY_DATA, + UnitRepaymentsListResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitRepaymentsListResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public static final String JSON_PROPERTY_META = "meta"; + private PaginationMeta meta; + + public UnitRepaymentsListResponse() { + } + + public UnitRepaymentsListResponse data(List data) { + this.data = data; + return this; + } + + public UnitRepaymentsListResponse addDataItem(Repayment dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + public UnitRepaymentsListResponse meta(PaginationMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMeta getMeta() { + return meta; + } + + + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMeta(PaginationMeta meta) { + this.meta = meta; + } + + + /** + * Return true if this UnitRepaymentsListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitRepaymentsListResponse unitRepaymentsListResponse = (UnitRepaymentsListResponse) o; + return Objects.equals(this.data, unitRepaymentsListResponse.data) && + Objects.equals(this.meta, unitRepaymentsListResponse.meta); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitRepaymentsListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `meta` to the URL query string + if (getMeta() != null) { + joiner.add(getMeta().toUrlQueryString(prefix + "meta" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitRewardResponse.java b/src/main/java/unit/java/sdk/model/UnitRewardResponse.java new file mode 100644 index 00000000..b445cf47 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitRewardResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Reward; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitRewardResponse + */ +@JsonPropertyOrder({ + UnitRewardResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitRewardResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Reward data; + + public UnitRewardResponse() { + } + + public UnitRewardResponse data(Reward data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Reward getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Reward data) { + this.data = data; + } + + + /** + * Return true if this UnitRewardResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitRewardResponse unitRewardResponse = (UnitRewardResponse) o; + return Objects.equals(this.data, unitRewardResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitRewardResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitRewardsListResponse.java b/src/main/java/unit/java/sdk/model/UnitRewardsListResponse.java new file mode 100644 index 00000000..5bb5697f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitRewardsListResponse.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Reward; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitRewardsListResponse + */ +@JsonPropertyOrder({ + UnitRewardsListResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitRewardsListResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public UnitRewardsListResponse() { + } + + public UnitRewardsListResponse data(List data) { + this.data = data; + return this; + } + + public UnitRewardsListResponse addDataItem(Reward dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this UnitRewardsListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitRewardsListResponse unitRewardsListResponse = (UnitRewardsListResponse) o; + return Objects.equals(this.data, unitRewardsListResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitRewardsListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitStatementsResponse.java b/src/main/java/unit/java/sdk/model/UnitStatementsResponse.java new file mode 100644 index 00000000..4c40cf07 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitStatementsResponse.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Statement; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitStatementsResponse + */ +@JsonPropertyOrder({ + UnitStatementsResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitStatementsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public UnitStatementsResponse() { + } + + public UnitStatementsResponse data(List data) { + this.data = data; + return this; + } + + public UnitStatementsResponse addDataItem(Statement dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this UnitStatementsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitStatementsResponse unitStatementsResponse = (UnitStatementsResponse) o; + return Objects.equals(this.data, unitStatementsResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitStatementsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitTransactionResponse.java b/src/main/java/unit/java/sdk/model/UnitTransactionResponse.java new file mode 100644 index 00000000..8cf5f244 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitTransactionResponse.java @@ -0,0 +1,203 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.IncludedResourceInner; +import unit.java.sdk.model.Transaction; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitTransactionResponse + */ +@JsonPropertyOrder({ + UnitTransactionResponse.JSON_PROPERTY_DATA, + UnitTransactionResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitTransactionResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Transaction data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included; + + public UnitTransactionResponse() { + } + + public UnitTransactionResponse data(Transaction data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Transaction getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Transaction data) { + this.data = data; + } + + + public UnitTransactionResponse included(List included) { + this.included = included; + return this; + } + + public UnitTransactionResponse addIncludedItem(IncludedResourceInner includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + return this; + } + + /** + * Get included + * @return included + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getIncluded() { + return included; + } + + + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncluded(List included) { + this.included = included; + } + + + /** + * Return true if this UnitTransactionResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitTransactionResponse unitTransactionResponse = (UnitTransactionResponse) o; + return Objects.equals(this.data, unitTransactionResponse.data) && + Objects.equals(this.included, unitTransactionResponse.included); + } + + @Override + public int hashCode() { + return Objects.hash(data, included); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitTransactionResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + // add `included` to the URL query string + if (getIncluded() != null) { + for (int i = 0; i < getIncluded().size(); i++) { + if (getIncluded().get(i) != null) { + joiner.add(getIncluded().get(i).toUrlQueryString(String.format("%sincluded%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitTransactionResponse1.java b/src/main/java/unit/java/sdk/model/UnitTransactionResponse1.java new file mode 100644 index 00000000..1f9319c8 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitTransactionResponse1.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Transaction; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitTransactionResponse1 + */ +@JsonPropertyOrder({ + UnitTransactionResponse1.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitTransactionResponse1 { + public static final String JSON_PROPERTY_DATA = "data"; + private Transaction data; + + public UnitTransactionResponse1() { + } + + public UnitTransactionResponse1 data(Transaction data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Transaction getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Transaction data) { + this.data = data; + } + + + /** + * Return true if this UnitTransactionResponse_1 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitTransactionResponse1 unitTransactionResponse1 = (UnitTransactionResponse1) o; + return Objects.equals(this.data, unitTransactionResponse1.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitTransactionResponse1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitTransactionsListResponse.java b/src/main/java/unit/java/sdk/model/UnitTransactionsListResponse.java new file mode 100644 index 00000000..fb6a8dc6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitTransactionsListResponse.java @@ -0,0 +1,253 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.IncludedResourceInner; +import unit.java.sdk.model.PaginationMeta; +import unit.java.sdk.model.Transaction; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitTransactionsListResponse + */ +@JsonPropertyOrder({ + UnitTransactionsListResponse.JSON_PROPERTY_DATA, + UnitTransactionsListResponse.JSON_PROPERTY_INCLUDED, + UnitTransactionsListResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitTransactionsListResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included; + + public static final String JSON_PROPERTY_META = "meta"; + private PaginationMeta meta; + + public UnitTransactionsListResponse() { + } + + public UnitTransactionsListResponse data(List data) { + this.data = data; + return this; + } + + public UnitTransactionsListResponse addDataItem(Transaction dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + public UnitTransactionsListResponse included(List included) { + this.included = included; + return this; + } + + public UnitTransactionsListResponse addIncludedItem(IncludedResourceInner includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + return this; + } + + /** + * Get included + * @return included + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getIncluded() { + return included; + } + + + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncluded(List included) { + this.included = included; + } + + + public UnitTransactionsListResponse meta(PaginationMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMeta getMeta() { + return meta; + } + + + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMeta(PaginationMeta meta) { + this.meta = meta; + } + + + /** + * Return true if this UnitTransactionsListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitTransactionsListResponse unitTransactionsListResponse = (UnitTransactionsListResponse) o; + return Objects.equals(this.data, unitTransactionsListResponse.data) && + Objects.equals(this.included, unitTransactionsListResponse.included) && + Objects.equals(this.meta, unitTransactionsListResponse.meta); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, meta); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitTransactionsListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `included` to the URL query string + if (getIncluded() != null) { + for (int i = 0; i < getIncluded().size(); i++) { + if (getIncluded().get(i) != null) { + joiner.add(getIncluded().get(i).toUrlQueryString(String.format("%sincluded%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `meta` to the URL query string + if (getMeta() != null) { + joiner.add(getMeta().toUrlQueryString(prefix + "meta" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitWebhookResponse.java b/src/main/java/unit/java/sdk/model/UnitWebhookResponse.java new file mode 100644 index 00000000..d9b811ed --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitWebhookResponse.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Webhook; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitWebhookResponse + */ +@JsonPropertyOrder({ + UnitWebhookResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitWebhookResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Webhook data; + + public UnitWebhookResponse() { + } + + public UnitWebhookResponse data(Webhook data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Webhook getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Webhook data) { + this.data = data; + } + + + /** + * Return true if this UnitWebhookResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitWebhookResponse unitWebhookResponse = (UnitWebhookResponse) o; + return Objects.equals(this.data, unitWebhookResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitWebhookResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UnitWebhooksListResponse.java b/src/main/java/unit/java/sdk/model/UnitWebhooksListResponse.java new file mode 100644 index 00000000..d7ea927c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UnitWebhooksListResponse.java @@ -0,0 +1,166 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Webhook; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnitWebhooksListResponse + */ +@JsonPropertyOrder({ + UnitWebhooksListResponse.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UnitWebhooksListResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public UnitWebhooksListResponse() { + } + + public UnitWebhooksListResponse data(List data) { + this.data = data; + return this; + } + + public UnitWebhooksListResponse addDataItem(Webhook dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this UnitWebhooksListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnitWebhooksListResponse unitWebhooksListResponse = (UnitWebhooksListResponse) o; + return Objects.equals(this.data, unitWebhooksListResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnitWebhooksListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateApplication.java b/src/main/java/unit/java/sdk/model/UpdateApplication.java new file mode 100644 index 00000000..92451b4c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateApplication.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateApplicationData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateApplication + */ +@JsonPropertyOrder({ + UpdateApplication.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateApplication { + public static final String JSON_PROPERTY_DATA = "data"; + private UpdateApplicationData data; + + public UpdateApplication() { + } + + public UpdateApplication data(UpdateApplicationData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UpdateApplicationData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(UpdateApplicationData data) { + this.data = data; + } + + + /** + * Return true if this update_application object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateApplication updateApplication = (UpdateApplication) o; + return Objects.equals(this.data, updateApplication.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateApplication {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateApplicationData.java b/src/main/java/unit/java/sdk/model/UpdateApplicationData.java new file mode 100644 index 00000000..6121cfd5 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateApplicationData.java @@ -0,0 +1,517 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessApplication; +import unit.java.sdk.model.PatchBusinessApplicationBeneficialOwner; +import unit.java.sdk.model.PatchBusinessApplicationOfficer; +import unit.java.sdk.model.PatchIndividualApplication; +import unit.java.sdk.model.PatchSoleProprietorApplication; +import unit.java.sdk.model.PatchTrustApplication; +import unit.java.sdk.model.PatchTrustApplicationAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import unit.java.sdk.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = UpdateApplicationData.UpdateApplicationDataDeserializer.class) +@JsonSerialize(using = UpdateApplicationData.UpdateApplicationDataSerializer.class) +public class UpdateApplicationData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(UpdateApplicationData.class.getName()); + + public static class UpdateApplicationDataSerializer extends StdSerializer { + public UpdateApplicationDataSerializer(Class t) { + super(t); + } + + public UpdateApplicationDataSerializer() { + this(null); + } + + @Override + public void serialize(UpdateApplicationData value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class UpdateApplicationDataDeserializer extends StdDeserializer { + public UpdateApplicationDataDeserializer() { + this(UpdateApplicationData.class); + } + + public UpdateApplicationDataDeserializer(Class vc) { + super(vc); + } + + @Override + public UpdateApplicationData deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize PatchBusinessApplication + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchBusinessApplication.class.equals(Integer.class) || PatchBusinessApplication.class.equals(Long.class) || PatchBusinessApplication.class.equals(Float.class) || PatchBusinessApplication.class.equals(Double.class) || PatchBusinessApplication.class.equals(Boolean.class) || PatchBusinessApplication.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchBusinessApplication.class.equals(Integer.class) || PatchBusinessApplication.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchBusinessApplication.class.equals(Float.class) || PatchBusinessApplication.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchBusinessApplication.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchBusinessApplication.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchBusinessApplication.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchBusinessApplication'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchBusinessApplication'", e); + } + + // deserialize PatchBusinessApplicationBeneficialOwner + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchBusinessApplicationBeneficialOwner.class.equals(Integer.class) || PatchBusinessApplicationBeneficialOwner.class.equals(Long.class) || PatchBusinessApplicationBeneficialOwner.class.equals(Float.class) || PatchBusinessApplicationBeneficialOwner.class.equals(Double.class) || PatchBusinessApplicationBeneficialOwner.class.equals(Boolean.class) || PatchBusinessApplicationBeneficialOwner.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchBusinessApplicationBeneficialOwner.class.equals(Integer.class) || PatchBusinessApplicationBeneficialOwner.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchBusinessApplicationBeneficialOwner.class.equals(Float.class) || PatchBusinessApplicationBeneficialOwner.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchBusinessApplicationBeneficialOwner.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchBusinessApplicationBeneficialOwner.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchBusinessApplicationBeneficialOwner.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchBusinessApplicationBeneficialOwner'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchBusinessApplicationBeneficialOwner'", e); + } + + // deserialize PatchBusinessApplicationOfficer + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchBusinessApplicationOfficer.class.equals(Integer.class) || PatchBusinessApplicationOfficer.class.equals(Long.class) || PatchBusinessApplicationOfficer.class.equals(Float.class) || PatchBusinessApplicationOfficer.class.equals(Double.class) || PatchBusinessApplicationOfficer.class.equals(Boolean.class) || PatchBusinessApplicationOfficer.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchBusinessApplicationOfficer.class.equals(Integer.class) || PatchBusinessApplicationOfficer.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchBusinessApplicationOfficer.class.equals(Float.class) || PatchBusinessApplicationOfficer.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchBusinessApplicationOfficer.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchBusinessApplicationOfficer.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchBusinessApplicationOfficer.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchBusinessApplicationOfficer'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchBusinessApplicationOfficer'", e); + } + + // deserialize PatchIndividualApplication + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchIndividualApplication.class.equals(Integer.class) || PatchIndividualApplication.class.equals(Long.class) || PatchIndividualApplication.class.equals(Float.class) || PatchIndividualApplication.class.equals(Double.class) || PatchIndividualApplication.class.equals(Boolean.class) || PatchIndividualApplication.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchIndividualApplication.class.equals(Integer.class) || PatchIndividualApplication.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchIndividualApplication.class.equals(Float.class) || PatchIndividualApplication.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchIndividualApplication.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchIndividualApplication.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchIndividualApplication.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchIndividualApplication'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchIndividualApplication'", e); + } + + // deserialize PatchSoleProprietorApplication + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchSoleProprietorApplication.class.equals(Integer.class) || PatchSoleProprietorApplication.class.equals(Long.class) || PatchSoleProprietorApplication.class.equals(Float.class) || PatchSoleProprietorApplication.class.equals(Double.class) || PatchSoleProprietorApplication.class.equals(Boolean.class) || PatchSoleProprietorApplication.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchSoleProprietorApplication.class.equals(Integer.class) || PatchSoleProprietorApplication.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchSoleProprietorApplication.class.equals(Float.class) || PatchSoleProprietorApplication.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchSoleProprietorApplication.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchSoleProprietorApplication.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchSoleProprietorApplication.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchSoleProprietorApplication'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchSoleProprietorApplication'", e); + } + + // deserialize PatchTrustApplication + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchTrustApplication.class.equals(Integer.class) || PatchTrustApplication.class.equals(Long.class) || PatchTrustApplication.class.equals(Float.class) || PatchTrustApplication.class.equals(Double.class) || PatchTrustApplication.class.equals(Boolean.class) || PatchTrustApplication.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchTrustApplication.class.equals(Integer.class) || PatchTrustApplication.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchTrustApplication.class.equals(Float.class) || PatchTrustApplication.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchTrustApplication.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchTrustApplication.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchTrustApplication.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchTrustApplication'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchTrustApplication'", e); + } + + if (match == 1) { + UpdateApplicationData ret = new UpdateApplicationData(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for UpdateApplicationData: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public UpdateApplicationData getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "UpdateApplicationData cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public UpdateApplicationData() { + super("oneOf", Boolean.FALSE); + } + + public UpdateApplicationData(PatchBusinessApplication o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public UpdateApplicationData(PatchBusinessApplicationBeneficialOwner o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public UpdateApplicationData(PatchBusinessApplicationOfficer o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public UpdateApplicationData(PatchIndividualApplication o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public UpdateApplicationData(PatchSoleProprietorApplication o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public UpdateApplicationData(PatchTrustApplication o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("PatchBusinessApplication", PatchBusinessApplication.class); + schemas.put("PatchBusinessApplicationBeneficialOwner", PatchBusinessApplicationBeneficialOwner.class); + schemas.put("PatchBusinessApplicationOfficer", PatchBusinessApplicationOfficer.class); + schemas.put("PatchIndividualApplication", PatchIndividualApplication.class); + schemas.put("PatchSoleProprietorApplication", PatchSoleProprietorApplication.class); + schemas.put("PatchTrustApplication", PatchTrustApplication.class); + JSON.registerDescendants(UpdateApplicationData.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return UpdateApplicationData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * PatchBusinessApplication, PatchBusinessApplicationBeneficialOwner, PatchBusinessApplicationOfficer, PatchIndividualApplication, PatchSoleProprietorApplication, PatchTrustApplication + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(PatchBusinessApplication.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PatchBusinessApplicationBeneficialOwner.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PatchBusinessApplicationOfficer.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PatchIndividualApplication.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PatchSoleProprietorApplication.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PatchTrustApplication.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be PatchBusinessApplication, PatchBusinessApplicationBeneficialOwner, PatchBusinessApplicationOfficer, PatchIndividualApplication, PatchSoleProprietorApplication, PatchTrustApplication"); + } + + /** + * Get the actual instance, which can be the following: + * PatchBusinessApplication, PatchBusinessApplicationBeneficialOwner, PatchBusinessApplicationOfficer, PatchIndividualApplication, PatchSoleProprietorApplication, PatchTrustApplication + * + * @return The actual instance (PatchBusinessApplication, PatchBusinessApplicationBeneficialOwner, PatchBusinessApplicationOfficer, PatchIndividualApplication, PatchSoleProprietorApplication, PatchTrustApplication) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchBusinessApplication`. If the actual instance is not `PatchBusinessApplication`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchBusinessApplication` + * @throws ClassCastException if the instance is not `PatchBusinessApplication` + */ + public PatchBusinessApplication getPatchBusinessApplication() throws ClassCastException { + return (PatchBusinessApplication)super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchBusinessApplicationBeneficialOwner`. If the actual instance is not `PatchBusinessApplicationBeneficialOwner`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchBusinessApplicationBeneficialOwner` + * @throws ClassCastException if the instance is not `PatchBusinessApplicationBeneficialOwner` + */ + public PatchBusinessApplicationBeneficialOwner getPatchBusinessApplicationBeneficialOwner() throws ClassCastException { + return (PatchBusinessApplicationBeneficialOwner)super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchBusinessApplicationOfficer`. If the actual instance is not `PatchBusinessApplicationOfficer`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchBusinessApplicationOfficer` + * @throws ClassCastException if the instance is not `PatchBusinessApplicationOfficer` + */ + public PatchBusinessApplicationOfficer getPatchBusinessApplicationOfficer() throws ClassCastException { + return (PatchBusinessApplicationOfficer)super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchIndividualApplication`. If the actual instance is not `PatchIndividualApplication`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchIndividualApplication` + * @throws ClassCastException if the instance is not `PatchIndividualApplication` + */ + public PatchIndividualApplication getPatchIndividualApplication() throws ClassCastException { + return (PatchIndividualApplication)super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchSoleProprietorApplication`. If the actual instance is not `PatchSoleProprietorApplication`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchSoleProprietorApplication` + * @throws ClassCastException if the instance is not `PatchSoleProprietorApplication` + */ + public PatchSoleProprietorApplication getPatchSoleProprietorApplication() throws ClassCastException { + return (PatchSoleProprietorApplication)super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchTrustApplication`. If the actual instance is not `PatchTrustApplication`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchTrustApplication` + * @throws ClassCastException if the instance is not `PatchTrustApplication` + */ + public PatchTrustApplication getPatchTrustApplication() throws ClassCastException { + return (PatchTrustApplication)super.getActualInstance(); + } + + + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof PatchBusinessApplication) { + if (getActualInstance() != null) { + joiner.add(((PatchBusinessApplication)getActualInstance()).toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof PatchBusinessApplicationOfficer) { + if (getActualInstance() != null) { + joiner.add(((PatchBusinessApplicationOfficer)getActualInstance()).toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof PatchBusinessApplicationBeneficialOwner) { + if (getActualInstance() != null) { + joiner.add(((PatchBusinessApplicationBeneficialOwner)getActualInstance()).toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof PatchSoleProprietorApplication) { + if (getActualInstance() != null) { + joiner.add(((PatchSoleProprietorApplication)getActualInstance()).toUrlQueryString(prefix + "one_of_3" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof PatchIndividualApplication) { + if (getActualInstance() != null) { + joiner.add(((PatchIndividualApplication)getActualInstance()).toUrlQueryString(prefix + "one_of_4" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof PatchTrustApplication) { + if (getActualInstance() != null) { + joiner.add(((PatchTrustApplication)getActualInstance()).toUrlQueryString(prefix + "one_of_5" + suffix)); + } + return joiner.toString(); + } + return null; + } + +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateBusinessCustomer.java b/src/main/java/unit/java/sdk/model/UpdateBusinessCustomer.java new file mode 100644 index 00000000..dc3c84a6 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateBusinessCustomer.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateBusinessCustomerAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateBusinessCustomer + */ +@JsonPropertyOrder({ + UpdateBusinessCustomer.JSON_PROPERTY_TYPE, + UpdateBusinessCustomer.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateBusinessCustomer { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private UpdateBusinessCustomerAttributes attributes; + + public UpdateBusinessCustomer() { + } + + public UpdateBusinessCustomer type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public UpdateBusinessCustomer attributes(UpdateBusinessCustomerAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UpdateBusinessCustomerAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(UpdateBusinessCustomerAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this updateBusinessCustomer object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateBusinessCustomer updateBusinessCustomer = (UpdateBusinessCustomer) o; + return Objects.equals(this.type, updateBusinessCustomer.type) && + Objects.equals(this.attributes, updateBusinessCustomer.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateBusinessCustomer {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateBusinessCustomerAttributes.java b/src/main/java/unit/java/sdk/model/UpdateBusinessCustomerAttributes.java new file mode 100644 index 00000000..7d7c0b7c --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateBusinessCustomerAttributes.java @@ -0,0 +1,420 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.AuthorizedUser; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.ResponseContact; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateBusinessCustomerAttributes + */ +@JsonPropertyOrder({ + UpdateBusinessCustomerAttributes.JSON_PROPERTY_DBA, + UpdateBusinessCustomerAttributes.JSON_PROPERTY_EIN, + UpdateBusinessCustomerAttributes.JSON_PROPERTY_PHONE, + UpdateBusinessCustomerAttributes.JSON_PROPERTY_ADDRESS, + UpdateBusinessCustomerAttributes.JSON_PROPERTY_CONTACT, + UpdateBusinessCustomerAttributes.JSON_PROPERTY_TAGS, + UpdateBusinessCustomerAttributes.JSON_PROPERTY_AUTHORIZED_USERS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateBusinessCustomerAttributes { + public static final String JSON_PROPERTY_DBA = "dba"; + private JsonNullable dba = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EIN = "ein"; + private String ein; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_CONTACT = "contact"; + private ResponseContact contact; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_AUTHORIZED_USERS = "authorizedUsers"; + private JsonNullable> authorizedUsers = JsonNullable.>undefined(); + + public UpdateBusinessCustomerAttributes() { + } + + public UpdateBusinessCustomerAttributes dba(String dba) { + this.dba = JsonNullable.of(dba); + return this; + } + + /** + * Get dba + * @return dba + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDba() { + return dba.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DBA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDba_JsonNullable() { + return dba; + } + + @JsonProperty(JSON_PROPERTY_DBA) + public void setDba_JsonNullable(JsonNullable dba) { + this.dba = dba; + } + + public void setDba(String dba) { + this.dba = JsonNullable.of(dba); + } + + + public UpdateBusinessCustomerAttributes ein(String ein) { + this.ein = ein; + return this; + } + + /** + * Get ein + * @return ein + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEin() { + return ein; + } + + + @JsonProperty(JSON_PROPERTY_EIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEin(String ein) { + this.ein = ein; + } + + + public UpdateBusinessCustomerAttributes phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public UpdateBusinessCustomerAttributes address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(Address address) { + this.address = address; + } + + + public UpdateBusinessCustomerAttributes contact(ResponseContact contact) { + this.contact = contact; + return this; + } + + /** + * Get contact + * @return contact + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ResponseContact getContact() { + return contact; + } + + + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContact(ResponseContact contact) { + this.contact = contact; + } + + + public UpdateBusinessCustomerAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public UpdateBusinessCustomerAttributes authorizedUsers(List authorizedUsers) { + this.authorizedUsers = JsonNullable.>of(authorizedUsers); + return this; + } + + public UpdateBusinessCustomerAttributes addAuthorizedUsersItem(AuthorizedUser authorizedUsersItem) { + if (this.authorizedUsers == null || !this.authorizedUsers.isPresent()) { + this.authorizedUsers = JsonNullable.>of(new ArrayList<>()); + } + try { + this.authorizedUsers.get().add(authorizedUsersItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get authorizedUsers + * @return authorizedUsers + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getAuthorizedUsers() { + return authorizedUsers.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AUTHORIZED_USERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAuthorizedUsers_JsonNullable() { + return authorizedUsers; + } + + @JsonProperty(JSON_PROPERTY_AUTHORIZED_USERS) + public void setAuthorizedUsers_JsonNullable(JsonNullable> authorizedUsers) { + this.authorizedUsers = authorizedUsers; + } + + public void setAuthorizedUsers(List authorizedUsers) { + this.authorizedUsers = JsonNullable.>of(authorizedUsers); + } + + + /** + * Return true if this updateBusinessCustomer_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateBusinessCustomerAttributes updateBusinessCustomerAttributes = (UpdateBusinessCustomerAttributes) o; + return equalsNullable(this.dba, updateBusinessCustomerAttributes.dba) && + Objects.equals(this.ein, updateBusinessCustomerAttributes.ein) && + Objects.equals(this.phone, updateBusinessCustomerAttributes.phone) && + Objects.equals(this.address, updateBusinessCustomerAttributes.address) && + Objects.equals(this.contact, updateBusinessCustomerAttributes.contact) && + Objects.equals(this.tags, updateBusinessCustomerAttributes.tags) && + equalsNullable(this.authorizedUsers, updateBusinessCustomerAttributes.authorizedUsers); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(dba), ein, phone, address, contact, tags, hashCodeNullable(authorizedUsers)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateBusinessCustomerAttributes {\n"); + sb.append(" dba: ").append(toIndentedString(dba)).append("\n"); + sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" authorizedUsers: ").append(toIndentedString(authorizedUsers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dba` to the URL query string + if (getDba() != null) { + joiner.add(String.format("%sdba%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDba()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `ein` to the URL query string + if (getEin() != null) { + joiner.add(String.format("%sein%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEin()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `contact` to the URL query string + if (getContact() != null) { + joiner.add(getContact().toUrlQueryString(prefix + "contact" + suffix)); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `authorizedUsers` to the URL query string + if (getAuthorizedUsers() != null) { + for (int i = 0; i < getAuthorizedUsers().size(); i++) { + if (getAuthorizedUsers().get(i) != null) { + joiner.add(getAuthorizedUsers().get(i).toUrlQueryString(String.format("%sauthorizedUsers%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateCard.java b/src/main/java/unit/java/sdk/model/UpdateCard.java new file mode 100644 index 00000000..20341ad2 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateCard.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateCardData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateCard + */ +@JsonPropertyOrder({ + UpdateCard.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateCard { + public static final String JSON_PROPERTY_DATA = "data"; + private UpdateCardData data; + + public UpdateCard() { + } + + public UpdateCard data(UpdateCardData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UpdateCardData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(UpdateCardData data) { + this.data = data; + } + + + /** + * Return true if this update_card object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCard updateCard = (UpdateCard) o; + return Objects.equals(this.data, updateCard.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCard {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateCardData.java b/src/main/java/unit/java/sdk/model/UpdateCardData.java new file mode 100644 index 00000000..5df58b28 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateCardData.java @@ -0,0 +1,517 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessCreditCard; +import unit.java.sdk.model.PatchBusinessDebitCard; +import unit.java.sdk.model.PatchBusinessVirtualCreditCard; +import unit.java.sdk.model.PatchBusinessVirtualDebitCard; +import unit.java.sdk.model.PatchBusinessVirtualDebitCardAttributes; +import unit.java.sdk.model.PatchIndividualDebitCard; +import unit.java.sdk.model.PatchIndividualVirtualDebitCard; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import unit.java.sdk.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = UpdateCardData.UpdateCardDataDeserializer.class) +@JsonSerialize(using = UpdateCardData.UpdateCardDataSerializer.class) +public class UpdateCardData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(UpdateCardData.class.getName()); + + public static class UpdateCardDataSerializer extends StdSerializer { + public UpdateCardDataSerializer(Class t) { + super(t); + } + + public UpdateCardDataSerializer() { + this(null); + } + + @Override + public void serialize(UpdateCardData value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class UpdateCardDataDeserializer extends StdDeserializer { + public UpdateCardDataDeserializer() { + this(UpdateCardData.class); + } + + public UpdateCardDataDeserializer(Class vc) { + super(vc); + } + + @Override + public UpdateCardData deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize PatchBusinessCreditCard + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchBusinessCreditCard.class.equals(Integer.class) || PatchBusinessCreditCard.class.equals(Long.class) || PatchBusinessCreditCard.class.equals(Float.class) || PatchBusinessCreditCard.class.equals(Double.class) || PatchBusinessCreditCard.class.equals(Boolean.class) || PatchBusinessCreditCard.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchBusinessCreditCard.class.equals(Integer.class) || PatchBusinessCreditCard.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchBusinessCreditCard.class.equals(Float.class) || PatchBusinessCreditCard.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchBusinessCreditCard.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchBusinessCreditCard.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchBusinessCreditCard.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchBusinessCreditCard'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchBusinessCreditCard'", e); + } + + // deserialize PatchBusinessDebitCard + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchBusinessDebitCard.class.equals(Integer.class) || PatchBusinessDebitCard.class.equals(Long.class) || PatchBusinessDebitCard.class.equals(Float.class) || PatchBusinessDebitCard.class.equals(Double.class) || PatchBusinessDebitCard.class.equals(Boolean.class) || PatchBusinessDebitCard.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchBusinessDebitCard.class.equals(Integer.class) || PatchBusinessDebitCard.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchBusinessDebitCard.class.equals(Float.class) || PatchBusinessDebitCard.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchBusinessDebitCard.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchBusinessDebitCard.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchBusinessDebitCard.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchBusinessDebitCard'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchBusinessDebitCard'", e); + } + + // deserialize PatchBusinessVirtualCreditCard + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchBusinessVirtualCreditCard.class.equals(Integer.class) || PatchBusinessVirtualCreditCard.class.equals(Long.class) || PatchBusinessVirtualCreditCard.class.equals(Float.class) || PatchBusinessVirtualCreditCard.class.equals(Double.class) || PatchBusinessVirtualCreditCard.class.equals(Boolean.class) || PatchBusinessVirtualCreditCard.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchBusinessVirtualCreditCard.class.equals(Integer.class) || PatchBusinessVirtualCreditCard.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchBusinessVirtualCreditCard.class.equals(Float.class) || PatchBusinessVirtualCreditCard.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchBusinessVirtualCreditCard.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchBusinessVirtualCreditCard.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchBusinessVirtualCreditCard.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchBusinessVirtualCreditCard'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchBusinessVirtualCreditCard'", e); + } + + // deserialize PatchBusinessVirtualDebitCard + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchBusinessVirtualDebitCard.class.equals(Integer.class) || PatchBusinessVirtualDebitCard.class.equals(Long.class) || PatchBusinessVirtualDebitCard.class.equals(Float.class) || PatchBusinessVirtualDebitCard.class.equals(Double.class) || PatchBusinessVirtualDebitCard.class.equals(Boolean.class) || PatchBusinessVirtualDebitCard.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchBusinessVirtualDebitCard.class.equals(Integer.class) || PatchBusinessVirtualDebitCard.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchBusinessVirtualDebitCard.class.equals(Float.class) || PatchBusinessVirtualDebitCard.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchBusinessVirtualDebitCard.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchBusinessVirtualDebitCard.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchBusinessVirtualDebitCard.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchBusinessVirtualDebitCard'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchBusinessVirtualDebitCard'", e); + } + + // deserialize PatchIndividualDebitCard + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchIndividualDebitCard.class.equals(Integer.class) || PatchIndividualDebitCard.class.equals(Long.class) || PatchIndividualDebitCard.class.equals(Float.class) || PatchIndividualDebitCard.class.equals(Double.class) || PatchIndividualDebitCard.class.equals(Boolean.class) || PatchIndividualDebitCard.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchIndividualDebitCard.class.equals(Integer.class) || PatchIndividualDebitCard.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchIndividualDebitCard.class.equals(Float.class) || PatchIndividualDebitCard.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchIndividualDebitCard.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchIndividualDebitCard.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchIndividualDebitCard.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchIndividualDebitCard'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchIndividualDebitCard'", e); + } + + // deserialize PatchIndividualVirtualDebitCard + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchIndividualVirtualDebitCard.class.equals(Integer.class) || PatchIndividualVirtualDebitCard.class.equals(Long.class) || PatchIndividualVirtualDebitCard.class.equals(Float.class) || PatchIndividualVirtualDebitCard.class.equals(Double.class) || PatchIndividualVirtualDebitCard.class.equals(Boolean.class) || PatchIndividualVirtualDebitCard.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchIndividualVirtualDebitCard.class.equals(Integer.class) || PatchIndividualVirtualDebitCard.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchIndividualVirtualDebitCard.class.equals(Float.class) || PatchIndividualVirtualDebitCard.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchIndividualVirtualDebitCard.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchIndividualVirtualDebitCard.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchIndividualVirtualDebitCard.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchIndividualVirtualDebitCard'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchIndividualVirtualDebitCard'", e); + } + + if (match == 1) { + UpdateCardData ret = new UpdateCardData(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for UpdateCardData: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public UpdateCardData getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "UpdateCardData cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public UpdateCardData() { + super("oneOf", Boolean.FALSE); + } + + public UpdateCardData(PatchBusinessCreditCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public UpdateCardData(PatchBusinessDebitCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public UpdateCardData(PatchBusinessVirtualCreditCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public UpdateCardData(PatchBusinessVirtualDebitCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public UpdateCardData(PatchIndividualDebitCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public UpdateCardData(PatchIndividualVirtualDebitCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("PatchBusinessCreditCard", PatchBusinessCreditCard.class); + schemas.put("PatchBusinessDebitCard", PatchBusinessDebitCard.class); + schemas.put("PatchBusinessVirtualCreditCard", PatchBusinessVirtualCreditCard.class); + schemas.put("PatchBusinessVirtualDebitCard", PatchBusinessVirtualDebitCard.class); + schemas.put("PatchIndividualDebitCard", PatchIndividualDebitCard.class); + schemas.put("PatchIndividualVirtualDebitCard", PatchIndividualVirtualDebitCard.class); + JSON.registerDescendants(UpdateCardData.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return UpdateCardData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * PatchBusinessCreditCard, PatchBusinessDebitCard, PatchBusinessVirtualCreditCard, PatchBusinessVirtualDebitCard, PatchIndividualDebitCard, PatchIndividualVirtualDebitCard + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(PatchBusinessCreditCard.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PatchBusinessDebitCard.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PatchBusinessVirtualCreditCard.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PatchBusinessVirtualDebitCard.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PatchIndividualDebitCard.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PatchIndividualVirtualDebitCard.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be PatchBusinessCreditCard, PatchBusinessDebitCard, PatchBusinessVirtualCreditCard, PatchBusinessVirtualDebitCard, PatchIndividualDebitCard, PatchIndividualVirtualDebitCard"); + } + + /** + * Get the actual instance, which can be the following: + * PatchBusinessCreditCard, PatchBusinessDebitCard, PatchBusinessVirtualCreditCard, PatchBusinessVirtualDebitCard, PatchIndividualDebitCard, PatchIndividualVirtualDebitCard + * + * @return The actual instance (PatchBusinessCreditCard, PatchBusinessDebitCard, PatchBusinessVirtualCreditCard, PatchBusinessVirtualDebitCard, PatchIndividualDebitCard, PatchIndividualVirtualDebitCard) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchBusinessCreditCard`. If the actual instance is not `PatchBusinessCreditCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchBusinessCreditCard` + * @throws ClassCastException if the instance is not `PatchBusinessCreditCard` + */ + public PatchBusinessCreditCard getPatchBusinessCreditCard() throws ClassCastException { + return (PatchBusinessCreditCard)super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchBusinessDebitCard`. If the actual instance is not `PatchBusinessDebitCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchBusinessDebitCard` + * @throws ClassCastException if the instance is not `PatchBusinessDebitCard` + */ + public PatchBusinessDebitCard getPatchBusinessDebitCard() throws ClassCastException { + return (PatchBusinessDebitCard)super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchBusinessVirtualCreditCard`. If the actual instance is not `PatchBusinessVirtualCreditCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchBusinessVirtualCreditCard` + * @throws ClassCastException if the instance is not `PatchBusinessVirtualCreditCard` + */ + public PatchBusinessVirtualCreditCard getPatchBusinessVirtualCreditCard() throws ClassCastException { + return (PatchBusinessVirtualCreditCard)super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchBusinessVirtualDebitCard`. If the actual instance is not `PatchBusinessVirtualDebitCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchBusinessVirtualDebitCard` + * @throws ClassCastException if the instance is not `PatchBusinessVirtualDebitCard` + */ + public PatchBusinessVirtualDebitCard getPatchBusinessVirtualDebitCard() throws ClassCastException { + return (PatchBusinessVirtualDebitCard)super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchIndividualDebitCard`. If the actual instance is not `PatchIndividualDebitCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchIndividualDebitCard` + * @throws ClassCastException if the instance is not `PatchIndividualDebitCard` + */ + public PatchIndividualDebitCard getPatchIndividualDebitCard() throws ClassCastException { + return (PatchIndividualDebitCard)super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchIndividualVirtualDebitCard`. If the actual instance is not `PatchIndividualVirtualDebitCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchIndividualVirtualDebitCard` + * @throws ClassCastException if the instance is not `PatchIndividualVirtualDebitCard` + */ + public PatchIndividualVirtualDebitCard getPatchIndividualVirtualDebitCard() throws ClassCastException { + return (PatchIndividualVirtualDebitCard)super.getActualInstance(); + } + + + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof PatchIndividualDebitCard) { + if (getActualInstance() != null) { + joiner.add(((PatchIndividualDebitCard)getActualInstance()).toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof PatchIndividualVirtualDebitCard) { + if (getActualInstance() != null) { + joiner.add(((PatchIndividualVirtualDebitCard)getActualInstance()).toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof PatchBusinessDebitCard) { + if (getActualInstance() != null) { + joiner.add(((PatchBusinessDebitCard)getActualInstance()).toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof PatchBusinessVirtualDebitCard) { + if (getActualInstance() != null) { + joiner.add(((PatchBusinessVirtualDebitCard)getActualInstance()).toUrlQueryString(prefix + "one_of_3" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof PatchBusinessCreditCard) { + if (getActualInstance() != null) { + joiner.add(((PatchBusinessCreditCard)getActualInstance()).toUrlQueryString(prefix + "one_of_4" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof PatchBusinessVirtualCreditCard) { + if (getActualInstance() != null) { + joiner.add(((PatchBusinessVirtualCreditCard)getActualInstance()).toUrlQueryString(prefix + "one_of_5" + suffix)); + } + return joiner.toString(); + } + return null; + } + +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateCheckDeposit.java b/src/main/java/unit/java/sdk/model/UpdateCheckDeposit.java new file mode 100644 index 00000000..918d004f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateCheckDeposit.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchCheckDeposit; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateCheckDeposit + */ +@JsonPropertyOrder({ + UpdateCheckDeposit.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateCheckDeposit { + public static final String JSON_PROPERTY_DATA = "data"; + private PatchCheckDeposit data; + + public UpdateCheckDeposit() { + } + + public UpdateCheckDeposit data(PatchCheckDeposit data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PatchCheckDeposit getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(PatchCheckDeposit data) { + this.data = data; + } + + + /** + * Return true if this update_check_deposit object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCheckDeposit updateCheckDeposit = (UpdateCheckDeposit) o; + return Objects.equals(this.data, updateCheckDeposit.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCheckDeposit {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateCounterparty.java b/src/main/java/unit/java/sdk/model/UpdateCounterparty.java new file mode 100644 index 00000000..dcb093ec --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateCounterparty.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateCounterpartyData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateCounterparty + */ +@JsonPropertyOrder({ + UpdateCounterparty.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateCounterparty { + public static final String JSON_PROPERTY_DATA = "data"; + private UpdateCounterpartyData data; + + public UpdateCounterparty() { + } + + public UpdateCounterparty data(UpdateCounterpartyData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UpdateCounterpartyData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(UpdateCounterpartyData data) { + this.data = data; + } + + + /** + * Return true if this update_counterparty object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCounterparty updateCounterparty = (UpdateCounterparty) o; + return Objects.equals(this.data, updateCounterparty.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCounterparty {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateCounterpartyData.java b/src/main/java/unit/java/sdk/model/UpdateCounterpartyData.java new file mode 100644 index 00000000..2a526b7e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateCounterpartyData.java @@ -0,0 +1,242 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchCounterparty; +import unit.java.sdk.model.PatchCounterpartyAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import unit.java.sdk.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = UpdateCounterpartyData.UpdateCounterpartyDataDeserializer.class) +@JsonSerialize(using = UpdateCounterpartyData.UpdateCounterpartyDataSerializer.class) +public class UpdateCounterpartyData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(UpdateCounterpartyData.class.getName()); + + public static class UpdateCounterpartyDataSerializer extends StdSerializer { + public UpdateCounterpartyDataSerializer(Class t) { + super(t); + } + + public UpdateCounterpartyDataSerializer() { + this(null); + } + + @Override + public void serialize(UpdateCounterpartyData value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class UpdateCounterpartyDataDeserializer extends StdDeserializer { + public UpdateCounterpartyDataDeserializer() { + this(UpdateCounterpartyData.class); + } + + public UpdateCounterpartyDataDeserializer(Class vc) { + super(vc); + } + + @Override + public UpdateCounterpartyData deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize PatchCounterparty + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchCounterparty.class.equals(Integer.class) || PatchCounterparty.class.equals(Long.class) || PatchCounterparty.class.equals(Float.class) || PatchCounterparty.class.equals(Double.class) || PatchCounterparty.class.equals(Boolean.class) || PatchCounterparty.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchCounterparty.class.equals(Integer.class) || PatchCounterparty.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchCounterparty.class.equals(Float.class) || PatchCounterparty.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchCounterparty.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchCounterparty.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchCounterparty.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchCounterparty'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchCounterparty'", e); + } + + if (match == 1) { + UpdateCounterpartyData ret = new UpdateCounterpartyData(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for UpdateCounterpartyData: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public UpdateCounterpartyData getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "UpdateCounterpartyData cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public UpdateCounterpartyData() { + super("oneOf", Boolean.FALSE); + } + + public UpdateCounterpartyData(PatchCounterparty o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("PatchCounterparty", PatchCounterparty.class); + JSON.registerDescendants(UpdateCounterpartyData.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return UpdateCounterpartyData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * PatchCounterparty + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(PatchCounterparty.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be PatchCounterparty"); + } + + /** + * Get the actual instance, which can be the following: + * PatchCounterparty + * + * @return The actual instance (PatchCounterparty) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchCounterparty`. If the actual instance is not `PatchCounterparty`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchCounterparty` + * @throws ClassCastException if the instance is not `PatchCounterparty` + */ + public PatchCounterparty getPatchCounterparty() throws ClassCastException { + return (PatchCounterparty)super.getActualInstance(); + } + + + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof PatchCounterparty) { + if (getActualInstance() != null) { + joiner.add(((PatchCounterparty)getActualInstance()).toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + return null; + } + +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateCreditAccount.java b/src/main/java/unit/java/sdk/model/UpdateCreditAccount.java new file mode 100644 index 00000000..1babad79 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateCreditAccount.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateCreditAccountAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateCreditAccount + */ +@JsonPropertyOrder({ + UpdateCreditAccount.JSON_PROPERTY_TYPE, + UpdateCreditAccount.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateCreditAccount { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "creditAccount"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private UpdateCreditAccountAttributes attributes; + + public UpdateCreditAccount() { + } + + public UpdateCreditAccount type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public UpdateCreditAccount attributes(UpdateCreditAccountAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UpdateCreditAccountAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(UpdateCreditAccountAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this updateCreditAccount object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCreditAccount updateCreditAccount = (UpdateCreditAccount) o; + return Objects.equals(this.type, updateCreditAccount.type) && + Objects.equals(this.attributes, updateCreditAccount.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCreditAccount {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateCreditAccountAttributes.java b/src/main/java/unit/java/sdk/model/UpdateCreditAccountAttributes.java new file mode 100644 index 00000000..f4ce8d5d --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateCreditAccountAttributes.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateCreditAccountAttributes + */ +@JsonPropertyOrder({ + UpdateCreditAccountAttributes.JSON_PROPERTY_TAGS, + UpdateCreditAccountAttributes.JSON_PROPERTY_CREDIT_LIMIT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateCreditAccountAttributes { + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_CREDIT_LIMIT = "creditLimit"; + private Integer creditLimit; + + public UpdateCreditAccountAttributes() { + } + + public UpdateCreditAccountAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public UpdateCreditAccountAttributes creditLimit(Integer creditLimit) { + this.creditLimit = creditLimit; + return this; + } + + /** + * Get creditLimit + * @return creditLimit + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREDIT_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getCreditLimit() { + return creditLimit; + } + + + @JsonProperty(JSON_PROPERTY_CREDIT_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreditLimit(Integer creditLimit) { + this.creditLimit = creditLimit; + } + + + /** + * Return true if this updateCreditAccount_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCreditAccountAttributes updateCreditAccountAttributes = (UpdateCreditAccountAttributes) o; + return Objects.equals(this.tags, updateCreditAccountAttributes.tags) && + Objects.equals(this.creditLimit, updateCreditAccountAttributes.creditLimit); + } + + @Override + public int hashCode() { + return Objects.hash(tags, creditLimit); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCreditAccountAttributes {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" creditLimit: ").append(toIndentedString(creditLimit)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `creditLimit` to the URL query string + if (getCreditLimit() != null) { + joiner.add(String.format("%screditLimit%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreditLimit()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateCustomer.java b/src/main/java/unit/java/sdk/model/UpdateCustomer.java new file mode 100644 index 00000000..30753bd7 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateCustomer.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateCustomerData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateCustomer + */ +@JsonPropertyOrder({ + UpdateCustomer.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateCustomer { + public static final String JSON_PROPERTY_DATA = "data"; + private UpdateCustomerData data; + + public UpdateCustomer() { + } + + public UpdateCustomer data(UpdateCustomerData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UpdateCustomerData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(UpdateCustomerData data) { + this.data = data; + } + + + /** + * Return true if this update_customer object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCustomer updateCustomer = (UpdateCustomer) o; + return Objects.equals(this.data, updateCustomer.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCustomer {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateCustomerData.java b/src/main/java/unit/java/sdk/model/UpdateCustomerData.java new file mode 100644 index 00000000..21040a38 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateCustomerData.java @@ -0,0 +1,352 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateBusinessCustomer; +import unit.java.sdk.model.UpdateIndividualCustomer; +import unit.java.sdk.model.UpdateTrustCustomer; +import unit.java.sdk.model.UpdateTrustCustomerAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import unit.java.sdk.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = UpdateCustomerData.UpdateCustomerDataDeserializer.class) +@JsonSerialize(using = UpdateCustomerData.UpdateCustomerDataSerializer.class) +public class UpdateCustomerData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(UpdateCustomerData.class.getName()); + + public static class UpdateCustomerDataSerializer extends StdSerializer { + public UpdateCustomerDataSerializer(Class t) { + super(t); + } + + public UpdateCustomerDataSerializer() { + this(null); + } + + @Override + public void serialize(UpdateCustomerData value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class UpdateCustomerDataDeserializer extends StdDeserializer { + public UpdateCustomerDataDeserializer() { + this(UpdateCustomerData.class); + } + + public UpdateCustomerDataDeserializer(Class vc) { + super(vc); + } + + @Override + public UpdateCustomerData deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize UpdateBusinessCustomer + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (UpdateBusinessCustomer.class.equals(Integer.class) || UpdateBusinessCustomer.class.equals(Long.class) || UpdateBusinessCustomer.class.equals(Float.class) || UpdateBusinessCustomer.class.equals(Double.class) || UpdateBusinessCustomer.class.equals(Boolean.class) || UpdateBusinessCustomer.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((UpdateBusinessCustomer.class.equals(Integer.class) || UpdateBusinessCustomer.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((UpdateBusinessCustomer.class.equals(Float.class) || UpdateBusinessCustomer.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (UpdateBusinessCustomer.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (UpdateBusinessCustomer.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(UpdateBusinessCustomer.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'UpdateBusinessCustomer'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'UpdateBusinessCustomer'", e); + } + + // deserialize UpdateIndividualCustomer + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (UpdateIndividualCustomer.class.equals(Integer.class) || UpdateIndividualCustomer.class.equals(Long.class) || UpdateIndividualCustomer.class.equals(Float.class) || UpdateIndividualCustomer.class.equals(Double.class) || UpdateIndividualCustomer.class.equals(Boolean.class) || UpdateIndividualCustomer.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((UpdateIndividualCustomer.class.equals(Integer.class) || UpdateIndividualCustomer.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((UpdateIndividualCustomer.class.equals(Float.class) || UpdateIndividualCustomer.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (UpdateIndividualCustomer.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (UpdateIndividualCustomer.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(UpdateIndividualCustomer.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'UpdateIndividualCustomer'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'UpdateIndividualCustomer'", e); + } + + // deserialize UpdateTrustCustomer + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (UpdateTrustCustomer.class.equals(Integer.class) || UpdateTrustCustomer.class.equals(Long.class) || UpdateTrustCustomer.class.equals(Float.class) || UpdateTrustCustomer.class.equals(Double.class) || UpdateTrustCustomer.class.equals(Boolean.class) || UpdateTrustCustomer.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((UpdateTrustCustomer.class.equals(Integer.class) || UpdateTrustCustomer.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((UpdateTrustCustomer.class.equals(Float.class) || UpdateTrustCustomer.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (UpdateTrustCustomer.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (UpdateTrustCustomer.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(UpdateTrustCustomer.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'UpdateTrustCustomer'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'UpdateTrustCustomer'", e); + } + + if (match == 1) { + UpdateCustomerData ret = new UpdateCustomerData(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for UpdateCustomerData: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public UpdateCustomerData getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "UpdateCustomerData cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public UpdateCustomerData() { + super("oneOf", Boolean.FALSE); + } + + public UpdateCustomerData(UpdateBusinessCustomer o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public UpdateCustomerData(UpdateIndividualCustomer o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public UpdateCustomerData(UpdateTrustCustomer o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("UpdateBusinessCustomer", UpdateBusinessCustomer.class); + schemas.put("UpdateIndividualCustomer", UpdateIndividualCustomer.class); + schemas.put("UpdateTrustCustomer", UpdateTrustCustomer.class); + JSON.registerDescendants(UpdateCustomerData.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return UpdateCustomerData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * UpdateBusinessCustomer, UpdateIndividualCustomer, UpdateTrustCustomer + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(UpdateBusinessCustomer.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UpdateIndividualCustomer.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UpdateTrustCustomer.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be UpdateBusinessCustomer, UpdateIndividualCustomer, UpdateTrustCustomer"); + } + + /** + * Get the actual instance, which can be the following: + * UpdateBusinessCustomer, UpdateIndividualCustomer, UpdateTrustCustomer + * + * @return The actual instance (UpdateBusinessCustomer, UpdateIndividualCustomer, UpdateTrustCustomer) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `UpdateBusinessCustomer`. If the actual instance is not `UpdateBusinessCustomer`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `UpdateBusinessCustomer` + * @throws ClassCastException if the instance is not `UpdateBusinessCustomer` + */ + public UpdateBusinessCustomer getUpdateBusinessCustomer() throws ClassCastException { + return (UpdateBusinessCustomer)super.getActualInstance(); + } + + /** + * Get the actual instance of `UpdateIndividualCustomer`. If the actual instance is not `UpdateIndividualCustomer`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `UpdateIndividualCustomer` + * @throws ClassCastException if the instance is not `UpdateIndividualCustomer` + */ + public UpdateIndividualCustomer getUpdateIndividualCustomer() throws ClassCastException { + return (UpdateIndividualCustomer)super.getActualInstance(); + } + + /** + * Get the actual instance of `UpdateTrustCustomer`. If the actual instance is not `UpdateTrustCustomer`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `UpdateTrustCustomer` + * @throws ClassCastException if the instance is not `UpdateTrustCustomer` + */ + public UpdateTrustCustomer getUpdateTrustCustomer() throws ClassCastException { + return (UpdateTrustCustomer)super.getActualInstance(); + } + + + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof UpdateIndividualCustomer) { + if (getActualInstance() != null) { + joiner.add(((UpdateIndividualCustomer)getActualInstance()).toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof UpdateBusinessCustomer) { + if (getActualInstance() != null) { + joiner.add(((UpdateBusinessCustomer)getActualInstance()).toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof UpdateTrustCustomer) { + if (getActualInstance() != null) { + joiner.add(((UpdateTrustCustomer)getActualInstance()).toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + return null; + } + +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateDepositAccount.java b/src/main/java/unit/java/sdk/model/UpdateDepositAccount.java new file mode 100644 index 00000000..78a0ab1f --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateDepositAccount.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateDepositAccountAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateDepositAccount + */ +@JsonPropertyOrder({ + UpdateDepositAccount.JSON_PROPERTY_TYPE, + UpdateDepositAccount.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateDepositAccount { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "depositAccount"; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private UpdateDepositAccountAttributes attributes; + + public UpdateDepositAccount() { + } + + public UpdateDepositAccount type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public UpdateDepositAccount attributes(UpdateDepositAccountAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UpdateDepositAccountAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(UpdateDepositAccountAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this updateDepositAccount object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateDepositAccount updateDepositAccount = (UpdateDepositAccount) o; + return Objects.equals(this.type, updateDepositAccount.type) && + Objects.equals(this.attributes, updateDepositAccount.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateDepositAccount {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateDepositAccountAttributes.java b/src/main/java/unit/java/sdk/model/UpdateDepositAccountAttributes.java new file mode 100644 index 00000000..6bfed9aa --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateDepositAccountAttributes.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateDepositAccountAttributes + */ +@JsonPropertyOrder({ + UpdateDepositAccountAttributes.JSON_PROPERTY_TAGS, + UpdateDepositAccountAttributes.JSON_PROPERTY_DEPOSIT_PRODUCT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateDepositAccountAttributes { + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_DEPOSIT_PRODUCT = "depositProduct"; + private String depositProduct; + + public UpdateDepositAccountAttributes() { + } + + public UpdateDepositAccountAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public UpdateDepositAccountAttributes depositProduct(String depositProduct) { + this.depositProduct = depositProduct; + return this; + } + + /** + * Get depositProduct + * @return depositProduct + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEPOSIT_PRODUCT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDepositProduct() { + return depositProduct; + } + + + @JsonProperty(JSON_PROPERTY_DEPOSIT_PRODUCT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDepositProduct(String depositProduct) { + this.depositProduct = depositProduct; + } + + + /** + * Return true if this updateDepositAccount_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateDepositAccountAttributes updateDepositAccountAttributes = (UpdateDepositAccountAttributes) o; + return Objects.equals(this.tags, updateDepositAccountAttributes.tags) && + Objects.equals(this.depositProduct, updateDepositAccountAttributes.depositProduct); + } + + @Override + public int hashCode() { + return Objects.hash(tags, depositProduct); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateDepositAccountAttributes {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" depositProduct: ").append(toIndentedString(depositProduct)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `depositProduct` to the URL query string + if (getDepositProduct() != null) { + joiner.add(String.format("%sdepositProduct%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDepositProduct()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateIndividualCustomer.java b/src/main/java/unit/java/sdk/model/UpdateIndividualCustomer.java new file mode 100644 index 00000000..bc0975db --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateIndividualCustomer.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateIndividualCustomerAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateIndividualCustomer + */ +@JsonPropertyOrder({ + UpdateIndividualCustomer.JSON_PROPERTY_TYPE, + UpdateIndividualCustomer.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateIndividualCustomer { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private UpdateIndividualCustomerAttributes attributes; + + public UpdateIndividualCustomer() { + } + + public UpdateIndividualCustomer type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public UpdateIndividualCustomer attributes(UpdateIndividualCustomerAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UpdateIndividualCustomerAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(UpdateIndividualCustomerAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this updateIndividualCustomer object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateIndividualCustomer updateIndividualCustomer = (UpdateIndividualCustomer) o; + return Objects.equals(this.type, updateIndividualCustomer.type) && + Objects.equals(this.attributes, updateIndividualCustomer.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateIndividualCustomer {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateIndividualCustomerAttributes.java b/src/main/java/unit/java/sdk/model/UpdateIndividualCustomerAttributes.java new file mode 100644 index 00000000..2b2e4548 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateIndividualCustomerAttributes.java @@ -0,0 +1,427 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.AuthorizedUser; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateIndividualCustomerAttributes + */ +@JsonPropertyOrder({ + UpdateIndividualCustomerAttributes.JSON_PROPERTY_EMAIL, + UpdateIndividualCustomerAttributes.JSON_PROPERTY_PHONE, + UpdateIndividualCustomerAttributes.JSON_PROPERTY_ADDRESS, + UpdateIndividualCustomerAttributes.JSON_PROPERTY_DBA, + UpdateIndividualCustomerAttributes.JSON_PROPERTY_TAGS, + UpdateIndividualCustomerAttributes.JSON_PROPERTY_AUTHORIZED_USERS, + UpdateIndividualCustomerAttributes.JSON_PROPERTY_JWT_SUBJECT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateIndividualCustomerAttributes { + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_PHONE = "phone"; + private Phone phone; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public static final String JSON_PROPERTY_DBA = "dba"; + private JsonNullable dba = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_AUTHORIZED_USERS = "authorizedUsers"; + private JsonNullable> authorizedUsers = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_JWT_SUBJECT = "jwtSubject"; + private JsonNullable jwtSubject = JsonNullable.undefined(); + + public UpdateIndividualCustomerAttributes() { + } + + public UpdateIndividualCustomerAttributes email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public UpdateIndividualCustomerAttributes phone(Phone phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Phone getPhone() { + return phone; + } + + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(Phone phone) { + this.phone = phone; + } + + + public UpdateIndividualCustomerAttributes address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(Address address) { + this.address = address; + } + + + public UpdateIndividualCustomerAttributes dba(String dba) { + this.dba = JsonNullable.of(dba); + return this; + } + + /** + * Get dba + * @return dba + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDba() { + return dba.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DBA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDba_JsonNullable() { + return dba; + } + + @JsonProperty(JSON_PROPERTY_DBA) + public void setDba_JsonNullable(JsonNullable dba) { + this.dba = dba; + } + + public void setDba(String dba) { + this.dba = JsonNullable.of(dba); + } + + + public UpdateIndividualCustomerAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public UpdateIndividualCustomerAttributes authorizedUsers(List authorizedUsers) { + this.authorizedUsers = JsonNullable.>of(authorizedUsers); + return this; + } + + public UpdateIndividualCustomerAttributes addAuthorizedUsersItem(AuthorizedUser authorizedUsersItem) { + if (this.authorizedUsers == null || !this.authorizedUsers.isPresent()) { + this.authorizedUsers = JsonNullable.>of(new ArrayList<>()); + } + try { + this.authorizedUsers.get().add(authorizedUsersItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get authorizedUsers + * @return authorizedUsers + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getAuthorizedUsers() { + return authorizedUsers.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AUTHORIZED_USERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAuthorizedUsers_JsonNullable() { + return authorizedUsers; + } + + @JsonProperty(JSON_PROPERTY_AUTHORIZED_USERS) + public void setAuthorizedUsers_JsonNullable(JsonNullable> authorizedUsers) { + this.authorizedUsers = authorizedUsers; + } + + public void setAuthorizedUsers(List authorizedUsers) { + this.authorizedUsers = JsonNullable.>of(authorizedUsers); + } + + + public UpdateIndividualCustomerAttributes jwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + return this; + } + + /** + * Get jwtSubject + * @return jwtSubject + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getJwtSubject() { + return jwtSubject.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getJwtSubject_JsonNullable() { + return jwtSubject; + } + + @JsonProperty(JSON_PROPERTY_JWT_SUBJECT) + public void setJwtSubject_JsonNullable(JsonNullable jwtSubject) { + this.jwtSubject = jwtSubject; + } + + public void setJwtSubject(String jwtSubject) { + this.jwtSubject = JsonNullable.of(jwtSubject); + } + + + /** + * Return true if this updateIndividualCustomer_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateIndividualCustomerAttributes updateIndividualCustomerAttributes = (UpdateIndividualCustomerAttributes) o; + return Objects.equals(this.email, updateIndividualCustomerAttributes.email) && + Objects.equals(this.phone, updateIndividualCustomerAttributes.phone) && + Objects.equals(this.address, updateIndividualCustomerAttributes.address) && + equalsNullable(this.dba, updateIndividualCustomerAttributes.dba) && + Objects.equals(this.tags, updateIndividualCustomerAttributes.tags) && + equalsNullable(this.authorizedUsers, updateIndividualCustomerAttributes.authorizedUsers) && + equalsNullable(this.jwtSubject, updateIndividualCustomerAttributes.jwtSubject); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(email, phone, address, hashCodeNullable(dba), tags, hashCodeNullable(authorizedUsers), hashCodeNullable(jwtSubject)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateIndividualCustomerAttributes {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" dba: ").append(toIndentedString(dba)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" authorizedUsers: ").append(toIndentedString(authorizedUsers)).append("\n"); + sb.append(" jwtSubject: ").append(toIndentedString(jwtSubject)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + // add `dba` to the URL query string + if (getDba() != null) { + joiner.add(String.format("%sdba%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDba()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `authorizedUsers` to the URL query string + if (getAuthorizedUsers() != null) { + for (int i = 0; i < getAuthorizedUsers().size(); i++) { + if (getAuthorizedUsers().get(i) != null) { + joiner.add(getAuthorizedUsers().get(i).toUrlQueryString(String.format("%sauthorizedUsers%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `jwtSubject` to the URL query string + if (getJwtSubject() != null) { + joiner.add(String.format("%sjwtSubject%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getJwtSubject()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdatePayment.java b/src/main/java/unit/java/sdk/model/UpdatePayment.java new file mode 100644 index 00000000..65e71194 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdatePayment.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdatePaymentData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdatePayment + */ +@JsonPropertyOrder({ + UpdatePayment.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdatePayment { + public static final String JSON_PROPERTY_DATA = "data"; + private UpdatePaymentData data; + + public UpdatePayment() { + } + + public UpdatePayment data(UpdatePaymentData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UpdatePaymentData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(UpdatePaymentData data) { + this.data = data; + } + + + /** + * Return true if this update_payment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePayment updatePayment = (UpdatePayment) o; + return Objects.equals(this.data, updatePayment.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdatePayment {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdatePaymentData.java b/src/main/java/unit/java/sdk/model/UpdatePaymentData.java new file mode 100644 index 00000000..50b27994 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdatePaymentData.java @@ -0,0 +1,297 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchAchPayment; +import unit.java.sdk.model.PatchBookPayment; +import unit.java.sdk.model.PatchTrustApplicationAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import unit.java.sdk.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = UpdatePaymentData.UpdatePaymentDataDeserializer.class) +@JsonSerialize(using = UpdatePaymentData.UpdatePaymentDataSerializer.class) +public class UpdatePaymentData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(UpdatePaymentData.class.getName()); + + public static class UpdatePaymentDataSerializer extends StdSerializer { + public UpdatePaymentDataSerializer(Class t) { + super(t); + } + + public UpdatePaymentDataSerializer() { + this(null); + } + + @Override + public void serialize(UpdatePaymentData value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class UpdatePaymentDataDeserializer extends StdDeserializer { + public UpdatePaymentDataDeserializer() { + this(UpdatePaymentData.class); + } + + public UpdatePaymentDataDeserializer(Class vc) { + super(vc); + } + + @Override + public UpdatePaymentData deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize PatchAchPayment + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchAchPayment.class.equals(Integer.class) || PatchAchPayment.class.equals(Long.class) || PatchAchPayment.class.equals(Float.class) || PatchAchPayment.class.equals(Double.class) || PatchAchPayment.class.equals(Boolean.class) || PatchAchPayment.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchAchPayment.class.equals(Integer.class) || PatchAchPayment.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchAchPayment.class.equals(Float.class) || PatchAchPayment.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchAchPayment.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchAchPayment.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchAchPayment.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchAchPayment'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchAchPayment'", e); + } + + // deserialize PatchBookPayment + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchBookPayment.class.equals(Integer.class) || PatchBookPayment.class.equals(Long.class) || PatchBookPayment.class.equals(Float.class) || PatchBookPayment.class.equals(Double.class) || PatchBookPayment.class.equals(Boolean.class) || PatchBookPayment.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchBookPayment.class.equals(Integer.class) || PatchBookPayment.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchBookPayment.class.equals(Float.class) || PatchBookPayment.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchBookPayment.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchBookPayment.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchBookPayment.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchBookPayment'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchBookPayment'", e); + } + + if (match == 1) { + UpdatePaymentData ret = new UpdatePaymentData(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for UpdatePaymentData: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public UpdatePaymentData getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "UpdatePaymentData cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public UpdatePaymentData() { + super("oneOf", Boolean.FALSE); + } + + public UpdatePaymentData(PatchAchPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public UpdatePaymentData(PatchBookPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("PatchAchPayment", PatchAchPayment.class); + schemas.put("PatchBookPayment", PatchBookPayment.class); + JSON.registerDescendants(UpdatePaymentData.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return UpdatePaymentData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * PatchAchPayment, PatchBookPayment + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(PatchAchPayment.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PatchBookPayment.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be PatchAchPayment, PatchBookPayment"); + } + + /** + * Get the actual instance, which can be the following: + * PatchAchPayment, PatchBookPayment + * + * @return The actual instance (PatchAchPayment, PatchBookPayment) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchAchPayment`. If the actual instance is not `PatchAchPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchAchPayment` + * @throws ClassCastException if the instance is not `PatchAchPayment` + */ + public PatchAchPayment getPatchAchPayment() throws ClassCastException { + return (PatchAchPayment)super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchBookPayment`. If the actual instance is not `PatchBookPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchBookPayment` + * @throws ClassCastException if the instance is not `PatchBookPayment` + */ + public PatchBookPayment getPatchBookPayment() throws ClassCastException { + return (PatchBookPayment)super.getActualInstance(); + } + + + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof PatchAchPayment) { + if (getActualInstance() != null) { + joiner.add(((PatchAchPayment)getActualInstance()).toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof PatchBookPayment) { + if (getActualInstance() != null) { + joiner.add(((PatchBookPayment)getActualInstance()).toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } + +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateReceivedPayment.java b/src/main/java/unit/java/sdk/model/UpdateReceivedPayment.java new file mode 100644 index 00000000..988ba0b8 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateReceivedPayment.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateReceivedPaymentData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateReceivedPayment + */ +@JsonPropertyOrder({ + UpdateReceivedPayment.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateReceivedPayment { + public static final String JSON_PROPERTY_DATA = "data"; + private UpdateReceivedPaymentData data; + + public UpdateReceivedPayment() { + } + + public UpdateReceivedPayment data(UpdateReceivedPaymentData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UpdateReceivedPaymentData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(UpdateReceivedPaymentData data) { + this.data = data; + } + + + /** + * Return true if this update_received_payment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateReceivedPayment updateReceivedPayment = (UpdateReceivedPayment) o; + return Objects.equals(this.data, updateReceivedPayment.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateReceivedPayment {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateReceivedPaymentData.java b/src/main/java/unit/java/sdk/model/UpdateReceivedPaymentData.java new file mode 100644 index 00000000..1e4856f4 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateReceivedPaymentData.java @@ -0,0 +1,242 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchAchReceivedPayment; +import unit.java.sdk.model.PatchTrustApplicationAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import unit.java.sdk.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = UpdateReceivedPaymentData.UpdateReceivedPaymentDataDeserializer.class) +@JsonSerialize(using = UpdateReceivedPaymentData.UpdateReceivedPaymentDataSerializer.class) +public class UpdateReceivedPaymentData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(UpdateReceivedPaymentData.class.getName()); + + public static class UpdateReceivedPaymentDataSerializer extends StdSerializer { + public UpdateReceivedPaymentDataSerializer(Class t) { + super(t); + } + + public UpdateReceivedPaymentDataSerializer() { + this(null); + } + + @Override + public void serialize(UpdateReceivedPaymentData value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class UpdateReceivedPaymentDataDeserializer extends StdDeserializer { + public UpdateReceivedPaymentDataDeserializer() { + this(UpdateReceivedPaymentData.class); + } + + public UpdateReceivedPaymentDataDeserializer(Class vc) { + super(vc); + } + + @Override + public UpdateReceivedPaymentData deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize PatchAchReceivedPayment + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchAchReceivedPayment.class.equals(Integer.class) || PatchAchReceivedPayment.class.equals(Long.class) || PatchAchReceivedPayment.class.equals(Float.class) || PatchAchReceivedPayment.class.equals(Double.class) || PatchAchReceivedPayment.class.equals(Boolean.class) || PatchAchReceivedPayment.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchAchReceivedPayment.class.equals(Integer.class) || PatchAchReceivedPayment.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchAchReceivedPayment.class.equals(Float.class) || PatchAchReceivedPayment.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchAchReceivedPayment.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchAchReceivedPayment.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchAchReceivedPayment.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchAchReceivedPayment'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchAchReceivedPayment'", e); + } + + if (match == 1) { + UpdateReceivedPaymentData ret = new UpdateReceivedPaymentData(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for UpdateReceivedPaymentData: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public UpdateReceivedPaymentData getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "UpdateReceivedPaymentData cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public UpdateReceivedPaymentData() { + super("oneOf", Boolean.FALSE); + } + + public UpdateReceivedPaymentData(PatchAchReceivedPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("PatchAchReceivedPayment", PatchAchReceivedPayment.class); + JSON.registerDescendants(UpdateReceivedPaymentData.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return UpdateReceivedPaymentData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * PatchAchReceivedPayment + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(PatchAchReceivedPayment.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be PatchAchReceivedPayment"); + } + + /** + * Get the actual instance, which can be the following: + * PatchAchReceivedPayment + * + * @return The actual instance (PatchAchReceivedPayment) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchAchReceivedPayment`. If the actual instance is not `PatchAchReceivedPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchAchReceivedPayment` + * @throws ClassCastException if the instance is not `PatchAchReceivedPayment` + */ + public PatchAchReceivedPayment getPatchAchReceivedPayment() throws ClassCastException { + return (PatchAchReceivedPayment)super.getActualInstance(); + } + + + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof PatchAchReceivedPayment) { + if (getActualInstance() != null) { + joiner.add(((PatchAchReceivedPayment)getActualInstance()).toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + return null; + } + +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateTransaction.java b/src/main/java/unit/java/sdk/model/UpdateTransaction.java new file mode 100644 index 00000000..efb862d9 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateTransaction.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateTransactionData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateTransaction + */ +@JsonPropertyOrder({ + UpdateTransaction.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateTransaction { + public static final String JSON_PROPERTY_DATA = "data"; + private UpdateTransactionData data; + + public UpdateTransaction() { + } + + public UpdateTransaction data(UpdateTransactionData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UpdateTransactionData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(UpdateTransactionData data) { + this.data = data; + } + + + /** + * Return true if this update_transaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateTransaction updateTransaction = (UpdateTransaction) o; + return Objects.equals(this.data, updateTransaction.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateTransaction {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateTransactionData.java b/src/main/java/unit/java/sdk/model/UpdateTransactionData.java new file mode 100644 index 00000000..f594c649 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateTransactionData.java @@ -0,0 +1,353 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBookTransaction; +import unit.java.sdk.model.PatchBookTransactionAttributes; +import unit.java.sdk.model.PatchBookTransactionRelationships; +import unit.java.sdk.model.PatchChargebackTransaction; +import unit.java.sdk.model.PatchTransactionTags; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import unit.java.sdk.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = UpdateTransactionData.UpdateTransactionDataDeserializer.class) +@JsonSerialize(using = UpdateTransactionData.UpdateTransactionDataSerializer.class) +public class UpdateTransactionData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(UpdateTransactionData.class.getName()); + + public static class UpdateTransactionDataSerializer extends StdSerializer { + public UpdateTransactionDataSerializer(Class t) { + super(t); + } + + public UpdateTransactionDataSerializer() { + this(null); + } + + @Override + public void serialize(UpdateTransactionData value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class UpdateTransactionDataDeserializer extends StdDeserializer { + public UpdateTransactionDataDeserializer() { + this(UpdateTransactionData.class); + } + + public UpdateTransactionDataDeserializer(Class vc) { + super(vc); + } + + @Override + public UpdateTransactionData deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize PatchBookTransaction + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchBookTransaction.class.equals(Integer.class) || PatchBookTransaction.class.equals(Long.class) || PatchBookTransaction.class.equals(Float.class) || PatchBookTransaction.class.equals(Double.class) || PatchBookTransaction.class.equals(Boolean.class) || PatchBookTransaction.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchBookTransaction.class.equals(Integer.class) || PatchBookTransaction.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchBookTransaction.class.equals(Float.class) || PatchBookTransaction.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchBookTransaction.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchBookTransaction.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchBookTransaction.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchBookTransaction'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchBookTransaction'", e); + } + + // deserialize PatchChargebackTransaction + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchChargebackTransaction.class.equals(Integer.class) || PatchChargebackTransaction.class.equals(Long.class) || PatchChargebackTransaction.class.equals(Float.class) || PatchChargebackTransaction.class.equals(Double.class) || PatchChargebackTransaction.class.equals(Boolean.class) || PatchChargebackTransaction.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchChargebackTransaction.class.equals(Integer.class) || PatchChargebackTransaction.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchChargebackTransaction.class.equals(Float.class) || PatchChargebackTransaction.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchChargebackTransaction.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchChargebackTransaction.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchChargebackTransaction.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchChargebackTransaction'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchChargebackTransaction'", e); + } + + // deserialize PatchTransactionTags + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PatchTransactionTags.class.equals(Integer.class) || PatchTransactionTags.class.equals(Long.class) || PatchTransactionTags.class.equals(Float.class) || PatchTransactionTags.class.equals(Double.class) || PatchTransactionTags.class.equals(Boolean.class) || PatchTransactionTags.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PatchTransactionTags.class.equals(Integer.class) || PatchTransactionTags.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PatchTransactionTags.class.equals(Float.class) || PatchTransactionTags.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PatchTransactionTags.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PatchTransactionTags.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PatchTransactionTags.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'PatchTransactionTags'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PatchTransactionTags'", e); + } + + if (match == 1) { + UpdateTransactionData ret = new UpdateTransactionData(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for UpdateTransactionData: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public UpdateTransactionData getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "UpdateTransactionData cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public UpdateTransactionData() { + super("oneOf", Boolean.FALSE); + } + + public UpdateTransactionData(PatchBookTransaction o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public UpdateTransactionData(PatchChargebackTransaction o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public UpdateTransactionData(PatchTransactionTags o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("PatchBookTransaction", PatchBookTransaction.class); + schemas.put("PatchChargebackTransaction", PatchChargebackTransaction.class); + schemas.put("PatchTransactionTags", PatchTransactionTags.class); + JSON.registerDescendants(UpdateTransactionData.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return UpdateTransactionData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * PatchBookTransaction, PatchChargebackTransaction, PatchTransactionTags + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(PatchBookTransaction.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PatchChargebackTransaction.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PatchTransactionTags.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be PatchBookTransaction, PatchChargebackTransaction, PatchTransactionTags"); + } + + /** + * Get the actual instance, which can be the following: + * PatchBookTransaction, PatchChargebackTransaction, PatchTransactionTags + * + * @return The actual instance (PatchBookTransaction, PatchChargebackTransaction, PatchTransactionTags) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchBookTransaction`. If the actual instance is not `PatchBookTransaction`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchBookTransaction` + * @throws ClassCastException if the instance is not `PatchBookTransaction` + */ + public PatchBookTransaction getPatchBookTransaction() throws ClassCastException { + return (PatchBookTransaction)super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchChargebackTransaction`. If the actual instance is not `PatchChargebackTransaction`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchChargebackTransaction` + * @throws ClassCastException if the instance is not `PatchChargebackTransaction` + */ + public PatchChargebackTransaction getPatchChargebackTransaction() throws ClassCastException { + return (PatchChargebackTransaction)super.getActualInstance(); + } + + /** + * Get the actual instance of `PatchTransactionTags`. If the actual instance is not `PatchTransactionTags`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PatchTransactionTags` + * @throws ClassCastException if the instance is not `PatchTransactionTags` + */ + public PatchTransactionTags getPatchTransactionTags() throws ClassCastException { + return (PatchTransactionTags)super.getActualInstance(); + } + + + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof PatchTransactionTags) { + if (getActualInstance() != null) { + joiner.add(((PatchTransactionTags)getActualInstance()).toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof PatchBookTransaction) { + if (getActualInstance() != null) { + joiner.add(((PatchBookTransaction)getActualInstance()).toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof PatchChargebackTransaction) { + if (getActualInstance() != null) { + joiner.add(((PatchChargebackTransaction)getActualInstance()).toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + return null; + } + +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateTrustCustomer.java b/src/main/java/unit/java/sdk/model/UpdateTrustCustomer.java new file mode 100644 index 00000000..d67e693e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateTrustCustomer.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateTrustCustomerAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateTrustCustomer + */ +@JsonPropertyOrder({ + UpdateTrustCustomer.JSON_PROPERTY_TYPE, + UpdateTrustCustomer.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateTrustCustomer { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private UpdateTrustCustomerAttributes attributes; + + public UpdateTrustCustomer() { + } + + public UpdateTrustCustomer type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public UpdateTrustCustomer attributes(UpdateTrustCustomerAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UpdateTrustCustomerAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(UpdateTrustCustomerAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this updateTrustCustomer object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateTrustCustomer updateTrustCustomer = (UpdateTrustCustomer) o; + return Objects.equals(this.type, updateTrustCustomer.type) && + Objects.equals(this.attributes, updateTrustCustomer.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateTrustCustomer {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateTrustCustomerAttributes.java b/src/main/java/unit/java/sdk/model/UpdateTrustCustomerAttributes.java new file mode 100644 index 00000000..92a18589 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateTrustCustomerAttributes.java @@ -0,0 +1,266 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.AuthorizedUser; +import unit.java.sdk.model.TrustContact; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateTrustCustomerAttributes + */ +@JsonPropertyOrder({ + UpdateTrustCustomerAttributes.JSON_PROPERTY_CONTACT, + UpdateTrustCustomerAttributes.JSON_PROPERTY_TAGS, + UpdateTrustCustomerAttributes.JSON_PROPERTY_AUTHORIZED_USERS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateTrustCustomerAttributes { + public static final String JSON_PROPERTY_CONTACT = "contact"; + private TrustContact contact; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public static final String JSON_PROPERTY_AUTHORIZED_USERS = "authorizedUsers"; + private JsonNullable> authorizedUsers = JsonNullable.>undefined(); + + public UpdateTrustCustomerAttributes() { + } + + public UpdateTrustCustomerAttributes contact(TrustContact contact) { + this.contact = contact; + return this; + } + + /** + * Get contact + * @return contact + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TrustContact getContact() { + return contact; + } + + + @JsonProperty(JSON_PROPERTY_CONTACT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContact(TrustContact contact) { + this.contact = contact; + } + + + public UpdateTrustCustomerAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + public UpdateTrustCustomerAttributes authorizedUsers(List authorizedUsers) { + this.authorizedUsers = JsonNullable.>of(authorizedUsers); + return this; + } + + public UpdateTrustCustomerAttributes addAuthorizedUsersItem(AuthorizedUser authorizedUsersItem) { + if (this.authorizedUsers == null || !this.authorizedUsers.isPresent()) { + this.authorizedUsers = JsonNullable.>of(new ArrayList<>()); + } + try { + this.authorizedUsers.get().add(authorizedUsersItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get authorizedUsers + * @return authorizedUsers + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getAuthorizedUsers() { + return authorizedUsers.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AUTHORIZED_USERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAuthorizedUsers_JsonNullable() { + return authorizedUsers; + } + + @JsonProperty(JSON_PROPERTY_AUTHORIZED_USERS) + public void setAuthorizedUsers_JsonNullable(JsonNullable> authorizedUsers) { + this.authorizedUsers = authorizedUsers; + } + + public void setAuthorizedUsers(List authorizedUsers) { + this.authorizedUsers = JsonNullable.>of(authorizedUsers); + } + + + /** + * Return true if this updateTrustCustomer_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateTrustCustomerAttributes updateTrustCustomerAttributes = (UpdateTrustCustomerAttributes) o; + return Objects.equals(this.contact, updateTrustCustomerAttributes.contact) && + Objects.equals(this.tags, updateTrustCustomerAttributes.tags) && + equalsNullable(this.authorizedUsers, updateTrustCustomerAttributes.authorizedUsers); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(contact, tags, hashCodeNullable(authorizedUsers)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateTrustCustomerAttributes {\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" authorizedUsers: ").append(toIndentedString(authorizedUsers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `contact` to the URL query string + if (getContact() != null) { + joiner.add(getContact().toUrlQueryString(prefix + "contact" + suffix)); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `authorizedUsers` to the URL query string + if (getAuthorizedUsers() != null) { + for (int i = 0; i < getAuthorizedUsers().size(); i++) { + if (getAuthorizedUsers().get(i) != null) { + joiner.add(getAuthorizedUsers().get(i).toUrlQueryString(String.format("%sauthorizedUsers%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateUnitRequest.java b/src/main/java/unit/java/sdk/model/UpdateUnitRequest.java new file mode 100644 index 00000000..30ed3a39 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateUnitRequest.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateUnitRequestData; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateUnitRequest + */ +@JsonPropertyOrder({ + UpdateUnitRequest.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateUnitRequest { + public static final String JSON_PROPERTY_DATA = "data"; + private UpdateUnitRequestData data; + + public UpdateUnitRequest() { + } + + public UpdateUnitRequest data(UpdateUnitRequestData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UpdateUnitRequestData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(UpdateUnitRequestData data) { + this.data = data; + } + + + /** + * Return true if this updateUnitRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateUnitRequest updateUnitRequest = (UpdateUnitRequest) o; + return Objects.equals(this.data, updateUnitRequest.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateUnitRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateUnitRequestData.java b/src/main/java/unit/java/sdk/model/UpdateUnitRequestData.java new file mode 100644 index 00000000..93807d9a --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateUnitRequestData.java @@ -0,0 +1,187 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateUnitRequestDataAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateUnitRequestData + */ +@JsonPropertyOrder({ + UpdateUnitRequestData.JSON_PROPERTY_TYPE, + UpdateUnitRequestData.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateUnitRequestData { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private UpdateUnitRequestDataAttributes attributes; + + public UpdateUnitRequestData() { + } + + public UpdateUnitRequestData type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public UpdateUnitRequestData attributes(UpdateUnitRequestDataAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UpdateUnitRequestDataAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(UpdateUnitRequestDataAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this updateUnitRequest_data object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateUnitRequestData updateUnitRequestData = (UpdateUnitRequestData) o; + return Objects.equals(this.type, updateUnitRequestData.type) && + Objects.equals(this.attributes, updateUnitRequestData.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateUnitRequestData {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/UpdateUnitRequestDataAttributes.java b/src/main/java/unit/java/sdk/model/UpdateUnitRequestDataAttributes.java new file mode 100644 index 00000000..6cc55538 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/UpdateUnitRequestDataAttributes.java @@ -0,0 +1,150 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UpdateUnitRequestDataAttributes + */ +@JsonPropertyOrder({ + UpdateUnitRequestDataAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateUnitRequestDataAttributes { + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public UpdateUnitRequestDataAttributes() { + } + + public UpdateUnitRequestDataAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this updateUnitRequest_data_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateUnitRequestDataAttributes updateUnitRequestDataAttributes = (UpdateUnitRequestDataAttributes) o; + return Objects.equals(this.tags, updateUnitRequestDataAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateUnitRequestDataAttributes {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/VerifyDocument.java b/src/main/java/unit/java/sdk/model/VerifyDocument.java new file mode 100644 index 00000000..525694fc --- /dev/null +++ b/src/main/java/unit/java/sdk/model/VerifyDocument.java @@ -0,0 +1,150 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * VerifyDocument + */ +@JsonPropertyOrder({ + VerifyDocument.JSON_PROPERTY_JOB_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class VerifyDocument { + public static final String JSON_PROPERTY_JOB_ID = "jobId"; + private String jobId; + + public VerifyDocument() { + } + + public VerifyDocument jobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * Get jobId + * @return jobId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_JOB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getJobId() { + return jobId; + } + + + @JsonProperty(JSON_PROPERTY_JOB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setJobId(String jobId) { + this.jobId = jobId; + } + + + /** + * Return true if this VerifyDocument object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VerifyDocument verifyDocument = (VerifyDocument) o; + return Objects.equals(this.jobId, verifyDocument.jobId); + } + + @Override + public int hashCode() { + return Objects.hash(jobId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VerifyDocument {\n"); + sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `jobId` to the URL query string + if (getJobId() != null) { + joiner.add(String.format("%sjobId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getJobId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/VirtualCardStatus.java b/src/main/java/unit/java/sdk/model/VirtualCardStatus.java new file mode 100644 index 00000000..07a5f153 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/VirtualCardStatus.java @@ -0,0 +1,90 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets virtualCardStatus + */ +public enum VirtualCardStatus { + + ACTIVE("Active"), + + INACTIVE("Inactive"), + + STOLEN("Stolen"), + + LOST("Lost"), + + FROZEN("Frozen"), + + CLOSEDBYCUSTOMER("ClosedByCustomer"), + + UNKNOWN("Unknown"), + + SUSPECTEDFRAUD("SuspectedFraud"); + + private String value; + + VirtualCardStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static VirtualCardStatus fromValue(String value) { + for (VirtualCardStatus b : VirtualCardStatus.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } + +} + diff --git a/src/main/java/unit/java/sdk/model/Webhook.java b/src/main/java/unit/java/sdk/model/Webhook.java new file mode 100644 index 00000000..bb69ca04 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/Webhook.java @@ -0,0 +1,223 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.WebhookAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Webhook + */ +@JsonPropertyOrder({ + Webhook.JSON_PROPERTY_TYPE, + Webhook.JSON_PROPERTY_ID, + Webhook.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Webhook { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type = "webhook"; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private WebhookAttributes attributes; + + public Webhook() { + } + + public Webhook type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + + public Webhook id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + + public Webhook attributes(WebhookAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public WebhookAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(WebhookAttributes attributes) { + this.attributes = attributes; + } + + + /** + * Return true if this webhook object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Webhook webhook = (Webhook) o; + return Objects.equals(this.type, webhook.type) && + Objects.equals(this.id, webhook.id) && + Objects.equals(this.attributes, webhook.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Webhook {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/WebhookAttributes.java b/src/main/java/unit/java/sdk/model/WebhookAttributes.java new file mode 100644 index 00000000..8f9288cd --- /dev/null +++ b/src/main/java/unit/java/sdk/model/WebhookAttributes.java @@ -0,0 +1,473 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * WebhookAttributes + */ +@JsonPropertyOrder({ + WebhookAttributes.JSON_PROPERTY_CREATED_AT, + WebhookAttributes.JSON_PROPERTY_LABEL, + WebhookAttributes.JSON_PROPERTY_URL, + WebhookAttributes.JSON_PROPERTY_STATUS, + WebhookAttributes.JSON_PROPERTY_CONTENT_TYPE, + WebhookAttributes.JSON_PROPERTY_DELIVERY_MODE, + WebhookAttributes.JSON_PROPERTY_TOKEN, + WebhookAttributes.JSON_PROPERTY_SUBSCRIPTION_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class WebhookAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_LABEL = "label"; + private String label; + + public static final String JSON_PROPERTY_URL = "url"; + private String url; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + /** + * Gets or Sets contentType + */ + public enum ContentTypeEnum { + JSON("Json"), + + JSONAPI("JsonAPI"); + + private String value; + + ContentTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ContentTypeEnum fromValue(String value) { + for (ContentTypeEnum b : ContentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_CONTENT_TYPE = "contentType"; + private ContentTypeEnum contentType; + + /** + * Gets or Sets deliveryMode + */ + public enum DeliveryModeEnum { + ATMOSTONCE("AtMostOnce"), + + ATLEASTONCE("AtLeastOnce"); + + private String value; + + DeliveryModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DeliveryModeEnum fromValue(String value) { + for (DeliveryModeEnum b : DeliveryModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DELIVERY_MODE = "deliveryMode"; + private DeliveryModeEnum deliveryMode; + + public static final String JSON_PROPERTY_TOKEN = "token"; + private String token; + + public static final String JSON_PROPERTY_SUBSCRIPTION_TYPE = "subscriptionType"; + private String subscriptionType; + + public WebhookAttributes() { + } + + public WebhookAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public WebhookAttributes label(String label) { + this.label = label; + return this; + } + + /** + * Get label + * @return label + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLabel() { + return label; + } + + + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLabel(String label) { + this.label = label; + } + + + public WebhookAttributes url(String url) { + this.url = url; + return this; + } + + /** + * Get url + * @return url + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUrl() { + return url; + } + + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUrl(String url) { + this.url = url; + } + + + public WebhookAttributes status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(String status) { + this.status = status; + } + + + public WebhookAttributes contentType(ContentTypeEnum contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get contentType + * @return contentType + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ContentTypeEnum getContentType() { + return contentType; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContentType(ContentTypeEnum contentType) { + this.contentType = contentType; + } + + + public WebhookAttributes deliveryMode(DeliveryModeEnum deliveryMode) { + this.deliveryMode = deliveryMode; + return this; + } + + /** + * Get deliveryMode + * @return deliveryMode + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELIVERY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DeliveryModeEnum getDeliveryMode() { + return deliveryMode; + } + + + @JsonProperty(JSON_PROPERTY_DELIVERY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeliveryMode(DeliveryModeEnum deliveryMode) { + this.deliveryMode = deliveryMode; + } + + + public WebhookAttributes token(String token) { + this.token = token; + return this; + } + + /** + * Get token + * @return token + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getToken() { + return token; + } + + + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setToken(String token) { + this.token = token; + } + + + public WebhookAttributes subscriptionType(String subscriptionType) { + this.subscriptionType = subscriptionType; + return this; + } + + /** + * Get subscriptionType + * @return subscriptionType + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBSCRIPTION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSubscriptionType() { + return subscriptionType; + } + + + @JsonProperty(JSON_PROPERTY_SUBSCRIPTION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubscriptionType(String subscriptionType) { + this.subscriptionType = subscriptionType; + } + + + /** + * Return true if this webhook_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookAttributes webhookAttributes = (WebhookAttributes) o; + return Objects.equals(this.createdAt, webhookAttributes.createdAt) && + Objects.equals(this.label, webhookAttributes.label) && + Objects.equals(this.url, webhookAttributes.url) && + Objects.equals(this.status, webhookAttributes.status) && + Objects.equals(this.contentType, webhookAttributes.contentType) && + Objects.equals(this.deliveryMode, webhookAttributes.deliveryMode) && + Objects.equals(this.token, webhookAttributes.token) && + Objects.equals(this.subscriptionType, webhookAttributes.subscriptionType); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, label, url, status, contentType, deliveryMode, token, subscriptionType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" label: ").append(toIndentedString(label)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" contentType: ").append(toIndentedString(contentType)).append("\n"); + sb.append(" deliveryMode: ").append(toIndentedString(deliveryMode)).append("\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" subscriptionType: ").append(toIndentedString(subscriptionType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `label` to the URL query string + if (getLabel() != null) { + joiner.add(String.format("%slabel%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLabel()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `url` to the URL query string + if (getUrl() != null) { + joiner.add(String.format("%surl%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUrl()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `contentType` to the URL query string + if (getContentType() != null) { + joiner.add(String.format("%scontentType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getContentType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `deliveryMode` to the URL query string + if (getDeliveryMode() != null) { + joiner.add(String.format("%sdeliveryMode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDeliveryMode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `token` to the URL query string + if (getToken() != null) { + joiner.add(String.format("%stoken%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getToken()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `subscriptionType` to the URL query string + if (getSubscriptionType() != null) { + joiner.add(String.format("%ssubscriptionType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSubscriptionType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/WireCounterparty.java b/src/main/java/unit/java/sdk/model/WireCounterparty.java new file mode 100644 index 00000000..a132ef00 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/WireCounterparty.java @@ -0,0 +1,259 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * WireCounterparty + */ +@JsonPropertyOrder({ + WireCounterparty.JSON_PROPERTY_ROUTING_NUMBER, + WireCounterparty.JSON_PROPERTY_ACCOUNT_NUMBER, + WireCounterparty.JSON_PROPERTY_NAME, + WireCounterparty.JSON_PROPERTY_ADDRESS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class WireCounterparty { + public static final String JSON_PROPERTY_ROUTING_NUMBER = "routingNumber"; + private String routingNumber; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + private String accountNumber; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private Address address; + + public WireCounterparty() { + } + + public WireCounterparty routingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; + } + + /** + * Get routingNumber + * @return routingNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getRoutingNumber() { + return routingNumber; + } + + + @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + } + + + public WireCounterparty accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getAccountNumber() { + return accountNumber; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public WireCounterparty name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public WireCounterparty address(Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Address getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(Address address) { + this.address = address; + } + + + /** + * Return true if this wireCounterparty object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WireCounterparty wireCounterparty = (WireCounterparty) o; + return Objects.equals(this.routingNumber, wireCounterparty.routingNumber) && + Objects.equals(this.accountNumber, wireCounterparty.accountNumber) && + Objects.equals(this.name, wireCounterparty.name) && + Objects.equals(this.address, wireCounterparty.address); + } + + @Override + public int hashCode() { + return Objects.hash(routingNumber, accountNumber, name, address); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WireCounterparty {\n"); + sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `routingNumber` to the URL query string + if (getRoutingNumber() != null) { + joiner.add(String.format("%sroutingNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRoutingNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add(String.format("%saccountNumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/WirePayment.java b/src/main/java/unit/java/sdk/model/WirePayment.java new file mode 100644 index 00000000..a9aca423 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/WirePayment.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Payment; +import unit.java.sdk.model.PaymentRelationships; +import unit.java.sdk.model.WirePaymentAllOfAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * WirePayment + */ +@JsonPropertyOrder({ + WirePayment.JSON_PROPERTY_ATTRIBUTES, + WirePayment.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class WirePayment extends Payment { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private WirePaymentAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private PaymentRelationships relationships; + + public WirePayment() { + } + + public WirePayment attributes(WirePaymentAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public WirePaymentAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(WirePaymentAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public WirePayment relationships(PaymentRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PaymentRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(PaymentRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public WirePayment type(String type) { + this.setType(type); + return this; + } + + @Override + public WirePayment id(String id) { + this.setId(id); + return this; + } + + /** + * Return true if this WirePayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WirePayment wirePayment = (WirePayment) o; + return Objects.equals(this.attributes, wirePayment.attributes) && + Objects.equals(this.relationships, wirePayment.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WirePayment {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(String.format("%srelationships%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRelationships()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("WirePayment", WirePayment.class); + JSON.registerDiscriminator(WirePayment.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/WirePaymentAllOfAttributes.java b/src/main/java/unit/java/sdk/model/WirePaymentAllOfAttributes.java new file mode 100644 index 00000000..650db8f2 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/WirePaymentAllOfAttributes.java @@ -0,0 +1,519 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.WireCounterparty; +import unit.java.sdk.model.WirePaymentAllOfAttributesImadOmad; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * WirePaymentAllOfAttributes + */ +@JsonPropertyOrder({ + WirePaymentAllOfAttributes.JSON_PROPERTY_CREATED_AT, + WirePaymentAllOfAttributes.JSON_PROPERTY_AMOUNT, + WirePaymentAllOfAttributes.JSON_PROPERTY_DIRECTION, + WirePaymentAllOfAttributes.JSON_PROPERTY_DESCRIPTION, + WirePaymentAllOfAttributes.JSON_PROPERTY_COUNTERPARTY, + WirePaymentAllOfAttributes.JSON_PROPERTY_STATUS, + WirePaymentAllOfAttributes.JSON_PROPERTY_SETTLEMENT_DATE, + WirePaymentAllOfAttributes.JSON_PROPERTY_REASON, + WirePaymentAllOfAttributes.JSON_PROPERTY_IMAD_OMAD +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class WirePaymentAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; + private WireCounterparty counterparty; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + PENDING("Pending"), + + REJECTED("Rejected"), + + CLEARING("Clearing"), + + SENT("Sent"), + + CANCELED("Canceled"), + + RETURNED("Returned"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_SETTLEMENT_DATE = "settlementDate"; + private LocalDate settlementDate; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public static final String JSON_PROPERTY_IMAD_OMAD = "imadOmad"; + private WirePaymentAllOfAttributesImadOmad imadOmad; + + public WirePaymentAllOfAttributes() { + } + + public WirePaymentAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public WirePaymentAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * minimum: 1 + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public WirePaymentAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public WirePaymentAllOfAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + + public WirePaymentAllOfAttributes counterparty(WireCounterparty counterparty) { + this.counterparty = counterparty; + return this; + } + + /** + * Get counterparty + * @return counterparty + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public WireCounterparty getCounterparty() { + return counterparty; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterparty(WireCounterparty counterparty) { + this.counterparty = counterparty; + } + + + public WirePaymentAllOfAttributes status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public WirePaymentAllOfAttributes settlementDate(LocalDate settlementDate) { + this.settlementDate = settlementDate; + return this; + } + + /** + * Get settlementDate + * @return settlementDate + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTLEMENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getSettlementDate() { + return settlementDate; + } + + + @JsonProperty(JSON_PROPERTY_SETTLEMENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSettlementDate(LocalDate settlementDate) { + this.settlementDate = settlementDate; + } + + + public WirePaymentAllOfAttributes reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(String reason) { + this.reason = reason; + } + + + public WirePaymentAllOfAttributes imadOmad(WirePaymentAllOfAttributesImadOmad imadOmad) { + this.imadOmad = imadOmad; + return this; + } + + /** + * Get imadOmad + * @return imadOmad + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IMAD_OMAD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public WirePaymentAllOfAttributesImadOmad getImadOmad() { + return imadOmad; + } + + + @JsonProperty(JSON_PROPERTY_IMAD_OMAD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setImadOmad(WirePaymentAllOfAttributesImadOmad imadOmad) { + this.imadOmad = imadOmad; + } + + + /** + * Return true if this WirePayment_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WirePaymentAllOfAttributes wirePaymentAllOfAttributes = (WirePaymentAllOfAttributes) o; + return Objects.equals(this.createdAt, wirePaymentAllOfAttributes.createdAt) && + Objects.equals(this.amount, wirePaymentAllOfAttributes.amount) && + Objects.equals(this.direction, wirePaymentAllOfAttributes.direction) && + Objects.equals(this.description, wirePaymentAllOfAttributes.description) && + Objects.equals(this.counterparty, wirePaymentAllOfAttributes.counterparty) && + Objects.equals(this.status, wirePaymentAllOfAttributes.status) && + Objects.equals(this.settlementDate, wirePaymentAllOfAttributes.settlementDate) && + Objects.equals(this.reason, wirePaymentAllOfAttributes.reason) && + Objects.equals(this.imadOmad, wirePaymentAllOfAttributes.imadOmad); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, amount, direction, description, counterparty, status, settlementDate, reason, imadOmad); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WirePaymentAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" settlementDate: ").append(toIndentedString(settlementDate)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" imadOmad: ").append(toIndentedString(imadOmad)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterparty` to the URL query string + if (getCounterparty() != null) { + joiner.add(getCounterparty().toUrlQueryString(prefix + "counterparty" + suffix)); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `settlementDate` to the URL query string + if (getSettlementDate() != null) { + joiner.add(String.format("%ssettlementDate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSettlementDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReason()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `imadOmad` to the URL query string + if (getImadOmad() != null) { + joiner.add(getImadOmad().toUrlQueryString(prefix + "imadOmad" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/WirePaymentAllOfAttributesImadOmad.java b/src/main/java/unit/java/sdk/model/WirePaymentAllOfAttributesImadOmad.java new file mode 100644 index 00000000..6e021d78 --- /dev/null +++ b/src/main/java/unit/java/sdk/model/WirePaymentAllOfAttributesImadOmad.java @@ -0,0 +1,186 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * WirePaymentAllOfAttributesImadOmad + */ +@JsonPropertyOrder({ + WirePaymentAllOfAttributesImadOmad.JSON_PROPERTY_IMAD, + WirePaymentAllOfAttributesImadOmad.JSON_PROPERTY_OMAD +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class WirePaymentAllOfAttributesImadOmad { + public static final String JSON_PROPERTY_IMAD = "imad"; + private String imad; + + public static final String JSON_PROPERTY_OMAD = "omad"; + private String omad; + + public WirePaymentAllOfAttributesImadOmad() { + } + + public WirePaymentAllOfAttributesImadOmad imad(String imad) { + this.imad = imad; + return this; + } + + /** + * Get imad + * @return imad + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IMAD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getImad() { + return imad; + } + + + @JsonProperty(JSON_PROPERTY_IMAD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setImad(String imad) { + this.imad = imad; + } + + + public WirePaymentAllOfAttributesImadOmad omad(String omad) { + this.omad = omad; + return this; + } + + /** + * Get omad + * @return omad + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OMAD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOmad() { + return omad; + } + + + @JsonProperty(JSON_PROPERTY_OMAD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOmad(String omad) { + this.omad = omad; + } + + + /** + * Return true if this WirePayment_allOf_attributes_imadOmad object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WirePaymentAllOfAttributesImadOmad wirePaymentAllOfAttributesImadOmad = (WirePaymentAllOfAttributesImadOmad) o; + return Objects.equals(this.imad, wirePaymentAllOfAttributesImadOmad.imad) && + Objects.equals(this.omad, wirePaymentAllOfAttributesImadOmad.omad); + } + + @Override + public int hashCode() { + return Objects.hash(imad, omad); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WirePaymentAllOfAttributesImadOmad {\n"); + sb.append(" imad: ").append(toIndentedString(imad)).append("\n"); + sb.append(" omad: ").append(toIndentedString(omad)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `imad` to the URL query string + if (getImad() != null) { + joiner.add(String.format("%simad%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getImad()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `omad` to the URL query string + if (getOmad() != null) { + joiner.add(String.format("%somad%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOmad()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/unit/java/sdk/model/WireTransaction.java b/src/main/java/unit/java/sdk/model/WireTransaction.java new file mode 100644 index 00000000..272255be --- /dev/null +++ b/src/main/java/unit/java/sdk/model/WireTransaction.java @@ -0,0 +1,229 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import unit.java.sdk.model.WireTransactionAllOfAttributes; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import unit.java.sdk.JSON; +/** + * WireTransaction + */ +@JsonPropertyOrder({ + WireTransaction.JSON_PROPERTY_ATTRIBUTES, + WireTransaction.JSON_PROPERTY_RELATIONSHIPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class WireTransaction extends Transaction { + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private WireTransactionAllOfAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TransactionRelationships relationships; + + public WireTransaction() { + } + + public WireTransaction attributes(WireTransactionAllOfAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public WireTransactionAllOfAttributes getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(WireTransactionAllOfAttributes attributes) { + this.attributes = attributes; + } + + + public WireTransaction relationships(TransactionRelationships relationships) { + this.relationships = relationships; + return this; + } + + /** + * Get relationships + * @return relationships + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionRelationships getRelationships() { + return relationships; + } + + + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRelationships(TransactionRelationships relationships) { + this.relationships = relationships; + } + + + @Override + public WireTransaction id(String id) { + this.setId(id); + return this; + } + + @Override + public WireTransaction type(String type) { + this.setType(type); + return this; + } + + /** + * Return true if this WireTransaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WireTransaction wireTransaction = (WireTransaction) o; + return Objects.equals(this.attributes, wireTransaction.attributes) && + Objects.equals(this.relationships, wireTransaction.relationships) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WireTransaction {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `relationships` to the URL query string + if (getRelationships() != null) { + joiner.add(getRelationships().toUrlQueryString(prefix + "relationships" + suffix)); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("WireTransaction", WireTransaction.class); + JSON.registerDiscriminator(WireTransaction.class, "type", mappings); +} +} + diff --git a/src/main/java/unit/java/sdk/model/WireTransactionAllOfAttributes.java b/src/main/java/unit/java/sdk/model/WireTransactionAllOfAttributes.java new file mode 100644 index 00000000..8f64a12e --- /dev/null +++ b/src/main/java/unit/java/sdk/model/WireTransactionAllOfAttributes.java @@ -0,0 +1,656 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty; +import unit.java.sdk.model.WirePaymentAllOfAttributesImadOmad; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * WireTransactionAllOfAttributes + */ +@JsonPropertyOrder({ + WireTransactionAllOfAttributes.JSON_PROPERTY_CREATED_AT, + WireTransactionAllOfAttributes.JSON_PROPERTY_DIRECTION, + WireTransactionAllOfAttributes.JSON_PROPERTY_AMOUNT, + WireTransactionAllOfAttributes.JSON_PROPERTY_BALANCE, + WireTransactionAllOfAttributes.JSON_PROPERTY_SUMMARY, + WireTransactionAllOfAttributes.JSON_PROPERTY_COUNTERPARTY, + WireTransactionAllOfAttributes.JSON_PROPERTY_DESCRIPTION, + WireTransactionAllOfAttributes.JSON_PROPERTY_SENDER_REFERENCE, + WireTransactionAllOfAttributes.JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY, + WireTransactionAllOfAttributes.JSON_PROPERTY_ORIGINATOR_TO_BENEFICIARY_INFORMATION, + WireTransactionAllOfAttributes.JSON_PROPERTY_BENEFICIARY_INFORMATION, + WireTransactionAllOfAttributes.JSON_PROPERTY_BENEFICIARY_ADVICE_INFORMATION, + WireTransactionAllOfAttributes.JSON_PROPERTY_IMAD_OMAD, + WireTransactionAllOfAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class WireTransactionAllOfAttributes { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** + * Gets or Sets direction + */ + public enum DirectionEnum { + CREDIT("Credit"), + + DEBIT("Debit"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private DirectionEnum direction; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Integer amount; + + public static final String JSON_PROPERTY_BALANCE = "balance"; + private Integer balance; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; + private Counterparty counterparty; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_SENDER_REFERENCE = "senderReference"; + private String senderReference; + + public static final String JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY = "referenceForBeneficiary"; + private String referenceForBeneficiary; + + public static final String JSON_PROPERTY_ORIGINATOR_TO_BENEFICIARY_INFORMATION = "originatorToBeneficiaryInformation"; + private String originatorToBeneficiaryInformation; + + public static final String JSON_PROPERTY_BENEFICIARY_INFORMATION = "beneficiaryInformation"; + private String beneficiaryInformation; + + public static final String JSON_PROPERTY_BENEFICIARY_ADVICE_INFORMATION = "beneficiaryAdviceInformation"; + private String beneficiaryAdviceInformation; + + public static final String JSON_PROPERTY_IMAD_OMAD = "imadOmad"; + private WirePaymentAllOfAttributesImadOmad imadOmad; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Object tags; + + public WireTransactionAllOfAttributes() { + } + + public WireTransactionAllOfAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public WireTransactionAllOfAttributes direction(DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public DirectionEnum getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDirection(DirectionEnum direction) { + this.direction = direction; + } + + + public WireTransactionAllOfAttributes amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(Integer amount) { + this.amount = amount; + } + + + public WireTransactionAllOfAttributes balance(Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalance(Integer balance) { + this.balance = balance; + } + + + public WireTransactionAllOfAttributes summary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(String summary) { + this.summary = summary; + } + + + public WireTransactionAllOfAttributes counterparty(Counterparty counterparty) { + this.counterparty = counterparty; + return this; + } + + /** + * Get counterparty + * @return counterparty + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Counterparty getCounterparty() { + return counterparty; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCounterparty(Counterparty counterparty) { + this.counterparty = counterparty; + } + + + public WireTransactionAllOfAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + + public WireTransactionAllOfAttributes senderReference(String senderReference) { + this.senderReference = senderReference; + return this; + } + + /** + * Get senderReference + * @return senderReference + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SENDER_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSenderReference() { + return senderReference; + } + + + @JsonProperty(JSON_PROPERTY_SENDER_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSenderReference(String senderReference) { + this.senderReference = senderReference; + } + + + public WireTransactionAllOfAttributes referenceForBeneficiary(String referenceForBeneficiary) { + this.referenceForBeneficiary = referenceForBeneficiary; + return this; + } + + /** + * Get referenceForBeneficiary + * @return referenceForBeneficiary + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReferenceForBeneficiary() { + return referenceForBeneficiary; + } + + + @JsonProperty(JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReferenceForBeneficiary(String referenceForBeneficiary) { + this.referenceForBeneficiary = referenceForBeneficiary; + } + + + public WireTransactionAllOfAttributes originatorToBeneficiaryInformation(String originatorToBeneficiaryInformation) { + this.originatorToBeneficiaryInformation = originatorToBeneficiaryInformation; + return this; + } + + /** + * Get originatorToBeneficiaryInformation + * @return originatorToBeneficiaryInformation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORIGINATOR_TO_BENEFICIARY_INFORMATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOriginatorToBeneficiaryInformation() { + return originatorToBeneficiaryInformation; + } + + + @JsonProperty(JSON_PROPERTY_ORIGINATOR_TO_BENEFICIARY_INFORMATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOriginatorToBeneficiaryInformation(String originatorToBeneficiaryInformation) { + this.originatorToBeneficiaryInformation = originatorToBeneficiaryInformation; + } + + + public WireTransactionAllOfAttributes beneficiaryInformation(String beneficiaryInformation) { + this.beneficiaryInformation = beneficiaryInformation; + return this; + } + + /** + * Get beneficiaryInformation + * @return beneficiaryInformation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BENEFICIARY_INFORMATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBeneficiaryInformation() { + return beneficiaryInformation; + } + + + @JsonProperty(JSON_PROPERTY_BENEFICIARY_INFORMATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBeneficiaryInformation(String beneficiaryInformation) { + this.beneficiaryInformation = beneficiaryInformation; + } + + + public WireTransactionAllOfAttributes beneficiaryAdviceInformation(String beneficiaryAdviceInformation) { + this.beneficiaryAdviceInformation = beneficiaryAdviceInformation; + return this; + } + + /** + * Get beneficiaryAdviceInformation + * @return beneficiaryAdviceInformation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BENEFICIARY_ADVICE_INFORMATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBeneficiaryAdviceInformation() { + return beneficiaryAdviceInformation; + } + + + @JsonProperty(JSON_PROPERTY_BENEFICIARY_ADVICE_INFORMATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBeneficiaryAdviceInformation(String beneficiaryAdviceInformation) { + this.beneficiaryAdviceInformation = beneficiaryAdviceInformation; + } + + + public WireTransactionAllOfAttributes imadOmad(WirePaymentAllOfAttributesImadOmad imadOmad) { + this.imadOmad = imadOmad; + return this; + } + + /** + * Get imadOmad + * @return imadOmad + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IMAD_OMAD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public WirePaymentAllOfAttributesImadOmad getImadOmad() { + return imadOmad; + } + + + @JsonProperty(JSON_PROPERTY_IMAD_OMAD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setImadOmad(WirePaymentAllOfAttributesImadOmad imadOmad) { + this.imadOmad = imadOmad; + } + + + public WireTransactionAllOfAttributes tags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Get tags + * @return tags + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(Object tags) { + this.tags = tags; + } + + + /** + * Return true if this WireTransaction_allOf_attributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WireTransactionAllOfAttributes wireTransactionAllOfAttributes = (WireTransactionAllOfAttributes) o; + return Objects.equals(this.createdAt, wireTransactionAllOfAttributes.createdAt) && + Objects.equals(this.direction, wireTransactionAllOfAttributes.direction) && + Objects.equals(this.amount, wireTransactionAllOfAttributes.amount) && + Objects.equals(this.balance, wireTransactionAllOfAttributes.balance) && + Objects.equals(this.summary, wireTransactionAllOfAttributes.summary) && + Objects.equals(this.counterparty, wireTransactionAllOfAttributes.counterparty) && + Objects.equals(this.description, wireTransactionAllOfAttributes.description) && + Objects.equals(this.senderReference, wireTransactionAllOfAttributes.senderReference) && + Objects.equals(this.referenceForBeneficiary, wireTransactionAllOfAttributes.referenceForBeneficiary) && + Objects.equals(this.originatorToBeneficiaryInformation, wireTransactionAllOfAttributes.originatorToBeneficiaryInformation) && + Objects.equals(this.beneficiaryInformation, wireTransactionAllOfAttributes.beneficiaryInformation) && + Objects.equals(this.beneficiaryAdviceInformation, wireTransactionAllOfAttributes.beneficiaryAdviceInformation) && + Objects.equals(this.imadOmad, wireTransactionAllOfAttributes.imadOmad) && + Objects.equals(this.tags, wireTransactionAllOfAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, direction, amount, balance, summary, counterparty, description, senderReference, referenceForBeneficiary, originatorToBeneficiaryInformation, beneficiaryInformation, beneficiaryAdviceInformation, imadOmad, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WireTransactionAllOfAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" senderReference: ").append(toIndentedString(senderReference)).append("\n"); + sb.append(" referenceForBeneficiary: ").append(toIndentedString(referenceForBeneficiary)).append("\n"); + sb.append(" originatorToBeneficiaryInformation: ").append(toIndentedString(originatorToBeneficiaryInformation)).append("\n"); + sb.append(" beneficiaryInformation: ").append(toIndentedString(beneficiaryInformation)).append("\n"); + sb.append(" beneficiaryAdviceInformation: ").append(toIndentedString(beneficiaryAdviceInformation)).append("\n"); + sb.append(" imadOmad: ").append(toIndentedString(imadOmad)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `direction` to the URL query string + if (getDirection() != null) { + joiner.add(String.format("%sdirection%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDirection()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add(String.format("%samount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `balance` to the URL query string + if (getBalance() != null) { + joiner.add(String.format("%sbalance%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBalance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `counterparty` to the URL query string + if (getCounterparty() != null) { + joiner.add(getCounterparty().toUrlQueryString(prefix + "counterparty" + suffix)); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `senderReference` to the URL query string + if (getSenderReference() != null) { + joiner.add(String.format("%ssenderReference%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSenderReference()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `referenceForBeneficiary` to the URL query string + if (getReferenceForBeneficiary() != null) { + joiner.add(String.format("%sreferenceForBeneficiary%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReferenceForBeneficiary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `originatorToBeneficiaryInformation` to the URL query string + if (getOriginatorToBeneficiaryInformation() != null) { + joiner.add(String.format("%soriginatorToBeneficiaryInformation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOriginatorToBeneficiaryInformation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `beneficiaryInformation` to the URL query string + if (getBeneficiaryInformation() != null) { + joiner.add(String.format("%sbeneficiaryInformation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBeneficiaryInformation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `beneficiaryAdviceInformation` to the URL query string + if (getBeneficiaryAdviceInformation() != null) { + joiner.add(String.format("%sbeneficiaryAdviceInformation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBeneficiaryAdviceInformation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `imadOmad` to the URL query string + if (getImadOmad() != null) { + joiner.add(getImadOmad().toUrlQueryString(prefix + "imadOmad" + suffix)); + } + + // add `tags` to the URL query string + if (getTags() != null) { + joiner.add(String.format("%stags%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTags()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} + diff --git a/src/test/java/org/openapitools/client/CustomerTests.java b/src/test/java/org/openapitools/client/CustomerTests.java deleted file mode 100644 index f54fced0..00000000 --- a/src/test/java/org/openapitools/client/CustomerTests.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.openapitools.client; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.openapitools.client.api.CreateApplicationApi; -import org.openapitools.client.api.GetCustomerApi; -import org.openapitools.client.api.GetListCustomersApi; -import org.openapitools.client.model.IndividualApplication; -import org.openapitools.client.model.IndividualCustomer; -import org.openapitools.client.model.UnitCreateApplicationResponse; -import org.openapitools.client.model.UnitCustomersListResponse; - -import static org.openapitools.client.TestHelpers.CreateApplicationRequest; - -public class CustomerTests { - @BeforeAll - static void init() { - String access_token = System.getenv("access_token"); - ApiClient cl = new ApiClient(); - cl.setBearerToken(access_token); - Configuration.setDefaultApiClient(cl); - } - - @Test - public void GetCustomersListApiTest() throws ApiException { - GetListCustomersApi api = new GetListCustomersApi(); - - UnitCustomersListResponse response = api.execute(null, null, null); - assert response.getData().size() > 0; - } - - public static IndividualCustomer CreateIndividualCustomer() throws ApiException { - CreateApplicationApi apiClient = new CreateApplicationApi(); - UnitCreateApplicationResponse res = apiClient.execute(CreateApplicationRequest()); - assert res.getData().getType().equals("individualApplication"); - - IndividualApplication app = (IndividualApplication) res.getData(); - String customerId = app.getRelationships().getCustomer().getData().getId(); - GetCustomerApi customerApi = new GetCustomerApi(); - - return (IndividualCustomer) customerApi.execute(customerId).getData(); - } - - @Test - public void CreateIndividualCustomerTest() throws ApiException { - IndividualCustomer customer = CreateIndividualCustomer(); - assert customer.getType().equals("individualCustomer"); - } -} diff --git a/src/test/java/org/openapitools/client/ReceivedPaymentTests.java b/src/test/java/org/openapitools/client/ReceivedPaymentTests.java deleted file mode 100644 index 1b971567..00000000 --- a/src/test/java/org/openapitools/client/ReceivedPaymentTests.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.openapitools.client;//package org.openapitools.client; -// -//import org.junit.jupiter.api.BeforeAll; -//import org.junit.jupiter.api.Test; -//import org.openapitools.client.api.GetReceivedPaymentApi; -//import org.openapitools.client.api.GetReceivedPaymentsListApi; -//import org.openapitools.client.model.UnitReceivedPaymentListResponse; -//import org.openapitools.client.model.UnitReceivedPaymentResponseWithIncluded; -// -//public class ReceivedPaymentTests { -// @BeforeAll -// static void init() { -// String access_token = System.getenv("access_token"); -// ApiClient cl = new ApiClient(); -// cl.setBearerToken(access_token); -// Configuration.setDefaultApiClient(cl); -// } -// -// @Test -// public void GetReceivedPaymentListApiTest() throws ApiException { -// GetReceivedPaymentsListApi api = new GetReceivedPaymentsListApi(); -// -// UnitReceivedPaymentListResponse response = api.execute(null); -// assert response.getData().size() != 0; -// } -// -// @Test -// public void GetReceivedPaymentListWithIncludedApiTest() throws ApiException { -// GetReceivedPaymentsListApi api = new GetReceivedPaymentsListApi(); -// -// UnitReceivedPaymentListResponse response = api.execute(null); -// assert response.getData().size() != 0; -// } -// -// @Test -// public void GetReceivedPaymentApiTest() throws ApiException { -// GetReceivedPaymentsListApi api = new GetReceivedPaymentsListApi(); -// -// UnitReceivedPaymentListResponse response = api.execute(null); -// assert response.getData().size() != 0; -// -// GetReceivedPaymentApi getApi = new GetReceivedPaymentApi(); -// -// response.getData().forEach(x -> { -// try { -// UnitReceivedPaymentResponseWithIncluded payment = getApi.execute(x.getId(), null); -// assert payment.getData().getId().equals(x.getId()); -// assert payment.getData().getAttributes().getAmount().equals(x.getAttributes().getAmount()); -// } catch (ApiException e) { -// throw new RuntimeException(e); -// } -// }); -// } -// -//} diff --git a/src/test/java/org/openapitools/client/RecurringPaymentTests.java b/src/test/java/org/openapitools/client/RecurringPaymentTests.java deleted file mode 100644 index 3cea1aad..00000000 --- a/src/test/java/org/openapitools/client/RecurringPaymentTests.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.openapitools.client;//package org.openapitools.client; -// -//import org.junit.jupiter.api.BeforeAll; -//import org.junit.jupiter.api.Test; -//import org.openapitools.client.api.GetListRecurringPaymentsApi; -//import org.openapitools.client.api.GetRecurringPaymentApi; -//import org.openapitools.client.model.UnitRecurringPaymentListResponse; -//import org.openapitools.client.model.UnitRecurringPaymentResponse; -// -// -//public class RecurringPaymentTests { -// @BeforeAll -// static void init() { -// String access_token = System.getenv("access_token"); -// ApiClient cl = new ApiClient(); -// cl.setBearerToken(access_token); -// Configuration.setDefaultApiClient(cl); -// } -// -// @Test -// public void GetRecurringPaymentListApiTest() throws ApiException { -// GetListRecurringPaymentsApi api = new GetListRecurringPaymentsApi(); -// -// UnitRecurringPaymentListResponse response = api.execute(); -// assert response.getData().size() != 0; -// } -// -// @Test -// public void GetRecurringPaymentApiTest() throws ApiException { -// GetListRecurringPaymentsApi api = new GetListRecurringPaymentsApi(); -// -// UnitRecurringPaymentListResponse response = api.execute(); -// assert response.getData().size() != 0; -// -// GetRecurringPaymentApi getApi = new GetRecurringPaymentApi(); -// -// response.getData().forEach(x -> { -// try { -// UnitRecurringPaymentResponse payment = getApi.execute(x.getId()); -// assert payment.getData().getId().equals(x.getId()); -// assert payment.getData().getType().toLowerCase() -// .equals(payment.getData().getClass().getSimpleName().toLowerCase()); -// } catch (ApiException e) { -// throw new RuntimeException(e); -// } -// }); -// } -// -//} diff --git a/src/test/java/org/openapitools/client/TestHelpers.java b/src/test/java/org/openapitools/client/TestHelpers.java deleted file mode 100644 index 167e2318..00000000 --- a/src/test/java/org/openapitools/client/TestHelpers.java +++ /dev/null @@ -1,73 +0,0 @@ -package org.openapitools.client; - -import org.openapitools.client.model.*; - -import java.time.LocalDate; - -public class TestHelpers { - public static CreateApplication CreateApplicationRequest() { - CreateIndividualApplication createIndividualApplication = new CreateIndividualApplication(); - CreateIndividualApplicationAttributes attr = new CreateIndividualApplicationAttributes(); - - FullName fn = new FullName(); - fn.setFirst("Peter"); - fn.setLast("Parker"); - attr.setFullName(fn); - - Address address = new Address(); - address.setStreet("20 Ingram St"); - address.setCity("Forest Hills"); - address.setPostalCode("11375"); - address.setCountry("US"); - address.setState("NY"); - attr.setAddress(address); - - attr.setSsn("721074426"); - attr.setDateOfBirth(LocalDate.parse("2001-08-10")); - attr.setEmail("peter@oscorp.com"); - Phone p = new Phone(); - p.setNumber("5555555555"); - p.setCountryCode("1"); - attr.setPhone(p); - attr.setIdempotencyKey("3a1a33be-4e12-4603-9ed0-820922389fb8"); - attr.setOccupation(Occupation.ARCHITECTORENGINEER); - - createIndividualApplication.setAttributes(attr); - - CreateApplication ca = new CreateApplication(); - ca.data(new CreateApplicationData(createIndividualApplication)); - - return ca; - } - - public static Counterparty CreateCounterparty() { - Counterparty counterparty = new Counterparty(); - counterparty.setName("Jane Doe"); - counterparty.setRoutingNumber("812345673"); - counterparty.setAccountNumber("12345569"); - counterparty.setAccountType(Counterparty.AccountTypeEnum.CHECKING); - - return counterparty; - } - - public static Address CreateAddress() { - Address address = new Address(); - address.setStreet("20 Ingram St"); - address.setCity("Forest Hills"); - address.setState("CA"); - address.setPostalCode("11375"); - address.setCountry("US"); - - return address; - } - - public static WireCounterparty CreateWireCounterparty() { - WireCounterparty counterparty = new WireCounterparty(); - counterparty.setName("April Oniel"); - counterparty.setAccountNumber("1000000001"); - counterparty.setRoutingNumber("812345678"); - counterparty.setAddress(CreateAddress()); - - return counterparty; - } -} diff --git a/src/test/java/org/openapitools/client/TokenTests.java b/src/test/java/org/openapitools/client/TokenTests.java deleted file mode 100644 index 15fdc497..00000000 --- a/src/test/java/org/openapitools/client/TokenTests.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.openapitools.client; - - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.openapitools.client.api.CreateCustomerTokenApi; -import org.openapitools.client.api.GetListOrgApiTokensApi; -import org.openapitools.client.model.*; - -import java.util.List; - -public class TokenTests { - @BeforeAll - static void init() { - String access_token = System.getenv("access_token"); - ApiClient cl = new ApiClient(); - cl.setBearerToken(access_token); - Configuration.setDefaultApiClient(cl); - } - - @Test - public void GetOrgTokensTest() throws ApiException { - GetListOrgApiTokensApi listApi = new GetListOrgApiTokensApi(); - List response = listApi.execute("252").getData(); - - for (ApiToken t: response) { - assert t.getType().equals("apiToken"); - } - } - - @Test - public void CreateCustomerToken() throws ApiException { - CreateCustomerTokenApi createApi = new CreateCustomerTokenApi(); - - CreateCustomerToken request = new CreateCustomerToken(); - - CreateCustomerTokenData data = new CreateCustomerTokenData(); - CreateCustomerTokenDataAttributes attributes = new CreateCustomerTokenDataAttributes(); - attributes.setScope("customers accounts"); - data.setAttributes(attributes); - request.setData(data); - - UnitCustomerTokenResponse res = createApi.execute("1527981", request); - assert res.getData().getType().equals("customerBearerToken"); - } -} diff --git a/src/test/java/org/openapitools/client/AccountTests.java b/src/test/java/unit/java/sdk/AccountTests.java similarity index 82% rename from src/test/java/org/openapitools/client/AccountTests.java rename to src/test/java/unit/java/sdk/AccountTests.java index 206db844..32f412b4 100644 --- a/src/test/java/org/openapitools/client/AccountTests.java +++ b/src/test/java/unit/java/sdk/AccountTests.java @@ -1,25 +1,21 @@ -package org.openapitools.client; +package unit.java.sdk; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.openapitools.client.api.*; -import org.openapitools.client.model.*; +import org.junit.Test; +import unit.java.sdk.api.CreateAccountApi; +import unit.java.sdk.api.GetAccountApi; +import unit.java.sdk.api.GetListAccountsApi; +import unit.java.sdk.api.UpdateAccountApi; +import unit.java.sdk.model.*; + +import static unit.java.sdk.CustomerTests.CreateIndividualCustomer; +import static unit.java.sdk.TestHelpers.getApiClient; -import static org.openapitools.client.CustomerTests.CreateIndividualCustomer; import java.util.HashMap; public class AccountTests { - @BeforeAll - static void init() { - String access_token = System.getenv("access_token"); - ApiClient cl = new ApiClient(); - cl.setBearerToken(access_token); - Configuration.setDefaultApiClient(cl); - } - @Test public void GetAccountListApiTest() throws ApiException { - GetListAccountsApi api = new GetListAccountsApi(); + GetListAccountsApi api = new GetListAccountsApi(getApiClient()); UnitAccountsListResponse response = api.execute(null, null, null); assert response.getData().size() > 0; @@ -27,12 +23,12 @@ public void GetAccountListApiTest() throws ApiException { @Test public void GetAccountApiTest() throws ApiException { - GetListAccountsApi api = new GetListAccountsApi(); + GetListAccountsApi api = new GetListAccountsApi(getApiClient()); UnitAccountsListResponse response = api.execute(null, null, null); assert response.getData().size() > 0; - GetAccountApi getApi = new GetAccountApi(); + GetAccountApi getApi = new GetAccountApi(getApiClient()); response.getData().forEach(x -> { try { @@ -47,14 +43,14 @@ public void GetAccountApiTest() throws ApiException { } @Test public void UpdateAccountApiTest() throws ApiException { - GetListAccountsApi api = new GetListAccountsApi(); + GetListAccountsApi api = new GetListAccountsApi(getApiClient()); UnitAccountsListResponse response = api.execute(null, null, null); assert response.getData().size() > 0; - GetAccountApi getApi = new GetAccountApi(); + GetAccountApi getApi = new GetAccountApi(getApiClient()); - UpdateAccountApi updateAccountApi = new UpdateAccountApi(); + UpdateAccountApi updateAccountApi = new UpdateAccountApi(getApiClient()); response.getData().forEach(x -> { try { @@ -99,7 +95,7 @@ public static Account CreateDepositAccount() throws ApiException { cda.setAttributes(attributes); cda.setRelationships(relationships); - CreateAccountApi createAccountApi = new CreateAccountApi(); + CreateAccountApi createAccountApi = new CreateAccountApi(getApiClient()); CreateAccount ca = new CreateAccount(); ca.setData(new CreateAccountData(cda)); return createAccountApi.execute(ca).getData(); diff --git a/src/test/java/org/openapitools/client/ApplicationTests.java b/src/test/java/unit/java/sdk/ApplicationTests.java similarity index 88% rename from src/test/java/org/openapitools/client/ApplicationTests.java rename to src/test/java/unit/java/sdk/ApplicationTests.java index b59de945..ea01b2ff 100644 --- a/src/test/java/org/openapitools/client/ApplicationTests.java +++ b/src/test/java/unit/java/sdk/ApplicationTests.java @@ -1,32 +1,23 @@ -package org.openapitools.client; +package unit.java.sdk; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.openapitools.client.api.*; -import org.openapitools.client.model.*; +import org.junit.Test; +import unit.java.sdk.api.*; +import unit.java.sdk.model.*; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.time.LocalDate; import java.util.ArrayList; import java.util.List; -import static org.openapitools.client.TestHelpers.CreateApplicationRequest; +import static unit.java.sdk.TestHelpers.CreateApplicationRequest; +import static unit.java.sdk.TestHelpers.getApiClient; public class ApplicationTests { - @BeforeAll - static void init() { - String access_token = System.getenv("access_token"); - ApiClient cl = new ApiClient(); - cl.setBearerToken(access_token); - Configuration.setDefaultApiClient(cl); - } - @Test public void GetApplicationListApiTest() throws ApiException { - GetListApplicationsApi api = new GetListApplicationsApi(); + GetListApplicationsApi api = new GetListApplicationsApi(getApiClient()); ExecuteFilterParameter filter = new ExecuteFilterParameter(); ListPageParametersObject page = new ListPageParametersObject(); @@ -45,7 +36,7 @@ public void GetApplicationListApiTest() throws ApiException { @Test public void GetApplicationListWithFilterApiTest() throws ApiException { - GetListApplicationsApi api = new GetListApplicationsApi(); + GetListApplicationsApi api = new GetListApplicationsApi(getApiClient()); ExecuteFilterParameter filter = new ExecuteFilterParameter(); ListPageParametersObject page = new ListPageParametersObject(); @@ -66,15 +57,14 @@ public void GetApplicationListWithFilterApiTest() throws ApiException { assert status.equals("Approved"); }); } - - @Test + @Test public void GetApplicationApiTest() throws ApiException { - GetListApplicationsApi api = new GetListApplicationsApi(); + GetListApplicationsApi api = new GetListApplicationsApi(getApiClient()); UnitListApplicationsResponse response = api.execute(null, null, null); assert response.getData().size() != 0; - GetApplicationApi getApi = new GetApplicationApi(); + GetApplicationApi getApi = new GetApplicationApi(getApiClient()); response.getData().forEach(x -> { try { @@ -90,13 +80,13 @@ public void GetApplicationApiTest() throws ApiException { @Test public void UpdateApplicationApiTest() throws ApiException { - GetListApplicationsApi api = new GetListApplicationsApi(); + GetListApplicationsApi api = new GetListApplicationsApi(getApiClient()); ExecuteFilterParameter filters = new ExecuteFilterParameter(); // filters.status(new ArrayList(){new ExecuteFilterParameter.StatusEnum[]{ExecuteFilterParameter.StatusEnum.APPROVED}}) UnitListApplicationsResponse response = api.execute(null, null, null); assert response.getData().size() != 0; - UpdateApplicationApi updateApi = new UpdateApplicationApi(); + UpdateApplicationApi updateApi = new UpdateApplicationApi(getApiClient()); response.getData().forEach(x -> { try { @@ -130,25 +120,24 @@ public void UpdateApplicationApiTest() throws ApiException { @Test public void CreateApplicationApiTest() throws ApiException { - CreateApplicationApi apiClient = new CreateApplicationApi(); + CreateApplicationApi apiClient = new CreateApplicationApi(getApiClient()); UnitCreateApplicationResponse res = apiClient.execute(CreateApplicationRequest()); assert res.getData().getType().equals("individualApplication"); } - // @Test // public void CreateDocumentForApplicationApiTest() throws ApiException { -// CreateApplicationApi apiClient = new CreateApplicationApi(); +// CreateApplicationApi apiClient = new CreateApplicationApi(getApiClient()); // UnitCreateApplicationResponse res = apiClient.execute(CreateApplicationRequest()); // assert res.getData().getType().equals("individualApplication"); // -// CreateADocumentForAnApplicationApi createApi = new CreateADocumentForAnApplicationApi(); +// CreateADocumentForAnApplicationApi createApi = new CreateADocumentForAnApplicationApi(getApiClient()); // UnitDocumentResponse document = createApi.execute(res.getData().getId()); // assert document.getData().getType().equals("document"); // } @Test public void GetApplicationDocumentsApiTest() throws ApiException { - GetListApplicationsApi api = new GetListApplicationsApi(); + GetListApplicationsApi api = new GetListApplicationsApi(getApiClient()); UnitListApplicationsResponse response = api.execute(null, null, null); assert response.getData().size() != 0; @@ -156,8 +145,8 @@ public void GetApplicationDocumentsApiTest() throws ApiException { @Test public void ListDocumentsApiTest() throws ApiException { - GetListOfDocumentsApi api = new GetListOfDocumentsApi(); - GetListApplicationsApi listApplicationsApi = new GetListApplicationsApi(); + GetListOfDocumentsApi api = new GetListOfDocumentsApi(getApiClient()); + GetListApplicationsApi listApplicationsApi = new GetListApplicationsApi(getApiClient()); UnitListApplicationsResponse response = listApplicationsApi.execute(null, null, null); assert response.getData().size() != 0; @@ -176,10 +165,10 @@ public void ListDocumentsApiTest() throws ApiException { // @Test // public void uploadPngFile() throws ApiException, IOException { -// Path path = Paths.get("./unit_photo.png"); +// Path path = Paths.get(".\\unit_photo.png"); // byte[] data = Files.readAllBytes(path); // -// UploadAPngDocumentForAnApplicationApi api = new UploadAPngDocumentForAnApplicationApi(); +// UploadAPngDocumentForAnApplicationApi api = new UploadAPngDocumentForAnApplicationApi(getApiClient()); // UnitDocumentResponse response = api.execute("applicationId", "documentId", data); // // assert response.getData().getType().equals("document"); diff --git a/src/test/java/unit/java/sdk/CustomerTests.java b/src/test/java/unit/java/sdk/CustomerTests.java new file mode 100644 index 00000000..cb7a5095 --- /dev/null +++ b/src/test/java/unit/java/sdk/CustomerTests.java @@ -0,0 +1,41 @@ +package unit.java.sdk; + +import org.junit.Test; +import unit.java.sdk.api.CreateApplicationApi; +import unit.java.sdk.api.GetCustomerApi; +import unit.java.sdk.api.GetListCustomersApi; +import unit.java.sdk.model.IndividualApplication; +import unit.java.sdk.model.IndividualCustomer; +import unit.java.sdk.model.UnitCreateApplicationResponse; +import unit.java.sdk.model.UnitCustomersListResponse; + +import static unit.java.sdk.TestHelpers.CreateApplicationRequest; +import static unit.java.sdk.TestHelpers.getApiClient; + +public class CustomerTests { + @Test + public void GetCustomersListApiTest() throws ApiException { + GetListCustomersApi api = new GetListCustomersApi(getApiClient()); + + UnitCustomersListResponse response = api.execute(null, null, null); + assert response.getData().size() > 0; + } + + public static IndividualCustomer CreateIndividualCustomer() throws ApiException { + CreateApplicationApi apiClient = new CreateApplicationApi(getApiClient()); + UnitCreateApplicationResponse res = apiClient.execute(CreateApplicationRequest()); + assert res.getData().getType().equals("individualApplication"); + + IndividualApplication app = (IndividualApplication) res.getData(); + String customerId = app.getRelationships().getCustomer().getData().getId(); + GetCustomerApi customerApi = new GetCustomerApi(getApiClient()); + + return (IndividualCustomer) customerApi.execute(customerId).getData(); + } + + @Test + public void CreateIndividualCustomerTest() throws ApiException { + IndividualCustomer customer = CreateIndividualCustomer(); + assert customer.getType().equals("individualCustomer"); + } +} diff --git a/src/test/java/org/openapitools/client/PaymentTests.java b/src/test/java/unit/java/sdk/PaymentTests.java similarity index 83% rename from src/test/java/org/openapitools/client/PaymentTests.java rename to src/test/java/unit/java/sdk/PaymentTests.java index bb6693db..91ac3891 100644 --- a/src/test/java/org/openapitools/client/PaymentTests.java +++ b/src/test/java/unit/java/sdk/PaymentTests.java @@ -1,40 +1,30 @@ -package org.openapitools.client; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.openapitools.client.api.CreateAPaymentApi; -import org.openapitools.client.api.GetListPaymentsApi; -import org.openapitools.client.api.GetPaymentApi; -import org.openapitools.client.model.*; -import static org.openapitools.client.AccountTests.CreateDepositAccount; -import static org.openapitools.client.TestHelpers.CreateWireCounterparty; -import static org.openapitools.client.TestHelpers.CreateCounterparty; +package unit.java.sdk; -public class PaymentTests { - @BeforeAll - static void init() { - String access_token = System.getenv("access_token"); - ApiClient cl = new ApiClient(); - cl.setBearerToken(access_token); - Configuration.setDefaultApiClient(cl); - } +import org.junit.Test; +import unit.java.sdk.api.CreateAPaymentApi; +import unit.java.sdk.api.GetListPaymentsApi; +import unit.java.sdk.api.GetPaymentApi; +import unit.java.sdk.model.*; + +import static unit.java.sdk.AccountTests.CreateDepositAccount; +import static unit.java.sdk.TestHelpers.*; +public class PaymentTests { @Test public void GetPaymentsListApiTest() throws ApiException { - GetListPaymentsApi api = new GetListPaymentsApi(); + GetListPaymentsApi api = new GetListPaymentsApi(getApiClient()); UnitPaymentsListResponse response = api.execute(null, null, null, null); assert response.getData().size() > 0; } - @Test public void GetPaymentsApiTest() throws ApiException { - GetListPaymentsApi api = new GetListPaymentsApi(); + GetListPaymentsApi api = new GetListPaymentsApi(getApiClient()); UnitPaymentsListResponse response = api.execute(null, null, null, null); assert response.getData().size() > 0; - GetPaymentApi getPaymentApi = new GetPaymentApi(); + GetPaymentApi getPaymentApi = new GetPaymentApi(getApiClient()); for (Payment p: response.getData()) { UnitPaymentResponseWithIncluded paymentResponse = getPaymentApi.execute(p.getId(), null); @@ -71,7 +61,7 @@ public void CreateBookPaymentTest() throws ApiException { relationships.setCounterpartyAccount(counterpartyAccountRelationship); createBookPayment.setRelationships(relationships); - CreateAPaymentApi createApi = new CreateAPaymentApi(); + CreateAPaymentApi createApi = new CreateAPaymentApi(getApiClient()); CreatePayment request = new CreatePayment(); CreatePaymentData data = new CreatePaymentData(createBookPayment); request.setData(data); @@ -101,7 +91,7 @@ public void CreateAchPaymentTest() throws ApiException { relationships.setAccount(accountRelationship); createAchPayment.setRelationships(relationships); - CreateAPaymentApi createApi = new CreateAPaymentApi(); + CreateAPaymentApi createApi = new CreateAPaymentApi(getApiClient()); CreatePayment request = new CreatePayment(); CreatePaymentData data = new CreatePaymentData(createAchPayment); request.setData(data); @@ -132,7 +122,7 @@ public void CreateWirePaymentTest() throws ApiException { relationships.setAccount(accountRelationship); createWirePayment.setRelationships(relationships); - CreateAPaymentApi createApi = new CreateAPaymentApi(); + CreateAPaymentApi createApi = new CreateAPaymentApi(getApiClient()); CreatePayment request = new CreatePayment(); CreatePaymentData data = new CreatePaymentData(createWirePayment); request.setData(data); diff --git a/src/test/java/unit/java/sdk/ReceivedPaymentTests.java b/src/test/java/unit/java/sdk/ReceivedPaymentTests.java new file mode 100644 index 00000000..2d0f6f74 --- /dev/null +++ b/src/test/java/unit/java/sdk/ReceivedPaymentTests.java @@ -0,0 +1,48 @@ +package unit.java.sdk; + +import org.junit.Test; +import unit.java.sdk.api.GetReceivedPaymentApi; +import unit.java.sdk.api.GetReceivedPaymentsListApi; +import unit.java.sdk.model.UnitReceivedPaymentListResponse; +import unit.java.sdk.model.UnitReceivedPaymentResponseWithIncluded; + +import static unit.java.sdk.TestHelpers.getApiClient; + +public class ReceivedPaymentTests { + @Test + public void GetReceivedPaymentListApiTest() throws ApiException { + GetReceivedPaymentsListApi api = new GetReceivedPaymentsListApi(getApiClient()); + + UnitReceivedPaymentListResponse response = api.execute(null); + assert response.getData().size() != 0; + } + + @Test + public void GetReceivedPaymentListWithIncludedApiTest() throws ApiException { + GetReceivedPaymentsListApi api = new GetReceivedPaymentsListApi(getApiClient()); + + UnitReceivedPaymentListResponse response = api.execute(null); + assert response.getData().size() != 0; + } + + @Test + public void GetReceivedPaymentApiTest() throws ApiException { + GetReceivedPaymentsListApi api = new GetReceivedPaymentsListApi(getApiClient()); + + UnitReceivedPaymentListResponse response = api.execute(null); + assert response.getData().size() != 0; + + GetReceivedPaymentApi getApi = new GetReceivedPaymentApi(getApiClient()); + + response.getData().forEach(x -> { + try { + UnitReceivedPaymentResponseWithIncluded payment = getApi.execute(x.getId(), null); + assert payment.getData().getId().equals(x.getId()); + assert payment.getData().getAttributes().getAmount().equals(x.getAttributes().getAmount()); + } catch (ApiException e) { + throw new RuntimeException(e); + } + }); + } + +} diff --git a/src/test/java/unit/java/sdk/RecurringPaymentTests.java b/src/test/java/unit/java/sdk/RecurringPaymentTests.java new file mode 100644 index 00000000..9245f54e --- /dev/null +++ b/src/test/java/unit/java/sdk/RecurringPaymentTests.java @@ -0,0 +1,40 @@ +package unit.java.sdk; + +import org.junit.Test; +import unit.java.sdk.api.GetListRecurringPaymentsApi; +import unit.java.sdk.api.GetRecurringPaymentApi; +import unit.java.sdk.model.UnitRecurringPaymentListResponse; +import unit.java.sdk.model.UnitRecurringPaymentResponse; + +import static unit.java.sdk.TestHelpers.getApiClient; + +public class RecurringPaymentTests { + @Test + public void GetRecurringPaymentListApiTest() throws ApiException { + GetListRecurringPaymentsApi api = new GetListRecurringPaymentsApi(getApiClient()); + + UnitRecurringPaymentListResponse response = api.execute(null, null, null); + assert response.getData().size() != 0; + } + + @Test + public void GetRecurringPaymentApiTest() throws ApiException { + GetListRecurringPaymentsApi api = new GetListRecurringPaymentsApi(getApiClient()); + + UnitRecurringPaymentListResponse response = api.execute(null, null, null); + assert response.getData().size() != 0; + + GetRecurringPaymentApi getApi = new GetRecurringPaymentApi(getApiClient()); + + response.getData().forEach(x -> { + try { + UnitRecurringPaymentResponse payment = getApi.execute(x.getId()); + assert payment.getData().getId().equals(x.getId()); + assert payment.getData().getType().toLowerCase() + .equals(payment.getData().getClass().getSimpleName().toLowerCase()); + } catch (ApiException e) { + throw new RuntimeException(e); + } + }); + } +} diff --git a/src/test/java/unit/java/sdk/TestHelpers.java b/src/test/java/unit/java/sdk/TestHelpers.java new file mode 100644 index 00000000..cb01cdae --- /dev/null +++ b/src/test/java/unit/java/sdk/TestHelpers.java @@ -0,0 +1,83 @@ +package unit.java.sdk; + +import unit.java.sdk.model.*; + +import java.time.LocalDate; + +public class TestHelpers { + private static ApiClient apiClient; + static ApiClient getApiClient() { + if(apiClient == null){ + String access_token = System.getenv("access_token"); + apiClient = new ApiClient(); + apiClient.setRequestInterceptor(r -> r.header("Authorization", "Bearer " + access_token)); + } + + return apiClient; + } + public static unit.java.sdk.model.CreateApplication CreateApplicationRequest() { + unit.java.sdk.model.CreateIndividualApplication createIndividualApplication = new unit.java.sdk.model.CreateIndividualApplication(); + unit.java.sdk.model.CreateIndividualApplicationAttributes attr = new unit.java.sdk.model.CreateIndividualApplicationAttributes(); + + unit.java.sdk.model.FullName fn = new unit.java.sdk.model.FullName(); + fn.setFirst("Peter"); + fn.setLast("Parker"); + attr.setFullName(fn); + + unit.java.sdk.model.Address address = new unit.java.sdk.model.Address(); + address.setStreet("20 Ingram St"); + address.setCity("Forest Hills"); + address.setPostalCode("11375"); + address.setCountry("US"); + address.setState("NY"); + attr.setAddress(address); + + attr.setSsn("721074426"); + attr.setDateOfBirth(LocalDate.parse("2001-08-10")); + attr.setEmail("peter@oscorp.com"); + unit.java.sdk.model.Phone p = new unit.java.sdk.model.Phone(); + p.setNumber("5555555555"); + p.setCountryCode("1"); + attr.setPhone(p); + attr.setIdempotencyKey("3a1a33be-4e12-4603-9ed0-820922389fb8"); + attr.setOccupation(unit.java.sdk.model.Occupation.ARCHITECTORENGINEER); + + createIndividualApplication.setAttributes(attr); + + unit.java.sdk.model.CreateApplication ca = new unit.java.sdk.model.CreateApplication(); + ca.data(new unit.java.sdk.model.CreateApplicationData(createIndividualApplication)); + + return ca; + } + + public static Counterparty CreateCounterparty() { + Counterparty counterparty = new Counterparty(); + counterparty.setName("Jane Doe"); + counterparty.setRoutingNumber("812345673"); + counterparty.setAccountNumber("12345569"); + counterparty.setAccountType(Counterparty.AccountTypeEnum.CHECKING); + + return counterparty; + } + + public static Address CreateAddress() { + Address address = new Address(); + address.setStreet("20 Ingram St"); + address.setCity("Forest Hills"); + address.setState("CA"); + address.setPostalCode("11375"); + address.setCountry("US"); + + return address; + } + + public static WireCounterparty CreateWireCounterparty() { + WireCounterparty counterparty = new WireCounterparty(); + counterparty.setName("April Oniel"); + counterparty.setAccountNumber("1000000001"); + counterparty.setRoutingNumber("812345678"); + counterparty.setAddress(CreateAddress()); + + return counterparty; + } +} diff --git a/src/test/java/unit/java/sdk/TokenTests.java b/src/test/java/unit/java/sdk/TokenTests.java new file mode 100644 index 00000000..6f332c9c --- /dev/null +++ b/src/test/java/unit/java/sdk/TokenTests.java @@ -0,0 +1,39 @@ +package unit.java.sdk; + +import org.junit.Test; +import unit.java.sdk.api.CreateCustomerTokenApi; +import unit.java.sdk.api.GetListOrgApiTokensApi; +import unit.java.sdk.model.*; + + +import java.util.List; + +import static unit.java.sdk.TestHelpers.getApiClient; + +public class TokenTests { + @Test + public void GetOrgTokensTest() throws ApiException { + GetListOrgApiTokensApi listApi = new GetListOrgApiTokensApi(getApiClient()); + List response = listApi.execute("252").getData(); + + for (ApiToken t : response) { + assert t.getType().equals("apiToken"); + } + } + + @Test + public void CreateCustomerToken() throws ApiException { + CreateCustomerTokenApi createApi = new CreateCustomerTokenApi(getApiClient()); + + CreateCustomerToken request = new CreateCustomerToken(); + + CreateCustomerTokenData data = new CreateCustomerTokenData(); + CreateCustomerTokenDataAttributes attributes = new CreateCustomerTokenDataAttributes(); + attributes.setScope("customers accounts"); + data.setAttributes(attributes); + request.setData(data); + + UnitCustomerTokenResponse res = createApi.execute("1527981", request); + assert res.getData().getType().equals("customerBearerToken"); + } +} diff --git a/src/test/java/unit/java/sdk/api/ActivateControlAgreementForAccountApiTest.java b/src/test/java/unit/java/sdk/api/ActivateControlAgreementForAccountApiTest.java new file mode 100644 index 00000000..65ecfbc2 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/ActivateControlAgreementForAccountApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitAccountResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for ActivateControlAgreementForAccountApi + */ +@Ignore +public class ActivateControlAgreementForAccountApiTest { + + private final ActivateControlAgreementForAccountApi api = new ActivateControlAgreementForAccountApi(); + + + /** + * Activate Account Control Agreement by Id + * + * Activate Control Agreement for Account via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String accountId = null; + UnitAccountResponse response = + api.execute(accountId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/AdvanceReceivedPaymentApiTest.java b/src/test/java/unit/java/sdk/api/AdvanceReceivedPaymentApiTest.java new file mode 100644 index 00000000..133d6007 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/AdvanceReceivedPaymentApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitReceivedPaymentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for AdvanceReceivedPaymentApi + */ +@Ignore +public class AdvanceReceivedPaymentApiTest { + + private final AdvanceReceivedPaymentApi api = new AdvanceReceivedPaymentApi(); + + + /** + * Advance Received Payment by Id + * + * Advance a Received Payment via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String paymentId = null; + UnitReceivedPaymentResponse response = + api.execute(paymentId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/ApproveAuthorizationRequestApiTest.java b/src/test/java/unit/java/sdk/api/ApproveAuthorizationRequestApiTest.java new file mode 100644 index 00000000..406bfbe3 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/ApproveAuthorizationRequestApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ApproveAuthorizationRequest; +import unit.java.sdk.model.UnitAuthorizationRequestResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for ApproveAuthorizationRequestApi + */ +@Ignore +public class ApproveAuthorizationRequestApiTest { + + private final ApproveAuthorizationRequestApi api = new ApproveAuthorizationRequestApi(); + + + /** + * Approve Authorization Request by Id + * + * Approve a Authorization Request via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String authorizationId = null; + ApproveAuthorizationRequest approveAuthorizationRequest = null; + UnitAuthorizationRequestResponse response = + api.execute(authorizationId, approveAuthorizationRequest); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/ApproveCheckPaymentApiTest.java b/src/test/java/unit/java/sdk/api/ApproveCheckPaymentApiTest.java new file mode 100644 index 00000000..ad02f020 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/ApproveCheckPaymentApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ApproveCheckPaymentRequest; +import unit.java.sdk.model.UnitCheckPaymentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for ApproveCheckPaymentApi + */ +@Ignore +public class ApproveCheckPaymentApiTest { + + private final ApproveCheckPaymentApi api = new ApproveCheckPaymentApi(); + + + /** + * Approve Check Payment by Id + * + * Approve a Check Payment via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String checkPaymentId = null; + ApproveCheckPaymentRequest approveCheckPaymentRequest = null; + UnitCheckPaymentResponse response = + api.execute(checkPaymentId, approveCheckPaymentRequest); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/ArchiveCustomerApiTest.java b/src/test/java/unit/java/sdk/api/ArchiveCustomerApiTest.java new file mode 100644 index 00000000..7d48d791 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/ArchiveCustomerApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ArchiveCustomerRequest; +import unit.java.sdk.model.UnitCustomerResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for ArchiveCustomerApi + */ +@Ignore +public class ArchiveCustomerApiTest { + + private final ArchiveCustomerApi api = new ArchiveCustomerApi(); + + + /** + * Archive Customer by Id + * + * Archive a Customer via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String customerId = null; + ArchiveCustomerRequest archiveCustomerRequest = null; + UnitCustomerResponse response = + api.execute(customerId, archiveCustomerRequest); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CancelApplicationApiTest.java b/src/test/java/unit/java/sdk/api/CancelApplicationApiTest.java new file mode 100644 index 00000000..1bc371b8 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CancelApplicationApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.CancelApplicationRequest; +import unit.java.sdk.model.UnitCancelApplicationResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CancelApplicationApi + */ +@Ignore +public class CancelApplicationApiTest { + + private final CancelApplicationApi api = new CancelApplicationApi(); + + + /** + * Cancel Application by Id + * + * Cancel a Application via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String applicationId = null; + CancelApplicationRequest cancelApplicationRequest = null; + UnitCancelApplicationResponse response = + api.execute(applicationId, cancelApplicationRequest); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CancelCheckPaymentApiTest.java b/src/test/java/unit/java/sdk/api/CancelCheckPaymentApiTest.java new file mode 100644 index 00000000..6ad0b4ef --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CancelCheckPaymentApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCheckPaymentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CancelCheckPaymentApi + */ +@Ignore +public class CancelCheckPaymentApiTest { + + private final CancelCheckPaymentApi api = new CancelCheckPaymentApi(); + + + /** + * Cancel Check Payment by Id + * + * Cancel a Check Payment via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String checkPaymentId = null; + UnitCheckPaymentResponse response = + api.execute(checkPaymentId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CancelPaymentApiTest.java b/src/test/java/unit/java/sdk/api/CancelPaymentApiTest.java new file mode 100644 index 00000000..079023b3 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CancelPaymentApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitPaymentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CancelPaymentApi + */ +@Ignore +public class CancelPaymentApiTest { + + private final CancelPaymentApi api = new CancelPaymentApi(); + + + /** + * Cancel a Payment by Id + * + * Cancel a Payment via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String paymentId = null; + UnitPaymentResponse response = + api.execute(paymentId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CloseACardApiTest.java b/src/test/java/unit/java/sdk/api/CloseACardApiTest.java new file mode 100644 index 00000000..fdfeb342 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CloseACardApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCardResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CloseACardApi + */ +@Ignore +public class CloseACardApiTest { + + private final CloseACardApi api = new CloseACardApi(); + + + /** + * Close a Card + * + * Close a Card via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String cardId = null; + UnitCardResponse response = + api.execute(cardId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CloseAnAccountApiTest.java b/src/test/java/unit/java/sdk/api/CloseAnAccountApiTest.java new file mode 100644 index 00000000..9eb52959 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CloseAnAccountApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.CloseAccountRequest; +import unit.java.sdk.model.UnitAccountResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CloseAnAccountApi + */ +@Ignore +public class CloseAnAccountApiTest { + + private final CloseAnAccountApi api = new CloseAnAccountApi(); + + + /** + * Close an Account by Id + * + * Close an Account via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String accountId = null; + CloseAccountRequest closeAccountRequest = null; + UnitAccountResponse response = + api.execute(accountId, closeAccountRequest); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/ConfirmCheckDepositApiTest.java b/src/test/java/unit/java/sdk/api/ConfirmCheckDepositApiTest.java new file mode 100644 index 00000000..29d3d42d --- /dev/null +++ b/src/test/java/unit/java/sdk/api/ConfirmCheckDepositApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCheckDepositResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for ConfirmCheckDepositApi + */ +@Ignore +public class ConfirmCheckDepositApiTest { + + private final ConfirmCheckDepositApi api = new ConfirmCheckDepositApi(); + + + /** + * Confirm by Id + * + * Confirm a Check Deposit from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String checkDepositId = null; + UnitCheckDepositResponse response = + api.execute(checkDepositId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CreateACardApiTest.java b/src/test/java/unit/java/sdk/api/CreateACardApiTest.java new file mode 100644 index 00000000..4bcf23eb --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CreateACardApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.CreateCard; +import unit.java.sdk.model.UnitCardResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CreateACardApi + */ +@Ignore +public class CreateACardApiTest { + + private final CreateACardApi api = new CreateACardApi(); + + + /** + * Create a Card + * + * Create a Card via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + CreateCard createCard = null; + UnitCardResponse response = + api.execute(createCard); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CreateADocumentForAnApplicationApiTest.java b/src/test/java/unit/java/sdk/api/CreateADocumentForAnApplicationApiTest.java new file mode 100644 index 00000000..5a346cbf --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CreateADocumentForAnApplicationApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitDocumentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CreateADocumentForAnApplicationApi + */ +@Ignore +public class CreateADocumentForAnApplicationApiTest { + + private final CreateADocumentForAnApplicationApi api = new CreateADocumentForAnApplicationApi(); + + + /** + * Create a document + * + * Create a document via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String applicationId = null; + UnitDocumentResponse response = + api.execute(applicationId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CreateAPaymentApiTest.java b/src/test/java/unit/java/sdk/api/CreateAPaymentApiTest.java new file mode 100644 index 00000000..bd92c64e --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CreateAPaymentApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.CreatePayment; +import unit.java.sdk.model.UnitPaymentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CreateAPaymentApi + */ +@Ignore +public class CreateAPaymentApiTest { + + private final CreateAPaymentApi api = new CreateAPaymentApi(); + + + /** + * Create a Payment + * + * Create a Payment via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + CreatePayment createPayment = null; + UnitPaymentResponse response = + api.execute(createPayment); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CreateARepaymentApiTest.java b/src/test/java/unit/java/sdk/api/CreateARepaymentApiTest.java new file mode 100644 index 00000000..54ea326b --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CreateARepaymentApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.CreateRepayment; +import unit.java.sdk.model.UnitRepaymentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CreateARepaymentApi + */ +@Ignore +public class CreateARepaymentApiTest { + + private final CreateARepaymentApi api = new CreateARepaymentApi(); + + + /** + * Create a Repayment + * + * Create a Repayment via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + CreateRepayment createRepayment = null; + UnitRepaymentResponse response = + api.execute(createRepayment); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CreateAccountApiTest.java b/src/test/java/unit/java/sdk/api/CreateAccountApiTest.java new file mode 100644 index 00000000..dcbf2fbd --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CreateAccountApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.CreateAccount; +import unit.java.sdk.model.UnitAccountResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CreateAccountApi + */ +@Ignore +public class CreateAccountApiTest { + + private final CreateAccountApi api = new CreateAccountApi(); + + + /** + * Create Account + * + * Create Account via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + CreateAccount createAccount = null; + UnitAccountResponse response = + api.execute(createAccount); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CreateApplicationApiTest.java b/src/test/java/unit/java/sdk/api/CreateApplicationApiTest.java new file mode 100644 index 00000000..a011ef07 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CreateApplicationApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.CreateApplication; +import unit.java.sdk.model.UnitCreateApplicationResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CreateApplicationApi + */ +@Ignore +public class CreateApplicationApiTest { + + private final CreateApplicationApi api = new CreateApplicationApi(); + + + /** + * Create Application + * + * Create an Application via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + CreateApplication createApplication = null; + UnitCreateApplicationResponse response = + api.execute(createApplication); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CreateApplicationFormApiTest.java b/src/test/java/unit/java/sdk/api/CreateApplicationFormApiTest.java new file mode 100644 index 00000000..e5d68656 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CreateApplicationFormApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.CreateApplicationForm; +import unit.java.sdk.model.UnitApplicationFormResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CreateApplicationFormApi + */ +@Ignore +public class CreateApplicationFormApiTest { + + private final CreateApplicationFormApi api = new CreateApplicationFormApi(); + + + /** + * Create Application Form + * + * Create an Application Form via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + CreateApplicationForm createApplicationForm = null; + UnitApplicationFormResponse response = + api.execute(createApplicationForm); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CreateCheckDepositApiTest.java b/src/test/java/unit/java/sdk/api/CreateCheckDepositApiTest.java new file mode 100644 index 00000000..4c3b0070 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CreateCheckDepositApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.CreateCheckDeposit; +import unit.java.sdk.model.UnitCheckDepositResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CreateCheckDepositApi + */ +@Ignore +public class CreateCheckDepositApiTest { + + private final CreateCheckDepositApi api = new CreateCheckDepositApi(); + + + /** + * Create Check Deposit + * + * Create a Check Deposit via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + CreateCheckDeposit createCheckDeposit = null; + UnitCheckDepositResponse response = + api.execute(createCheckDeposit); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CreateCheckPaymentApiTest.java b/src/test/java/unit/java/sdk/api/CreateCheckPaymentApiTest.java new file mode 100644 index 00000000..725b9366 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CreateCheckPaymentApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.CreateCheckPayment; +import unit.java.sdk.model.UnitCheckPaymentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CreateCheckPaymentApi + */ +@Ignore +public class CreateCheckPaymentApiTest { + + private final CreateCheckPaymentApi api = new CreateCheckPaymentApi(); + + + /** + * Create Check Payment + * + * Create Check Payment via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + CreateCheckPayment createCheckPayment = null; + UnitCheckPaymentResponse response = + api.execute(createCheckPayment); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CreateCounterpartyApiTest.java b/src/test/java/unit/java/sdk/api/CreateCounterpartyApiTest.java new file mode 100644 index 00000000..648908bf --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CreateCounterpartyApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.CreateCounterparty; +import unit.java.sdk.model.UnitCounterpartyResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CreateCounterpartyApi + */ +@Ignore +public class CreateCounterpartyApiTest { + + private final CreateCounterpartyApi api = new CreateCounterpartyApi(); + + + /** + * Create Counterparty + * + * Create a counterparty via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + CreateCounterparty createCounterparty = null; + UnitCounterpartyResponse response = + api.execute(createCounterparty); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CreateCustomerTokenApiTest.java b/src/test/java/unit/java/sdk/api/CreateCustomerTokenApiTest.java new file mode 100644 index 00000000..df17be55 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CreateCustomerTokenApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.CreateCustomerToken; +import unit.java.sdk.model.UnitCustomerTokenResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CreateCustomerTokenApi + */ +@Ignore +public class CreateCustomerTokenApiTest { + + private final CreateCustomerTokenApi api = new CreateCustomerTokenApi(); + + + /** + * Create Customer Token + * + * Create a Customer Token via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String customerId = null; + CreateCustomerToken createCustomerToken = null; + UnitCustomerTokenResponse response = + api.execute(customerId, createCustomerToken); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CreateCustomerTokenVerificationApiTest.java b/src/test/java/unit/java/sdk/api/CreateCustomerTokenVerificationApiTest.java new file mode 100644 index 00000000..9fe75865 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CreateCustomerTokenVerificationApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.CreateCustomerTokenVerification; +import unit.java.sdk.model.UnitCustomerTokenVerificationResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CreateCustomerTokenVerificationApi + */ +@Ignore +public class CreateCustomerTokenVerificationApiTest { + + private final CreateCustomerTokenVerificationApi api = new CreateCustomerTokenVerificationApi(); + + + /** + * Create Customer Token Verification + * + * Create a Customer Token Verification via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String customerId = null; + CreateCustomerTokenVerification createCustomerTokenVerification = null; + UnitCustomerTokenVerificationResponse response = + api.execute(customerId, createCustomerTokenVerification); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CreateFeeApiTest.java b/src/test/java/unit/java/sdk/api/CreateFeeApiTest.java new file mode 100644 index 00000000..70763cdf --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CreateFeeApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitFeeResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CreateFeeApi + */ +@Ignore +public class CreateFeeApiTest { + + private final CreateFeeApi api = new CreateFeeApi(); + + + /** + * Create Fee + * + * Create a Fee via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + Object body = null; + UnitFeeResponse response = + api.execute(body); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CreateOrgApiTokenApiTest.java b/src/test/java/unit/java/sdk/api/CreateOrgApiTokenApiTest.java new file mode 100644 index 00000000..c06ab16a --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CreateOrgApiTokenApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.CreateApiToken; +import unit.java.sdk.model.UnitApiTokenResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CreateOrgApiTokenApi + */ +@Ignore +public class CreateOrgApiTokenApiTest { + + private final CreateOrgApiTokenApi api = new CreateOrgApiTokenApi(); + + + /** + * Create Org API Token + * + * Create an Org API Token via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String userId = null; + CreateApiToken createApiToken = null; + UnitApiTokenResponse response = + api.execute(userId, createApiToken); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CreateRecurringPaymentApiTest.java b/src/test/java/unit/java/sdk/api/CreateRecurringPaymentApiTest.java new file mode 100644 index 00000000..7d2ae0f3 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CreateRecurringPaymentApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.CreateRecurringPayment; +import unit.java.sdk.model.UnitRecurringPaymentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CreateRecurringPaymentApi + */ +@Ignore +public class CreateRecurringPaymentApiTest { + + private final CreateRecurringPaymentApi api = new CreateRecurringPaymentApi(); + + + /** + * Create Recurring Payment + * + * Create a Recurring Payment via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + CreateRecurringPayment createRecurringPayment = null; + UnitRecurringPaymentResponse response = + api.execute(createRecurringPayment); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CreateRewardApiTest.java b/src/test/java/unit/java/sdk/api/CreateRewardApiTest.java new file mode 100644 index 00000000..de76d38c --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CreateRewardApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.CreateReward; +import unit.java.sdk.model.UnitRewardResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CreateRewardApi + */ +@Ignore +public class CreateRewardApiTest { + + private final CreateRewardApi api = new CreateRewardApi(); + + + /** + * Create Reward + * + * Create a Reward via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + CreateReward createReward = null; + UnitRewardResponse response = + api.execute(createReward); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/CreateWebhookApiTest.java b/src/test/java/unit/java/sdk/api/CreateWebhookApiTest.java new file mode 100644 index 00000000..12dc9ab4 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/CreateWebhookApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.CreateWebhook; +import unit.java.sdk.model.UnitWebhookResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for CreateWebhookApi + */ +@Ignore +public class CreateWebhookApiTest { + + private final CreateWebhookApi api = new CreateWebhookApi(); + + + /** + * Create Webhook + * + * Create a Webhook via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + CreateWebhook createWebhook = null; + UnitWebhookResponse response = + api.execute(createWebhook); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/DeactivateControlAgreementForAccountApiTest.java b/src/test/java/unit/java/sdk/api/DeactivateControlAgreementForAccountApiTest.java new file mode 100644 index 00000000..b969f955 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/DeactivateControlAgreementForAccountApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitAccountResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for DeactivateControlAgreementForAccountApi + */ +@Ignore +public class DeactivateControlAgreementForAccountApiTest { + + private final DeactivateControlAgreementForAccountApi api = new DeactivateControlAgreementForAccountApi(); + + + /** + * Deactivate Account Control Agreement by Id + * + * Deactivate Control Agreement for Account via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String accountId = null; + UnitAccountResponse response = + api.execute(accountId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/DeclineAuthorizationRequestApiTest.java b/src/test/java/unit/java/sdk/api/DeclineAuthorizationRequestApiTest.java new file mode 100644 index 00000000..6d040c16 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/DeclineAuthorizationRequestApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.DeclineAuthorizationRequest; +import unit.java.sdk.model.UnitAuthorizationRequestResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for DeclineAuthorizationRequestApi + */ +@Ignore +public class DeclineAuthorizationRequestApiTest { + + private final DeclineAuthorizationRequestApi api = new DeclineAuthorizationRequestApi(); + + + /** + * Decline Authorization Request + * + * Decline Authorization Request via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String authorizationId = null; + DeclineAuthorizationRequest declineAuthorizationRequest = null; + UnitAuthorizationRequestResponse response = + api.execute(authorizationId, declineAuthorizationRequest); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/DefaultApiTest.java b/src/test/java/unit/java/sdk/api/DefaultApiTest.java new file mode 100644 index 00000000..ac79c63b --- /dev/null +++ b/src/test/java/unit/java/sdk/api/DefaultApiTest.java @@ -0,0 +1,128 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.CreateStopPayment; +import unit.java.sdk.model.ExecuteFilterParameter20; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.StopPaymentListResponse; +import unit.java.sdk.model.StopPaymentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for DefaultApi + */ +@Ignore +public class DefaultApiTest { + + private final DefaultApi api = new DefaultApi(); + + + /** + * Get a list of stop payments + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter20 filter = null; + String sort = null; + StopPaymentListResponse response = + api.execute(page, filter, sort); + + // TODO: test validations + } + + /** + * Create Stop Payment + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void execute_0Test() throws ApiException { + CreateStopPayment createStopPayment = null; + StopPaymentResponse response = + api.execute_0(createStopPayment); + + // TODO: test validations + } + + /** + * Get details of a specific stop payment + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void execute_1Test() throws ApiException { + String stopPaymentId = null; + StopPaymentResponse response = + api.execute_1(stopPaymentId); + + // TODO: test validations + } + + /** + * Cancel a stop payment + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void execute_2Test() throws ApiException { + String stopPaymentId = null; + + api.execute_2(stopPaymentId); + + // TODO: test validations + } + + /** + * Disable a stop payment + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void execute_3Test() throws ApiException { + String stopPaymentId = null; + StopPaymentResponse response = + api.execute_3(stopPaymentId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/DeleteCounterpartyApiTest.java b/src/test/java/unit/java/sdk/api/DeleteCounterpartyApiTest.java new file mode 100644 index 00000000..7cff3171 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/DeleteCounterpartyApiTest.java @@ -0,0 +1,53 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for DeleteCounterpartyApi + */ +@Ignore +public class DeleteCounterpartyApiTest { + + private final DeleteCounterpartyApi api = new DeleteCounterpartyApi(); + + + /** + * Delete Counterparty by Id + * + * Delete Counterparty via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String counterpartyId = null; + + api.execute(counterpartyId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/DisableRecurringPaymentApiTest.java b/src/test/java/unit/java/sdk/api/DisableRecurringPaymentApiTest.java new file mode 100644 index 00000000..b71be1e6 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/DisableRecurringPaymentApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitRecurringPaymentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for DisableRecurringPaymentApi + */ +@Ignore +public class DisableRecurringPaymentApiTest { + + private final DisableRecurringPaymentApi api = new DisableRecurringPaymentApi(); + + + /** + * Disable Recurring Payment + * + * Disable Recurring Payment via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String paymentId = null; + UnitRecurringPaymentResponse response = + api.execute(paymentId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/DisableWebhookApiTest.java b/src/test/java/unit/java/sdk/api/DisableWebhookApiTest.java new file mode 100644 index 00000000..8283a1c9 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/DisableWebhookApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitWebhookResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for DisableWebhookApi + */ +@Ignore +public class DisableWebhookApiTest { + + private final DisableWebhookApi api = new DisableWebhookApi(); + + + /** + * Disable a Webhook + * + * Disable a Webhook via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String webhookId = null; + UnitWebhookResponse response = + api.execute(webhookId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/DownloadADocumentApiTest.java b/src/test/java/unit/java/sdk/api/DownloadADocumentApiTest.java new file mode 100644 index 00000000..a4d4b158 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/DownloadADocumentApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import java.io.File; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for DownloadADocumentApi + */ +@Ignore +public class DownloadADocumentApiTest { + + private final DownloadADocumentApi api = new DownloadADocumentApi(); + + + /** + * Download a Document + * + * Download a Document via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String applicationId = null; + String documentId = null; + File response = + api.execute(applicationId, documentId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/DownloadADocumentBackSideApiTest.java b/src/test/java/unit/java/sdk/api/DownloadADocumentBackSideApiTest.java new file mode 100644 index 00000000..98515083 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/DownloadADocumentBackSideApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import java.io.File; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for DownloadADocumentBackSideApi + */ +@Ignore +public class DownloadADocumentBackSideApiTest { + + private final DownloadADocumentBackSideApi api = new DownloadADocumentBackSideApi(); + + + /** + * Download a Document - Back Side + * + * Download a Document - Back Side via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String applicationId = null; + String documentId = null; + File response = + api.execute(applicationId, documentId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/EnableRecurringPaymentApiTest.java b/src/test/java/unit/java/sdk/api/EnableRecurringPaymentApiTest.java new file mode 100644 index 00000000..974b7394 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/EnableRecurringPaymentApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitRecurringPaymentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for EnableRecurringPaymentApi + */ +@Ignore +public class EnableRecurringPaymentApiTest { + + private final EnableRecurringPaymentApi api = new EnableRecurringPaymentApi(); + + + /** + * Enable Recurring Payment + * + * Enable Recurring Payment via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String paymentId = null; + UnitRecurringPaymentResponse response = + api.execute(paymentId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/EnableWebhookApiTest.java b/src/test/java/unit/java/sdk/api/EnableWebhookApiTest.java new file mode 100644 index 00000000..f24e4b35 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/EnableWebhookApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitWebhookResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for EnableWebhookApi + */ +@Ignore +public class EnableWebhookApiTest { + + private final EnableWebhookApi api = new EnableWebhookApi(); + + + /** + * Enable Webhook + * + * Enable a Webhook via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String webhookId = null; + UnitWebhookResponse response = + api.execute(webhookId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/EnterControlAgreementForAccountApiTest.java b/src/test/java/unit/java/sdk/api/EnterControlAgreementForAccountApiTest.java new file mode 100644 index 00000000..5780c1b0 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/EnterControlAgreementForAccountApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitAccountResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for EnterControlAgreementForAccountApi + */ +@Ignore +public class EnterControlAgreementForAccountApiTest { + + private final EnterControlAgreementForAccountApi api = new EnterControlAgreementForAccountApi(); + + + /** + * Enter Account Control Agreement by Id + * + * Enter Control Agreement for Account via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String accountId = null; + UnitAccountResponse response = + api.execute(accountId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/FireEventApiTest.java b/src/test/java/unit/java/sdk/api/FireEventApiTest.java new file mode 100644 index 00000000..89e0cce3 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/FireEventApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitEventResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for FireEventApi + */ +@Ignore +public class FireEventApiTest { + + private final FireEventApi api = new FireEventApi(); + + + /** + * Fire Event by Id + * + * Fire an Event via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String eventId = null; + UnitEventResponse response = + api.execute(eventId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/FreezeACardApiTest.java b/src/test/java/unit/java/sdk/api/FreezeACardApiTest.java new file mode 100644 index 00000000..aca2e231 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/FreezeACardApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCardResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for FreezeACardApi + */ +@Ignore +public class FreezeACardApiTest { + + private final FreezeACardApi api = new FreezeACardApi(); + + + /** + * Freeze a Card + * + * Freeze a Card via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String cardId = null; + UnitCardResponse response = + api.execute(cardId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/FreezeAnAccountApiTest.java b/src/test/java/unit/java/sdk/api/FreezeAnAccountApiTest.java new file mode 100644 index 00000000..fe473727 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/FreezeAnAccountApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.FreezeAccountRequest; +import unit.java.sdk.model.UnitAccountResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for FreezeAnAccountApi + */ +@Ignore +public class FreezeAnAccountApiTest { + + private final FreezeAnAccountApi api = new FreezeAnAccountApi(); + + + /** + * Freeze Account by Id + * + * Freeze Account via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String accountId = null; + FreezeAccountRequest freezeAccountRequest = null; + UnitAccountResponse response = + api.execute(accountId, freezeAccountRequest); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetABackImageApiTest.java b/src/test/java/unit/java/sdk/api/GetABackImageApiTest.java new file mode 100644 index 00000000..42cefb49 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetABackImageApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import java.io.File; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetABackImageApi + */ +@Ignore +public class GetABackImageApiTest { + + private final GetABackImageApi api = new GetABackImageApi(); + + + /** + * Get back image + * + * Get back image via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String checkPaymentId = null; + File response = + api.execute(checkPaymentId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetAFrontImageApiTest.java b/src/test/java/unit/java/sdk/api/GetAFrontImageApiTest.java new file mode 100644 index 00000000..ef15ba79 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetAFrontImageApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import java.io.File; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetAFrontImageApi + */ +@Ignore +public class GetAFrontImageApiTest { + + private final GetAFrontImageApi api = new GetAFrontImageApi(); + + + /** + * Get front image + * + * Get front image via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String checkPaymentId = null; + File response = + api.execute(checkPaymentId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetAccountApiTest.java b/src/test/java/unit/java/sdk/api/GetAccountApiTest.java new file mode 100644 index 00000000..146ed414 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetAccountApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitAccountResponseWithIncluded; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetAccountApi + */ +@Ignore +public class GetAccountApiTest { + + private final GetAccountApi api = new GetAccountApi(); + + + /** + * Get Account by Id + * + * Get an Account from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String accountId = null; + String include = null; + UnitAccountResponseWithIncluded response = + api.execute(accountId, include); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetAccountLimitsApiTest.java b/src/test/java/unit/java/sdk/api/GetAccountLimitsApiTest.java new file mode 100644 index 00000000..74012a21 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetAccountLimitsApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitGetAccountLimitsResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetAccountLimitsApi + */ +@Ignore +public class GetAccountLimitsApiTest { + + private final GetAccountLimitsApi api = new GetAccountLimitsApi(); + + + /** + * Get Account Limits by Id + * + * Get Account Limits from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String accountId = null; + UnitGetAccountLimitsResponse response = + api.execute(accountId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetApplicationApiTest.java b/src/test/java/unit/java/sdk/api/GetApplicationApiTest.java new file mode 100644 index 00000000..4916c5c0 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetApplicationApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitApplicationResponseWithIncluded; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetApplicationApi + */ +@Ignore +public class GetApplicationApiTest { + + private final GetApplicationApi api = new GetApplicationApi(); + + + /** + * Get Application by Id + * + * Get an Application from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String applicationId = null; + String included = null; + UnitApplicationResponseWithIncluded response = + api.execute(applicationId, included); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetApplicationFormApiTest.java b/src/test/java/unit/java/sdk/api/GetApplicationFormApiTest.java new file mode 100644 index 00000000..0046204e --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetApplicationFormApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitApplicationFormResponseWithIncluded; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetApplicationFormApi + */ +@Ignore +public class GetApplicationFormApiTest { + + private final GetApplicationFormApi api = new GetApplicationFormApi(); + + + /** + * Get ApplicationForm by Id + * + * Get an Application Form from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String applicationFormId = null; + String included = null; + UnitApplicationFormResponseWithIncluded response = + api.execute(applicationFormId, included); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetAtmLocationsListApiTest.java b/src/test/java/unit/java/sdk/api/GetAtmLocationsListApiTest.java new file mode 100644 index 00000000..03736644 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetAtmLocationsListApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.AtmLocation; +import unit.java.sdk.model.ExecuteFilterParameter15; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetAtmLocationsListApi + */ +@Ignore +public class GetAtmLocationsListApiTest { + + private final GetAtmLocationsListApi api = new GetAtmLocationsListApi(); + + + /** + * Get List ATM Locations + * + * Get List ATM Locations from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ExecuteFilterParameter15 filter = null; + List response = + api.execute(filter); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetAuthorizationApiTest.java b/src/test/java/unit/java/sdk/api/GetAuthorizationApiTest.java new file mode 100644 index 00000000..0d66ace9 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetAuthorizationApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitAuthorizationResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetAuthorizationApi + */ +@Ignore +public class GetAuthorizationApiTest { + + private final GetAuthorizationApi api = new GetAuthorizationApi(); + + + /** + * Get Authorization by Id + * + * Get a Authorization from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String authorizationId = null; + Boolean includeNoneAuthorized = null; + UnitAuthorizationResponse response = + api.execute(authorizationId, includeNoneAuthorized); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetAuthorizationRequestApiTest.java b/src/test/java/unit/java/sdk/api/GetAuthorizationRequestApiTest.java new file mode 100644 index 00000000..33bdb24e --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetAuthorizationRequestApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitAuthorizationRequestsResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetAuthorizationRequestApi + */ +@Ignore +public class GetAuthorizationRequestApiTest { + + private final GetAuthorizationRequestApi api = new GetAuthorizationRequestApi(); + + + /** + * Get Authorization Request by Id + * + * Get a Authorization Request from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String authorizationId = null; + UnitAuthorizationRequestsResponse response = + api.execute(authorizationId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetBankVerificationPdfApiTest.java b/src/test/java/unit/java/sdk/api/GetBankVerificationPdfApiTest.java new file mode 100644 index 00000000..b46482e9 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetBankVerificationPdfApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import java.io.File; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetBankVerificationPdfApi + */ +@Ignore +public class GetBankVerificationPdfApiTest { + + private final GetBankVerificationPdfApi api = new GetBankVerificationPdfApi(); + + + /** + * Get Bank verification PDF + * + * Get Get Bank verification PDF from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String accountId = null; + File response = + api.execute(accountId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetCardApiTest.java b/src/test/java/unit/java/sdk/api/GetCardApiTest.java new file mode 100644 index 00000000..ac322dd1 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetCardApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCardResponse1; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetCardApi + */ +@Ignore +public class GetCardApiTest { + + private final GetCardApi api = new GetCardApi(); + + + /** + * Get Card by Id + * + * Get a Card from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String cardId = null; + String included = null; + UnitCardResponse1 response = + api.execute(cardId, included); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetCardLimitsApiTest.java b/src/test/java/unit/java/sdk/api/GetCardLimitsApiTest.java new file mode 100644 index 00000000..482714cb --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetCardLimitsApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCardResponse3; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetCardLimitsApi + */ +@Ignore +public class GetCardLimitsApiTest { + + private final GetCardLimitsApi api = new GetCardLimitsApi(); + + + /** + * Get Card Limit by Id + * + * Get a Card Limits from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String cardId = null; + UnitCardResponse3 response = + api.execute(cardId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetCardPinStatusApiTest.java b/src/test/java/unit/java/sdk/api/GetCardPinStatusApiTest.java new file mode 100644 index 00000000..a1dd927b --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetCardPinStatusApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCardResponse2; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetCardPinStatusApi + */ +@Ignore +public class GetCardPinStatusApiTest { + + private final GetCardPinStatusApi api = new GetCardPinStatusApi(); + + + /** + * Get Card PIN Status + * + * Get Card PIN Status via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String cardId = null; + UnitCardResponse2 response = + api.execute(cardId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetCheckDepositApiTest.java b/src/test/java/unit/java/sdk/api/GetCheckDepositApiTest.java new file mode 100644 index 00000000..79710e4c --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetCheckDepositApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCheckDepositResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetCheckDepositApi + */ +@Ignore +public class GetCheckDepositApiTest { + + private final GetCheckDepositApi api = new GetCheckDepositApi(); + + + /** + * Get Check Deposit by Id + * + * Get a Check Deposit from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String checkDepositId = null; + UnitCheckDepositResponse response = + api.execute(checkDepositId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetCheckDepositBackImageApiTest.java b/src/test/java/unit/java/sdk/api/GetCheckDepositBackImageApiTest.java new file mode 100644 index 00000000..5b5fc47b --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetCheckDepositBackImageApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCheckDepositResponse1; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetCheckDepositBackImageApi + */ +@Ignore +public class GetCheckDepositBackImageApiTest { + + private final GetCheckDepositBackImageApi api = new GetCheckDepositBackImageApi(); + + + /** + * Get Back Check Deposit Image by Id + * + * Get Back Check Deposit Image from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String checkDepositId = null; + UnitCheckDepositResponse1 response = + api.execute(checkDepositId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetCheckDepositFrontImageApiTest.java b/src/test/java/unit/java/sdk/api/GetCheckDepositFrontImageApiTest.java new file mode 100644 index 00000000..474b9051 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetCheckDepositFrontImageApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCheckDepositResponse1; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetCheckDepositFrontImageApi + */ +@Ignore +public class GetCheckDepositFrontImageApiTest { + + private final GetCheckDepositFrontImageApi api = new GetCheckDepositFrontImageApi(); + + + /** + * Get Front Check Deposit Image by Id + * + * Get Front Check Deposit Image from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String checkDepositId = null; + UnitCheckDepositResponse1 response = + api.execute(checkDepositId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetCheckPaymentApiTest.java b/src/test/java/unit/java/sdk/api/GetCheckPaymentApiTest.java new file mode 100644 index 00000000..02e65f56 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetCheckPaymentApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCheckPaymentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetCheckPaymentApi + */ +@Ignore +public class GetCheckPaymentApiTest { + + private final GetCheckPaymentApi api = new GetCheckPaymentApi(); + + + /** + * Get Check Payment by Id + * + * Get a Check Payment from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String checkPaymentId = null; + UnitCheckPaymentResponse response = + api.execute(checkPaymentId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetCounterpartyApiTest.java b/src/test/java/unit/java/sdk/api/GetCounterpartyApiTest.java new file mode 100644 index 00000000..4ae0eba8 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetCounterpartyApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCounterpartyResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetCounterpartyApi + */ +@Ignore +public class GetCounterpartyApiTest { + + private final GetCounterpartyApi api = new GetCounterpartyApi(); + + + /** + * Get Counterparty by Id + * + * Get a Counterparty from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String counterpartyId = null; + String included = null; + UnitCounterpartyResponse response = + api.execute(counterpartyId, included); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetCounterpartyBalanceApiTest.java b/src/test/java/unit/java/sdk/api/GetCounterpartyBalanceApiTest.java new file mode 100644 index 00000000..53f76832 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetCounterpartyBalanceApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCounterpartyResponse1; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetCounterpartyBalanceApi + */ +@Ignore +public class GetCounterpartyBalanceApiTest { + + private final GetCounterpartyBalanceApi api = new GetCounterpartyBalanceApi(); + + + /** + * Get Counterparty Balance + * + * Get Recurring Payment from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String counterpartyId = null; + UnitCounterpartyResponse1 response = + api.execute(counterpartyId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetCustomerApiTest.java b/src/test/java/unit/java/sdk/api/GetCustomerApiTest.java new file mode 100644 index 00000000..38190687 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetCustomerApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCustomerResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetCustomerApi + */ +@Ignore +public class GetCustomerApiTest { + + private final GetCustomerApi api = new GetCustomerApi(); + + + /** + * Get Customer by Id + * + * Get a Customer from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String customerId = null; + UnitCustomerResponse response = + api.execute(customerId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetDisputeApiTest.java b/src/test/java/unit/java/sdk/api/GetDisputeApiTest.java new file mode 100644 index 00000000..fc9f5655 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetDisputeApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitDisputeResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetDisputeApi + */ +@Ignore +public class GetDisputeApiTest { + + private final GetDisputeApi api = new GetDisputeApi(); + + + /** + * Get Dispute by Id + * + * Get a Dispute from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String disputeId = null; + UnitDisputeResponse response = + api.execute(disputeId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetEventApiTest.java b/src/test/java/unit/java/sdk/api/GetEventApiTest.java new file mode 100644 index 00000000..7dc19da1 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetEventApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitEventResponse1; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetEventApi + */ +@Ignore +public class GetEventApiTest { + + private final GetEventApi api = new GetEventApi(); + + + /** + * Get Event by Id + * + * Get an Event from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String eventId = null; + UnitEventResponse1 response = + api.execute(eventId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetInstitutionApiTest.java b/src/test/java/unit/java/sdk/api/GetInstitutionApiTest.java new file mode 100644 index 00000000..abd86a48 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetInstitutionApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitInstitutionResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetInstitutionApi + */ +@Ignore +public class GetInstitutionApiTest { + + private final GetInstitutionApi api = new GetInstitutionApi(); + + + /** + * Get Institution by Routing Number + * + * Get an Institution from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String routingNumber = null; + UnitInstitutionResponse response = + api.execute(routingNumber); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListAccountEndOfDayBalancesHistoryApiTest.java b/src/test/java/unit/java/sdk/api/GetListAccountEndOfDayBalancesHistoryApiTest.java new file mode 100644 index 00000000..5c7c0a8a --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListAccountEndOfDayBalancesHistoryApiTest.java @@ -0,0 +1,53 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitGetAccountEndOfDayListResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListAccountEndOfDayBalancesHistoryApi + */ +@Ignore +public class GetListAccountEndOfDayBalancesHistoryApiTest { + + private final GetListAccountEndOfDayBalancesHistoryApi api = new GetListAccountEndOfDayBalancesHistoryApi(); + + + /** + * Get AccountEndOfDay List + * + * Get AccountEndOfDay List from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + UnitGetAccountEndOfDayListResponse response = + api.execute(); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListAccountsApiTest.java b/src/test/java/unit/java/sdk/api/GetListAccountsApiTest.java new file mode 100644 index 00000000..1cbdf3a5 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListAccountsApiTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ExecuteFilterParameter2; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitAccountsListResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListAccountsApi + */ +@Ignore +public class GetListAccountsApiTest { + + private final GetListAccountsApi api = new GetListAccountsApi(); + + + /** + * Get List Accounts + * + * Get List Accounts from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter2 filter = null; + String include = null; + UnitAccountsListResponse response = + api.execute(page, filter, include); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListApplicationFormsApiTest.java b/src/test/java/unit/java/sdk/api/GetListApplicationFormsApiTest.java new file mode 100644 index 00000000..1bd40b95 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListApplicationFormsApiTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ExecuteFilterParameter1; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitApplicationFormsListResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListApplicationFormsApi + */ +@Ignore +public class GetListApplicationFormsApiTest { + + private final GetListApplicationFormsApi api = new GetListApplicationFormsApi(); + + + /** + * Get List Application Forms + * + * Get List Application Forms from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter1 filter = null; + String sort = null; + UnitApplicationFormsListResponse response = + api.execute(page, filter, sort); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListApplicationsApiTest.java b/src/test/java/unit/java/sdk/api/GetListApplicationsApiTest.java new file mode 100644 index 00000000..9c78d712 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListApplicationsApiTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ExecuteFilterParameter; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitListApplicationsResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListApplicationsApi + */ +@Ignore +public class GetListApplicationsApiTest { + + private final GetListApplicationsApi api = new GetListApplicationsApi(); + + + /** + * Get List Application + * + * Get List Applications from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter filter = null; + String sort = null; + UnitListApplicationsResponse response = + api.execute(page, filter, sort); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListAuthorizationRequestsApiTest.java b/src/test/java/unit/java/sdk/api/GetListAuthorizationRequestsApiTest.java new file mode 100644 index 00000000..261b2738 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListAuthorizationRequestsApiTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ExecuteFilterParameter9; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitListAuthorizationRequestsResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListAuthorizationRequestsApi + */ +@Ignore +public class GetListAuthorizationRequestsApiTest { + + private final GetListAuthorizationRequestsApi api = new GetListAuthorizationRequestsApi(); + + + /** + * Get List Authorization Requests + * + * Get List Authorization Requests from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter9 filter = null; + UnitListAuthorizationRequestsResponse response = + api.execute(page, filter); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListAuthorizationsApiTest.java b/src/test/java/unit/java/sdk/api/GetListAuthorizationsApiTest.java new file mode 100644 index 00000000..003d75d0 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListAuthorizationsApiTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ExecuteFilterParameter8; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitListAuthorizationsResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListAuthorizationsApi + */ +@Ignore +public class GetListAuthorizationsApiTest { + + private final GetListAuthorizationsApi api = new GetListAuthorizationsApi(); + + + /** + * Get List authorizations + * + * Get List Authorizations from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter8 filter = null; + String sort = null; + UnitListAuthorizationsResponse response = + api.execute(page, filter, sort); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListCheckDepositsApiTest.java b/src/test/java/unit/java/sdk/api/GetListCheckDepositsApiTest.java new file mode 100644 index 00000000..66b748bc --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListCheckDepositsApiTest.java @@ -0,0 +1,59 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ExecuteFilterParameter13; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitListCheckDepositsResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListCheckDepositsApi + */ +@Ignore +public class GetListCheckDepositsApiTest { + + private final GetListCheckDepositsApi api = new GetListCheckDepositsApi(); + + + /** + * Get List Check Deposits + * + * Get List Check Deposits from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter13 filter = null; + String sort = null; + String include = null; + UnitListCheckDepositsResponse response = + api.execute(page, filter, sort, include); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListCheckPaymentsApiTest.java b/src/test/java/unit/java/sdk/api/GetListCheckPaymentsApiTest.java new file mode 100644 index 00000000..37f308df --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListCheckPaymentsApiTest.java @@ -0,0 +1,59 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ExecuteFilterParameter19; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitListCheckPaymentsResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListCheckPaymentsApi + */ +@Ignore +public class GetListCheckPaymentsApiTest { + + private final GetListCheckPaymentsApi api = new GetListCheckPaymentsApi(); + + + /** + * Get List Check Payments + * + * Get List Check Payments from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter19 filter = null; + String sort = null; + String include = null; + UnitListCheckPaymentsResponse response = + api.execute(page, filter, sort, include); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListCounterpartiesApiTest.java b/src/test/java/unit/java/sdk/api/GetListCounterpartiesApiTest.java new file mode 100644 index 00000000..de865086 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListCounterpartiesApiTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ExecuteFilterParameter5; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitCounterpartiesListResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListCounterpartiesApi + */ +@Ignore +public class GetListCounterpartiesApiTest { + + private final GetListCounterpartiesApi api = new GetListCounterpartiesApi(); + + + /** + * Get Counterparties List + * + * Get Counterparties List from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter5 filter = null; + String sort = null; + UnitCounterpartiesListResponse response = + api.execute(page, filter, sort); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListCustomersApiTest.java b/src/test/java/unit/java/sdk/api/GetListCustomersApiTest.java new file mode 100644 index 00000000..8b14ff55 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListCustomersApiTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ExecuteFilterParameter3; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitCustomersListResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListCustomersApi + */ +@Ignore +public class GetListCustomersApiTest { + + private final GetListCustomersApi api = new GetListCustomersApi(); + + + /** + * Get Customers List + * + * Get Customers List from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter3 filter = null; + String sort = null; + UnitCustomersListResponse response = + api.execute(page, filter, sort); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListDisputesApiTest.java b/src/test/java/unit/java/sdk/api/GetListDisputesApiTest.java new file mode 100644 index 00000000..892a3776 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListDisputesApiTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.Dispute; +import unit.java.sdk.model.ExecuteFilterParameter17; +import unit.java.sdk.model.ListPageParametersObject; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListDisputesApi + */ +@Ignore +public class GetListDisputesApiTest { + + private final GetListDisputesApi api = new GetListDisputesApi(); + + + /** + * Get List Disputes + * + * Get List Disputes from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter17 filter = null; + List response = + api.execute(page, filter); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListEventsApiTest.java b/src/test/java/unit/java/sdk/api/GetListEventsApiTest.java new file mode 100644 index 00000000..4fd677bf --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListEventsApiTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ExecuteFilterParameter12; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitEventListResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListEventsApi + */ +@Ignore +public class GetListEventsApiTest { + + private final GetListEventsApi api = new GetListEventsApi(); + + + /** + * Get Events List + * + * Get Events List from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter12 filter = null; + UnitEventListResponse response = + api.execute(page, filter); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListOfCardsApiTest.java b/src/test/java/unit/java/sdk/api/GetListOfCardsApiTest.java new file mode 100644 index 00000000..ba2c76a8 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListOfCardsApiTest.java @@ -0,0 +1,59 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ExecuteFilterParameter7; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitCardResponseCardsList; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListOfCardsApi + */ +@Ignore +public class GetListOfCardsApiTest { + + private final GetListOfCardsApi api = new GetListOfCardsApi(); + + + /** + * Get List of Cards + * + * Get List of Cards from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter7 filter = null; + String include = null; + String sort = null; + UnitCardResponseCardsList response = + api.execute(page, filter, include, sort); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListOfDocumentsApiTest.java b/src/test/java/unit/java/sdk/api/GetListOfDocumentsApiTest.java new file mode 100644 index 00000000..80d48f97 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListOfDocumentsApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitListDocumentsResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListOfDocumentsApi + */ +@Ignore +public class GetListOfDocumentsApiTest { + + private final GetListOfDocumentsApi api = new GetListOfDocumentsApi(); + + + /** + * Get List of Documents + * + * Get List of Documents via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String applicationId = null; + UnitListDocumentsResponse response = + api.execute(applicationId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListOrgApiTokensApiTest.java b/src/test/java/unit/java/sdk/api/GetListOrgApiTokensApiTest.java new file mode 100644 index 00000000..743117a2 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListOrgApiTokensApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitOrgApiTokensListResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListOrgApiTokensApi + */ +@Ignore +public class GetListOrgApiTokensApiTest { + + private final GetListOrgApiTokensApi api = new GetListOrgApiTokensApi(); + + + /** + * Get List Org API Tokens + * + * Get List Org API Tokens from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String userId = null; + UnitOrgApiTokensListResponse response = + api.execute(userId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListPaymentsApiTest.java b/src/test/java/unit/java/sdk/api/GetListPaymentsApiTest.java new file mode 100644 index 00000000..10ee3029 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListPaymentsApiTest.java @@ -0,0 +1,59 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ExecuteFilterParameter4; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitPaymentsListResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListPaymentsApi + */ +@Ignore +public class GetListPaymentsApiTest { + + private final GetListPaymentsApi api = new GetListPaymentsApi(); + + + /** + * Get List Payments + * + * Get List Payments from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter4 filter = null; + String include = null; + String sort = null; + UnitPaymentsListResponse response = + api.execute(page, filter, include, sort); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListRecurringPaymentsApiTest.java b/src/test/java/unit/java/sdk/api/GetListRecurringPaymentsApiTest.java new file mode 100644 index 00000000..a8ab18be --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListRecurringPaymentsApiTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ExecuteFilterParameter6; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitRecurringPaymentListResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListRecurringPaymentsApi + */ +@Ignore +public class GetListRecurringPaymentsApiTest { + + private final GetListRecurringPaymentsApi api = new GetListRecurringPaymentsApi(); + + + /** + * Get Recurring Payments List + * + * Get Recurring Payments List from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter6 filter = null; + String sort = null; + UnitRecurringPaymentListResponse response = + api.execute(page, filter, sort); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListRepaymentsApiTest.java b/src/test/java/unit/java/sdk/api/GetListRepaymentsApiTest.java new file mode 100644 index 00000000..c4eaac95 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListRepaymentsApiTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ExecuteFilterParameter18; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitRepaymentsListResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListRepaymentsApi + */ +@Ignore +public class GetListRepaymentsApiTest { + + private final GetListRepaymentsApi api = new GetListRepaymentsApi(); + + + /** + * Get List Repayments + * + * Get List Repayments from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter18 filter = null; + UnitRepaymentsListResponse response = + api.execute(page, filter); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListRewardsApiTest.java b/src/test/java/unit/java/sdk/api/GetListRewardsApiTest.java new file mode 100644 index 00000000..93b32db8 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListRewardsApiTest.java @@ -0,0 +1,59 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ExecuteFilterParameter11; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitRewardsListResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListRewardsApi + */ +@Ignore +public class GetListRewardsApiTest { + + private final GetListRewardsApi api = new GetListRewardsApi(); + + + /** + * Get Rewards List + * + * Get Rewards List from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter11 filter = null; + String sort = null; + String include = null; + UnitRewardsListResponse response = + api.execute(page, filter, sort, include); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListStatementsApiTest.java b/src/test/java/unit/java/sdk/api/GetListStatementsApiTest.java new file mode 100644 index 00000000..78871dc2 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListStatementsApiTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ExecuteFilterParameter10; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitStatementsResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListStatementsApi + */ +@Ignore +public class GetListStatementsApiTest { + + private final GetListStatementsApi api = new GetListStatementsApi(); + + + /** + * Get List Statements + * + * Get List Statements from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter10 filter = null; + String sort = null; + UnitStatementsResponse response = + api.execute(page, filter, sort); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListTransactionsApiTest.java b/src/test/java/unit/java/sdk/api/GetListTransactionsApiTest.java new file mode 100644 index 00000000..4cb3bee3 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListTransactionsApiTest.java @@ -0,0 +1,59 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ExecuteFilterParameter16; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitTransactionsListResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListTransactionsApi + */ +@Ignore +public class GetListTransactionsApiTest { + + private final GetListTransactionsApi api = new GetListTransactionsApi(); + + + /** + * Get List Transactions + * + * Get List Transactions from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter16 filter = null; + String sort = null; + String include = null; + UnitTransactionsListResponse response = + api.execute(page, filter, sort, include); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetListWebhooksApiTest.java b/src/test/java/unit/java/sdk/api/GetListWebhooksApiTest.java new file mode 100644 index 00000000..51ba945f --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetListWebhooksApiTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ExecuteFilterParameter14; +import unit.java.sdk.model.ListPageParametersObject; +import unit.java.sdk.model.UnitWebhooksListResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetListWebhooksApi + */ +@Ignore +public class GetListWebhooksApiTest { + + private final GetListWebhooksApi api = new GetListWebhooksApi(); + + + /** + * Get List Webhooks + * + * Get List Webhooks from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + ListPageParametersObject page = null; + ExecuteFilterParameter14 filter = null; + String sort = null; + UnitWebhooksListResponse response = + api.execute(page, filter, sort); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetPaymentApiTest.java b/src/test/java/unit/java/sdk/api/GetPaymentApiTest.java new file mode 100644 index 00000000..d4789d5a --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetPaymentApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitPaymentResponseWithIncluded; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetPaymentApi + */ +@Ignore +public class GetPaymentApiTest { + + private final GetPaymentApi api = new GetPaymentApi(); + + + /** + * Get Payment by Id + * + * Get a Payment from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String paymentId = null; + String included = null; + UnitPaymentResponseWithIncluded response = + api.execute(paymentId, included); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetReceivedPaymentApiTest.java b/src/test/java/unit/java/sdk/api/GetReceivedPaymentApiTest.java new file mode 100644 index 00000000..8c7dd2c6 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetReceivedPaymentApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitReceivedPaymentResponseWithIncluded; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetReceivedPaymentApi + */ +@Ignore +public class GetReceivedPaymentApiTest { + + private final GetReceivedPaymentApi api = new GetReceivedPaymentApi(); + + + /** + * Get Received Payment by Id + * + * Get a Received Payment from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String paymentId = null; + String included = null; + UnitReceivedPaymentResponseWithIncluded response = + api.execute(paymentId, included); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetReceivedPaymentsListApiTest.java b/src/test/java/unit/java/sdk/api/GetReceivedPaymentsListApiTest.java new file mode 100644 index 00000000..b78bbc6f --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetReceivedPaymentsListApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitReceivedPaymentListResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetReceivedPaymentsListApi + */ +@Ignore +public class GetReceivedPaymentsListApiTest { + + private final GetReceivedPaymentsListApi api = new GetReceivedPaymentsListApi(); + + + /** + * Get Received Payments List + * + * Get Received Payments from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String included = null; + UnitReceivedPaymentListResponse response = + api.execute(included); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetRecurringPaymentApiTest.java b/src/test/java/unit/java/sdk/api/GetRecurringPaymentApiTest.java new file mode 100644 index 00000000..f1f194d8 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetRecurringPaymentApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitRecurringPaymentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetRecurringPaymentApi + */ +@Ignore +public class GetRecurringPaymentApiTest { + + private final GetRecurringPaymentApi api = new GetRecurringPaymentApi(); + + + /** + * Get Recurring Payment + * + * Get Recurring Payment from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String paymentId = null; + UnitRecurringPaymentResponse response = + api.execute(paymentId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetRepaymentApiTest.java b/src/test/java/unit/java/sdk/api/GetRepaymentApiTest.java new file mode 100644 index 00000000..883fc6dd --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetRepaymentApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitRepaymentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetRepaymentApi + */ +@Ignore +public class GetRepaymentApiTest { + + private final GetRepaymentApi api = new GetRepaymentApi(); + + + /** + * Get Repayment by Id + * + * Get an Repayment from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String repaymentId = null; + String include = null; + UnitRepaymentResponse response = + api.execute(repaymentId, include); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetRewardApiTest.java b/src/test/java/unit/java/sdk/api/GetRewardApiTest.java new file mode 100644 index 00000000..01f43797 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetRewardApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitRewardResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetRewardApi + */ +@Ignore +public class GetRewardApiTest { + + private final GetRewardApi api = new GetRewardApi(); + + + /** + * Get Reward by Id + * + * Get a Reward from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String rewardId = null; + UnitRewardResponse response = + api.execute(rewardId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetStatementHtmlApiTest.java b/src/test/java/unit/java/sdk/api/GetStatementHtmlApiTest.java new file mode 100644 index 00000000..b806819b --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetStatementHtmlApiTest.java @@ -0,0 +1,53 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetStatementHtmlApi + */ +@Ignore +public class GetStatementHtmlApiTest { + + private final GetStatementHtmlApi api = new GetStatementHtmlApi(); + + + /** + * Get HTML Statement by Id + * + * Get a HTML Statement from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String statementId = null; + String response = + api.execute(statementId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetStatementPdfApiTest.java b/src/test/java/unit/java/sdk/api/GetStatementPdfApiTest.java new file mode 100644 index 00000000..57e8f250 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetStatementPdfApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import java.io.File; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetStatementPdfApi + */ +@Ignore +public class GetStatementPdfApiTest { + + private final GetStatementPdfApi api = new GetStatementPdfApi(); + + + /** + * Get PDF Statement by Id + * + * Get a PDF Statement from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String statementId = null; + File response = + api.execute(statementId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetTransactionApiTest.java b/src/test/java/unit/java/sdk/api/GetTransactionApiTest.java new file mode 100644 index 00000000..522ebf07 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetTransactionApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitTransactionResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetTransactionApi + */ +@Ignore +public class GetTransactionApiTest { + + private final GetTransactionApi api = new GetTransactionApi(); + + + /** + * Get Transaction by Id + * + * Get a Transaction from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String accountId = null; + String transactionId = null; + UnitTransactionResponse response = + api.execute(accountId, transactionId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/GetWebhookApiTest.java b/src/test/java/unit/java/sdk/api/GetWebhookApiTest.java new file mode 100644 index 00000000..2462726a --- /dev/null +++ b/src/test/java/unit/java/sdk/api/GetWebhookApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitWebhookResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for GetWebhookApi + */ +@Ignore +public class GetWebhookApiTest { + + private final GetWebhookApi api = new GetWebhookApi(); + + + /** + * Get Webhook Id + * + * Get a Webhook from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String webhookId = null; + UnitWebhookResponse response = + api.execute(webhookId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/ReopenAnAccountApiTest.java b/src/test/java/unit/java/sdk/api/ReopenAnAccountApiTest.java new file mode 100644 index 00000000..17e78c3e --- /dev/null +++ b/src/test/java/unit/java/sdk/api/ReopenAnAccountApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitAccountResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for ReopenAnAccountApi + */ +@Ignore +public class ReopenAnAccountApiTest { + + private final ReopenAnAccountApi api = new ReopenAnAccountApi(); + + + /** + * Reopen an Account by Id + * + * Reopen an Account via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String accountId = null; + UnitAccountResponse response = + api.execute(accountId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/ReportCardAsLostApiTest.java b/src/test/java/unit/java/sdk/api/ReportCardAsLostApiTest.java new file mode 100644 index 00000000..d7e167fb --- /dev/null +++ b/src/test/java/unit/java/sdk/api/ReportCardAsLostApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCardResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for ReportCardAsLostApi + */ +@Ignore +public class ReportCardAsLostApiTest { + + private final ReportCardAsLostApi api = new ReportCardAsLostApi(); + + + /** + * Report lost as stolen + * + * Report lost as stolen via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String cardId = null; + UnitCardResponse response = + api.execute(cardId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/ReportCardAsStolenApiTest.java b/src/test/java/unit/java/sdk/api/ReportCardAsStolenApiTest.java new file mode 100644 index 00000000..8ba6ec09 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/ReportCardAsStolenApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCardResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for ReportCardAsStolenApi + */ +@Ignore +public class ReportCardAsStolenApiTest { + + private final ReportCardAsStolenApi api = new ReportCardAsStolenApi(); + + + /** + * Report card as stolen + * + * Report card as stolen via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String cardId = null; + UnitCardResponse response = + api.execute(cardId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/ReturnCheckPaymentApiTest.java b/src/test/java/unit/java/sdk/api/ReturnCheckPaymentApiTest.java new file mode 100644 index 00000000..14452f16 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/ReturnCheckPaymentApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.ReturnCheckPaymentRequest; +import unit.java.sdk.model.UnitCheckPaymentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for ReturnCheckPaymentApi + */ +@Ignore +public class ReturnCheckPaymentApiTest { + + private final ReturnCheckPaymentApi api = new ReturnCheckPaymentApi(); + + + /** + * Return Check Payment by Id + * + * Return a Check Payment via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String checkPaymentId = null; + ReturnCheckPaymentRequest returnCheckPaymentRequest = null; + UnitCheckPaymentResponse response = + api.execute(checkPaymentId, returnCheckPaymentRequest); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/RevokeOrgApiTokenApiTest.java b/src/test/java/unit/java/sdk/api/RevokeOrgApiTokenApiTest.java new file mode 100644 index 00000000..e55046f5 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/RevokeOrgApiTokenApiTest.java @@ -0,0 +1,55 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitApiTokenResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for RevokeOrgApiTokenApi + */ +@Ignore +public class RevokeOrgApiTokenApiTest { + + private final RevokeOrgApiTokenApi api = new RevokeOrgApiTokenApi(); + + + /** + * Get Reward by Id + * + * Get a Reward from API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String userId = null; + String tokenId = null; + UnitApiTokenResponse response = + api.execute(userId, tokenId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/UnfreezeACardApiTest.java b/src/test/java/unit/java/sdk/api/UnfreezeACardApiTest.java new file mode 100644 index 00000000..44ed3a53 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/UnfreezeACardApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCardResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for UnfreezeACardApi + */ +@Ignore +public class UnfreezeACardApiTest { + + private final UnfreezeACardApi api = new UnfreezeACardApi(); + + + /** + * Unfreeze a Card + * + * Unfreeze a Card via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String cardId = null; + UnitCardResponse response = + api.execute(cardId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/UnfreezeAccountApiTest.java b/src/test/java/unit/java/sdk/api/UnfreezeAccountApiTest.java new file mode 100644 index 00000000..3c1c3503 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/UnfreezeAccountApiTest.java @@ -0,0 +1,54 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitAccountResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for UnfreezeAccountApi + */ +@Ignore +public class UnfreezeAccountApiTest { + + private final UnfreezeAccountApi api = new UnfreezeAccountApi(); + + + /** + * Unfreeze Account by Id + * + * Unfreeze an Account via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String accountId = null; + UnitAccountResponse response = + api.execute(accountId); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/UpdateAccountApiTest.java b/src/test/java/unit/java/sdk/api/UpdateAccountApiTest.java new file mode 100644 index 00000000..ed404b4c --- /dev/null +++ b/src/test/java/unit/java/sdk/api/UpdateAccountApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.PatchAccount; +import unit.java.sdk.model.UnitAccountResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for UpdateAccountApi + */ +@Ignore +public class UpdateAccountApiTest { + + private final UpdateAccountApi api = new UpdateAccountApi(); + + + /** + * Update Account + * + * Update an Account via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String accountId = null; + PatchAccount patchAccount = null; + UnitAccountResponse response = + api.execute(accountId, patchAccount); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/UpdateApplicationApiTest.java b/src/test/java/unit/java/sdk/api/UpdateApplicationApiTest.java new file mode 100644 index 00000000..962a20fe --- /dev/null +++ b/src/test/java/unit/java/sdk/api/UpdateApplicationApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitApplicationResponseWithIncluded; +import unit.java.sdk.model.UpdateApplication; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for UpdateApplicationApi + */ +@Ignore +public class UpdateApplicationApiTest { + + private final UpdateApplicationApi api = new UpdateApplicationApi(); + + + /** + * Update Application + * + * Update an Application via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String applicationId = null; + UpdateApplication updateApplication = null; + UnitApplicationResponseWithIncluded response = + api.execute(applicationId, updateApplication); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/UpdateCardApiTest.java b/src/test/java/unit/java/sdk/api/UpdateCardApiTest.java new file mode 100644 index 00000000..d930979a --- /dev/null +++ b/src/test/java/unit/java/sdk/api/UpdateCardApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCardResponse; +import unit.java.sdk.model.UpdateCard; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for UpdateCardApi + */ +@Ignore +public class UpdateCardApiTest { + + private final UpdateCardApi api = new UpdateCardApi(); + + + /** + * Update Card + * + * Update a Card via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String cardId = null; + UpdateCard updateCard = null; + UnitCardResponse response = + api.execute(cardId, updateCard); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/UpdateCheckDepositApiTest.java b/src/test/java/unit/java/sdk/api/UpdateCheckDepositApiTest.java new file mode 100644 index 00000000..8683d326 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/UpdateCheckDepositApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCheckDepositResponse; +import unit.java.sdk.model.UpdateCheckDeposit; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for UpdateCheckDepositApi + */ +@Ignore +public class UpdateCheckDepositApiTest { + + private final UpdateCheckDepositApi api = new UpdateCheckDepositApi(); + + + /** + * Update Check Deposit + * + * Update a Check Deposit via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String checkDepositId = null; + UpdateCheckDeposit updateCheckDeposit = null; + UnitCheckDepositResponse response = + api.execute(checkDepositId, updateCheckDeposit); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/UpdateCounterpartyApiTest.java b/src/test/java/unit/java/sdk/api/UpdateCounterpartyApiTest.java new file mode 100644 index 00000000..3c955fb7 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/UpdateCounterpartyApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCounterpartyResponse; +import unit.java.sdk.model.UpdateCounterparty; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for UpdateCounterpartyApi + */ +@Ignore +public class UpdateCounterpartyApiTest { + + private final UpdateCounterpartyApi api = new UpdateCounterpartyApi(); + + + /** + * Update Counterparty + * + * Update a Counterparty via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String counterpartyId = null; + UpdateCounterparty updateCounterparty = null; + UnitCounterpartyResponse response = + api.execute(counterpartyId, updateCounterparty); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/UpdateCustomerApiTest.java b/src/test/java/unit/java/sdk/api/UpdateCustomerApiTest.java new file mode 100644 index 00000000..45738231 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/UpdateCustomerApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitCustomerResponse; +import unit.java.sdk.model.UpdateCustomer; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for UpdateCustomerApi + */ +@Ignore +public class UpdateCustomerApiTest { + + private final UpdateCustomerApi api = new UpdateCustomerApi(); + + + /** + * Update Customer + * + * Update an Customer via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String customerId = null; + UpdateCustomer updateCustomer = null; + UnitCustomerResponse response = + api.execute(customerId, updateCustomer); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/UpdatePaymentApiTest.java b/src/test/java/unit/java/sdk/api/UpdatePaymentApiTest.java new file mode 100644 index 00000000..869b0943 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/UpdatePaymentApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitPaymentResponse; +import unit.java.sdk.model.UpdatePayment; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for UpdatePaymentApi + */ +@Ignore +public class UpdatePaymentApiTest { + + private final UpdatePaymentApi api = new UpdatePaymentApi(); + + + /** + * Update Payment + * + * Update an Payment via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String paymentId = null; + UpdatePayment updatePayment = null; + UnitPaymentResponse response = + api.execute(paymentId, updatePayment); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/UpdateReceivedPaymentApiTest.java b/src/test/java/unit/java/sdk/api/UpdateReceivedPaymentApiTest.java new file mode 100644 index 00000000..e17e1f97 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/UpdateReceivedPaymentApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitReceivedPaymentResponse; +import unit.java.sdk.model.UpdateReceivedPayment; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for UpdateReceivedPaymentApi + */ +@Ignore +public class UpdateReceivedPaymentApiTest { + + private final UpdateReceivedPaymentApi api = new UpdateReceivedPaymentApi(); + + + /** + * Update Received Payment + * + * Update a Received Payment via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String paymentId = null; + UpdateReceivedPayment updateReceivedPayment = null; + UnitReceivedPaymentResponse response = + api.execute(paymentId, updateReceivedPayment); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/UpdateTransactionApiTest.java b/src/test/java/unit/java/sdk/api/UpdateTransactionApiTest.java new file mode 100644 index 00000000..3a3211f7 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/UpdateTransactionApiTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitTransactionResponse1; +import unit.java.sdk.model.UpdateTransaction; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for UpdateTransactionApi + */ +@Ignore +public class UpdateTransactionApiTest { + + private final UpdateTransactionApi api = new UpdateTransactionApi(); + + + /** + * Update Transaction + * + * Update a Transaction via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String accountId = null; + String transactionId = null; + UpdateTransaction updateTransaction = null; + UnitTransactionResponse1 response = + api.execute(accountId, transactionId, updateTransaction); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/UpdateWebhookApiTest.java b/src/test/java/unit/java/sdk/api/UpdateWebhookApiTest.java new file mode 100644 index 00000000..427df18a --- /dev/null +++ b/src/test/java/unit/java/sdk/api/UpdateWebhookApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitWebhookResponse; +import unit.java.sdk.model.UpdateUnitRequest; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for UpdateWebhookApi + */ +@Ignore +public class UpdateWebhookApiTest { + + private final UpdateWebhookApi api = new UpdateWebhookApi(); + + + /** + * Update Webhook + * + * Update a Webhook via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String webhookId = null; + UpdateUnitRequest updateUnitRequest = null; + UnitWebhookResponse response = + api.execute(webhookId, updateUnitRequest); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/UploadAJpegDocumentForAnApplicationApiTest.java b/src/test/java/unit/java/sdk/api/UploadAJpegDocumentForAnApplicationApiTest.java new file mode 100644 index 00000000..9ec23128 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/UploadAJpegDocumentForAnApplicationApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitDocumentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for UploadAJpegDocumentForAnApplicationApi + */ +@Ignore +public class UploadAJpegDocumentForAnApplicationApiTest { + + private final UploadAJpegDocumentForAnApplicationApi api = new UploadAJpegDocumentForAnApplicationApi(); + + + /** + * Upload a JPEG document + * + * Upload a JPEG file via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String applicationId = null; + String documentId = null; + Object body = null; + UnitDocumentResponse response = + api.execute(applicationId, documentId, body); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/UploadAJpegDocumentForAnApplicationBackSideApiTest.java b/src/test/java/unit/java/sdk/api/UploadAJpegDocumentForAnApplicationBackSideApiTest.java new file mode 100644 index 00000000..70ada9fa --- /dev/null +++ b/src/test/java/unit/java/sdk/api/UploadAJpegDocumentForAnApplicationBackSideApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitDocumentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for UploadAJpegDocumentForAnApplicationBackSideApi + */ +@Ignore +public class UploadAJpegDocumentForAnApplicationBackSideApiTest { + + private final UploadAJpegDocumentForAnApplicationBackSideApi api = new UploadAJpegDocumentForAnApplicationBackSideApi(); + + + /** + * Upload a JPEG document - Back Side + * + * Upload a JPEG file via API - Back Side + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String applicationId = null; + String documentId = null; + Object body = null; + UnitDocumentResponse response = + api.execute(applicationId, documentId, body); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/UploadAPdfDocumentForAnApplicationApiTest.java b/src/test/java/unit/java/sdk/api/UploadAPdfDocumentForAnApplicationApiTest.java new file mode 100644 index 00000000..c62b1498 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/UploadAPdfDocumentForAnApplicationApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitDocumentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for UploadAPdfDocumentForAnApplicationApi + */ +@Ignore +public class UploadAPdfDocumentForAnApplicationApiTest { + + private final UploadAPdfDocumentForAnApplicationApi api = new UploadAPdfDocumentForAnApplicationApi(); + + + /** + * Upload a PDF document + * + * Upload a PDF file via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String applicationId = null; + String documentId = null; + Object body = null; + UnitDocumentResponse response = + api.execute(applicationId, documentId, body); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/UploadAPdfDocumentForAnApplicationBackSideApiTest.java b/src/test/java/unit/java/sdk/api/UploadAPdfDocumentForAnApplicationBackSideApiTest.java new file mode 100644 index 00000000..dabea03c --- /dev/null +++ b/src/test/java/unit/java/sdk/api/UploadAPdfDocumentForAnApplicationBackSideApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitDocumentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for UploadAPdfDocumentForAnApplicationBackSideApi + */ +@Ignore +public class UploadAPdfDocumentForAnApplicationBackSideApiTest { + + private final UploadAPdfDocumentForAnApplicationBackSideApi api = new UploadAPdfDocumentForAnApplicationBackSideApi(); + + + /** + * Upload a PDF document - Back Side + * + * Upload a PDF file via API - Back Side + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String applicationId = null; + String documentId = null; + Object body = null; + UnitDocumentResponse response = + api.execute(applicationId, documentId, body); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/UploadAPngDocumentForAnApplicationApiTest.java b/src/test/java/unit/java/sdk/api/UploadAPngDocumentForAnApplicationApiTest.java new file mode 100644 index 00000000..36868bc6 --- /dev/null +++ b/src/test/java/unit/java/sdk/api/UploadAPngDocumentForAnApplicationApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitDocumentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for UploadAPngDocumentForAnApplicationApi + */ +@Ignore +public class UploadAPngDocumentForAnApplicationApiTest { + + private final UploadAPngDocumentForAnApplicationApi api = new UploadAPngDocumentForAnApplicationApi(); + + + /** + * Upload a PNG document + * + * Upload a PNG file via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String applicationId = null; + String documentId = null; + Object body = null; + UnitDocumentResponse response = + api.execute(applicationId, documentId, body); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/UploadAPngDocumentForAnApplicationBackSideApiTest.java b/src/test/java/unit/java/sdk/api/UploadAPngDocumentForAnApplicationBackSideApiTest.java new file mode 100644 index 00000000..94dfb30b --- /dev/null +++ b/src/test/java/unit/java/sdk/api/UploadAPngDocumentForAnApplicationBackSideApiTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitDocumentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for UploadAPngDocumentForAnApplicationBackSideApi + */ +@Ignore +public class UploadAPngDocumentForAnApplicationBackSideApiTest { + + private final UploadAPngDocumentForAnApplicationBackSideApi api = new UploadAPngDocumentForAnApplicationBackSideApi(); + + + /** + * Upload a PNG document - Back Side + * + * Upload a PNG file via API - Back Side + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String applicationId = null; + String documentId = null; + Object body = null; + UnitDocumentResponse response = + api.execute(applicationId, documentId, body); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/api/VerifyADocumentForAnApplicationApiTest.java b/src/test/java/unit/java/sdk/api/VerifyADocumentForAnApplicationApiTest.java new file mode 100644 index 00000000..0b1412bb --- /dev/null +++ b/src/test/java/unit/java/sdk/api/VerifyADocumentForAnApplicationApiTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.api; + +import unit.java.sdk.ApiException; +import unit.java.sdk.model.UnitDocumentResponse; +import unit.java.sdk.model.VerifyDocument; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for VerifyADocumentForAnApplicationApi + */ +@Ignore +public class VerifyADocumentForAnApplicationApiTest { + + private final VerifyADocumentForAnApplicationApi api = new VerifyADocumentForAnApplicationApi(); + + + /** + * Verify a document + * + * Verify a document via API + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void executeTest() throws ApiException { + String applicationId = null; + String documentId = null; + VerifyDocument verifyDocument = null; + UnitDocumentResponse response = + api.execute(applicationId, documentId, verifyDocument); + + // TODO: test validations + } + +} diff --git a/src/test/java/unit/java/sdk/model/AccountEndOfDayAttributesTest.java b/src/test/java/unit/java/sdk/model/AccountEndOfDayAttributesTest.java new file mode 100644 index 00000000..d313884d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AccountEndOfDayAttributesTest.java @@ -0,0 +1,81 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AccountEndOfDayAttributes + */ +public class AccountEndOfDayAttributesTest { + private final AccountEndOfDayAttributes model = new AccountEndOfDayAttributes(); + + /** + * Model tests for AccountEndOfDayAttributes + */ + @Test + public void testAccountEndOfDayAttributes() { + // TODO: test AccountEndOfDayAttributes + } + + /** + * Test the property 'date' + */ + @Test + public void dateTest() { + // TODO: test date + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'hold' + */ + @Test + public void holdTest() { + // TODO: test hold + } + + /** + * Test the property 'available' + */ + @Test + public void availableTest() { + // TODO: test available + } + + /** + * Test the property 'overdraftLimit' + */ + @Test + public void overdraftLimitTest() { + // TODO: test overdraftLimit + } + +} diff --git a/src/test/java/unit/java/sdk/model/AccountEndOfDayTest.java b/src/test/java/unit/java/sdk/model/AccountEndOfDayTest.java new file mode 100644 index 00000000..5c23c688 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AccountEndOfDayTest.java @@ -0,0 +1,74 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountEndOfDayAttributes; +import unit.java.sdk.model.Relationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AccountEndOfDay + */ +public class AccountEndOfDayTest { + private final AccountEndOfDay model = new AccountEndOfDay(); + + /** + * Model tests for AccountEndOfDay + */ + @Test + public void testAccountEndOfDay() { + // TODO: test AccountEndOfDay + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/AccountLowBalanceClosureTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/AccountLowBalanceClosureTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..70b3d9bc --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AccountLowBalanceClosureTransactionAllOfAttributesTest.java @@ -0,0 +1,89 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AccountLowBalanceClosureTransactionAllOfAttributes + */ +public class AccountLowBalanceClosureTransactionAllOfAttributesTest { + private final AccountLowBalanceClosureTransactionAllOfAttributes model = new AccountLowBalanceClosureTransactionAllOfAttributes(); + + /** + * Model tests for AccountLowBalanceClosureTransactionAllOfAttributes + */ + @Test + public void testAccountLowBalanceClosureTransactionAllOfAttributes() { + // TODO: test AccountLowBalanceClosureTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/AccountLowBalanceClosureTransactionTest.java b/src/test/java/unit/java/sdk/model/AccountLowBalanceClosureTransactionTest.java new file mode 100644 index 00000000..666243e3 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AccountLowBalanceClosureTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountLowBalanceClosureTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AccountLowBalanceClosureTransaction + */ +public class AccountLowBalanceClosureTransactionTest { + private final AccountLowBalanceClosureTransaction model = new AccountLowBalanceClosureTransaction(); + + /** + * Model tests for AccountLowBalanceClosureTransaction + */ + @Test + public void testAccountLowBalanceClosureTransaction() { + // TODO: test AccountLowBalanceClosureTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/AccountRelationship1Test.java b/src/test/java/unit/java/sdk/model/AccountRelationship1Test.java new file mode 100644 index 00000000..0b991a13 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AccountRelationship1Test.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountRelationshipData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AccountRelationship1 + */ +public class AccountRelationship1Test { + private final AccountRelationship1 model = new AccountRelationship1(); + + /** + * Model tests for AccountRelationship1 + */ + @Test + public void testAccountRelationship1() { + // TODO: test AccountRelationship1 + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/AccountRelationship2DataTest.java b/src/test/java/unit/java/sdk/model/AccountRelationship2DataTest.java new file mode 100644 index 00000000..05e48438 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AccountRelationship2DataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AccountRelationship2Data + */ +public class AccountRelationship2DataTest { + private final AccountRelationship2Data model = new AccountRelationship2Data(); + + /** + * Model tests for AccountRelationship2Data + */ + @Test + public void testAccountRelationship2Data() { + // TODO: test AccountRelationship2Data + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/AccountRelationship2Test.java b/src/test/java/unit/java/sdk/model/AccountRelationship2Test.java new file mode 100644 index 00000000..8561f79d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AccountRelationship2Test.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountRelationship2Data; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AccountRelationship2 + */ +public class AccountRelationship2Test { + private final AccountRelationship2 model = new AccountRelationship2(); + + /** + * Model tests for AccountRelationship2 + */ + @Test + public void testAccountRelationship2() { + // TODO: test AccountRelationship2 + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/AccountRelationshipDataTest.java b/src/test/java/unit/java/sdk/model/AccountRelationshipDataTest.java new file mode 100644 index 00000000..ca3eaa3b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AccountRelationshipDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AccountRelationshipData + */ +public class AccountRelationshipDataTest { + private final AccountRelationshipData model = new AccountRelationshipData(); + + /** + * Model tests for AccountRelationshipData + */ + @Test + public void testAccountRelationshipData() { + // TODO: test AccountRelationshipData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/AccountRelationshipTest.java b/src/test/java/unit/java/sdk/model/AccountRelationshipTest.java new file mode 100644 index 00000000..416676e5 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AccountRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountRelationshipData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AccountRelationship + */ +public class AccountRelationshipTest { + private final AccountRelationship model = new AccountRelationship(); + + /** + * Model tests for AccountRelationship + */ + @Test + public void testAccountRelationship() { + // TODO: test AccountRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/AccountTest.java b/src/test/java/unit/java/sdk/model/AccountTest.java new file mode 100644 index 00000000..c5a4f758 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AccountTest.java @@ -0,0 +1,59 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Account + */ +public class AccountTest { + private final Account model = new Account(); + + /** + * Model tests for Account + */ + @Test + public void testAccount() { + // TODO: test Account + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/unit/java/sdk/model/AchPaymentAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/AchPaymentAllOfAttributesTest.java new file mode 100644 index 00000000..723c22c1 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AchPaymentAllOfAttributesTest.java @@ -0,0 +1,171 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AchPaymentAllOfAttributes + */ +public class AchPaymentAllOfAttributesTest { + private final AchPaymentAllOfAttributes model = new AchPaymentAllOfAttributes(); + + /** + * Model tests for AchPaymentAllOfAttributes + */ + @Test + public void testAchPaymentAllOfAttributes() { + // TODO: test AchPaymentAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'addenda' + */ + @Test + public void addendaTest() { + // TODO: test addenda + } + + /** + * Test the property 'counterparty' + */ + @Test + public void counterpartyTest() { + // TODO: test counterparty + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'settlementDate' + */ + @Test + public void settlementDateTest() { + // TODO: test settlementDate + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** + * Test the property 'expectedCompletionDate' + */ + @Test + public void expectedCompletionDateTest() { + // TODO: test expectedCompletionDate + } + + /** + * Test the property 'secCode' + */ + @Test + public void secCodeTest() { + // TODO: test secCode + } + + /** + * Test the property 'traceNumber' + */ + @Test + public void traceNumberTest() { + // TODO: test traceNumber + } + + /** + * Test the property 'sameDay' + */ + @Test + public void sameDayTest() { + // TODO: test sameDay + } + + /** + * Test the property 'counterpartyVerificationMethod' + */ + @Test + public void counterpartyVerificationMethodTest() { + // TODO: test counterpartyVerificationMethod + } + + /** + * Test the property 'clearingDaysOverride' + */ + @Test + public void clearingDaysOverrideTest() { + // TODO: test clearingDaysOverride + } + +} diff --git a/src/test/java/unit/java/sdk/model/AchPaymentTest.java b/src/test/java/unit/java/sdk/model/AchPaymentTest.java new file mode 100644 index 00000000..0b59a90b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AchPaymentTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AchPaymentAllOfAttributes; +import unit.java.sdk.model.Payment; +import unit.java.sdk.model.PaymentRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AchPayment + */ +public class AchPaymentTest { + private final AchPayment model = new AchPayment(); + + /** + * Model tests for AchPayment + */ + @Test + public void testAchPayment() { + // TODO: test AchPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/AchRepaymentAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfAttributesTest.java new file mode 100644 index 00000000..cdd4bb09 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfAttributesTest.java @@ -0,0 +1,89 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AchRepaymentAllOfAttributes + */ +public class AchRepaymentAllOfAttributesTest { + private final AchRepaymentAllOfAttributes model = new AchRepaymentAllOfAttributes(); + + /** + * Model tests for AchRepaymentAllOfAttributes + */ + @Test + public void testAchRepaymentAllOfAttributes() { + // TODO: test AchRepaymentAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'sameDay' + */ + @Test + public void sameDayTest() { + // TODO: test sameDay + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsAccountDataTest.java b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsAccountDataTest.java new file mode 100644 index 00000000..e328b19b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsAccountDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AchRepaymentAllOfRelationshipsAccountData + */ +public class AchRepaymentAllOfRelationshipsAccountDataTest { + private final AchRepaymentAllOfRelationshipsAccountData model = new AchRepaymentAllOfRelationshipsAccountData(); + + /** + * Model tests for AchRepaymentAllOfRelationshipsAccountData + */ + @Test + public void testAchRepaymentAllOfRelationshipsAccountData() { + // TODO: test AchRepaymentAllOfRelationshipsAccountData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsAccountTest.java b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsAccountTest.java new file mode 100644 index 00000000..163eba79 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsAccountTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsAccountData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AchRepaymentAllOfRelationshipsAccount + */ +public class AchRepaymentAllOfRelationshipsAccountTest { + private final AchRepaymentAllOfRelationshipsAccount model = new AchRepaymentAllOfRelationshipsAccount(); + + /** + * Model tests for AchRepaymentAllOfRelationshipsAccount + */ + @Test + public void testAchRepaymentAllOfRelationshipsAccount() { + // TODO: test AchRepaymentAllOfRelationshipsAccount + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCounterpartyDataTest.java b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCounterpartyDataTest.java new file mode 100644 index 00000000..450732ee --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCounterpartyDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AchRepaymentAllOfRelationshipsCounterpartyData + */ +public class AchRepaymentAllOfRelationshipsCounterpartyDataTest { + private final AchRepaymentAllOfRelationshipsCounterpartyData model = new AchRepaymentAllOfRelationshipsCounterpartyData(); + + /** + * Model tests for AchRepaymentAllOfRelationshipsCounterpartyData + */ + @Test + public void testAchRepaymentAllOfRelationshipsCounterpartyData() { + // TODO: test AchRepaymentAllOfRelationshipsCounterpartyData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCounterpartyTest.java b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCounterpartyTest.java new file mode 100644 index 00000000..e6500275 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCounterpartyTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsCounterpartyData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AchRepaymentAllOfRelationshipsCounterparty + */ +public class AchRepaymentAllOfRelationshipsCounterpartyTest { + private final AchRepaymentAllOfRelationshipsCounterparty model = new AchRepaymentAllOfRelationshipsCounterparty(); + + /** + * Model tests for AchRepaymentAllOfRelationshipsCounterparty + */ + @Test + public void testAchRepaymentAllOfRelationshipsCounterparty() { + // TODO: test AchRepaymentAllOfRelationshipsCounterparty + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCreditAccountDataTest.java b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCreditAccountDataTest.java new file mode 100644 index 00000000..8d92a045 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCreditAccountDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AchRepaymentAllOfRelationshipsCreditAccountData + */ +public class AchRepaymentAllOfRelationshipsCreditAccountDataTest { + private final AchRepaymentAllOfRelationshipsCreditAccountData model = new AchRepaymentAllOfRelationshipsCreditAccountData(); + + /** + * Model tests for AchRepaymentAllOfRelationshipsCreditAccountData + */ + @Test + public void testAchRepaymentAllOfRelationshipsCreditAccountData() { + // TODO: test AchRepaymentAllOfRelationshipsCreditAccountData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCreditAccountTest.java b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCreditAccountTest.java new file mode 100644 index 00000000..052963a2 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCreditAccountTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsCreditAccountData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AchRepaymentAllOfRelationshipsCreditAccount + */ +public class AchRepaymentAllOfRelationshipsCreditAccountTest { + private final AchRepaymentAllOfRelationshipsCreditAccount model = new AchRepaymentAllOfRelationshipsCreditAccount(); + + /** + * Model tests for AchRepaymentAllOfRelationshipsCreditAccount + */ + @Test + public void testAchRepaymentAllOfRelationshipsCreditAccount() { + // TODO: test AchRepaymentAllOfRelationshipsCreditAccount + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCustomerDataTest.java b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCustomerDataTest.java new file mode 100644 index 00000000..32e5b2ec --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCustomerDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AchRepaymentAllOfRelationshipsCustomerData + */ +public class AchRepaymentAllOfRelationshipsCustomerDataTest { + private final AchRepaymentAllOfRelationshipsCustomerData model = new AchRepaymentAllOfRelationshipsCustomerData(); + + /** + * Model tests for AchRepaymentAllOfRelationshipsCustomerData + */ + @Test + public void testAchRepaymentAllOfRelationshipsCustomerData() { + // TODO: test AchRepaymentAllOfRelationshipsCustomerData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCustomerTest.java b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCustomerTest.java new file mode 100644 index 00000000..d2910486 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsCustomerTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsCustomerData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AchRepaymentAllOfRelationshipsCustomer + */ +public class AchRepaymentAllOfRelationshipsCustomerTest { + private final AchRepaymentAllOfRelationshipsCustomer model = new AchRepaymentAllOfRelationshipsCustomer(); + + /** + * Model tests for AchRepaymentAllOfRelationshipsCustomer + */ + @Test + public void testAchRepaymentAllOfRelationshipsCustomer() { + // TODO: test AchRepaymentAllOfRelationshipsCustomer + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsPaymentDataTest.java b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsPaymentDataTest.java new file mode 100644 index 00000000..f19f7e6b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsPaymentDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AchRepaymentAllOfRelationshipsPaymentData + */ +public class AchRepaymentAllOfRelationshipsPaymentDataTest { + private final AchRepaymentAllOfRelationshipsPaymentData model = new AchRepaymentAllOfRelationshipsPaymentData(); + + /** + * Model tests for AchRepaymentAllOfRelationshipsPaymentData + */ + @Test + public void testAchRepaymentAllOfRelationshipsPaymentData() { + // TODO: test AchRepaymentAllOfRelationshipsPaymentData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsPaymentTest.java b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsPaymentTest.java new file mode 100644 index 00000000..03add3e5 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsPaymentTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsPaymentData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AchRepaymentAllOfRelationshipsPayment + */ +public class AchRepaymentAllOfRelationshipsPaymentTest { + private final AchRepaymentAllOfRelationshipsPayment model = new AchRepaymentAllOfRelationshipsPayment(); + + /** + * Model tests for AchRepaymentAllOfRelationshipsPayment + */ + @Test + public void testAchRepaymentAllOfRelationshipsPayment() { + // TODO: test AchRepaymentAllOfRelationshipsPayment + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsTest.java b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsTest.java new file mode 100644 index 00000000..1e844c36 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AchRepaymentAllOfRelationshipsTest.java @@ -0,0 +1,85 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsAccount; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsCounterparty; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsCreditAccount; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsCustomer; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsPayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AchRepaymentAllOfRelationships + */ +public class AchRepaymentAllOfRelationshipsTest { + private final AchRepaymentAllOfRelationships model = new AchRepaymentAllOfRelationships(); + + /** + * Model tests for AchRepaymentAllOfRelationships + */ + @Test + public void testAchRepaymentAllOfRelationships() { + // TODO: test AchRepaymentAllOfRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'creditAccount' + */ + @Test + public void creditAccountTest() { + // TODO: test creditAccount + } + + /** + * Test the property 'counterparty' + */ + @Test + public void counterpartyTest() { + // TODO: test counterparty + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + + /** + * Test the property 'payment' + */ + @Test + public void paymentTest() { + // TODO: test payment + } + +} diff --git a/src/test/java/unit/java/sdk/model/AchRepaymentTest.java b/src/test/java/unit/java/sdk/model/AchRepaymentTest.java new file mode 100644 index 00000000..110f2eb0 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AchRepaymentTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AchRepaymentAllOfAttributes; +import unit.java.sdk.model.AchRepaymentAllOfRelationships; +import unit.java.sdk.model.Repayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AchRepayment + */ +public class AchRepaymentTest { + private final AchRepayment model = new AchRepayment(); + + /** + * Model tests for AchRepayment + */ + @Test + public void testAchRepayment() { + // TODO: test AchRepayment + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/AddressTest.java b/src/test/java/unit/java/sdk/model/AddressTest.java new file mode 100644 index 00000000..c50b35ca --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AddressTest.java @@ -0,0 +1,92 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Address + */ +public class AddressTest { + private final Address model = new Address(); + + /** + * Model tests for Address + */ + @Test + public void testAddress() { + // TODO: test Address + } + + /** + * Test the property 'street' + */ + @Test + public void streetTest() { + // TODO: test street + } + + /** + * Test the property 'street2' + */ + @Test + public void street2Test() { + // TODO: test street2 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'country' + */ + @Test + public void countryTest() { + // TODO: test country + } + +} diff --git a/src/test/java/unit/java/sdk/model/AdjustmentTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/AdjustmentTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..b7af423c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AdjustmentTransactionAllOfAttributesTest.java @@ -0,0 +1,97 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AdjustmentTransactionAllOfAttributes + */ +public class AdjustmentTransactionAllOfAttributesTest { + private final AdjustmentTransactionAllOfAttributes model = new AdjustmentTransactionAllOfAttributes(); + + /** + * Model tests for AdjustmentTransactionAllOfAttributes + */ + @Test + public void testAdjustmentTransactionAllOfAttributes() { + // TODO: test AdjustmentTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/AdjustmentTransactionTest.java b/src/test/java/unit/java/sdk/model/AdjustmentTransactionTest.java new file mode 100644 index 00000000..2421f68d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AdjustmentTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AdjustmentTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AdjustmentTransaction + */ +public class AdjustmentTransactionTest { + private final AdjustmentTransaction model = new AdjustmentTransaction(); + + /** + * Model tests for AdjustmentTransaction + */ + @Test + public void testAdjustmentTransaction() { + // TODO: test AdjustmentTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/AnnualIncomeTest.java b/src/test/java/unit/java/sdk/model/AnnualIncomeTest.java new file mode 100644 index 00000000..b9c26884 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AnnualIncomeTest.java @@ -0,0 +1,32 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AnnualIncome + */ +public class AnnualIncomeTest { + /** + * Model tests for AnnualIncome + */ + @Test + public void testAnnualIncome() { + // TODO: test AnnualIncome + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApiTokenAttributesTest.java b/src/test/java/unit/java/sdk/model/ApiTokenAttributesTest.java new file mode 100644 index 00000000..5eccd551 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApiTokenAttributesTest.java @@ -0,0 +1,81 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApiTokenAttributes + */ +public class ApiTokenAttributesTest { + private final ApiTokenAttributes model = new ApiTokenAttributes(); + + /** + * Model tests for ApiTokenAttributes + */ + @Test + public void testApiTokenAttributes() { + // TODO: test ApiTokenAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'expiration' + */ + @Test + public void expirationTest() { + // TODO: test expiration + } + + /** + * Test the property 'token' + */ + @Test + public void tokenTest() { + // TODO: test token + } + + /** + * Test the property 'sourceIp' + */ + @Test + public void sourceIpTest() { + // TODO: test sourceIp + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApiTokenTest.java b/src/test/java/unit/java/sdk/model/ApiTokenTest.java new file mode 100644 index 00000000..e7ee6d3d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApiTokenTest.java @@ -0,0 +1,65 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ApiTokenAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApiToken + */ +public class ApiTokenTest { + private final ApiToken model = new ApiToken(); + + /** + * Model tests for ApiToken + */ + @Test + public void testApiToken() { + // TODO: test ApiToken + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApplicationFormAdditionalDisclosuresInnerTest.java b/src/test/java/unit/java/sdk/model/ApplicationFormAdditionalDisclosuresInnerTest.java new file mode 100644 index 00000000..98c39e9d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApplicationFormAdditionalDisclosuresInnerTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApplicationFormAdditionalDisclosuresInner + */ +public class ApplicationFormAdditionalDisclosuresInnerTest { + private final ApplicationFormAdditionalDisclosuresInner model = new ApplicationFormAdditionalDisclosuresInner(); + + /** + * Model tests for ApplicationFormAdditionalDisclosuresInner + */ + @Test + public void testApplicationFormAdditionalDisclosuresInner() { + // TODO: test ApplicationFormAdditionalDisclosuresInner + } + + /** + * Test the property 'title' + */ + @Test + public void titleTest() { + // TODO: test title + } + + /** + * Test the property 'url' + */ + @Test + public void urlTest() { + // TODO: test url + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApplicationFormAttributesTest.java b/src/test/java/unit/java/sdk/model/ApplicationFormAttributesTest.java new file mode 100644 index 00000000..6e2cddac --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApplicationFormAttributesTest.java @@ -0,0 +1,100 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.ApplicationFormPrefill; +import unit.java.sdk.model.ApplicationFormSettingsOverride; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApplicationFormAttributes + */ +public class ApplicationFormAttributesTest { + private final ApplicationFormAttributes model = new ApplicationFormAttributes(); + + /** + * Model tests for ApplicationFormAttributes + */ + @Test + public void testApplicationFormAttributes() { + // TODO: test ApplicationFormAttributes + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'url' + */ + @Test + public void urlTest() { + // TODO: test url + } + + /** + * Test the property 'stage' + */ + @Test + public void stageTest() { + // TODO: test stage + } + + /** + * Test the property 'applicantDetails' + */ + @Test + public void applicantDetailsTest() { + // TODO: test applicantDetails + } + + /** + * Test the property 'settingsOverride' + */ + @Test + public void settingsOverrideTest() { + // TODO: test settingsOverride + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'allowedApplicationTypes' + */ + @Test + public void allowedApplicationTypesTest() { + // TODO: test allowedApplicationTypes + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApplicationFormPrefillTest.java b/src/test/java/unit/java/sdk/model/ApplicationFormPrefillTest.java new file mode 100644 index 00000000..f3cb7df4 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApplicationFormPrefillTest.java @@ -0,0 +1,215 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.Contact; +import unit.java.sdk.model.CreateBeneficialOwner; +import unit.java.sdk.model.CreateOfficer; +import unit.java.sdk.model.EntityType; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Industry; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApplicationFormPrefill + */ +public class ApplicationFormPrefillTest { + private final ApplicationFormPrefill model = new ApplicationFormPrefill(); + + /** + * Model tests for ApplicationFormPrefill + */ + @Test + public void testApplicationFormPrefill() { + // TODO: test ApplicationFormPrefill + } + + /** + * Test the property 'applicationType' + */ + @Test + public void applicationTypeTest() { + // TODO: test applicationType + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'ssn' + */ + @Test + public void ssnTest() { + // TODO: test ssn + } + + /** + * Test the property 'passport' + */ + @Test + public void passportTest() { + // TODO: test passport + } + + /** + * Test the property 'nationality' + */ + @Test + public void nationalityTest() { + // TODO: test nationality + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'stateOfIncorporation' + */ + @Test + public void stateOfIncorporationTest() { + // TODO: test stateOfIncorporation + } + + /** + * Test the property 'entityType' + */ + @Test + public void entityTypeTest() { + // TODO: test entityType + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'officer' + */ + @Test + public void officerTest() { + // TODO: test officer + } + + /** + * Test the property 'beneficialOwners' + */ + @Test + public void beneficialOwnersTest() { + // TODO: test beneficialOwners + } + + /** + * Test the property 'website' + */ + @Test + public void websiteTest() { + // TODO: test website + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'dba' + */ + @Test + public void dbaTest() { + // TODO: test dba + } + + /** + * Test the property 'ein' + */ + @Test + public void einTest() { + // TODO: test ein + } + + /** + * Test the property 'jwtSubject' + */ + @Test + public void jwtSubjectTest() { + // TODO: test jwtSubject + } + + /** + * Test the property 'industry' + */ + @Test + public void industryTest() { + // TODO: test industry + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApplicationFormRelationshipsApplicationDataTest.java b/src/test/java/unit/java/sdk/model/ApplicationFormRelationshipsApplicationDataTest.java new file mode 100644 index 00000000..ea6419cf --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApplicationFormRelationshipsApplicationDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApplicationFormRelationshipsApplicationData + */ +public class ApplicationFormRelationshipsApplicationDataTest { + private final ApplicationFormRelationshipsApplicationData model = new ApplicationFormRelationshipsApplicationData(); + + /** + * Model tests for ApplicationFormRelationshipsApplicationData + */ + @Test + public void testApplicationFormRelationshipsApplicationData() { + // TODO: test ApplicationFormRelationshipsApplicationData + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApplicationFormRelationshipsApplicationTest.java b/src/test/java/unit/java/sdk/model/ApplicationFormRelationshipsApplicationTest.java new file mode 100644 index 00000000..cc254b57 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApplicationFormRelationshipsApplicationTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ApplicationFormRelationshipsApplicationData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApplicationFormRelationshipsApplication + */ +public class ApplicationFormRelationshipsApplicationTest { + private final ApplicationFormRelationshipsApplication model = new ApplicationFormRelationshipsApplication(); + + /** + * Model tests for ApplicationFormRelationshipsApplication + */ + @Test + public void testApplicationFormRelationshipsApplication() { + // TODO: test ApplicationFormRelationshipsApplication + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApplicationFormRelationshipsTest.java b/src/test/java/unit/java/sdk/model/ApplicationFormRelationshipsTest.java new file mode 100644 index 00000000..e307620b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApplicationFormRelationshipsTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ApplicationFormRelationshipsApplication; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApplicationFormRelationships + */ +public class ApplicationFormRelationshipsTest { + private final ApplicationFormRelationships model = new ApplicationFormRelationships(); + + /** + * Model tests for ApplicationFormRelationships + */ + @Test + public void testApplicationFormRelationships() { + // TODO: test ApplicationFormRelationships + } + + /** + * Test the property 'application' + */ + @Test + public void applicationTest() { + // TODO: test application + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApplicationFormSettingsOverrideTest.java b/src/test/java/unit/java/sdk/model/ApplicationFormSettingsOverrideTest.java new file mode 100644 index 00000000..d3c69eb3 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApplicationFormSettingsOverrideTest.java @@ -0,0 +1,115 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.ApplicationFormAdditionalDisclosuresInner; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApplicationFormSettingsOverride + */ +public class ApplicationFormSettingsOverrideTest { + private final ApplicationFormSettingsOverride model = new ApplicationFormSettingsOverride(); + + /** + * Model tests for ApplicationFormSettingsOverride + */ + @Test + public void testApplicationFormSettingsOverride() { + // TODO: test ApplicationFormSettingsOverride + } + + /** + * Test the property 'redirectUrl' + */ + @Test + public void redirectUrlTest() { + // TODO: test redirectUrl + } + + /** + * Test the property 'privacyPolicyUrl' + */ + @Test + public void privacyPolicyUrlTest() { + // TODO: test privacyPolicyUrl + } + + /** + * Test the property 'electronicDisclosuresUrl' + */ + @Test + public void electronicDisclosuresUrlTest() { + // TODO: test electronicDisclosuresUrl + } + + /** + * Test the property 'depositTermsUrl' + */ + @Test + public void depositTermsUrlTest() { + // TODO: test depositTermsUrl + } + + /** + * Test the property 'clientTermsUrl' + */ + @Test + public void clientTermsUrlTest() { + // TODO: test clientTermsUrl + } + + /** + * Test the property 'cardholderTermsUrl' + */ + @Test + public void cardholderTermsUrlTest() { + // TODO: test cardholderTermsUrl + } + + /** + * Test the property 'cashAdvancedTermsUrl' + */ + @Test + public void cashAdvancedTermsUrlTest() { + // TODO: test cashAdvancedTermsUrl + } + + /** + * Test the property 'debitCardDisclosureUrl' + */ + @Test + public void debitCardDisclosureUrlTest() { + // TODO: test debitCardDisclosureUrl + } + + /** + * Test the property 'additionalDisclosures' + */ + @Test + public void additionalDisclosuresTest() { + // TODO: test additionalDisclosures + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApplicationFormTest.java b/src/test/java/unit/java/sdk/model/ApplicationFormTest.java new file mode 100644 index 00000000..dbdefdc1 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApplicationFormTest.java @@ -0,0 +1,74 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ApplicationFormAttributes; +import unit.java.sdk.model.ApplicationFormRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApplicationForm + */ +public class ApplicationFormTest { + private final ApplicationForm model = new ApplicationForm(); + + /** + * Model tests for ApplicationForm + */ + @Test + public void testApplicationForm() { + // TODO: test ApplicationForm + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApplicationRelationshipsBeneficialOwnersDataInnerTest.java b/src/test/java/unit/java/sdk/model/ApplicationRelationshipsBeneficialOwnersDataInnerTest.java new file mode 100644 index 00000000..4d809958 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApplicationRelationshipsBeneficialOwnersDataInnerTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApplicationRelationshipsBeneficialOwnersDataInner + */ +public class ApplicationRelationshipsBeneficialOwnersDataInnerTest { + private final ApplicationRelationshipsBeneficialOwnersDataInner model = new ApplicationRelationshipsBeneficialOwnersDataInner(); + + /** + * Model tests for ApplicationRelationshipsBeneficialOwnersDataInner + */ + @Test + public void testApplicationRelationshipsBeneficialOwnersDataInner() { + // TODO: test ApplicationRelationshipsBeneficialOwnersDataInner + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApplicationRelationshipsBeneficialOwnersTest.java b/src/test/java/unit/java/sdk/model/ApplicationRelationshipsBeneficialOwnersTest.java new file mode 100644 index 00000000..bf690baa --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApplicationRelationshipsBeneficialOwnersTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.ApplicationRelationshipsBeneficialOwnersDataInner; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApplicationRelationshipsBeneficialOwners + */ +public class ApplicationRelationshipsBeneficialOwnersTest { + private final ApplicationRelationshipsBeneficialOwners model = new ApplicationRelationshipsBeneficialOwners(); + + /** + * Model tests for ApplicationRelationshipsBeneficialOwners + */ + @Test + public void testApplicationRelationshipsBeneficialOwners() { + // TODO: test ApplicationRelationshipsBeneficialOwners + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApplicationRelationshipsBeneficiariesDataInnerTest.java b/src/test/java/unit/java/sdk/model/ApplicationRelationshipsBeneficiariesDataInnerTest.java new file mode 100644 index 00000000..5dd03811 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApplicationRelationshipsBeneficiariesDataInnerTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApplicationRelationshipsBeneficiariesDataInner + */ +public class ApplicationRelationshipsBeneficiariesDataInnerTest { + private final ApplicationRelationshipsBeneficiariesDataInner model = new ApplicationRelationshipsBeneficiariesDataInner(); + + /** + * Model tests for ApplicationRelationshipsBeneficiariesDataInner + */ + @Test + public void testApplicationRelationshipsBeneficiariesDataInner() { + // TODO: test ApplicationRelationshipsBeneficiariesDataInner + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApplicationRelationshipsBeneficiariesTest.java b/src/test/java/unit/java/sdk/model/ApplicationRelationshipsBeneficiariesTest.java new file mode 100644 index 00000000..8d5f319f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApplicationRelationshipsBeneficiariesTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.ApplicationRelationshipsBeneficiariesDataInner; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApplicationRelationshipsBeneficiaries + */ +public class ApplicationRelationshipsBeneficiariesTest { + private final ApplicationRelationshipsBeneficiaries model = new ApplicationRelationshipsBeneficiaries(); + + /** + * Model tests for ApplicationRelationshipsBeneficiaries + */ + @Test + public void testApplicationRelationshipsBeneficiaries() { + // TODO: test ApplicationRelationshipsBeneficiaries + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApplicationRelationshipsTest.java b/src/test/java/unit/java/sdk/model/ApplicationRelationshipsTest.java new file mode 100644 index 00000000..c4f7f004 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApplicationRelationshipsTest.java @@ -0,0 +1,102 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ApplicationRelationshipsBeneficialOwners; +import unit.java.sdk.model.ApplicationRelationshipsBeneficiaries; +import unit.java.sdk.model.ApplicationRelationshipsTrustees; +import unit.java.sdk.model.DocumentsRelationship; +import unit.java.sdk.model.OrgRelationship; +import unit.java.sdk.model.Relationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApplicationRelationships + */ +public class ApplicationRelationshipsTest { + private final ApplicationRelationships model = new ApplicationRelationships(); + + /** + * Model tests for ApplicationRelationships + */ + @Test + public void testApplicationRelationships() { + // TODO: test ApplicationRelationships + } + + /** + * Test the property 'org' + */ + @Test + public void orgTest() { + // TODO: test org + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + + /** + * Test the property 'documents' + */ + @Test + public void documentsTest() { + // TODO: test documents + } + + /** + * Test the property 'applicationForm' + */ + @Test + public void applicationFormTest() { + // TODO: test applicationForm + } + + /** + * Test the property 'trustees' + */ + @Test + public void trusteesTest() { + // TODO: test trustees + } + + /** + * Test the property 'beneficiaries' + */ + @Test + public void beneficiariesTest() { + // TODO: test beneficiaries + } + + /** + * Test the property 'beneficialOwners' + */ + @Test + public void beneficialOwnersTest() { + // TODO: test beneficialOwners + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApplicationRelationshipsTrusteesDataInnerTest.java b/src/test/java/unit/java/sdk/model/ApplicationRelationshipsTrusteesDataInnerTest.java new file mode 100644 index 00000000..1b1cca29 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApplicationRelationshipsTrusteesDataInnerTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApplicationRelationshipsTrusteesDataInner + */ +public class ApplicationRelationshipsTrusteesDataInnerTest { + private final ApplicationRelationshipsTrusteesDataInner model = new ApplicationRelationshipsTrusteesDataInner(); + + /** + * Model tests for ApplicationRelationshipsTrusteesDataInner + */ + @Test + public void testApplicationRelationshipsTrusteesDataInner() { + // TODO: test ApplicationRelationshipsTrusteesDataInner + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApplicationRelationshipsTrusteesTest.java b/src/test/java/unit/java/sdk/model/ApplicationRelationshipsTrusteesTest.java new file mode 100644 index 00000000..88362989 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApplicationRelationshipsTrusteesTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.ApplicationRelationshipsTrusteesDataInner; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApplicationRelationshipsTrustees + */ +public class ApplicationRelationshipsTrusteesTest { + private final ApplicationRelationshipsTrustees model = new ApplicationRelationshipsTrustees(); + + /** + * Model tests for ApplicationRelationshipsTrustees + */ + @Test + public void testApplicationRelationshipsTrustees() { + // TODO: test ApplicationRelationshipsTrustees + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApplicationStatusTest.java b/src/test/java/unit/java/sdk/model/ApplicationStatusTest.java new file mode 100644 index 00000000..bf4869c0 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApplicationStatusTest.java @@ -0,0 +1,32 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApplicationStatus + */ +public class ApplicationStatusTest { + /** + * Model tests for ApplicationStatus + */ + @Test + public void testApplicationStatus() { + // TODO: test ApplicationStatus + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApplicationTest.java b/src/test/java/unit/java/sdk/model/ApplicationTest.java new file mode 100644 index 00000000..392f21a6 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApplicationTest.java @@ -0,0 +1,59 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Application + */ +public class ApplicationTest { + private final Application model = new Application(); + + /** + * Model tests for Application + */ + @Test + public void testApplication() { + // TODO: test Application + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApproveAuthorizationRequestAttributesTest.java b/src/test/java/unit/java/sdk/model/ApproveAuthorizationRequestAttributesTest.java new file mode 100644 index 00000000..96691e78 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApproveAuthorizationRequestAttributesTest.java @@ -0,0 +1,64 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApproveAuthorizationRequestAttributes + */ +public class ApproveAuthorizationRequestAttributesTest { + private final ApproveAuthorizationRequestAttributes model = new ApproveAuthorizationRequestAttributes(); + + /** + * Model tests for ApproveAuthorizationRequestAttributes + */ + @Test + public void testApproveAuthorizationRequestAttributes() { + // TODO: test ApproveAuthorizationRequestAttributes + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'fundingAccount' + */ + @Test + public void fundingAccountTest() { + // TODO: test fundingAccount + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApproveAuthorizationRequestTest.java b/src/test/java/unit/java/sdk/model/ApproveAuthorizationRequestTest.java new file mode 100644 index 00000000..b17dd1cd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApproveAuthorizationRequestTest.java @@ -0,0 +1,48 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApproveAuthorizationRequest + */ +public class ApproveAuthorizationRequestTest { + private final ApproveAuthorizationRequest model = new ApproveAuthorizationRequest(); + + /** + * Model tests for ApproveAuthorizationRequest + */ + @Test + public void testApproveAuthorizationRequest() { + // TODO: test ApproveAuthorizationRequest + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApproveCheckPaymentRequestDataTest.java b/src/test/java/unit/java/sdk/model/ApproveCheckPaymentRequestDataTest.java new file mode 100644 index 00000000..2b76f450 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApproveCheckPaymentRequestDataTest.java @@ -0,0 +1,48 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApproveCheckPaymentRequestData + */ +public class ApproveCheckPaymentRequestDataTest { + private final ApproveCheckPaymentRequestData model = new ApproveCheckPaymentRequestData(); + + /** + * Model tests for ApproveCheckPaymentRequestData + */ + @Test + public void testApproveCheckPaymentRequestData() { + // TODO: test ApproveCheckPaymentRequestData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/unit/java/sdk/model/ApproveCheckPaymentRequestTest.java b/src/test/java/unit/java/sdk/model/ApproveCheckPaymentRequestTest.java new file mode 100644 index 00000000..a9ed7810 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ApproveCheckPaymentRequestTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ApproveCheckPaymentRequestData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ApproveCheckPaymentRequest + */ +public class ApproveCheckPaymentRequestTest { + private final ApproveCheckPaymentRequest model = new ApproveCheckPaymentRequest(); + + /** + * Model tests for ApproveCheckPaymentRequest + */ + @Test + public void testApproveCheckPaymentRequest() { + // TODO: test ApproveCheckPaymentRequest + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/ArchiveCustomerRequestAttributesTest.java b/src/test/java/unit/java/sdk/model/ArchiveCustomerRequestAttributesTest.java new file mode 100644 index 00000000..3d79edd9 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ArchiveCustomerRequestAttributesTest.java @@ -0,0 +1,48 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ArchiveCustomerRequestAttributes + */ +public class ArchiveCustomerRequestAttributesTest { + private final ArchiveCustomerRequestAttributes model = new ArchiveCustomerRequestAttributes(); + + /** + * Model tests for ArchiveCustomerRequestAttributes + */ + @Test + public void testArchiveCustomerRequestAttributes() { + // TODO: test ArchiveCustomerRequestAttributes + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + +} diff --git a/src/test/java/unit/java/sdk/model/ArchiveCustomerRequestTest.java b/src/test/java/unit/java/sdk/model/ArchiveCustomerRequestTest.java new file mode 100644 index 00000000..13265c6a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ArchiveCustomerRequestTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ArchiveCustomerRequestAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ArchiveCustomerRequest + */ +public class ArchiveCustomerRequestTest { + private final ArchiveCustomerRequest model = new ArchiveCustomerRequest(); + + /** + * Model tests for ArchiveCustomerRequest + */ + @Test + public void testArchiveCustomerRequest() { + // TODO: test ArchiveCustomerRequest + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/AstraTest.java b/src/test/java/unit/java/sdk/model/AstraTest.java new file mode 100644 index 00000000..0250bbdc --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AstraTest.java @@ -0,0 +1,105 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Astra + */ +public class AstraTest { + private final Astra model = new Astra(); + + /** + * Model tests for Astra + */ + @Test + public void testAstra() { + // TODO: test Astra + } + + /** + * Test the property 'authToken' + */ + @Test + public void authTokenTest() { + // TODO: test authToken + } + + /** + * Test the property 'debitFeePercent' + */ + @Test + public void debitFeePercentTest() { + // TODO: test debitFeePercent + } + + /** + * Test the property 'institutionId' + */ + @Test + public void institutionIdTest() { + // TODO: test institutionId + } + + /** + * Test the property 'destinationCardId' + */ + @Test + public void destinationCardIdTest() { + // TODO: test destinationCardId + } + + /** + * Test the property 'routingNumber' + */ + @Test + public void routingNumberTest() { + // TODO: test routingNumber + } + + /** + * Test the property 'accountNumber' + */ + @Test + public void accountNumberTest() { + // TODO: test accountNumber + } + + /** + * Test the property 'accountName' + */ + @Test + public void accountNameTest() { + // TODO: test accountName + } + + /** + * Test the property 'referenceId' + */ + @Test + public void referenceIdTest() { + // TODO: test referenceId + } + +} diff --git a/src/test/java/unit/java/sdk/model/AtmAuthorizationRequestAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/AtmAuthorizationRequestAllOfAttributesTest.java new file mode 100644 index 00000000..7a04a8ab --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AtmAuthorizationRequestAllOfAttributesTest.java @@ -0,0 +1,150 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AtmAuthorizationRequestAllOfAttributes + */ +public class AtmAuthorizationRequestAllOfAttributesTest { + private final AtmAuthorizationRequestAllOfAttributes model = new AtmAuthorizationRequestAllOfAttributes(); + + /** + * Model tests for AtmAuthorizationRequestAllOfAttributes + */ + @Test + public void testAtmAuthorizationRequestAllOfAttributes() { + // TODO: test AtmAuthorizationRequestAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'partialApprovalAllowed' + */ + @Test + public void partialApprovalAllowedTest() { + // TODO: test partialApprovalAllowed + } + + /** + * Test the property 'approvedAmount' + */ + @Test + public void approvedAmountTest() { + // TODO: test approvedAmount + } + + /** + * Test the property 'declineReason' + */ + @Test + public void declineReasonTest() { + // TODO: test declineReason + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'atmName' + */ + @Test + public void atmNameTest() { + // TODO: test atmName + } + + /** + * Test the property 'atmLocation' + */ + @Test + public void atmLocationTest() { + // TODO: test atmLocation + } + + /** + * Test the property 'surcharge' + */ + @Test + public void surchargeTest() { + // TODO: test surcharge + } + + /** + * Test the property 'internationalServiceFee' + */ + @Test + public void internationalServiceFeeTest() { + // TODO: test internationalServiceFee + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'cardNetwork' + */ + @Test + public void cardNetworkTest() { + // TODO: test cardNetwork + } + +} diff --git a/src/test/java/unit/java/sdk/model/AtmAuthorizationRequestTest.java b/src/test/java/unit/java/sdk/model/AtmAuthorizationRequestTest.java new file mode 100644 index 00000000..94136dab --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AtmAuthorizationRequestTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AtmAuthorizationRequestAllOfAttributes; +import unit.java.sdk.model.AuthorizationRequest; +import unit.java.sdk.model.AuthorizationRequestRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AtmAuthorizationRequest + */ +public class AtmAuthorizationRequestTest { + private final AtmAuthorizationRequest model = new AtmAuthorizationRequest(); + + /** + * Model tests for AtmAuthorizationRequest + */ + @Test + public void testAtmAuthorizationRequest() { + // TODO: test AtmAuthorizationRequest + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/AtmLocationAttributesTest.java b/src/test/java/unit/java/sdk/model/AtmLocationAttributesTest.java new file mode 100644 index 00000000..c91ae80f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AtmLocationAttributesTest.java @@ -0,0 +1,98 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.Coordinates; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AtmLocationAttributes + */ +public class AtmLocationAttributesTest { + private final AtmLocationAttributes model = new AtmLocationAttributes(); + + /** + * Model tests for AtmLocationAttributes + */ + @Test + public void testAtmLocationAttributes() { + // TODO: test AtmLocationAttributes + } + + /** + * Test the property 'network' + */ + @Test + public void networkTest() { + // TODO: test network + } + + /** + * Test the property 'locationName' + */ + @Test + public void locationNameTest() { + // TODO: test locationName + } + + /** + * Test the property 'coordinates' + */ + @Test + public void coordinatesTest() { + // TODO: test coordinates + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'distance' + */ + @Test + public void distanceTest() { + // TODO: test distance + } + + /** + * Test the property 'surchargeFree' + */ + @Test + public void surchargeFreeTest() { + // TODO: test surchargeFree + } + + /** + * Test the property 'acceptDeposits' + */ + @Test + public void acceptDepositsTest() { + // TODO: test acceptDeposits + } + +} diff --git a/src/test/java/unit/java/sdk/model/AtmLocationTest.java b/src/test/java/unit/java/sdk/model/AtmLocationTest.java new file mode 100644 index 00000000..9fed2db5 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AtmLocationTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AtmLocationAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AtmLocation + */ +public class AtmLocationTest { + private final AtmLocation model = new AtmLocation(); + + /** + * Model tests for AtmLocation + */ + @Test + public void testAtmLocation() { + // TODO: test AtmLocation + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/AtmTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/AtmTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..f3062143 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AtmTransactionAllOfAttributesTest.java @@ -0,0 +1,157 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AtmTransactionAllOfAttributes + */ +public class AtmTransactionAllOfAttributesTest { + private final AtmTransactionAllOfAttributes model = new AtmTransactionAllOfAttributes(); + + /** + * Model tests for AtmTransactionAllOfAttributes + */ + @Test + public void testAtmTransactionAllOfAttributes() { + // TODO: test AtmTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'cardLast4Digits' + */ + @Test + public void cardLast4DigitsTest() { + // TODO: test cardLast4Digits + } + + /** + * Test the property 'atmName' + */ + @Test + public void atmNameTest() { + // TODO: test atmName + } + + /** + * Test the property 'atmLocation' + */ + @Test + public void atmLocationTest() { + // TODO: test atmLocation + } + + /** + * Test the property 'surcharge' + */ + @Test + public void surchargeTest() { + // TODO: test surcharge + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'networkTransactionId' + */ + @Test + public void networkTransactionIdTest() { + // TODO: test networkTransactionId + } + + /** + * Test the property 'interchange' + */ + @Test + public void interchangeTest() { + // TODO: test interchange + } + + /** + * Test the property 'internationalServiceFee' + */ + @Test + public void internationalServiceFeeTest() { + // TODO: test internationalServiceFee + } + + /** + * Test the property 'cardNetwork' + */ + @Test + public void cardNetworkTest() { + // TODO: test cardNetwork + } + +} diff --git a/src/test/java/unit/java/sdk/model/AtmTransactionTest.java b/src/test/java/unit/java/sdk/model/AtmTransactionTest.java new file mode 100644 index 00000000..f08fc1ba --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AtmTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AtmTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AtmTransaction + */ +public class AtmTransactionTest { + private final AtmTransaction model = new AtmTransaction(); + + /** + * Model tests for AtmTransaction + */ + @Test + public void testAtmTransaction() { + // TODO: test AtmTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/AuthorizationAttributesTest.java b/src/test/java/unit/java/sdk/model/AuthorizationAttributesTest.java new file mode 100644 index 00000000..576c31e1 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AuthorizationAttributesTest.java @@ -0,0 +1,155 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.CardVerificationData; +import unit.java.sdk.model.Merchant; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AuthorizationAttributes + */ +public class AuthorizationAttributesTest { + private final AuthorizationAttributes model = new AuthorizationAttributes(); + + /** + * Model tests for AuthorizationAttributes + */ + @Test + public void testAuthorizationAttributes() { + // TODO: test AuthorizationAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'cardLast4Digits' + */ + @Test + public void cardLast4DigitsTest() { + // TODO: test cardLast4Digits + } + + /** + * Test the property 'merchant' + */ + @Test + public void merchantTest() { + // TODO: test merchant + } + + /** + * Test the property 'recurring' + */ + @Test + public void recurringTest() { + // TODO: test recurring + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'declineReason' + */ + @Test + public void declineReasonTest() { + // TODO: test declineReason + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'paymentMethod' + */ + @Test + public void paymentMethodTest() { + // TODO: test paymentMethod + } + + /** + * Test the property 'digitalWallet' + */ + @Test + public void digitalWalletTest() { + // TODO: test digitalWallet + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'cardVerificationData' + */ + @Test + public void cardVerificationDataTest() { + // TODO: test cardVerificationData + } + + /** + * Test the property 'cardNetwork' + */ + @Test + public void cardNetworkTest() { + // TODO: test cardNetwork + } + + /** + * Test the property 'cashWithdrawalAmount' + */ + @Test + public void cashWithdrawalAmountTest() { + // TODO: test cashWithdrawalAmount + } + +} diff --git a/src/test/java/unit/java/sdk/model/AuthorizationRelationshipDataTest.java b/src/test/java/unit/java/sdk/model/AuthorizationRelationshipDataTest.java new file mode 100644 index 00000000..752b6ab9 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AuthorizationRelationshipDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AuthorizationRelationshipData + */ +public class AuthorizationRelationshipDataTest { + private final AuthorizationRelationshipData model = new AuthorizationRelationshipData(); + + /** + * Model tests for AuthorizationRelationshipData + */ + @Test + public void testAuthorizationRelationshipData() { + // TODO: test AuthorizationRelationshipData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/AuthorizationRelationshipTest.java b/src/test/java/unit/java/sdk/model/AuthorizationRelationshipTest.java new file mode 100644 index 00000000..96096808 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AuthorizationRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationRelationshipData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AuthorizationRelationship + */ +public class AuthorizationRelationshipTest { + private final AuthorizationRelationship model = new AuthorizationRelationship(); + + /** + * Model tests for AuthorizationRelationship + */ + @Test + public void testAuthorizationRelationship() { + // TODO: test AuthorizationRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/AuthorizationRequestRelationshipDataTest.java b/src/test/java/unit/java/sdk/model/AuthorizationRequestRelationshipDataTest.java new file mode 100644 index 00000000..775b71e5 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AuthorizationRequestRelationshipDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AuthorizationRequestRelationshipData + */ +public class AuthorizationRequestRelationshipDataTest { + private final AuthorizationRequestRelationshipData model = new AuthorizationRequestRelationshipData(); + + /** + * Model tests for AuthorizationRequestRelationshipData + */ + @Test + public void testAuthorizationRequestRelationshipData() { + // TODO: test AuthorizationRequestRelationshipData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/AuthorizationRequestRelationshipTest.java b/src/test/java/unit/java/sdk/model/AuthorizationRequestRelationshipTest.java new file mode 100644 index 00000000..c3aaf855 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AuthorizationRequestRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationRequestRelationshipData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AuthorizationRequestRelationship + */ +public class AuthorizationRequestRelationshipTest { + private final AuthorizationRequestRelationship model = new AuthorizationRequestRelationship(); + + /** + * Model tests for AuthorizationRequestRelationship + */ + @Test + public void testAuthorizationRequestRelationship() { + // TODO: test AuthorizationRequestRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/AuthorizationRequestRelationshipsCardDataTest.java b/src/test/java/unit/java/sdk/model/AuthorizationRequestRelationshipsCardDataTest.java new file mode 100644 index 00000000..cfa8570f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AuthorizationRequestRelationshipsCardDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AuthorizationRequestRelationshipsCardData + */ +public class AuthorizationRequestRelationshipsCardDataTest { + private final AuthorizationRequestRelationshipsCardData model = new AuthorizationRequestRelationshipsCardData(); + + /** + * Model tests for AuthorizationRequestRelationshipsCardData + */ + @Test + public void testAuthorizationRequestRelationshipsCardData() { + // TODO: test AuthorizationRequestRelationshipsCardData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/AuthorizationRequestRelationshipsCardTest.java b/src/test/java/unit/java/sdk/model/AuthorizationRequestRelationshipsCardTest.java new file mode 100644 index 00000000..71f47321 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AuthorizationRequestRelationshipsCardTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationRequestRelationshipsCardData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AuthorizationRequestRelationshipsCard + */ +public class AuthorizationRequestRelationshipsCardTest { + private final AuthorizationRequestRelationshipsCard model = new AuthorizationRequestRelationshipsCard(); + + /** + * Model tests for AuthorizationRequestRelationshipsCard + */ + @Test + public void testAuthorizationRequestRelationshipsCard() { + // TODO: test AuthorizationRequestRelationshipsCard + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/AuthorizationRequestRelationshipsTest.java b/src/test/java/unit/java/sdk/model/AuthorizationRequestRelationshipsTest.java new file mode 100644 index 00000000..42755384 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AuthorizationRequestRelationshipsTest.java @@ -0,0 +1,75 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationRequestRelationshipsCard; +import unit.java.sdk.model.RelationshipsAccount; +import unit.java.sdk.model.RelationshipsCustomer; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AuthorizationRequestRelationships + */ +public class AuthorizationRequestRelationshipsTest { + private final AuthorizationRequestRelationships model = new AuthorizationRequestRelationships(); + + /** + * Model tests for AuthorizationRequestRelationships + */ + @Test + public void testAuthorizationRequestRelationships() { + // TODO: test AuthorizationRequestRelationships + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'fundingAccount' + */ + @Test + public void fundingAccountTest() { + // TODO: test fundingAccount + } + + /** + * Test the property 'card' + */ + @Test + public void cardTest() { + // TODO: test card + } + +} diff --git a/src/test/java/unit/java/sdk/model/AuthorizationRequestTest.java b/src/test/java/unit/java/sdk/model/AuthorizationRequestTest.java new file mode 100644 index 00000000..6550e515 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AuthorizationRequestTest.java @@ -0,0 +1,59 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AuthorizationRequest + */ +public class AuthorizationRequestTest { + private final AuthorizationRequest model = new AuthorizationRequest(); + + /** + * Model tests for AuthorizationRequest + */ + @Test + public void testAuthorizationRequest() { + // TODO: test AuthorizationRequest + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/AuthorizationTest.java b/src/test/java/unit/java/sdk/model/AuthorizationTest.java new file mode 100644 index 00000000..c8ff664a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AuthorizationTest.java @@ -0,0 +1,73 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Authorization + */ +public class AuthorizationTest { + private final Authorization model = new Authorization(); + + /** + * Model tests for Authorization + */ + @Test + public void testAuthorization() { + // TODO: test Authorization + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/AuthorizedUserTest.java b/src/test/java/unit/java/sdk/model/AuthorizedUserTest.java new file mode 100644 index 00000000..956419b3 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/AuthorizedUserTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AuthorizedUser + */ +public class AuthorizedUserTest { + private final AuthorizedUser model = new AuthorizedUser(); + + /** + * Model tests for AuthorizedUser + */ + @Test + public void testAuthorizedUser() { + // TODO: test AuthorizedUser + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'jwtSubject' + */ + @Test + public void jwtSubjectTest() { + // TODO: test jwtSubject + } + +} diff --git a/src/test/java/unit/java/sdk/model/BINTest.java b/src/test/java/unit/java/sdk/model/BINTest.java new file mode 100644 index 00000000..514220fd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BINTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BIN + */ +public class BINTest { + private final BIN model = new BIN(); + + /** + * Model tests for BIN + */ + @Test + public void testBIN() { + // TODO: test BIN + } + + /** + * Test the property 'bin' + */ + @Test + public void binTest() { + // TODO: test bin + } + + /** + * Test the property 'institutionId' + */ + @Test + public void institutionIdTest() { + // TODO: test institutionId + } + +} diff --git a/src/test/java/unit/java/sdk/model/BankRepaymentTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/BankRepaymentTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..758bf216 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BankRepaymentTransactionAllOfAttributesTest.java @@ -0,0 +1,97 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BankRepaymentTransactionAllOfAttributes + */ +public class BankRepaymentTransactionAllOfAttributesTest { + private final BankRepaymentTransactionAllOfAttributes model = new BankRepaymentTransactionAllOfAttributes(); + + /** + * Model tests for BankRepaymentTransactionAllOfAttributes + */ + @Test + public void testBankRepaymentTransactionAllOfAttributes() { + // TODO: test BankRepaymentTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'paidForDate' + */ + @Test + public void paidForDateTest() { + // TODO: test paidForDate + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/BankRepaymentTransactionTest.java b/src/test/java/unit/java/sdk/model/BankRepaymentTransactionTest.java new file mode 100644 index 00000000..597b6170 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BankRepaymentTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BankRepaymentTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BankRepaymentTransaction + */ +public class BankRepaymentTransactionTest { + private final BankRepaymentTransaction model = new BankRepaymentTransaction(); + + /** + * Model tests for BankRepaymentTransaction + */ + @Test + public void testBankRepaymentTransaction() { + // TODO: test BankRepaymentTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/BeneficialOwnerTest.java b/src/test/java/unit/java/sdk/model/BeneficialOwnerTest.java new file mode 100644 index 00000000..c8e6381e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BeneficialOwnerTest.java @@ -0,0 +1,216 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.SourceOfIncome; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BeneficialOwner + */ +public class BeneficialOwnerTest { + private final BeneficialOwner model = new BeneficialOwner(); + + /** + * Model tests for BeneficialOwner + */ + @Test + public void testBeneficialOwner() { + // TODO: test BeneficialOwner + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'ssn' + */ + @Test + public void ssnTest() { + // TODO: test ssn + } + + /** + * Test the property 'passport' + */ + @Test + public void passportTest() { + // TODO: test passport + } + + /** + * Test the property 'nationality' + */ + @Test + public void nationalityTest() { + // TODO: test nationality + } + + /** + * Test the property 'matriculaConsular' + */ + @Test + public void matriculaConsularTest() { + // TODO: test matriculaConsular + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** + * Test the property 'evaluationId' + */ + @Test + public void evaluationIdTest() { + // TODO: test evaluationId + } + + /** + * Test the property 'percentage' + */ + @Test + public void percentageTest() { + // TODO: test percentage + } + + /** + * Test the property 'evaluationFlags' + */ + @Test + public void evaluationFlagsTest() { + // TODO: test evaluationFlags + } + + /** + * Test the property 'maskedSSN' + */ + @Test + public void maskedSSNTest() { + // TODO: test maskedSSN + } + + /** + * Test the property 'maskedPassport' + */ + @Test + public void maskedPassportTest() { + // TODO: test maskedPassport + } + + /** + * Test the property 'maskedMatriculaConsular' + */ + @Test + public void maskedMatriculaConsularTest() { + // TODO: test maskedMatriculaConsular + } + + /** + * Test the property 'idTheftScore' + */ + @Test + public void idTheftScoreTest() { + // TODO: test idTheftScore + } + + /** + * Test the property 'evaluationCodes' + */ + @Test + public void evaluationCodesTest() { + // TODO: test evaluationCodes + } + + /** + * Test the property 'occupation' + */ + @Test + public void occupationTest() { + // TODO: test occupation + } + + /** + * Test the property 'annualIncome' + */ + @Test + public void annualIncomeTest() { + // TODO: test annualIncome + } + + /** + * Test the property 'sourceOfIncome' + */ + @Test + public void sourceOfIncomeTest() { + // TODO: test sourceOfIncome + } + +} diff --git a/src/test/java/unit/java/sdk/model/BeneficiaryTest.java b/src/test/java/unit/java/sdk/model/BeneficiaryTest.java new file mode 100644 index 00000000..072910b4 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BeneficiaryTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import unit.java.sdk.model.FullName; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Beneficiary + */ +public class BeneficiaryTest { + private final Beneficiary model = new Beneficiary(); + + /** + * Model tests for Beneficiary + */ + @Test + public void testBeneficiary() { + // TODO: test Beneficiary + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + +} diff --git a/src/test/java/unit/java/sdk/model/BillPayTransactionTest.java b/src/test/java/unit/java/sdk/model/BillPayTransactionTest.java new file mode 100644 index 00000000..50c4e5b4 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BillPayTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BillPayTransaction + */ +public class BillPayTransactionTest { + private final BillPayTransaction model = new BillPayTransaction(); + + /** + * Model tests for BillPayTransaction + */ + @Test + public void testBillPayTransaction() { + // TODO: test BillPayTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/BillPaymentAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/BillPaymentAllOfAttributesTest.java new file mode 100644 index 00000000..adff6153 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BillPaymentAllOfAttributesTest.java @@ -0,0 +1,89 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BillPaymentAllOfAttributes + */ +public class BillPaymentAllOfAttributesTest { + private final BillPaymentAllOfAttributes model = new BillPaymentAllOfAttributes(); + + /** + * Model tests for BillPaymentAllOfAttributes + */ + @Test + public void testBillPaymentAllOfAttributes() { + // TODO: test BillPaymentAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + +} diff --git a/src/test/java/unit/java/sdk/model/BillPaymentTest.java b/src/test/java/unit/java/sdk/model/BillPaymentTest.java new file mode 100644 index 00000000..fd1727f4 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BillPaymentTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BillPaymentAllOfAttributes; +import unit.java.sdk.model.Payment; +import unit.java.sdk.model.PaymentRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BillPayment + */ +public class BillPaymentTest { + private final BillPayment model = new BillPayment(); + + /** + * Model tests for BillPayment + */ + @Test + public void testBillPayment() { + // TODO: test BillPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/BookPaymentAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/BookPaymentAllOfAttributesTest.java new file mode 100644 index 00000000..59472dea --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BookPaymentAllOfAttributesTest.java @@ -0,0 +1,105 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BookPaymentAllOfAttributes + */ +public class BookPaymentAllOfAttributesTest { + private final BookPaymentAllOfAttributes model = new BookPaymentAllOfAttributes(); + + /** + * Model tests for BookPaymentAllOfAttributes + */ + @Test + public void testBookPaymentAllOfAttributes() { + // TODO: test BookPaymentAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'transactionSummaryOverride' + */ + @Test + public void transactionSummaryOverrideTest() { + // TODO: test transactionSummaryOverride + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/BookPaymentTest.java b/src/test/java/unit/java/sdk/model/BookPaymentTest.java new file mode 100644 index 00000000..ef0f2b3d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BookPaymentTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BookPaymentAllOfAttributes; +import unit.java.sdk.model.Payment; +import unit.java.sdk.model.PaymentRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BookPayment + */ +public class BookPaymentTest { + private final BookPayment model = new BookPayment(); + + /** + * Model tests for BookPayment + */ + @Test + public void testBookPayment() { + // TODO: test BookPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/BookRepaymentAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/BookRepaymentAllOfAttributesTest.java new file mode 100644 index 00000000..eb66f25b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BookRepaymentAllOfAttributesTest.java @@ -0,0 +1,81 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BookRepaymentAllOfAttributes + */ +public class BookRepaymentAllOfAttributesTest { + private final BookRepaymentAllOfAttributes model = new BookRepaymentAllOfAttributes(); + + /** + * Model tests for BookRepaymentAllOfAttributes + */ + @Test + public void testBookRepaymentAllOfAttributes() { + // TODO: test BookRepaymentAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/unit/java/sdk/model/BookRepaymentAllOfRelationshipsCounterpartyAccountDataTest.java b/src/test/java/unit/java/sdk/model/BookRepaymentAllOfRelationshipsCounterpartyAccountDataTest.java new file mode 100644 index 00000000..94bd1f51 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BookRepaymentAllOfRelationshipsCounterpartyAccountDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BookRepaymentAllOfRelationshipsCounterpartyAccountData + */ +public class BookRepaymentAllOfRelationshipsCounterpartyAccountDataTest { + private final BookRepaymentAllOfRelationshipsCounterpartyAccountData model = new BookRepaymentAllOfRelationshipsCounterpartyAccountData(); + + /** + * Model tests for BookRepaymentAllOfRelationshipsCounterpartyAccountData + */ + @Test + public void testBookRepaymentAllOfRelationshipsCounterpartyAccountData() { + // TODO: test BookRepaymentAllOfRelationshipsCounterpartyAccountData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/BookRepaymentAllOfRelationshipsCounterpartyAccountTest.java b/src/test/java/unit/java/sdk/model/BookRepaymentAllOfRelationshipsCounterpartyAccountTest.java new file mode 100644 index 00000000..285de280 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BookRepaymentAllOfRelationshipsCounterpartyAccountTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BookRepaymentAllOfRelationshipsCounterpartyAccountData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BookRepaymentAllOfRelationshipsCounterpartyAccount + */ +public class BookRepaymentAllOfRelationshipsCounterpartyAccountTest { + private final BookRepaymentAllOfRelationshipsCounterpartyAccount model = new BookRepaymentAllOfRelationshipsCounterpartyAccount(); + + /** + * Model tests for BookRepaymentAllOfRelationshipsCounterpartyAccount + */ + @Test + public void testBookRepaymentAllOfRelationshipsCounterpartyAccount() { + // TODO: test BookRepaymentAllOfRelationshipsCounterpartyAccount + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/BookRepaymentAllOfRelationshipsTest.java b/src/test/java/unit/java/sdk/model/BookRepaymentAllOfRelationshipsTest.java new file mode 100644 index 00000000..e88da0c3 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BookRepaymentAllOfRelationshipsTest.java @@ -0,0 +1,85 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsAccount; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsCreditAccount; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsCustomer; +import unit.java.sdk.model.AchRepaymentAllOfRelationshipsPayment; +import unit.java.sdk.model.BookRepaymentAllOfRelationshipsCounterpartyAccount; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BookRepaymentAllOfRelationships + */ +public class BookRepaymentAllOfRelationshipsTest { + private final BookRepaymentAllOfRelationships model = new BookRepaymentAllOfRelationships(); + + /** + * Model tests for BookRepaymentAllOfRelationships + */ + @Test + public void testBookRepaymentAllOfRelationships() { + // TODO: test BookRepaymentAllOfRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'creditAccount' + */ + @Test + public void creditAccountTest() { + // TODO: test creditAccount + } + + /** + * Test the property 'counterpartyAccount' + */ + @Test + public void counterpartyAccountTest() { + // TODO: test counterpartyAccount + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + + /** + * Test the property 'payment' + */ + @Test + public void paymentTest() { + // TODO: test payment + } + +} diff --git a/src/test/java/unit/java/sdk/model/BookRepaymentTest.java b/src/test/java/unit/java/sdk/model/BookRepaymentTest.java new file mode 100644 index 00000000..7137bf0c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BookRepaymentTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BookRepaymentAllOfAttributes; +import unit.java.sdk.model.BookRepaymentAllOfRelationships; +import unit.java.sdk.model.Repayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BookRepayment + */ +public class BookRepaymentTest { + private final BookRepayment model = new BookRepayment(); + + /** + * Model tests for BookRepayment + */ + @Test + public void testBookRepayment() { + // TODO: test BookRepayment + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/BookTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/BookTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..c993c608 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BookTransactionAllOfAttributesTest.java @@ -0,0 +1,98 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BookTransactionAllOfAttributes + */ +public class BookTransactionAllOfAttributesTest { + private final BookTransactionAllOfAttributes model = new BookTransactionAllOfAttributes(); + + /** + * Model tests for BookTransactionAllOfAttributes + */ + @Test + public void testBookTransactionAllOfAttributes() { + // TODO: test BookTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'counterparty' + */ + @Test + public void counterpartyTest() { + // TODO: test counterparty + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/BookTransactionTest.java b/src/test/java/unit/java/sdk/model/BookTransactionTest.java new file mode 100644 index 00000000..fe0e18ce --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BookTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BookTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BookTransaction + */ +public class BookTransactionTest { + private final BookTransaction model = new BookTransaction(); + + /** + * Model tests for BookTransaction + */ + @Test + public void testBookTransaction() { + // TODO: test BookTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/BusinessAnnualRevenueTest.java b/src/test/java/unit/java/sdk/model/BusinessAnnualRevenueTest.java new file mode 100644 index 00000000..23a791fc --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BusinessAnnualRevenueTest.java @@ -0,0 +1,32 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BusinessAnnualRevenue + */ +public class BusinessAnnualRevenueTest { + /** + * Model tests for BusinessAnnualRevenue + */ + @Test + public void testBusinessAnnualRevenue() { + // TODO: test BusinessAnnualRevenue + } + +} diff --git a/src/test/java/unit/java/sdk/model/BusinessApplicationAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/BusinessApplicationAllOfAttributesTest.java new file mode 100644 index 00000000..3bd58e9c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BusinessApplicationAllOfAttributesTest.java @@ -0,0 +1,372 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.ApplicationStatus; +import unit.java.sdk.model.BeneficialOwner; +import unit.java.sdk.model.BusinessAnnualRevenue; +import unit.java.sdk.model.BusinessNumberOfEmployees; +import unit.java.sdk.model.BusinessVertical; +import unit.java.sdk.model.CashFlow; +import unit.java.sdk.model.Contact; +import unit.java.sdk.model.EntityType; +import unit.java.sdk.model.Industry; +import unit.java.sdk.model.Officer; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BusinessApplicationAllOfAttributes + */ +public class BusinessApplicationAllOfAttributesTest { + private final BusinessApplicationAllOfAttributes model = new BusinessApplicationAllOfAttributes(); + + /** + * Model tests for BusinessApplicationAllOfAttributes + */ + @Test + public void testBusinessApplicationAllOfAttributes() { + // TODO: test BusinessApplicationAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'evaluationOutcome' + */ + @Test + public void evaluationOutcomeTest() { + // TODO: test evaluationOutcome + } + + /** + * Test the property 'evaluationId' + */ + @Test + public void evaluationIdTest() { + // TODO: test evaluationId + } + + /** + * Test the property 'evaluationEntityId' + */ + @Test + public void evaluationEntityIdTest() { + // TODO: test evaluationEntityId + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'dba' + */ + @Test + public void dbaTest() { + // TODO: test dba + } + + /** + * Test the property 'ein' + */ + @Test + public void einTest() { + // TODO: test ein + } + + /** + * Test the property 'entityType' + */ + @Test + public void entityTypeTest() { + // TODO: test entityType + } + + /** + * Test the property 'dateOfIncorporation' + */ + @Test + public void dateOfIncorporationTest() { + // TODO: test dateOfIncorporation + } + + /** + * Test the property 'stateOfIncorporation' + */ + @Test + public void stateOfIncorporationTest() { + // TODO: test stateOfIncorporation + } + + /** + * Test the property 'purpose' + */ + @Test + public void purposeTest() { + // TODO: test purpose + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'officer' + */ + @Test + public void officerTest() { + // TODO: test officer + } + + /** + * Test the property 'ip' + */ + @Test + public void ipTest() { + // TODO: test ip + } + + /** + * Test the property 'website' + */ + @Test + public void websiteTest() { + // TODO: test website + } + + /** + * Test the property 'beneficialOwners' + */ + @Test + public void beneficialOwnersTest() { + // TODO: test beneficialOwners + } + + /** + * Test the property 'decisionMethod' + */ + @Test + public void decisionMethodTest() { + // TODO: test decisionMethod + } + + /** + * Test the property 'decisionUserId' + */ + @Test + public void decisionUserIdTest() { + // TODO: test decisionUserId + } + + /** + * Test the property 'decisionReason' + */ + @Test + public void decisionReasonTest() { + // TODO: test decisionReason + } + + /** + * Test the property 'decisionDateTime' + */ + @Test + public void decisionDateTimeTest() { + // TODO: test decisionDateTime + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'riskRate' + */ + @Test + public void riskRateTest() { + // TODO: test riskRate + } + + /** + * Test the property 'evaluationFlags' + */ + @Test + public void evaluationFlagsTest() { + // TODO: test evaluationFlags + } + + /** + * Test the property 'ipLocationDetails' + */ + @Test + public void ipLocationDetailsTest() { + // TODO: test ipLocationDetails + } + + /** + * Test the property 'phoneLocationDetails' + */ + @Test + public void phoneLocationDetailsTest() { + // TODO: test phoneLocationDetails + } + + /** + * Test the property 'archived' + */ + @Test + public void archivedTest() { + // TODO: test archived + } + + /** + * Test the property 'industry' + */ + @Test + public void industryTest() { + // TODO: test industry + } + + /** + * Test the property 'annualRevenue' + */ + @Test + public void annualRevenueTest() { + // TODO: test annualRevenue + } + + /** + * Test the property 'numberOfEmployees' + */ + @Test + public void numberOfEmployeesTest() { + // TODO: test numberOfEmployees + } + + /** + * Test the property 'cashFlow' + */ + @Test + public void cashFlowTest() { + // TODO: test cashFlow + } + + /** + * Test the property 'yearOfIncorporation' + */ + @Test + public void yearOfIncorporationTest() { + // TODO: test yearOfIncorporation + } + + /** + * Test the property 'countriesOfOperation' + */ + @Test + public void countriesOfOperationTest() { + // TODO: test countriesOfOperation + } + + /** + * Test the property 'stockSymbol' + */ + @Test + public void stockSymbolTest() { + // TODO: test stockSymbol + } + + /** + * Test the property 'businessVertical' + */ + @Test + public void businessVerticalTest() { + // TODO: test businessVertical + } + +} diff --git a/src/test/java/unit/java/sdk/model/BusinessApplicationTest.java b/src/test/java/unit/java/sdk/model/BusinessApplicationTest.java new file mode 100644 index 00000000..2409248a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BusinessApplicationTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Application; +import unit.java.sdk.model.ApplicationRelationships; +import unit.java.sdk.model.BusinessApplicationAllOfAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BusinessApplication + */ +public class BusinessApplicationTest { + private final BusinessApplication model = new BusinessApplication(); + + /** + * Model tests for BusinessApplication + */ + @Test + public void testBusinessApplication() { + // TODO: test BusinessApplication + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/BusinessCreditCardTest.java b/src/test/java/unit/java/sdk/model/BusinessCreditCardTest.java new file mode 100644 index 00000000..448afcc2 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BusinessCreditCardTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BusinessDebitCardAllOfAttributes; +import unit.java.sdk.model.Card; +import unit.java.sdk.model.CardRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BusinessCreditCard + */ +public class BusinessCreditCardTest { + private final BusinessCreditCard model = new BusinessCreditCard(); + + /** + * Model tests for BusinessCreditCard + */ + @Test + public void testBusinessCreditCard() { + // TODO: test BusinessCreditCard + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/BusinessCustomerAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/BusinessCustomerAllOfAttributesTest.java new file mode 100644 index 00000000..0912857b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BusinessCustomerAllOfAttributesTest.java @@ -0,0 +1,177 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.AuthorizedUser; +import unit.java.sdk.model.Contact; +import unit.java.sdk.model.EntityType; +import unit.java.sdk.model.Phone; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BusinessCustomerAllOfAttributes + */ +public class BusinessCustomerAllOfAttributesTest { + private final BusinessCustomerAllOfAttributes model = new BusinessCustomerAllOfAttributes(); + + /** + * Model tests for BusinessCustomerAllOfAttributes + */ + @Test + public void testBusinessCustomerAllOfAttributes() { + // TODO: test BusinessCustomerAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'dba' + */ + @Test + public void dbaTest() { + // TODO: test dba + } + + /** + * Test the property 'ein' + */ + @Test + public void einTest() { + // TODO: test ein + } + + /** + * Test the property 'entityType' + */ + @Test + public void entityTypeTest() { + // TODO: test entityType + } + + /** + * Test the property 'dateOfIncorporation' + */ + @Test + public void dateOfIncorporationTest() { + // TODO: test dateOfIncorporation + } + + /** + * Test the property 'stateOfIncorporation' + */ + @Test + public void stateOfIncorporationTest() { + // TODO: test stateOfIncorporation + } + + /** + * Test the property 'purpose' + */ + @Test + public void purposeTest() { + // TODO: test purpose + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'riskRate' + */ + @Test + public void riskRateTest() { + // TODO: test riskRate + } + + /** + * Test the property 'authorizedUsers' + */ + @Test + public void authorizedUsersTest() { + // TODO: test authorizedUsers + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'archiveReason' + */ + @Test + public void archiveReasonTest() { + // TODO: test archiveReason + } + +} diff --git a/src/test/java/unit/java/sdk/model/BusinessCustomerTest.java b/src/test/java/unit/java/sdk/model/BusinessCustomerTest.java new file mode 100644 index 00000000..919330ce --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BusinessCustomerTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BusinessCustomerAllOfAttributes; +import unit.java.sdk.model.Customer; +import unit.java.sdk.model.CustomerRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BusinessCustomer + */ +public class BusinessCustomerTest { + private final BusinessCustomer model = new BusinessCustomer(); + + /** + * Model tests for BusinessCustomer + */ + @Test + public void testBusinessCustomer() { + // TODO: test BusinessCustomer + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/BusinessDebitCardAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/BusinessDebitCardAllOfAttributesTest.java new file mode 100644 index 00000000..a50b3eca --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BusinessDebitCardAllOfAttributesTest.java @@ -0,0 +1,190 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.PhysicalCardStatus; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BusinessDebitCardAllOfAttributes + */ +public class BusinessDebitCardAllOfAttributesTest { + private final BusinessDebitCardAllOfAttributes model = new BusinessDebitCardAllOfAttributes(); + + /** + * Model tests for BusinessDebitCardAllOfAttributes + */ + @Test + public void testBusinessDebitCardAllOfAttributes() { + // TODO: test BusinessDebitCardAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'last4Digits' + */ + @Test + public void last4DigitsTest() { + // TODO: test last4Digits + } + + /** + * Test the property 'expirationDate' + */ + @Test + public void expirationDateTest() { + // TODO: test expirationDate + } + + /** + * Test the property 'shippingAddress' + */ + @Test + public void shippingAddressTest() { + // TODO: test shippingAddress + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** + * Test the property 'nationality' + */ + @Test + public void nationalityTest() { + // TODO: test nationality + } + + /** + * Test the property 'ssn' + */ + @Test + public void ssnTest() { + // TODO: test ssn + } + + /** + * Test the property 'passport' + */ + @Test + public void passportTest() { + // TODO: test passport + } + + /** + * Test the property 'bin' + */ + @Test + public void binTest() { + // TODO: test bin + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'design' + */ + @Test + public void designTest() { + // TODO: test design + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'freezeReason' + */ + @Test + public void freezeReasonTest() { + // TODO: test freezeReason + } + +} diff --git a/src/test/java/unit/java/sdk/model/BusinessDebitCardTest.java b/src/test/java/unit/java/sdk/model/BusinessDebitCardTest.java new file mode 100644 index 00000000..ad51b2a3 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BusinessDebitCardTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BusinessDebitCardAllOfAttributes; +import unit.java.sdk.model.Card; +import unit.java.sdk.model.CardRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BusinessDebitCard + */ +public class BusinessDebitCardTest { + private final BusinessDebitCard model = new BusinessDebitCard(); + + /** + * Model tests for BusinessDebitCard + */ + @Test + public void testBusinessDebitCard() { + // TODO: test BusinessDebitCard + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/BusinessNumberOfEmployeesTest.java b/src/test/java/unit/java/sdk/model/BusinessNumberOfEmployeesTest.java new file mode 100644 index 00000000..1a6a0926 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BusinessNumberOfEmployeesTest.java @@ -0,0 +1,32 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BusinessNumberOfEmployees + */ +public class BusinessNumberOfEmployeesTest { + /** + * Model tests for BusinessNumberOfEmployees + */ + @Test + public void testBusinessNumberOfEmployees() { + // TODO: test BusinessNumberOfEmployees + } + +} diff --git a/src/test/java/unit/java/sdk/model/BusinessVerticalTest.java b/src/test/java/unit/java/sdk/model/BusinessVerticalTest.java new file mode 100644 index 00000000..d42eba7a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BusinessVerticalTest.java @@ -0,0 +1,32 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BusinessVertical + */ +public class BusinessVerticalTest { + /** + * Model tests for BusinessVertical + */ + @Test + public void testBusinessVertical() { + // TODO: test BusinessVertical + } + +} diff --git a/src/test/java/unit/java/sdk/model/BusinessVirtualCreditCardTest.java b/src/test/java/unit/java/sdk/model/BusinessVirtualCreditCardTest.java new file mode 100644 index 00000000..c4c007f0 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BusinessVirtualCreditCardTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BusinessVirtualDebitCardAllOfAttributes; +import unit.java.sdk.model.Card; +import unit.java.sdk.model.CardRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BusinessVirtualCreditCard + */ +public class BusinessVirtualCreditCardTest { + private final BusinessVirtualCreditCard model = new BusinessVirtualCreditCard(); + + /** + * Model tests for BusinessVirtualCreditCard + */ + @Test + public void testBusinessVirtualCreditCard() { + // TODO: test BusinessVirtualCreditCard + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/BusinessVirtualDebitCardAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/BusinessVirtualDebitCardAllOfAttributesTest.java new file mode 100644 index 00000000..ece53239 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BusinessVirtualDebitCardAllOfAttributesTest.java @@ -0,0 +1,174 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.VirtualCardStatus; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BusinessVirtualDebitCardAllOfAttributes + */ +public class BusinessVirtualDebitCardAllOfAttributesTest { + private final BusinessVirtualDebitCardAllOfAttributes model = new BusinessVirtualDebitCardAllOfAttributes(); + + /** + * Model tests for BusinessVirtualDebitCardAllOfAttributes + */ + @Test + public void testBusinessVirtualDebitCardAllOfAttributes() { + // TODO: test BusinessVirtualDebitCardAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'last4Digits' + */ + @Test + public void last4DigitsTest() { + // TODO: test last4Digits + } + + /** + * Test the property 'expirationDate' + */ + @Test + public void expirationDateTest() { + // TODO: test expirationDate + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** + * Test the property 'nationality' + */ + @Test + public void nationalityTest() { + // TODO: test nationality + } + + /** + * Test the property 'ssn' + */ + @Test + public void ssnTest() { + // TODO: test ssn + } + + /** + * Test the property 'passport' + */ + @Test + public void passportTest() { + // TODO: test passport + } + + /** + * Test the property 'bin' + */ + @Test + public void binTest() { + // TODO: test bin + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'freezeReason' + */ + @Test + public void freezeReasonTest() { + // TODO: test freezeReason + } + +} diff --git a/src/test/java/unit/java/sdk/model/BusinessVirtualDebitCardTest.java b/src/test/java/unit/java/sdk/model/BusinessVirtualDebitCardTest.java new file mode 100644 index 00000000..ca88d172 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/BusinessVirtualDebitCardTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BusinessVirtualDebitCardAllOfAttributes; +import unit.java.sdk.model.Card; +import unit.java.sdk.model.CardRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for BusinessVirtualDebitCard + */ +public class BusinessVirtualDebitCardTest { + private final BusinessVirtualDebitCard model = new BusinessVirtualDebitCard(); + + /** + * Model tests for BusinessVirtualDebitCard + */ + @Test + public void testBusinessVirtualDebitCard() { + // TODO: test BusinessVirtualDebitCard + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CancelApplicationRequestDataAttributesTest.java b/src/test/java/unit/java/sdk/model/CancelApplicationRequestDataAttributesTest.java new file mode 100644 index 00000000..b406fbc4 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CancelApplicationRequestDataAttributesTest.java @@ -0,0 +1,48 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CancelApplicationRequestDataAttributes + */ +public class CancelApplicationRequestDataAttributesTest { + private final CancelApplicationRequestDataAttributes model = new CancelApplicationRequestDataAttributes(); + + /** + * Model tests for CancelApplicationRequestDataAttributes + */ + @Test + public void testCancelApplicationRequestDataAttributes() { + // TODO: test CancelApplicationRequestDataAttributes + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + +} diff --git a/src/test/java/unit/java/sdk/model/CancelApplicationRequestDataTest.java b/src/test/java/unit/java/sdk/model/CancelApplicationRequestDataTest.java new file mode 100644 index 00000000..0825d5f7 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CancelApplicationRequestDataTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CancelApplicationRequestDataAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CancelApplicationRequestData + */ +public class CancelApplicationRequestDataTest { + private final CancelApplicationRequestData model = new CancelApplicationRequestData(); + + /** + * Model tests for CancelApplicationRequestData + */ + @Test + public void testCancelApplicationRequestData() { + // TODO: test CancelApplicationRequestData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/CancelApplicationRequestTest.java b/src/test/java/unit/java/sdk/model/CancelApplicationRequestTest.java new file mode 100644 index 00000000..5301700c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CancelApplicationRequestTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CancelApplicationRequestData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CancelApplicationRequest + */ +public class CancelApplicationRequestTest { + private final CancelApplicationRequest model = new CancelApplicationRequest(); + + /** + * Model tests for CancelApplicationRequest + */ + @Test + public void testCancelApplicationRequest() { + // TODO: test CancelApplicationRequest + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CardLevelLimitsTest.java b/src/test/java/unit/java/sdk/model/CardLevelLimitsTest.java new file mode 100644 index 00000000..c9e5e18b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CardLevelLimitsTest.java @@ -0,0 +1,72 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CardLevelLimits + */ +public class CardLevelLimitsTest { + private final CardLevelLimits model = new CardLevelLimits(); + + /** + * Model tests for CardLevelLimits + */ + @Test + public void testCardLevelLimits() { + // TODO: test CardLevelLimits + } + + /** + * Test the property 'dailyWithdrawal' + */ + @Test + public void dailyWithdrawalTest() { + // TODO: test dailyWithdrawal + } + + /** + * Test the property 'dailyPurchase' + */ + @Test + public void dailyPurchaseTest() { + // TODO: test dailyPurchase + } + + /** + * Test the property 'monthlyWithdrawal' + */ + @Test + public void monthlyWithdrawalTest() { + // TODO: test monthlyWithdrawal + } + + /** + * Test the property 'monthlyPurchase' + */ + @Test + public void monthlyPurchaseTest() { + // TODO: test monthlyPurchase + } + +} diff --git a/src/test/java/unit/java/sdk/model/CardRelationshipTest.java b/src/test/java/unit/java/sdk/model/CardRelationshipTest.java new file mode 100644 index 00000000..df5484cd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CardRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationRequestRelationshipsCardData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CardRelationship + */ +public class CardRelationshipTest { + private final CardRelationship model = new CardRelationship(); + + /** + * Model tests for CardRelationship + */ + @Test + public void testCardRelationship() { + // TODO: test CardRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CardRelationshipsAccountTest.java b/src/test/java/unit/java/sdk/model/CardRelationshipsAccountTest.java new file mode 100644 index 00000000..932996d7 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CardRelationshipsAccountTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CounterpartyAccountRelationshipData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CardRelationshipsAccount + */ +public class CardRelationshipsAccountTest { + private final CardRelationshipsAccount model = new CardRelationshipsAccount(); + + /** + * Model tests for CardRelationshipsAccount + */ + @Test + public void testCardRelationshipsAccount() { + // TODO: test CardRelationshipsAccount + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CardRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CardRelationshipsTest.java new file mode 100644 index 00000000..84b5f258 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CardRelationshipsTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CardRelationshipsAccount; +import unit.java.sdk.model.ReceivedPaymentRelationshipsCustomer; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CardRelationships + */ +public class CardRelationshipsTest { + private final CardRelationships model = new CardRelationships(); + + /** + * Model tests for CardRelationships + */ + @Test + public void testCardRelationships() { + // TODO: test CardRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + +} diff --git a/src/test/java/unit/java/sdk/model/CardTest.java b/src/test/java/unit/java/sdk/model/CardTest.java new file mode 100644 index 00000000..ccb871e2 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CardTest.java @@ -0,0 +1,59 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Card + */ +public class CardTest { + private final Card model = new Card(); + + /** + * Model tests for Card + */ + @Test + public void testCard() { + // TODO: test Card + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/CardTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/CardTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..fbe36466 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CardTransactionAllOfAttributesTest.java @@ -0,0 +1,175 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.CardVerificationData; +import unit.java.sdk.model.Merchant; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CardTransactionAllOfAttributes + */ +public class CardTransactionAllOfAttributesTest { + private final CardTransactionAllOfAttributes model = new CardTransactionAllOfAttributes(); + + /** + * Model tests for CardTransactionAllOfAttributes + */ + @Test + public void testCardTransactionAllOfAttributes() { + // TODO: test CardTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'cardLast4Digits' + */ + @Test + public void cardLast4DigitsTest() { + // TODO: test cardLast4Digits + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'networkTransactionId' + */ + @Test + public void networkTransactionIdTest() { + // TODO: test networkTransactionId + } + + /** + * Test the property 'interchange' + */ + @Test + public void interchangeTest() { + // TODO: test interchange + } + + /** + * Test the property 'internationalServiceFee' + */ + @Test + public void internationalServiceFeeTest() { + // TODO: test internationalServiceFee + } + + /** + * Test the property 'merchant' + */ + @Test + public void merchantTest() { + // TODO: test merchant + } + + /** + * Test the property 'recurring' + */ + @Test + public void recurringTest() { + // TODO: test recurring + } + + /** + * Test the property 'paymentMethod' + */ + @Test + public void paymentMethodTest() { + // TODO: test paymentMethod + } + + /** + * Test the property 'digitalWallet' + */ + @Test + public void digitalWalletTest() { + // TODO: test digitalWallet + } + + /** + * Test the property 'cardVerificationData' + */ + @Test + public void cardVerificationDataTest() { + // TODO: test cardVerificationData + } + + /** + * Test the property 'cardNetwork' + */ + @Test + public void cardNetworkTest() { + // TODO: test cardNetwork + } + +} diff --git a/src/test/java/unit/java/sdk/model/CardTransactionAuthorizationRequestAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/CardTransactionAuthorizationRequestAllOfAttributesTest.java new file mode 100644 index 00000000..59855d40 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CardTransactionAuthorizationRequestAllOfAttributesTest.java @@ -0,0 +1,147 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.CardVerificationData; +import unit.java.sdk.model.Merchant; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CardTransactionAuthorizationRequestAllOfAttributes + */ +public class CardTransactionAuthorizationRequestAllOfAttributesTest { + private final CardTransactionAuthorizationRequestAllOfAttributes model = new CardTransactionAuthorizationRequestAllOfAttributes(); + + /** + * Model tests for CardTransactionAuthorizationRequestAllOfAttributes + */ + @Test + public void testCardTransactionAuthorizationRequestAllOfAttributes() { + // TODO: test CardTransactionAuthorizationRequestAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'partialApprovalAllowed' + */ + @Test + public void partialApprovalAllowedTest() { + // TODO: test partialApprovalAllowed + } + + /** + * Test the property 'approvedAmount' + */ + @Test + public void approvedAmountTest() { + // TODO: test approvedAmount + } + + /** + * Test the property 'declineReason' + */ + @Test + public void declineReasonTest() { + // TODO: test declineReason + } + + /** + * Test the property 'merchant' + */ + @Test + public void merchantTest() { + // TODO: test merchant + } + + /** + * Test the property 'recurring' + */ + @Test + public void recurringTest() { + // TODO: test recurring + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'paymentMethod' + */ + @Test + public void paymentMethodTest() { + // TODO: test paymentMethod + } + + /** + * Test the property 'digitalWallet' + */ + @Test + public void digitalWalletTest() { + // TODO: test digitalWallet + } + + /** + * Test the property 'cardVerificationData' + */ + @Test + public void cardVerificationDataTest() { + // TODO: test cardVerificationData + } + + /** + * Test the property 'cardNetwork' + */ + @Test + public void cardNetworkTest() { + // TODO: test cardNetwork + } + +} diff --git a/src/test/java/unit/java/sdk/model/CardTransactionAuthorizationRequestTest.java b/src/test/java/unit/java/sdk/model/CardTransactionAuthorizationRequestTest.java new file mode 100644 index 00000000..181577f9 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CardTransactionAuthorizationRequestTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationRequest; +import unit.java.sdk.model.AuthorizationRequestRelationships; +import unit.java.sdk.model.CardTransactionAuthorizationRequestAllOfAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CardTransactionAuthorizationRequest + */ +public class CardTransactionAuthorizationRequestTest { + private final CardTransactionAuthorizationRequest model = new CardTransactionAuthorizationRequest(); + + /** + * Model tests for CardTransactionAuthorizationRequest + */ + @Test + public void testCardTransactionAuthorizationRequest() { + // TODO: test CardTransactionAuthorizationRequest + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CardTransactionTest.java b/src/test/java/unit/java/sdk/model/CardTransactionTest.java new file mode 100644 index 00000000..def1ba97 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CardTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CardTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CardTransaction + */ +public class CardTransactionTest { + private final CardTransaction model = new CardTransaction(); + + /** + * Model tests for CardTransaction + */ + @Test + public void testCardTransaction() { + // TODO: test CardTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CardVerificationDataTest.java b/src/test/java/unit/java/sdk/model/CardVerificationDataTest.java new file mode 100644 index 00000000..0d09067b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CardVerificationDataTest.java @@ -0,0 +1,48 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CardVerificationData + */ +public class CardVerificationDataTest { + private final CardVerificationData model = new CardVerificationData(); + + /** + * Model tests for CardVerificationData + */ + @Test + public void testCardVerificationData() { + // TODO: test CardVerificationData + } + + /** + * Test the property 'verificationMethod' + */ + @Test + public void verificationMethodTest() { + // TODO: test verificationMethod + } + +} diff --git a/src/test/java/unit/java/sdk/model/CashDepositTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/CashDepositTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..da9677ce --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CashDepositTransactionAllOfAttributesTest.java @@ -0,0 +1,97 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CashDepositTransactionAllOfAttributes + */ +public class CashDepositTransactionAllOfAttributesTest { + private final CashDepositTransactionAllOfAttributes model = new CashDepositTransactionAllOfAttributes(); + + /** + * Model tests for CashDepositTransactionAllOfAttributes + */ + @Test + public void testCashDepositTransactionAllOfAttributes() { + // TODO: test CashDepositTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'recurring' + */ + @Test + public void recurringTest() { + // TODO: test recurring + } + +} diff --git a/src/test/java/unit/java/sdk/model/CashDepositTransactionTest.java b/src/test/java/unit/java/sdk/model/CashDepositTransactionTest.java new file mode 100644 index 00000000..3ac42e1f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CashDepositTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CashDepositTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CashDepositTransaction + */ +public class CashDepositTransactionTest { + private final CashDepositTransaction model = new CashDepositTransaction(); + + /** + * Model tests for CashDepositTransaction + */ + @Test + public void testCashDepositTransaction() { + // TODO: test CashDepositTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CashFlowTest.java b/src/test/java/unit/java/sdk/model/CashFlowTest.java new file mode 100644 index 00000000..013abbbd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CashFlowTest.java @@ -0,0 +1,32 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CashFlow + */ +public class CashFlowTest { + /** + * Model tests for CashFlow + */ + @Test + public void testCashFlow() { + // TODO: test CashFlow + } + +} diff --git a/src/test/java/unit/java/sdk/model/ChargebackRelationshipDataTest.java b/src/test/java/unit/java/sdk/model/ChargebackRelationshipDataTest.java new file mode 100644 index 00000000..44bbacb1 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ChargebackRelationshipDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ChargebackRelationshipData + */ +public class ChargebackRelationshipDataTest { + private final ChargebackRelationshipData model = new ChargebackRelationshipData(); + + /** + * Model tests for ChargebackRelationshipData + */ + @Test + public void testChargebackRelationshipData() { + // TODO: test ChargebackRelationshipData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/ChargebackRelationshipTest.java b/src/test/java/unit/java/sdk/model/ChargebackRelationshipTest.java new file mode 100644 index 00000000..d494102a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ChargebackRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ChargebackRelationshipData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ChargebackRelationship + */ +public class ChargebackRelationshipTest { + private final ChargebackRelationship model = new ChargebackRelationship(); + + /** + * Model tests for ChargebackRelationship + */ + @Test + public void testChargebackRelationship() { + // TODO: test ChargebackRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/ChargebackTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/ChargebackTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..99ee0015 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ChargebackTransactionAllOfAttributesTest.java @@ -0,0 +1,98 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ChargebackTransactionAllOfAttributes + */ +public class ChargebackTransactionAllOfAttributesTest { + private final ChargebackTransactionAllOfAttributes model = new ChargebackTransactionAllOfAttributes(); + + /** + * Model tests for ChargebackTransactionAllOfAttributes + */ + @Test + public void testChargebackTransactionAllOfAttributes() { + // TODO: test ChargebackTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'counterparty' + */ + @Test + public void counterpartyTest() { + // TODO: test counterparty + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/ChargebackTransactionTest.java b/src/test/java/unit/java/sdk/model/ChargebackTransactionTest.java new file mode 100644 index 00000000..381cd3b9 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ChargebackTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ChargebackTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ChargebackTransaction + */ +public class ChargebackTransactionTest { + private final ChargebackTransaction model = new ChargebackTransaction(); + + /** + * Model tests for ChargebackTransaction + */ + @Test + public void testChargebackTransaction() { + // TODO: test ChargebackTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CheckDepositAttributesTest.java b/src/test/java/unit/java/sdk/model/CheckDepositAttributesTest.java new file mode 100644 index 00000000..bfd8ebb6 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CheckDepositAttributesTest.java @@ -0,0 +1,162 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Counterparty2; +import unit.java.sdk.model.StatusEvent; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CheckDepositAttributes + */ +public class CheckDepositAttributesTest { + private final CheckDepositAttributes model = new CheckDepositAttributes(); + + /** + * Model tests for CheckDepositAttributes + */ + @Test + public void testCheckDepositAttributes() { + // TODO: test CheckDepositAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'settlementDate' + */ + @Test + public void settlementDateTest() { + // TODO: test settlementDate + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** + * Test the property 'statusCreatedAt' + */ + @Test + public void statusCreatedAtTest() { + // TODO: test statusCreatedAt + } + + /** + * Test the property 'statusSetBy' + */ + @Test + public void statusSetByTest() { + // TODO: test statusSetBy + } + + /** + * Test the property 'statusHistory' + */ + @Test + public void statusHistoryTest() { + // TODO: test statusHistory + } + + /** + * Test the property 'reasonText' + */ + @Test + public void reasonTextTest() { + // TODO: test reasonText + } + + /** + * Test the property 'checkNumber' + */ + @Test + public void checkNumberTest() { + // TODO: test checkNumber + } + + /** + * Test the property 'vendor' + */ + @Test + public void vendorTest() { + // TODO: test vendor + } + + /** + * Test the property 'counterparty' + */ + @Test + public void counterpartyTest() { + // TODO: test counterparty + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/CheckDepositRelationshipDataTest.java b/src/test/java/unit/java/sdk/model/CheckDepositRelationshipDataTest.java new file mode 100644 index 00000000..ccb738df --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CheckDepositRelationshipDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CheckDepositRelationshipData + */ +public class CheckDepositRelationshipDataTest { + private final CheckDepositRelationshipData model = new CheckDepositRelationshipData(); + + /** + * Model tests for CheckDepositRelationshipData + */ + @Test + public void testCheckDepositRelationshipData() { + // TODO: test CheckDepositRelationshipData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/CheckDepositRelationshipTest.java b/src/test/java/unit/java/sdk/model/CheckDepositRelationshipTest.java new file mode 100644 index 00000000..41599896 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CheckDepositRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositRelationshipData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CheckDepositRelationship + */ +public class CheckDepositRelationshipTest { + private final CheckDepositRelationship model = new CheckDepositRelationship(); + + /** + * Model tests for CheckDepositRelationship + */ + @Test + public void testCheckDepositRelationship() { + // TODO: test CheckDepositRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CheckDepositRelationshipsAccountDataTest.java b/src/test/java/unit/java/sdk/model/CheckDepositRelationshipsAccountDataTest.java new file mode 100644 index 00000000..8182a2ca --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CheckDepositRelationshipsAccountDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CheckDepositRelationshipsAccountData + */ +public class CheckDepositRelationshipsAccountDataTest { + private final CheckDepositRelationshipsAccountData model = new CheckDepositRelationshipsAccountData(); + + /** + * Model tests for CheckDepositRelationshipsAccountData + */ + @Test + public void testCheckDepositRelationshipsAccountData() { + // TODO: test CheckDepositRelationshipsAccountData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/CheckDepositRelationshipsAccountTest.java b/src/test/java/unit/java/sdk/model/CheckDepositRelationshipsAccountTest.java new file mode 100644 index 00000000..b456803f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CheckDepositRelationshipsAccountTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import unit.java.sdk.model.CheckDepositRelationshipsAccountData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CheckDepositRelationshipsAccount + */ +public class CheckDepositRelationshipsAccountTest { + private final CheckDepositRelationshipsAccount model = new CheckDepositRelationshipsAccount(); + + /** + * Model tests for CheckDepositRelationshipsAccount + */ + @Test + public void testCheckDepositRelationshipsAccount() { + // TODO: test CheckDepositRelationshipsAccount + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CheckDepositRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CheckDepositRelationshipsTest.java new file mode 100644 index 00000000..bcfc33eb --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CheckDepositRelationshipsTest.java @@ -0,0 +1,76 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositRelationshipsAccount; +import unit.java.sdk.model.OrgRelationship; +import unit.java.sdk.model.ReceivedPaymentRelationshipsCustomer; +import unit.java.sdk.model.ReceivedPaymentRelationshipsReceivePaymentTransaction; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CheckDepositRelationships + */ +public class CheckDepositRelationshipsTest { + private final CheckDepositRelationships model = new CheckDepositRelationships(); + + /** + * Model tests for CheckDepositRelationships + */ + @Test + public void testCheckDepositRelationships() { + // TODO: test CheckDepositRelationships + } + + /** + * Test the property 'org' + */ + @Test + public void orgTest() { + // TODO: test org + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + + /** + * Test the property 'transaction' + */ + @Test + public void transactionTest() { + // TODO: test transaction + } + +} diff --git a/src/test/java/unit/java/sdk/model/CheckDepositStatusTest.java b/src/test/java/unit/java/sdk/model/CheckDepositStatusTest.java new file mode 100644 index 00000000..5b32937c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CheckDepositStatusTest.java @@ -0,0 +1,32 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CheckDepositStatus + */ +public class CheckDepositStatusTest { + /** + * Model tests for CheckDepositStatus + */ + @Test + public void testCheckDepositStatus() { + // TODO: test CheckDepositStatus + } + +} diff --git a/src/test/java/unit/java/sdk/model/CheckDepositTest.java b/src/test/java/unit/java/sdk/model/CheckDepositTest.java new file mode 100644 index 00000000..45baf26a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CheckDepositTest.java @@ -0,0 +1,74 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositAttributes; +import unit.java.sdk.model.CheckDepositRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CheckDeposit + */ +public class CheckDepositTest { + private final CheckDeposit model = new CheckDeposit(); + + /** + * Model tests for CheckDeposit + */ + @Test + public void testCheckDeposit() { + // TODO: test CheckDeposit + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CheckDepositTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/CheckDepositTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..c68bc571 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CheckDepositTransactionAllOfAttributesTest.java @@ -0,0 +1,89 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CheckDepositTransactionAllOfAttributes + */ +public class CheckDepositTransactionAllOfAttributesTest { + private final CheckDepositTransactionAllOfAttributes model = new CheckDepositTransactionAllOfAttributes(); + + /** + * Model tests for CheckDepositTransactionAllOfAttributes + */ + @Test + public void testCheckDepositTransactionAllOfAttributes() { + // TODO: test CheckDepositTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/CheckDepositTransactionTest.java b/src/test/java/unit/java/sdk/model/CheckDepositTransactionTest.java new file mode 100644 index 00000000..177da8dc --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CheckDepositTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CheckDepositTransaction + */ +public class CheckDepositTransactionTest { + private final CheckDepositTransaction model = new CheckDepositTransaction(); + + /** + * Model tests for CheckDepositTransaction + */ + @Test + public void testCheckDepositTransaction() { + // TODO: test CheckDepositTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CheckPaymentAttributesCounterpartyTest.java b/src/test/java/unit/java/sdk/model/CheckPaymentAttributesCounterpartyTest.java new file mode 100644 index 00000000..ca64fa86 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CheckPaymentAttributesCounterpartyTest.java @@ -0,0 +1,65 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CheckPaymentAttributesCounterparty + */ +public class CheckPaymentAttributesCounterpartyTest { + private final CheckPaymentAttributesCounterparty model = new CheckPaymentAttributesCounterparty(); + + /** + * Model tests for CheckPaymentAttributesCounterparty + */ + @Test + public void testCheckPaymentAttributesCounterparty() { + // TODO: test CheckPaymentAttributesCounterparty + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'counterpartyMoved' + */ + @Test + public void counterpartyMovedTest() { + // TODO: test counterpartyMoved + } + +} diff --git a/src/test/java/unit/java/sdk/model/CheckPaymentAttributesTest.java b/src/test/java/unit/java/sdk/model/CheckPaymentAttributesTest.java new file mode 100644 index 00000000..3de8d3a1 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CheckPaymentAttributesTest.java @@ -0,0 +1,238 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.CheckPaymentAttributesCounterparty; +import unit.java.sdk.model.ReturnReason; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CheckPaymentAttributes + */ +public class CheckPaymentAttributesTest { + private final CheckPaymentAttributes model = new CheckPaymentAttributes(); + + /** + * Model tests for CheckPaymentAttributes + */ + @Test + public void testCheckPaymentAttributes() { + // TODO: test CheckPaymentAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'returnCutoffTime' + */ + @Test + public void returnCutoffTimeTest() { + // TODO: test returnCutoffTime + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'memo' + */ + @Test + public void memoTest() { + // TODO: test memo + } + + /** + * Test the property 'deliveryStatus' + */ + @Test + public void deliveryStatusTest() { + // TODO: test deliveryStatus + } + + /** + * Test the property 'sendAt' + */ + @Test + public void sendAtTest() { + // TODO: test sendAt + } + + /** + * Test the property 'counterparty' + */ + @Test + public void counterpartyTest() { + // TODO: test counterparty + } + + /** + * Test the property 'trackedAt' + */ + @Test + public void trackedAtTest() { + // TODO: test trackedAt + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'expectedDelivery' + */ + @Test + public void expectedDeliveryTest() { + // TODO: test expectedDelivery + } + + /** + * Test the property 'originated' + */ + @Test + public void originatedTest() { + // TODO: test originated + } + + /** + * Test the property 'expirationDate' + */ + @Test + public void expirationDateTest() { + // TODO: test expirationDate + } + + /** + * Test the property 'rejectReason' + */ + @Test + public void rejectReasonTest() { + // TODO: test rejectReason + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'returnReason' + */ + @Test + public void returnReasonTest() { + // TODO: test returnReason + } + + /** + * Test the property 'pendingReviewReasons' + */ + @Test + public void pendingReviewReasonsTest() { + // TODO: test pendingReviewReasons + } + + /** + * Test the property 'checkNumber' + */ + @Test + public void checkNumberTest() { + // TODO: test checkNumber + } + + /** + * Test the property 'onUsAuxiliary' + */ + @Test + public void onUsAuxiliaryTest() { + // TODO: test onUsAuxiliary + } + + /** + * Test the property 'onUs' + */ + @Test + public void onUsTest() { + // TODO: test onUs + } + + /** + * Test the property 'counterpartyRoutingNumber' + */ + @Test + public void counterpartyRoutingNumberTest() { + // TODO: test counterpartyRoutingNumber + } + + /** + * Test the property 'additionalVerificationStatus' + */ + @Test + public void additionalVerificationStatusTest() { + // TODO: test additionalVerificationStatus + } + +} diff --git a/src/test/java/unit/java/sdk/model/CheckPaymentRelationshipTest.java b/src/test/java/unit/java/sdk/model/CheckPaymentRelationshipTest.java new file mode 100644 index 00000000..a56e565b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CheckPaymentRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PaymentRelationshipData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CheckPaymentRelationship + */ +public class CheckPaymentRelationshipTest { + private final CheckPaymentRelationship model = new CheckPaymentRelationship(); + + /** + * Model tests for CheckPaymentRelationship + */ + @Test + public void testCheckPaymentRelationship() { + // TODO: test CheckPaymentRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CheckPaymentRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CheckPaymentRelationshipsTest.java new file mode 100644 index 00000000..174aef5c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CheckPaymentRelationshipsTest.java @@ -0,0 +1,76 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomersRelationship; +import unit.java.sdk.model.ReceivedPaymentRelationshipsCustomer; +import unit.java.sdk.model.ReceivedPaymentRelationshipsReceivePaymentTransaction; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsAccount; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CheckPaymentRelationships + */ +public class CheckPaymentRelationshipsTest { + private final CheckPaymentRelationships model = new CheckPaymentRelationships(); + + /** + * Model tests for CheckPaymentRelationships + */ + @Test + public void testCheckPaymentRelationships() { + // TODO: test CheckPaymentRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + + /** + * Test the property 'customers' + */ + @Test + public void customersTest() { + // TODO: test customers + } + + /** + * Test the property 'transaction' + */ + @Test + public void transactionTest() { + // TODO: test transaction + } + +} diff --git a/src/test/java/unit/java/sdk/model/CheckPaymentTest.java b/src/test/java/unit/java/sdk/model/CheckPaymentTest.java new file mode 100644 index 00000000..111397b6 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CheckPaymentTest.java @@ -0,0 +1,74 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckPaymentAttributes; +import unit.java.sdk.model.CheckPaymentRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CheckPayment + */ +public class CheckPaymentTest { + private final CheckPayment model = new CheckPayment(); + + /** + * Model tests for CheckPayment + */ + @Test + public void testCheckPayment() { + // TODO: test CheckPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CheckPaymentTransactionTest.java b/src/test/java/unit/java/sdk/model/CheckPaymentTransactionTest.java new file mode 100644 index 00000000..32a15d38 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CheckPaymentTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CheckPaymentTransaction + */ +public class CheckPaymentTransactionTest { + private final CheckPaymentTransaction model = new CheckPaymentTransaction(); + + /** + * Model tests for CheckPaymentTransaction + */ + @Test + public void testCheckPaymentTransaction() { + // TODO: test CheckPaymentTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CloseAccountRequestAttributesTest.java b/src/test/java/unit/java/sdk/model/CloseAccountRequestAttributesTest.java new file mode 100644 index 00000000..50873aa5 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CloseAccountRequestAttributesTest.java @@ -0,0 +1,60 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CloseAccountRequestAttributes + */ +public class CloseAccountRequestAttributesTest { + private final CloseAccountRequestAttributes model = new CloseAccountRequestAttributes(); + + /** + * Model tests for CloseAccountRequestAttributes + */ + @Test + public void testCloseAccountRequestAttributes() { + // TODO: test CloseAccountRequestAttributes + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** + * Test the property 'fraudReason' + */ + @Test + public void fraudReasonTest() { + // TODO: test fraudReason + } + +} diff --git a/src/test/java/unit/java/sdk/model/CloseAccountRequestTest.java b/src/test/java/unit/java/sdk/model/CloseAccountRequestTest.java new file mode 100644 index 00000000..55098278 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CloseAccountRequestTest.java @@ -0,0 +1,48 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CloseAccountRequest + */ +public class CloseAccountRequestTest { + private final CloseAccountRequest model = new CloseAccountRequest(); + + /** + * Model tests for CloseAccountRequest + */ + @Test + public void testCloseAccountRequest() { + // TODO: test CloseAccountRequest + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/ContactTest.java b/src/test/java/unit/java/sdk/model/ContactTest.java new file mode 100644 index 00000000..68b94278 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ContactTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Contact + */ +public class ContactTest { + private final Contact model = new Contact(); + + /** + * Model tests for Contact + */ + @Test + public void testContact() { + // TODO: test Contact + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'jwtSubject' + */ + @Test + public void jwtSubjectTest() { + // TODO: test jwtSubject + } + +} diff --git a/src/test/java/unit/java/sdk/model/CoordinatesTest.java b/src/test/java/unit/java/sdk/model/CoordinatesTest.java new file mode 100644 index 00000000..82f869a1 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CoordinatesTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Coordinates + */ +public class CoordinatesTest { + private final Coordinates model = new Coordinates(); + + /** + * Model tests for Coordinates + */ + @Test + public void testCoordinates() { + // TODO: test Coordinates + } + + /** + * Test the property 'longitude' + */ + @Test + public void longitudeTest() { + // TODO: test longitude + } + + /** + * Test the property 'latitude' + */ + @Test + public void latitudeTest() { + // TODO: test latitude + } + +} diff --git a/src/test/java/unit/java/sdk/model/Counterparty1AttributesTest.java b/src/test/java/unit/java/sdk/model/Counterparty1AttributesTest.java new file mode 100644 index 00000000..7163f201 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/Counterparty1AttributesTest.java @@ -0,0 +1,113 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Counterparty1Attributes + */ +public class Counterparty1AttributesTest { + private final Counterparty1Attributes model = new Counterparty1Attributes(); + + /** + * Model tests for Counterparty1Attributes + */ + @Test + public void testCounterparty1Attributes() { + // TODO: test Counterparty1Attributes + } + + /** + * Test the property 'routingNumber' + */ + @Test + public void routingNumberTest() { + // TODO: test routingNumber + } + + /** + * Test the property 'accountNumber' + */ + @Test + public void accountNumberTest() { + // TODO: test accountNumber + } + + /** + * Test the property 'accountType' + */ + @Test + public void accountTypeTest() { + // TODO: test accountType + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'bank' + */ + @Test + public void bankTest() { + // TODO: test bank + } + + /** + * Test the property 'permissions' + */ + @Test + public void permissionsTest() { + // TODO: test permissions + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + +} diff --git a/src/test/java/unit/java/sdk/model/Counterparty1Test.java b/src/test/java/unit/java/sdk/model/Counterparty1Test.java new file mode 100644 index 00000000..49e599c5 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/Counterparty1Test.java @@ -0,0 +1,74 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty1Attributes; +import unit.java.sdk.model.CounterpartyRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Counterparty1 + */ +public class Counterparty1Test { + private final Counterparty1 model = new Counterparty1(); + + /** + * Model tests for Counterparty1 + */ + @Test + public void testCounterparty1() { + // TODO: test Counterparty1 + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/Counterparty2Test.java b/src/test/java/unit/java/sdk/model/Counterparty2Test.java new file mode 100644 index 00000000..5a98f8f7 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/Counterparty2Test.java @@ -0,0 +1,64 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Counterparty2 + */ +public class Counterparty2Test { + private final Counterparty2 model = new Counterparty2(); + + /** + * Model tests for Counterparty2 + */ + @Test + public void testCounterparty2() { + // TODO: test Counterparty2 + } + + /** + * Test the property 'routingNumber' + */ + @Test + public void routingNumberTest() { + // TODO: test routingNumber + } + + /** + * Test the property 'accountNumber' + */ + @Test + public void accountNumberTest() { + // TODO: test accountNumber + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/src/test/java/unit/java/sdk/model/CounterpartyAccountRelationship1Test.java b/src/test/java/unit/java/sdk/model/CounterpartyAccountRelationship1Test.java new file mode 100644 index 00000000..4c5111b4 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CounterpartyAccountRelationship1Test.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RelationshipsAccountData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CounterpartyAccountRelationship1 + */ +public class CounterpartyAccountRelationship1Test { + private final CounterpartyAccountRelationship1 model = new CounterpartyAccountRelationship1(); + + /** + * Model tests for CounterpartyAccountRelationship1 + */ + @Test + public void testCounterpartyAccountRelationship1() { + // TODO: test CounterpartyAccountRelationship1 + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CounterpartyAccountRelationshipDataTest.java b/src/test/java/unit/java/sdk/model/CounterpartyAccountRelationshipDataTest.java new file mode 100644 index 00000000..4d603c9d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CounterpartyAccountRelationshipDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CounterpartyAccountRelationshipData + */ +public class CounterpartyAccountRelationshipDataTest { + private final CounterpartyAccountRelationshipData model = new CounterpartyAccountRelationshipData(); + + /** + * Model tests for CounterpartyAccountRelationshipData + */ + @Test + public void testCounterpartyAccountRelationshipData() { + // TODO: test CounterpartyAccountRelationshipData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/CounterpartyAccountRelationshipTest.java b/src/test/java/unit/java/sdk/model/CounterpartyAccountRelationshipTest.java new file mode 100644 index 00000000..58f33b4a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CounterpartyAccountRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CounterpartyAccountRelationshipData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CounterpartyAccountRelationship + */ +public class CounterpartyAccountRelationshipTest { + private final CounterpartyAccountRelationship model = new CounterpartyAccountRelationship(); + + /** + * Model tests for CounterpartyAccountRelationship + */ + @Test + public void testCounterpartyAccountRelationship() { + // TODO: test CounterpartyAccountRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CounterpartyBalanceAttributesTest.java b/src/test/java/unit/java/sdk/model/CounterpartyBalanceAttributesTest.java new file mode 100644 index 00000000..2b77c69e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CounterpartyBalanceAttributesTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CounterpartyBalanceAttributes + */ +public class CounterpartyBalanceAttributesTest { + private final CounterpartyBalanceAttributes model = new CounterpartyBalanceAttributes(); + + /** + * Model tests for CounterpartyBalanceAttributes + */ + @Test + public void testCounterpartyBalanceAttributes() { + // TODO: test CounterpartyBalanceAttributes + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'available' + */ + @Test + public void availableTest() { + // TODO: test available + } + +} diff --git a/src/test/java/unit/java/sdk/model/CounterpartyBalanceRelationshipsCounterpartyDataTest.java b/src/test/java/unit/java/sdk/model/CounterpartyBalanceRelationshipsCounterpartyDataTest.java new file mode 100644 index 00000000..5f6932c9 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CounterpartyBalanceRelationshipsCounterpartyDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CounterpartyBalanceRelationshipsCounterpartyData + */ +public class CounterpartyBalanceRelationshipsCounterpartyDataTest { + private final CounterpartyBalanceRelationshipsCounterpartyData model = new CounterpartyBalanceRelationshipsCounterpartyData(); + + /** + * Model tests for CounterpartyBalanceRelationshipsCounterpartyData + */ + @Test + public void testCounterpartyBalanceRelationshipsCounterpartyData() { + // TODO: test CounterpartyBalanceRelationshipsCounterpartyData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/CounterpartyBalanceRelationshipsCounterpartyTest.java b/src/test/java/unit/java/sdk/model/CounterpartyBalanceRelationshipsCounterpartyTest.java new file mode 100644 index 00000000..123c5910 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CounterpartyBalanceRelationshipsCounterpartyTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CounterpartyBalanceRelationshipsCounterpartyData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CounterpartyBalanceRelationshipsCounterparty + */ +public class CounterpartyBalanceRelationshipsCounterpartyTest { + private final CounterpartyBalanceRelationshipsCounterparty model = new CounterpartyBalanceRelationshipsCounterparty(); + + /** + * Model tests for CounterpartyBalanceRelationshipsCounterparty + */ + @Test + public void testCounterpartyBalanceRelationshipsCounterparty() { + // TODO: test CounterpartyBalanceRelationshipsCounterparty + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CounterpartyBalanceRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CounterpartyBalanceRelationshipsTest.java new file mode 100644 index 00000000..a4cb94ed --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CounterpartyBalanceRelationshipsTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CounterpartyBalanceRelationshipsCounterparty; +import unit.java.sdk.model.RelationshipsCustomer; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CounterpartyBalanceRelationships + */ +public class CounterpartyBalanceRelationshipsTest { + private final CounterpartyBalanceRelationships model = new CounterpartyBalanceRelationships(); + + /** + * Model tests for CounterpartyBalanceRelationships + */ + @Test + public void testCounterpartyBalanceRelationships() { + // TODO: test CounterpartyBalanceRelationships + } + + /** + * Test the property 'counterparty' + */ + @Test + public void counterpartyTest() { + // TODO: test counterparty + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + +} diff --git a/src/test/java/unit/java/sdk/model/CounterpartyBalanceTest.java b/src/test/java/unit/java/sdk/model/CounterpartyBalanceTest.java new file mode 100644 index 00000000..830f8845 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CounterpartyBalanceTest.java @@ -0,0 +1,74 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CounterpartyBalanceAttributes; +import unit.java.sdk.model.CounterpartyBalanceRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CounterpartyBalance + */ +public class CounterpartyBalanceTest { + private final CounterpartyBalance model = new CounterpartyBalance(); + + /** + * Model tests for CounterpartyBalance + */ + @Test + public void testCounterpartyBalance() { + // TODO: test CounterpartyBalance + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CounterpartyCustomerRelationshipTest.java b/src/test/java/unit/java/sdk/model/CounterpartyCustomerRelationshipTest.java new file mode 100644 index 00000000..a9c28b56 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CounterpartyCustomerRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RelationshipsCustomerData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CounterpartyCustomerRelationship + */ +public class CounterpartyCustomerRelationshipTest { + private final CounterpartyCustomerRelationship model = new CounterpartyCustomerRelationship(); + + /** + * Model tests for CounterpartyCustomerRelationship + */ + @Test + public void testCounterpartyCustomerRelationship() { + // TODO: test CounterpartyCustomerRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CounterpartyRelationshipDataTest.java b/src/test/java/unit/java/sdk/model/CounterpartyRelationshipDataTest.java new file mode 100644 index 00000000..971f9a3d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CounterpartyRelationshipDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CounterpartyRelationshipData + */ +public class CounterpartyRelationshipDataTest { + private final CounterpartyRelationshipData model = new CounterpartyRelationshipData(); + + /** + * Model tests for CounterpartyRelationshipData + */ + @Test + public void testCounterpartyRelationshipData() { + // TODO: test CounterpartyRelationshipData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/CounterpartyRelationshipTest.java b/src/test/java/unit/java/sdk/model/CounterpartyRelationshipTest.java new file mode 100644 index 00000000..798150f1 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CounterpartyRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CounterpartyRelationshipData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CounterpartyRelationship + */ +public class CounterpartyRelationshipTest { + private final CounterpartyRelationship model = new CounterpartyRelationship(); + + /** + * Model tests for CounterpartyRelationship + */ + @Test + public void testCounterpartyRelationship() { + // TODO: test CounterpartyRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CounterpartyRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CounterpartyRelationshipsTest.java new file mode 100644 index 00000000..1222d023 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CounterpartyRelationshipsTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RelationshipsCustomer; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CounterpartyRelationships + */ +public class CounterpartyRelationshipsTest { + private final CounterpartyRelationships model = new CounterpartyRelationships(); + + /** + * Model tests for CounterpartyRelationships + */ + @Test + public void testCounterpartyRelationships() { + // TODO: test CounterpartyRelationships + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + +} diff --git a/src/test/java/unit/java/sdk/model/CounterpartyTest.java b/src/test/java/unit/java/sdk/model/CounterpartyTest.java new file mode 100644 index 00000000..c6617bd0 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CounterpartyTest.java @@ -0,0 +1,72 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Counterparty + */ +public class CounterpartyTest { + private final Counterparty model = new Counterparty(); + + /** + * Model tests for Counterparty + */ + @Test + public void testCounterparty() { + // TODO: test Counterparty + } + + /** + * Test the property 'routingNumber' + */ + @Test + public void routingNumberTest() { + // TODO: test routingNumber + } + + /** + * Test the property 'accountNumber' + */ + @Test + public void accountNumberTest() { + // TODO: test accountNumber + } + + /** + * Test the property 'accountType' + */ + @Test + public void accountTypeTest() { + // TODO: test accountType + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateAccountDataTest.java b/src/test/java/unit/java/sdk/model/CreateAccountDataTest.java new file mode 100644 index 00000000..4febb56f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateAccountDataTest.java @@ -0,0 +1,68 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCreditAccount; +import unit.java.sdk.model.CreateDepositAccount; +import unit.java.sdk.model.CreateDepositAccountAttributes; +import unit.java.sdk.model.CreateDepositAccountRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateAccountData + */ +public class CreateAccountDataTest { + private final CreateAccountData model = new CreateAccountData(); + + /** + * Model tests for CreateAccountData + */ + @Test + public void testCreateAccountData() { + // TODO: test CreateAccountData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateAccountTest.java b/src/test/java/unit/java/sdk/model/CreateAccountTest.java new file mode 100644 index 00000000..af89e500 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateAccountTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAccountData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateAccount + */ +public class CreateAccountTest { + private final CreateAccount model = new CreateAccount(); + + /** + * Model tests for CreateAccount + */ + @Test + public void testCreateAccount() { + // TODO: test CreateAccount + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateAchCounterpartyAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateAchCounterpartyAttributesTest.java new file mode 100644 index 00000000..a343cf17 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateAchCounterpartyAttributesTest.java @@ -0,0 +1,104 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateAchCounterpartyAttributes + */ +public class CreateAchCounterpartyAttributesTest { + private final CreateAchCounterpartyAttributes model = new CreateAchCounterpartyAttributes(); + + /** + * Model tests for CreateAchCounterpartyAttributes + */ + @Test + public void testCreateAchCounterpartyAttributes() { + // TODO: test CreateAchCounterpartyAttributes + } + + /** + * Test the property 'routingNumber' + */ + @Test + public void routingNumberTest() { + // TODO: test routingNumber + } + + /** + * Test the property 'accountNumber' + */ + @Test + public void accountNumberTest() { + // TODO: test accountNumber + } + + /** + * Test the property 'accountType' + */ + @Test + public void accountTypeTest() { + // TODO: test accountType + } + + /** + * Test the property 'permissions' + */ + @Test + public void permissionsTest() { + // TODO: test permissions + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateAchCounterpartyTest.java b/src/test/java/unit/java/sdk/model/CreateAchCounterpartyTest.java new file mode 100644 index 00000000..827e696f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateAchCounterpartyTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchCounterpartyAttributes; +import unit.java.sdk.model.CreateCounterpartyRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateAchCounterparty + */ +public class CreateAchCounterpartyTest { + private final CreateAchCounterparty model = new CreateAchCounterparty(); + + /** + * Model tests for CreateAchCounterparty + */ + @Test + public void testCreateAchCounterparty() { + // TODO: test CreateAchCounterparty + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateAchPaymentAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateAchPaymentAttributesTest.java new file mode 100644 index 00000000..02042ada --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateAchPaymentAttributesTest.java @@ -0,0 +1,113 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateAchPaymentAttributes + */ +public class CreateAchPaymentAttributesTest { + private final CreateAchPaymentAttributes model = new CreateAchPaymentAttributes(); + + /** + * Model tests for CreateAchPaymentAttributes + */ + @Test + public void testCreateAchPaymentAttributes() { + // TODO: test CreateAchPaymentAttributes + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'addenda' + */ + @Test + public void addendaTest() { + // TODO: test addenda + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'counterparty' + */ + @Test + public void counterpartyTest() { + // TODO: test counterparty + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'sameDay' + */ + @Test + public void sameDayTest() { + // TODO: test sameDay + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'secCode' + */ + @Test + public void secCodeTest() { + // TODO: test secCode + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateAchPaymentCounterpartyAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateAchPaymentCounterpartyAttributesTest.java new file mode 100644 index 00000000..44989225 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateAchPaymentCounterpartyAttributesTest.java @@ -0,0 +1,112 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateAchPaymentCounterpartyAttributes + */ +public class CreateAchPaymentCounterpartyAttributesTest { + private final CreateAchPaymentCounterpartyAttributes model = new CreateAchPaymentCounterpartyAttributes(); + + /** + * Model tests for CreateAchPaymentCounterpartyAttributes + */ + @Test + public void testCreateAchPaymentCounterpartyAttributes() { + // TODO: test CreateAchPaymentCounterpartyAttributes + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'addenda' + */ + @Test + public void addendaTest() { + // TODO: test addenda + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'sameDay' + */ + @Test + public void sameDayTest() { + // TODO: test sameDay + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'verifyCounterpartyBalance' + */ + @Test + public void verifyCounterpartyBalanceTest() { + // TODO: test verifyCounterpartyBalance + } + + /** + * Test the property 'secCode' + */ + @Test + public void secCodeTest() { + // TODO: test secCode + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateAchPaymentCounterpartyRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CreateAchPaymentCounterpartyRelationshipsTest.java new file mode 100644 index 00000000..debabc7f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateAchPaymentCounterpartyRelationshipsTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountRelationship; +import unit.java.sdk.model.CounterpartyRelationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateAchPaymentCounterpartyRelationships + */ +public class CreateAchPaymentCounterpartyRelationshipsTest { + private final CreateAchPaymentCounterpartyRelationships model = new CreateAchPaymentCounterpartyRelationships(); + + /** + * Model tests for CreateAchPaymentCounterpartyRelationships + */ + @Test + public void testCreateAchPaymentCounterpartyRelationships() { + // TODO: test CreateAchPaymentCounterpartyRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'counterparty' + */ + @Test + public void counterpartyTest() { + // TODO: test counterparty + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateAchPaymentCounterpartyTest.java b/src/test/java/unit/java/sdk/model/CreateAchPaymentCounterpartyTest.java new file mode 100644 index 00000000..cee9493d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateAchPaymentCounterpartyTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchPaymentCounterpartyAttributes; +import unit.java.sdk.model.CreateAchPaymentCounterpartyRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateAchPaymentCounterparty + */ +public class CreateAchPaymentCounterpartyTest { + private final CreateAchPaymentCounterparty model = new CreateAchPaymentCounterparty(); + + /** + * Model tests for CreateAchPaymentCounterparty + */ + @Test + public void testCreateAchPaymentCounterparty() { + // TODO: test CreateAchPaymentCounterparty + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateAchPaymentPlaidAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateAchPaymentPlaidAttributesTest.java new file mode 100644 index 00000000..9f33ac17 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateAchPaymentPlaidAttributesTest.java @@ -0,0 +1,128 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateAchPaymentPlaidAttributes + */ +public class CreateAchPaymentPlaidAttributesTest { + private final CreateAchPaymentPlaidAttributes model = new CreateAchPaymentPlaidAttributes(); + + /** + * Model tests for CreateAchPaymentPlaidAttributes + */ + @Test + public void testCreateAchPaymentPlaidAttributes() { + // TODO: test CreateAchPaymentPlaidAttributes + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'addenda' + */ + @Test + public void addendaTest() { + // TODO: test addenda + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'plaidProcessorToken' + */ + @Test + public void plaidProcessorTokenTest() { + // TODO: test plaidProcessorToken + } + + /** + * Test the property 'counterpartyName' + */ + @Test + public void counterpartyNameTest() { + // TODO: test counterpartyName + } + + /** + * Test the property 'sameDay' + */ + @Test + public void sameDayTest() { + // TODO: test sameDay + } + + /** + * Test the property 'verifyCounterpartyBalance' + */ + @Test + public void verifyCounterpartyBalanceTest() { + // TODO: test verifyCounterpartyBalance + } + + /** + * Test the property 'secCode' + */ + @Test + public void secCodeTest() { + // TODO: test secCode + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateAchPaymentPlaidTest.java b/src/test/java/unit/java/sdk/model/CreateAchPaymentPlaidTest.java new file mode 100644 index 00000000..a8fb2939 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateAchPaymentPlaidTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchPaymentPlaidAttributes; +import unit.java.sdk.model.CreateAchPaymentRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateAchPaymentPlaid + */ +public class CreateAchPaymentPlaidTest { + private final CreateAchPaymentPlaid model = new CreateAchPaymentPlaid(); + + /** + * Model tests for CreateAchPaymentPlaid + */ + @Test + public void testCreateAchPaymentPlaid() { + // TODO: test CreateAchPaymentPlaid + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateAchPaymentRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CreateAchPaymentRelationshipsTest.java new file mode 100644 index 00000000..ebedf4c0 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateAchPaymentRelationshipsTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountRelationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateAchPaymentRelationships + */ +public class CreateAchPaymentRelationshipsTest { + private final CreateAchPaymentRelationships model = new CreateAchPaymentRelationships(); + + /** + * Model tests for CreateAchPaymentRelationships + */ + @Test + public void testCreateAchPaymentRelationships() { + // TODO: test CreateAchPaymentRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateAchPaymentTest.java b/src/test/java/unit/java/sdk/model/CreateAchPaymentTest.java new file mode 100644 index 00000000..b57b16d7 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateAchPaymentTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchPaymentAttributes; +import unit.java.sdk.model.CreateAchPaymentRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateAchPayment + */ +public class CreateAchPaymentTest { + private final CreateAchPayment model = new CreateAchPayment(); + + /** + * Model tests for CreateAchPayment + */ + @Test + public void testCreateAchPayment() { + // TODO: test CreateAchPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateAchRepaymentAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateAchRepaymentAttributesTest.java new file mode 100644 index 00000000..dd519bc2 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateAchRepaymentAttributesTest.java @@ -0,0 +1,88 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateAchRepaymentAttributes + */ +public class CreateAchRepaymentAttributesTest { + private final CreateAchRepaymentAttributes model = new CreateAchRepaymentAttributes(); + + /** + * Model tests for CreateAchRepaymentAttributes + */ + @Test + public void testCreateAchRepaymentAttributes() { + // TODO: test CreateAchRepaymentAttributes + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'addenda' + */ + @Test + public void addendaTest() { + // TODO: test addenda + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'sameDay' + */ + @Test + public void sameDayTest() { + // TODO: test sameDay + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateAchRepaymentRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CreateAchRepaymentRelationshipsTest.java new file mode 100644 index 00000000..7e61c45f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateAchRepaymentRelationshipsTest.java @@ -0,0 +1,65 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateAchRepaymentRelationships + */ +public class CreateAchRepaymentRelationshipsTest { + private final CreateAchRepaymentRelationships model = new CreateAchRepaymentRelationships(); + + /** + * Model tests for CreateAchRepaymentRelationships + */ + @Test + public void testCreateAchRepaymentRelationships() { + // TODO: test CreateAchRepaymentRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'creditAccount' + */ + @Test + public void creditAccountTest() { + // TODO: test creditAccount + } + + /** + * Test the property 'counterparty' + */ + @Test + public void counterpartyTest() { + // TODO: test counterparty + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateAchRepaymentTest.java b/src/test/java/unit/java/sdk/model/CreateAchRepaymentTest.java new file mode 100644 index 00000000..43ee0a2c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateAchRepaymentTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchRepaymentAttributes; +import unit.java.sdk.model.CreateAchRepaymentRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateAchRepayment + */ +public class CreateAchRepaymentTest { + private final CreateAchRepayment model = new CreateAchRepayment(); + + /** + * Model tests for CreateAchRepayment + */ + @Test + public void testCreateAchRepayment() { + // TODO: test CreateAchRepayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateApiTokenDataAttributesResourcesInnerTest.java b/src/test/java/unit/java/sdk/model/CreateApiTokenDataAttributesResourcesInnerTest.java new file mode 100644 index 00000000..53c455d6 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateApiTokenDataAttributesResourcesInnerTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateApiTokenDataAttributesResourcesInner + */ +public class CreateApiTokenDataAttributesResourcesInnerTest { + private final CreateApiTokenDataAttributesResourcesInner model = new CreateApiTokenDataAttributesResourcesInner(); + + /** + * Model tests for CreateApiTokenDataAttributesResourcesInner + */ + @Test + public void testCreateApiTokenDataAttributesResourcesInner() { + // TODO: test CreateApiTokenDataAttributesResourcesInner + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'ids' + */ + @Test + public void idsTest() { + // TODO: test ids + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateApiTokenDataAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateApiTokenDataAttributesTest.java new file mode 100644 index 00000000..bdb6fffd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateApiTokenDataAttributesTest.java @@ -0,0 +1,84 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.CreateApiTokenDataAttributesResourcesInner; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateApiTokenDataAttributes + */ +public class CreateApiTokenDataAttributesTest { + private final CreateApiTokenDataAttributes model = new CreateApiTokenDataAttributes(); + + /** + * Model tests for CreateApiTokenDataAttributes + */ + @Test + public void testCreateApiTokenDataAttributes() { + // TODO: test CreateApiTokenDataAttributes + } + + /** + * Test the property 'scope' + */ + @Test + public void scopeTest() { + // TODO: test scope + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'expiration' + */ + @Test + public void expirationTest() { + // TODO: test expiration + } + + /** + * Test the property 'sourceIp' + */ + @Test + public void sourceIpTest() { + // TODO: test sourceIp + } + + /** + * Test the property 'resources' + */ + @Test + public void resourcesTest() { + // TODO: test resources + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateApiTokenDataTest.java b/src/test/java/unit/java/sdk/model/CreateApiTokenDataTest.java new file mode 100644 index 00000000..5573473e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateApiTokenDataTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateApiTokenDataAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateApiTokenData + */ +public class CreateApiTokenDataTest { + private final CreateApiTokenData model = new CreateApiTokenData(); + + /** + * Model tests for CreateApiTokenData + */ + @Test + public void testCreateApiTokenData() { + // TODO: test CreateApiTokenData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateApiTokenTest.java b/src/test/java/unit/java/sdk/model/CreateApiTokenTest.java new file mode 100644 index 00000000..27e2570e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateApiTokenTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateApiTokenData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateApiToken + */ +public class CreateApiTokenTest { + private final CreateApiToken model = new CreateApiToken(); + + /** + * Model tests for CreateApiToken + */ + @Test + public void testCreateApiToken() { + // TODO: test CreateApiToken + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateApplicationDataTest.java b/src/test/java/unit/java/sdk/model/CreateApplicationDataTest.java new file mode 100644 index 00000000..75795557 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateApplicationDataTest.java @@ -0,0 +1,61 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBusinessApplication; +import unit.java.sdk.model.CreateIndividualApplication; +import unit.java.sdk.model.CreateSoleProprietorApplication; +import unit.java.sdk.model.CreateTrustApplication; +import unit.java.sdk.model.CreateTrustApplicationAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateApplicationData + */ +public class CreateApplicationDataTest { + private final CreateApplicationData model = new CreateApplicationData(); + + /** + * Model tests for CreateApplicationData + */ + @Test + public void testCreateApplicationData() { + // TODO: test CreateApplicationData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateApplicationFormDataAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateApplicationFormDataAttributesTest.java new file mode 100644 index 00000000..e479327e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateApplicationFormDataAttributesTest.java @@ -0,0 +1,101 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.ApplicationFormPrefill; +import unit.java.sdk.model.ApplicationFormSettingsOverride; +import unit.java.sdk.model.RequireIdVerification; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateApplicationFormDataAttributes + */ +public class CreateApplicationFormDataAttributesTest { + private final CreateApplicationFormDataAttributes model = new CreateApplicationFormDataAttributes(); + + /** + * Model tests for CreateApplicationFormDataAttributes + */ + @Test + public void testCreateApplicationFormDataAttributes() { + // TODO: test CreateApplicationFormDataAttributes + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'applicantDetails' + */ + @Test + public void applicantDetailsTest() { + // TODO: test applicantDetails + } + + /** + * Test the property 'settingsOverride' + */ + @Test + public void settingsOverrideTest() { + // TODO: test settingsOverride + } + + /** + * Test the property 'requireIdVerification' + */ + @Test + public void requireIdVerificationTest() { + // TODO: test requireIdVerification + } + + /** + * Test the property 'allowedApplicationTypes' + */ + @Test + public void allowedApplicationTypesTest() { + // TODO: test allowedApplicationTypes + } + + /** + * Test the property 'lang' + */ + @Test + public void langTest() { + // TODO: test lang + } + + /** + * Test the property 'hideApplicationProgressTracker' + */ + @Test + public void hideApplicationProgressTrackerTest() { + // TODO: test hideApplicationProgressTracker + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateApplicationFormDataTest.java b/src/test/java/unit/java/sdk/model/CreateApplicationFormDataTest.java new file mode 100644 index 00000000..4bad4e80 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateApplicationFormDataTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateApplicationFormDataAttributes; +import unit.java.sdk.model.CreateApplicationFormRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateApplicationFormData + */ +public class CreateApplicationFormDataTest { + private final CreateApplicationFormData model = new CreateApplicationFormData(); + + /** + * Model tests for CreateApplicationFormData + */ + @Test + public void testCreateApplicationFormData() { + // TODO: test CreateApplicationFormData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateApplicationFormRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CreateApplicationFormRelationshipsTest.java new file mode 100644 index 00000000..4a6c5ebe --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateApplicationFormRelationshipsTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateApplicationFormRelationships + */ +public class CreateApplicationFormRelationshipsTest { + private final CreateApplicationFormRelationships model = new CreateApplicationFormRelationships(); + + /** + * Model tests for CreateApplicationFormRelationships + */ + @Test + public void testCreateApplicationFormRelationships() { + // TODO: test CreateApplicationFormRelationships + } + + /** + * Test the property 'application' + */ + @Test + public void applicationTest() { + // TODO: test application + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateApplicationFormTest.java b/src/test/java/unit/java/sdk/model/CreateApplicationFormTest.java new file mode 100644 index 00000000..95be5a5c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateApplicationFormTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateApplicationFormData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateApplicationForm + */ +public class CreateApplicationFormTest { + private final CreateApplicationForm model = new CreateApplicationForm(); + + /** + * Model tests for CreateApplicationForm + */ + @Test + public void testCreateApplicationForm() { + // TODO: test CreateApplicationForm + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateApplicationTest.java b/src/test/java/unit/java/sdk/model/CreateApplicationTest.java new file mode 100644 index 00000000..12d9bb66 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateApplicationTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateApplicationData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateApplication + */ +public class CreateApplicationTest { + private final CreateApplication model = new CreateApplication(); + + /** + * Model tests for CreateApplication + */ + @Test + public void testCreateApplication() { + // TODO: test CreateApplication + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateBeneficialOwnerTest.java b/src/test/java/unit/java/sdk/model/CreateBeneficialOwnerTest.java new file mode 100644 index 00000000..2d3ce6a3 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateBeneficialOwnerTest.java @@ -0,0 +1,160 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.EvaluationParams; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.SourceOfIncome; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateBeneficialOwner + */ +public class CreateBeneficialOwnerTest { + private final CreateBeneficialOwner model = new CreateBeneficialOwner(); + + /** + * Model tests for CreateBeneficialOwner + */ + @Test + public void testCreateBeneficialOwner() { + // TODO: test CreateBeneficialOwner + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'ssn' + */ + @Test + public void ssnTest() { + // TODO: test ssn + } + + /** + * Test the property 'passport' + */ + @Test + public void passportTest() { + // TODO: test passport + } + + /** + * Test the property 'nationality' + */ + @Test + public void nationalityTest() { + // TODO: test nationality + } + + /** + * Test the property 'matriculaConsular' + */ + @Test + public void matriculaConsularTest() { + // TODO: test matriculaConsular + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** + * Test the property 'percentage' + */ + @Test + public void percentageTest() { + // TODO: test percentage + } + + /** + * Test the property 'evaluationParams' + */ + @Test + public void evaluationParamsTest() { + // TODO: test evaluationParams + } + + /** + * Test the property 'occupation' + */ + @Test + public void occupationTest() { + // TODO: test occupation + } + + /** + * Test the property 'annualIncome' + */ + @Test + public void annualIncomeTest() { + // TODO: test annualIncome + } + + /** + * Test the property 'sourceOfIncome' + */ + @Test + public void sourceOfIncomeTest() { + // TODO: test sourceOfIncome + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateBillPaymentAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateBillPaymentAttributesTest.java new file mode 100644 index 00000000..91996639 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateBillPaymentAttributesTest.java @@ -0,0 +1,106 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import unit.java.sdk.model.FullName; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateBillPaymentAttributes + */ +public class CreateBillPaymentAttributesTest { + private final CreateBillPaymentAttributes model = new CreateBillPaymentAttributes(); + + /** + * Model tests for CreateBillPaymentAttributes + */ + @Test + public void testCreateBillPaymentAttributes() { + // TODO: test CreateBillPaymentAttributes + } + + /** + * Test the property 'billerId' + */ + @Test + public void billerIdTest() { + // TODO: test billerId + } + + /** + * Test the property 'accountNumber' + */ + @Test + public void accountNumberTest() { + // TODO: test accountNumber + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateBillPaymentTest.java b/src/test/java/unit/java/sdk/model/CreateBillPaymentTest.java new file mode 100644 index 00000000..2a7acf0f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateBillPaymentTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchPaymentRelationships; +import unit.java.sdk.model.CreateBillPaymentAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateBillPayment + */ +public class CreateBillPaymentTest { + private final CreateBillPayment model = new CreateBillPayment(); + + /** + * Model tests for CreateBillPayment + */ + @Test + public void testCreateBillPayment() { + // TODO: test CreateBillPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateBookPaymentAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateBookPaymentAttributesTest.java new file mode 100644 index 00000000..575ae9b6 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateBookPaymentAttributesTest.java @@ -0,0 +1,80 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateBookPaymentAttributes + */ +public class CreateBookPaymentAttributesTest { + private final CreateBookPaymentAttributes model = new CreateBookPaymentAttributes(); + + /** + * Model tests for CreateBookPaymentAttributes + */ + @Test + public void testCreateBookPaymentAttributes() { + // TODO: test CreateBookPaymentAttributes + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'transactionSummaryOverride' + */ + @Test + public void transactionSummaryOverrideTest() { + // TODO: test transactionSummaryOverride + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateBookPaymentRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CreateBookPaymentRelationshipsTest.java new file mode 100644 index 00000000..02b0332e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateBookPaymentRelationshipsTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountRelationship; +import unit.java.sdk.model.CounterpartyAccountRelationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateBookPaymentRelationships + */ +public class CreateBookPaymentRelationshipsTest { + private final CreateBookPaymentRelationships model = new CreateBookPaymentRelationships(); + + /** + * Model tests for CreateBookPaymentRelationships + */ + @Test + public void testCreateBookPaymentRelationships() { + // TODO: test CreateBookPaymentRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'counterpartyAccount' + */ + @Test + public void counterpartyAccountTest() { + // TODO: test counterpartyAccount + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateBookPaymentTest.java b/src/test/java/unit/java/sdk/model/CreateBookPaymentTest.java new file mode 100644 index 00000000..9e2b8dbd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateBookPaymentTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBookPaymentAttributes; +import unit.java.sdk.model.CreateBookPaymentRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateBookPayment + */ +public class CreateBookPaymentTest { + private final CreateBookPayment model = new CreateBookPayment(); + + /** + * Model tests for CreateBookPayment + */ + @Test + public void testCreateBookPayment() { + // TODO: test CreateBookPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateBookRepaymentAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateBookRepaymentAttributesTest.java new file mode 100644 index 00000000..515a9364 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateBookRepaymentAttributesTest.java @@ -0,0 +1,80 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateBookRepaymentAttributes + */ +public class CreateBookRepaymentAttributesTest { + private final CreateBookRepaymentAttributes model = new CreateBookRepaymentAttributes(); + + /** + * Model tests for CreateBookRepaymentAttributes + */ + @Test + public void testCreateBookRepaymentAttributes() { + // TODO: test CreateBookRepaymentAttributes + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'transactionSummaryOverride' + */ + @Test + public void transactionSummaryOverrideTest() { + // TODO: test transactionSummaryOverride + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateBookRepaymentRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CreateBookRepaymentRelationshipsTest.java new file mode 100644 index 00000000..1e5b5891 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateBookRepaymentRelationshipsTest.java @@ -0,0 +1,65 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateBookRepaymentRelationships + */ +public class CreateBookRepaymentRelationshipsTest { + private final CreateBookRepaymentRelationships model = new CreateBookRepaymentRelationships(); + + /** + * Model tests for CreateBookRepaymentRelationships + */ + @Test + public void testCreateBookRepaymentRelationships() { + // TODO: test CreateBookRepaymentRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'creditAccount' + */ + @Test + public void creditAccountTest() { + // TODO: test creditAccount + } + + /** + * Test the property 'counterpartyAccount' + */ + @Test + public void counterpartyAccountTest() { + // TODO: test counterpartyAccount + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateBookRepaymentTest.java b/src/test/java/unit/java/sdk/model/CreateBookRepaymentTest.java new file mode 100644 index 00000000..b9805a9b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateBookRepaymentTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBookRepaymentAttributes; +import unit.java.sdk.model.CreateBookRepaymentRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateBookRepayment + */ +public class CreateBookRepaymentTest { + private final CreateBookRepayment model = new CreateBookRepayment(); + + /** + * Model tests for CreateBookRepayment + */ + @Test + public void testCreateBookRepayment() { + // TODO: test CreateBookRepayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateBusinessApplicationAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateBusinessApplicationAttributesTest.java new file mode 100644 index 00000000..a3de8841 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateBusinessApplicationAttributesTest.java @@ -0,0 +1,255 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.BusinessAnnualRevenue; +import unit.java.sdk.model.BusinessNumberOfEmployees; +import unit.java.sdk.model.BusinessVertical; +import unit.java.sdk.model.CashFlow; +import unit.java.sdk.model.Contact; +import unit.java.sdk.model.CreateBeneficialOwner; +import unit.java.sdk.model.CreateOfficer; +import unit.java.sdk.model.DeviceFingerprint; +import unit.java.sdk.model.EntityType; +import unit.java.sdk.model.Industry; +import unit.java.sdk.model.Phone; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateBusinessApplicationAttributes + */ +public class CreateBusinessApplicationAttributesTest { + private final CreateBusinessApplicationAttributes model = new CreateBusinessApplicationAttributes(); + + /** + * Model tests for CreateBusinessApplicationAttributes + */ + @Test + public void testCreateBusinessApplicationAttributes() { + // TODO: test CreateBusinessApplicationAttributes + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'dba' + */ + @Test + public void dbaTest() { + // TODO: test dba + } + + /** + * Test the property 'ein' + */ + @Test + public void einTest() { + // TODO: test ein + } + + /** + * Test the property 'entityType' + */ + @Test + public void entityTypeTest() { + // TODO: test entityType + } + + /** + * Test the property 'dateOfIncorporation' + */ + @Test + public void dateOfIncorporationTest() { + // TODO: test dateOfIncorporation + } + + /** + * Test the property 'stateOfIncorporation' + */ + @Test + public void stateOfIncorporationTest() { + // TODO: test stateOfIncorporation + } + + /** + * Test the property 'purpose' + */ + @Test + public void purposeTest() { + // TODO: test purpose + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'officer' + */ + @Test + public void officerTest() { + // TODO: test officer + } + + /** + * Test the property 'ip' + */ + @Test + public void ipTest() { + // TODO: test ip + } + + /** + * Test the property 'website' + */ + @Test + public void websiteTest() { + // TODO: test website + } + + /** + * Test the property 'beneficialOwners' + */ + @Test + public void beneficialOwnersTest() { + // TODO: test beneficialOwners + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'deviceFingerprints' + */ + @Test + public void deviceFingerprintsTest() { + // TODO: test deviceFingerprints + } + + /** + * Test the property 'industry' + */ + @Test + public void industryTest() { + // TODO: test industry + } + + /** + * Test the property 'annualRevenue' + */ + @Test + public void annualRevenueTest() { + // TODO: test annualRevenue + } + + /** + * Test the property 'numberOfEmployees' + */ + @Test + public void numberOfEmployeesTest() { + // TODO: test numberOfEmployees + } + + /** + * Test the property 'cashFlow' + */ + @Test + public void cashFlowTest() { + // TODO: test cashFlow + } + + /** + * Test the property 'yearOfIncorporation' + */ + @Test + public void yearOfIncorporationTest() { + // TODO: test yearOfIncorporation + } + + /** + * Test the property 'countriesOfOperation' + */ + @Test + public void countriesOfOperationTest() { + // TODO: test countriesOfOperation + } + + /** + * Test the property 'stockSymbol' + */ + @Test + public void stockSymbolTest() { + // TODO: test stockSymbol + } + + /** + * Test the property 'businessVertical' + */ + @Test + public void businessVerticalTest() { + // TODO: test businessVertical + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateBusinessApplicationTest.java b/src/test/java/unit/java/sdk/model/CreateBusinessApplicationTest.java new file mode 100644 index 00000000..4c4d0ab7 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateBusinessApplicationTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBusinessApplicationAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateBusinessApplication + */ +public class CreateBusinessApplicationTest { + private final CreateBusinessApplication model = new CreateBusinessApplication(); + + /** + * Model tests for CreateBusinessApplication + */ + @Test + public void testCreateBusinessApplication() { + // TODO: test CreateBusinessApplication + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateBusinessCreditCardTest.java b/src/test/java/unit/java/sdk/model/CreateBusinessCreditCardTest.java new file mode 100644 index 00000000..8a701744 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateBusinessCreditCardTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBusinessDebitCardAttributes; +import unit.java.sdk.model.CreateCardRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateBusinessCreditCard + */ +public class CreateBusinessCreditCardTest { + private final CreateBusinessCreditCard model = new CreateBusinessCreditCard(); + + /** + * Model tests for CreateBusinessCreditCard + */ + @Test + public void testCreateBusinessCreditCard() { + // TODO: test CreateBusinessCreditCard + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateBusinessDebitCardAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateBusinessDebitCardAttributesTest.java new file mode 100644 index 00000000..b1dbc9dd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateBusinessDebitCardAttributesTest.java @@ -0,0 +1,181 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.CardLevelLimits; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateBusinessDebitCardAttributes + */ +public class CreateBusinessDebitCardAttributesTest { + private final CreateBusinessDebitCardAttributes model = new CreateBusinessDebitCardAttributes(); + + /** + * Model tests for CreateBusinessDebitCardAttributes + */ + @Test + public void testCreateBusinessDebitCardAttributes() { + // TODO: test CreateBusinessDebitCardAttributes + } + + /** + * Test the property 'shippingAddress' + */ + @Test + public void shippingAddressTest() { + // TODO: test shippingAddress + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** + * Test the property 'nationality' + */ + @Test + public void nationalityTest() { + // TODO: test nationality + } + + /** + * Test the property 'ssn' + */ + @Test + public void ssnTest() { + // TODO: test ssn + } + + /** + * Test the property 'passport' + */ + @Test + public void passportTest() { + // TODO: test passport + } + + /** + * Test the property 'design' + */ + @Test + public void designTest() { + // TODO: test design + } + + /** + * Test the property 'additionalEmbossedText' + */ + @Test + public void additionalEmbossedTextTest() { + // TODO: test additionalEmbossedText + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'limits' + */ + @Test + public void limitsTest() { + // TODO: test limits + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'activeForOnlineUse' + */ + @Test + public void activeForOnlineUseTest() { + // TODO: test activeForOnlineUse + } + + /** + * Test the property 'printOnlyBusinessName' + */ + @Test + public void printOnlyBusinessNameTest() { + // TODO: test printOnlyBusinessName + } + + /** + * Test the property 'expiryDate' + */ + @Test + public void expiryDateTest() { + // TODO: test expiryDate + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateBusinessDebitCardTest.java b/src/test/java/unit/java/sdk/model/CreateBusinessDebitCardTest.java new file mode 100644 index 00000000..d9711739 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateBusinessDebitCardTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBusinessDebitCardAttributes; +import unit.java.sdk.model.CreateCardRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateBusinessDebitCard + */ +public class CreateBusinessDebitCardTest { + private final CreateBusinessDebitCard model = new CreateBusinessDebitCard(); + + /** + * Model tests for CreateBusinessDebitCard + */ + @Test + public void testCreateBusinessDebitCard() { + // TODO: test CreateBusinessDebitCard + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateBusinessVirtualCreditCardTest.java b/src/test/java/unit/java/sdk/model/CreateBusinessVirtualCreditCardTest.java new file mode 100644 index 00000000..244fe996 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateBusinessVirtualCreditCardTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBusinessVirtualDebitCardAttributes; +import unit.java.sdk.model.CreateCardRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateBusinessVirtualCreditCard + */ +public class CreateBusinessVirtualCreditCardTest { + private final CreateBusinessVirtualCreditCard model = new CreateBusinessVirtualCreditCard(); + + /** + * Model tests for CreateBusinessVirtualCreditCard + */ + @Test + public void testCreateBusinessVirtualCreditCard() { + // TODO: test CreateBusinessVirtualCreditCard + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateBusinessVirtualDebitCardAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateBusinessVirtualDebitCardAttributesTest.java new file mode 100644 index 00000000..f824c2c8 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateBusinessVirtualDebitCardAttributesTest.java @@ -0,0 +1,141 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.CardLevelLimits; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateBusinessVirtualDebitCardAttributes + */ +public class CreateBusinessVirtualDebitCardAttributesTest { + private final CreateBusinessVirtualDebitCardAttributes model = new CreateBusinessVirtualDebitCardAttributes(); + + /** + * Model tests for CreateBusinessVirtualDebitCardAttributes + */ + @Test + public void testCreateBusinessVirtualDebitCardAttributes() { + // TODO: test CreateBusinessVirtualDebitCardAttributes + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** + * Test the property 'nationality' + */ + @Test + public void nationalityTest() { + // TODO: test nationality + } + + /** + * Test the property 'ssn' + */ + @Test + public void ssnTest() { + // TODO: test ssn + } + + /** + * Test the property 'passport' + */ + @Test + public void passportTest() { + // TODO: test passport + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'limits' + */ + @Test + public void limitsTest() { + // TODO: test limits + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'expiryDate' + */ + @Test + public void expiryDateTest() { + // TODO: test expiryDate + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateBusinessVirtualDebitCardTest.java b/src/test/java/unit/java/sdk/model/CreateBusinessVirtualDebitCardTest.java new file mode 100644 index 00000000..59c2bb3c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateBusinessVirtualDebitCardTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBusinessVirtualDebitCardAttributes; +import unit.java.sdk.model.CreateCardRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateBusinessVirtualDebitCard + */ +public class CreateBusinessVirtualDebitCardTest { + private final CreateBusinessVirtualDebitCard model = new CreateBusinessVirtualDebitCard(); + + /** + * Model tests for CreateBusinessVirtualDebitCard + */ + @Test + public void testCreateBusinessVirtualDebitCard() { + // TODO: test CreateBusinessVirtualDebitCard + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCardDataTest.java b/src/test/java/unit/java/sdk/model/CreateCardDataTest.java new file mode 100644 index 00000000..7705f6ee --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCardDataTest.java @@ -0,0 +1,72 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBusinessCreditCard; +import unit.java.sdk.model.CreateBusinessDebitCard; +import unit.java.sdk.model.CreateBusinessVirtualCreditCard; +import unit.java.sdk.model.CreateBusinessVirtualDebitCard; +import unit.java.sdk.model.CreateBusinessVirtualDebitCardAttributes; +import unit.java.sdk.model.CreateCardRelationships; +import unit.java.sdk.model.CreateIndividualDebitCard; +import unit.java.sdk.model.CreateIndividualVirtualDebitCard; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCardData + */ +public class CreateCardDataTest { + private final CreateCardData model = new CreateCardData(); + + /** + * Model tests for CreateCardData + */ + @Test + public void testCreateCardData() { + // TODO: test CreateCardData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCardRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CreateCardRelationshipsTest.java new file mode 100644 index 00000000..24ea3edd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCardRelationshipsTest.java @@ -0,0 +1,65 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCardRelationships + */ +public class CreateCardRelationshipsTest { + private final CreateCardRelationships model = new CreateCardRelationships(); + + /** + * Model tests for CreateCardRelationships + */ + @Test + public void testCreateCardRelationships() { + // TODO: test CreateCardRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + + /** + * Test the property 'defaultFundingAccount' + */ + @Test + public void defaultFundingAccountTest() { + // TODO: test defaultFundingAccount + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCardTest.java b/src/test/java/unit/java/sdk/model/CreateCardTest.java new file mode 100644 index 00000000..40878022 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCardTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCardData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCard + */ +public class CreateCardTest { + private final CreateCard model = new CreateCard(); + + /** + * Model tests for CreateCard + */ + @Test + public void testCreateCard() { + // TODO: test CreateCard + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCheckDepositDataAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateCheckDepositDataAttributesTest.java new file mode 100644 index 00000000..5339e429 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCheckDepositDataAttributesTest.java @@ -0,0 +1,72 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCheckDepositDataAttributes + */ +public class CreateCheckDepositDataAttributesTest { + private final CreateCheckDepositDataAttributes model = new CreateCheckDepositDataAttributes(); + + /** + * Model tests for CreateCheckDepositDataAttributes + */ + @Test + public void testCreateCheckDepositDataAttributes() { + // TODO: test CreateCheckDepositDataAttributes + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCheckDepositDataTest.java b/src/test/java/unit/java/sdk/model/CreateCheckDepositDataTest.java new file mode 100644 index 00000000..b0f41463 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCheckDepositDataTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCheckDepositDataAttributes; +import unit.java.sdk.model.CreateCheckDepositRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCheckDepositData + */ +public class CreateCheckDepositDataTest { + private final CreateCheckDepositData model = new CreateCheckDepositData(); + + /** + * Model tests for CreateCheckDepositData + */ + @Test + public void testCreateCheckDepositData() { + // TODO: test CreateCheckDepositData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCheckDepositRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CreateCheckDepositRelationshipsTest.java new file mode 100644 index 00000000..ed40896c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCheckDepositRelationshipsTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCheckDepositRelationships + */ +public class CreateCheckDepositRelationshipsTest { + private final CreateCheckDepositRelationships model = new CreateCheckDepositRelationships(); + + /** + * Model tests for CreateCheckDepositRelationships + */ + @Test + public void testCreateCheckDepositRelationships() { + // TODO: test CreateCheckDepositRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCheckDepositTest.java b/src/test/java/unit/java/sdk/model/CreateCheckDepositTest.java new file mode 100644 index 00000000..56cb6dbb --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCheckDepositTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCheckDepositData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCheckDeposit + */ +public class CreateCheckDepositTest { + private final CreateCheckDeposit model = new CreateCheckDeposit(); + + /** + * Model tests for CreateCheckDeposit + */ + @Test + public void testCreateCheckDeposit() { + // TODO: test CreateCheckDeposit + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCheckPaymentTest.java b/src/test/java/unit/java/sdk/model/CreateCheckPaymentTest.java new file mode 100644 index 00000000..8e72dd32 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCheckPaymentTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckPayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCheckPayment + */ +public class CreateCheckPaymentTest { + private final CreateCheckPayment model = new CreateCheckPayment(); + + /** + * Model tests for CreateCheckPayment + */ + @Test + public void testCreateCheckPayment() { + // TODO: test CreateCheckPayment + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCounterpartyDataTest.java b/src/test/java/unit/java/sdk/model/CreateCounterpartyDataTest.java new file mode 100644 index 00000000..de41b8b8 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCounterpartyDataTest.java @@ -0,0 +1,68 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchCounterparty; +import unit.java.sdk.model.CreateCounterpartyRelationships; +import unit.java.sdk.model.CreatePlaidCounterparty; +import unit.java.sdk.model.CreatePlaidCounterpartyAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCounterpartyData + */ +public class CreateCounterpartyDataTest { + private final CreateCounterpartyData model = new CreateCounterpartyData(); + + /** + * Model tests for CreateCounterpartyData + */ + @Test + public void testCreateCounterpartyData() { + // TODO: test CreateCounterpartyData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCounterpartyRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CreateCounterpartyRelationshipsTest.java new file mode 100644 index 00000000..13912a60 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCounterpartyRelationshipsTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCounterpartyRelationships + */ +public class CreateCounterpartyRelationshipsTest { + private final CreateCounterpartyRelationships model = new CreateCounterpartyRelationships(); + + /** + * Model tests for CreateCounterpartyRelationships + */ + @Test + public void testCreateCounterpartyRelationships() { + // TODO: test CreateCounterpartyRelationships + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCounterpartyTest.java b/src/test/java/unit/java/sdk/model/CreateCounterpartyTest.java new file mode 100644 index 00000000..3e35d259 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCounterpartyTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCounterpartyData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCounterparty + */ +public class CreateCounterpartyTest { + private final CreateCounterparty model = new CreateCounterparty(); + + /** + * Model tests for CreateCounterparty + */ + @Test + public void testCreateCounterparty() { + // TODO: test CreateCounterparty + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCreditAccountAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateCreditAccountAttributesTest.java new file mode 100644 index 00000000..c99dad2a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCreditAccountAttributesTest.java @@ -0,0 +1,76 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCreditAccountAttributes + */ +public class CreateCreditAccountAttributesTest { + private final CreateCreditAccountAttributes model = new CreateCreditAccountAttributes(); + + /** + * Model tests for CreateCreditAccountAttributes + */ + @Test + public void testCreateCreditAccountAttributes() { + // TODO: test CreateCreditAccountAttributes + } + + /** + * Test the property 'creditTerms' + */ + @Test + public void creditTermsTest() { + // TODO: test creditTerms + } + + /** + * Test the property 'creditLimit' + */ + @Test + public void creditLimitTest() { + // TODO: test creditLimit + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCreditAccountRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CreateCreditAccountRelationshipsTest.java new file mode 100644 index 00000000..f15ff963 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCreditAccountRelationshipsTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomerLinkage; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCreditAccountRelationships + */ +public class CreateCreditAccountRelationshipsTest { + private final CreateCreditAccountRelationships model = new CreateCreditAccountRelationships(); + + /** + * Model tests for CreateCreditAccountRelationships + */ + @Test + public void testCreateCreditAccountRelationships() { + // TODO: test CreateCreditAccountRelationships + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCreditAccountTest.java b/src/test/java/unit/java/sdk/model/CreateCreditAccountTest.java new file mode 100644 index 00000000..dc733c8e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCreditAccountTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCreditAccountAttributes; +import unit.java.sdk.model.CreateCreditAccountRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCreditAccount + */ +public class CreateCreditAccountTest { + private final CreateCreditAccount model = new CreateCreditAccount(); + + /** + * Model tests for CreateCreditAccount + */ + @Test + public void testCreateCreditAccount() { + // TODO: test CreateCreditAccount + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCustomerTokenDataAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateCustomerTokenDataAttributesTest.java new file mode 100644 index 00000000..b8659e79 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCustomerTokenDataAttributesTest.java @@ -0,0 +1,99 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.CreateApiTokenDataAttributesResourcesInner; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCustomerTokenDataAttributes + */ +public class CreateCustomerTokenDataAttributesTest { + private final CreateCustomerTokenDataAttributes model = new CreateCustomerTokenDataAttributes(); + + /** + * Model tests for CreateCustomerTokenDataAttributes + */ + @Test + public void testCreateCustomerTokenDataAttributes() { + // TODO: test CreateCustomerTokenDataAttributes + } + + /** + * Test the property 'scope' + */ + @Test + public void scopeTest() { + // TODO: test scope + } + + /** + * Test the property 'verificationToken' + */ + @Test + public void verificationTokenTest() { + // TODO: test verificationToken + } + + /** + * Test the property 'jwtToken' + */ + @Test + public void jwtTokenTest() { + // TODO: test jwtToken + } + + /** + * Test the property 'expiresIn' + */ + @Test + public void expiresInTest() { + // TODO: test expiresIn + } + + /** + * Test the property 'verificationCode' + */ + @Test + public void verificationCodeTest() { + // TODO: test verificationCode + } + + /** + * Test the property 'resources' + */ + @Test + public void resourcesTest() { + // TODO: test resources + } + + /** + * Test the property 'upgradableScope' + */ + @Test + public void upgradableScopeTest() { + // TODO: test upgradableScope + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCustomerTokenDataTest.java b/src/test/java/unit/java/sdk/model/CreateCustomerTokenDataTest.java new file mode 100644 index 00000000..c1b53197 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCustomerTokenDataTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCustomerTokenDataAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCustomerTokenData + */ +public class CreateCustomerTokenDataTest { + private final CreateCustomerTokenData model = new CreateCustomerTokenData(); + + /** + * Model tests for CreateCustomerTokenData + */ + @Test + public void testCreateCustomerTokenData() { + // TODO: test CreateCustomerTokenData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCustomerTokenTest.java b/src/test/java/unit/java/sdk/model/CreateCustomerTokenTest.java new file mode 100644 index 00000000..bf964afc --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCustomerTokenTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCustomerTokenData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCustomerToken + */ +public class CreateCustomerTokenTest { + private final CreateCustomerToken model = new CreateCustomerToken(); + + /** + * Model tests for CreateCustomerToken + */ + @Test + public void testCreateCustomerToken() { + // TODO: test CreateCustomerToken + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCustomerTokenVerificationDataAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateCustomerTokenVerificationDataAttributesTest.java new file mode 100644 index 00000000..792842c6 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCustomerTokenVerificationDataAttributesTest.java @@ -0,0 +1,73 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Phone; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCustomerTokenVerificationDataAttributes + */ +public class CreateCustomerTokenVerificationDataAttributesTest { + private final CreateCustomerTokenVerificationDataAttributes model = new CreateCustomerTokenVerificationDataAttributes(); + + /** + * Model tests for CreateCustomerTokenVerificationDataAttributes + */ + @Test + public void testCreateCustomerTokenVerificationDataAttributes() { + // TODO: test CreateCustomerTokenVerificationDataAttributes + } + + /** + * Test the property 'channel' + */ + @Test + public void channelTest() { + // TODO: test channel + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'appHash' + */ + @Test + public void appHashTest() { + // TODO: test appHash + } + + /** + * Test the property 'language' + */ + @Test + public void languageTest() { + // TODO: test language + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCustomerTokenVerificationDataTest.java b/src/test/java/unit/java/sdk/model/CreateCustomerTokenVerificationDataTest.java new file mode 100644 index 00000000..0a23ea38 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCustomerTokenVerificationDataTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCustomerTokenVerificationDataAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCustomerTokenVerificationData + */ +public class CreateCustomerTokenVerificationDataTest { + private final CreateCustomerTokenVerificationData model = new CreateCustomerTokenVerificationData(); + + /** + * Model tests for CreateCustomerTokenVerificationData + */ + @Test + public void testCreateCustomerTokenVerificationData() { + // TODO: test CreateCustomerTokenVerificationData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateCustomerTokenVerificationTest.java b/src/test/java/unit/java/sdk/model/CreateCustomerTokenVerificationTest.java new file mode 100644 index 00000000..07b9cef8 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateCustomerTokenVerificationTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCustomerTokenVerificationData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateCustomerTokenVerification + */ +public class CreateCustomerTokenVerificationTest { + private final CreateCustomerTokenVerification model = new CreateCustomerTokenVerification(); + + /** + * Model tests for CreateCustomerTokenVerification + */ + @Test + public void testCreateCustomerTokenVerification() { + // TODO: test CreateCustomerTokenVerification + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateDepositAccountAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateDepositAccountAttributesTest.java new file mode 100644 index 00000000..449f9fe6 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateDepositAccountAttributesTest.java @@ -0,0 +1,68 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateDepositAccountAttributes + */ +public class CreateDepositAccountAttributesTest { + private final CreateDepositAccountAttributes model = new CreateDepositAccountAttributes(); + + /** + * Model tests for CreateDepositAccountAttributes + */ + @Test + public void testCreateDepositAccountAttributes() { + // TODO: test CreateDepositAccountAttributes + } + + /** + * Test the property 'depositProduct' + */ + @Test + public void depositProductTest() { + // TODO: test depositProduct + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateDepositAccountRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CreateDepositAccountRelationshipsTest.java new file mode 100644 index 00000000..aeede858 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateDepositAccountRelationshipsTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomerLinkage; +import unit.java.sdk.model.CustomersRelationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateDepositAccountRelationships + */ +public class CreateDepositAccountRelationshipsTest { + private final CreateDepositAccountRelationships model = new CreateDepositAccountRelationships(); + + /** + * Model tests for CreateDepositAccountRelationships + */ + @Test + public void testCreateDepositAccountRelationships() { + // TODO: test CreateDepositAccountRelationships + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + + /** + * Test the property 'customers' + */ + @Test + public void customersTest() { + // TODO: test customers + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateDepositAccountTest.java b/src/test/java/unit/java/sdk/model/CreateDepositAccountTest.java new file mode 100644 index 00000000..024ff09e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateDepositAccountTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateDepositAccountAttributes; +import unit.java.sdk.model.CreateDepositAccountRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateDepositAccount + */ +public class CreateDepositAccountTest { + private final CreateDepositAccount model = new CreateDepositAccount(); + + /** + * Model tests for CreateDepositAccount + */ + @Test + public void testCreateDepositAccount() { + // TODO: test CreateDepositAccount + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateIndividualApplicationAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateIndividualApplicationAttributesTest.java new file mode 100644 index 00000000..6175138f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateIndividualApplicationAttributesTest.java @@ -0,0 +1,209 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.CreatePowerOfAttorneyAgent; +import unit.java.sdk.model.DeviceFingerprint; +import unit.java.sdk.model.EvaluationParams; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Industry; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.SourceOfIncome; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateIndividualApplicationAttributes + */ +public class CreateIndividualApplicationAttributesTest { + private final CreateIndividualApplicationAttributes model = new CreateIndividualApplicationAttributes(); + + /** + * Model tests for CreateIndividualApplicationAttributes + */ + @Test + public void testCreateIndividualApplicationAttributes() { + // TODO: test CreateIndividualApplicationAttributes + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'ssn' + */ + @Test + public void ssnTest() { + // TODO: test ssn + } + + /** + * Test the property 'passport' + */ + @Test + public void passportTest() { + // TODO: test passport + } + + /** + * Test the property 'nationality' + */ + @Test + public void nationalityTest() { + // TODO: test nationality + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** + * Test the property 'ip' + */ + @Test + public void ipTest() { + // TODO: test ip + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'deviceFingerprints' + */ + @Test + public void deviceFingerprintsTest() { + // TODO: test deviceFingerprints + } + + /** + * Test the property 'jwtSubject' + */ + @Test + public void jwtSubjectTest() { + // TODO: test jwtSubject + } + + /** + * Test the property 'powerOfAttorneyAgent' + */ + @Test + public void powerOfAttorneyAgentTest() { + // TODO: test powerOfAttorneyAgent + } + + /** + * Test the property 'industry' + */ + @Test + public void industryTest() { + // TODO: test industry + } + + /** + * Test the property 'evaluationParams' + */ + @Test + public void evaluationParamsTest() { + // TODO: test evaluationParams + } + + /** + * Test the property 'occupation' + */ + @Test + public void occupationTest() { + // TODO: test occupation + } + + /** + * Test the property 'annualIncome' + */ + @Test + public void annualIncomeTest() { + // TODO: test annualIncome + } + + /** + * Test the property 'sourceOfIncome' + */ + @Test + public void sourceOfIncomeTest() { + // TODO: test sourceOfIncome + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateIndividualApplicationTest.java b/src/test/java/unit/java/sdk/model/CreateIndividualApplicationTest.java new file mode 100644 index 00000000..75754f04 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateIndividualApplicationTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateIndividualApplicationAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateIndividualApplication + */ +public class CreateIndividualApplicationTest { + private final CreateIndividualApplication model = new CreateIndividualApplication(); + + /** + * Model tests for CreateIndividualApplication + */ + @Test + public void testCreateIndividualApplication() { + // TODO: test CreateIndividualApplication + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateIndividualDebitCardAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateIndividualDebitCardAttributesTest.java new file mode 100644 index 00000000..2b298c88 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateIndividualDebitCardAttributesTest.java @@ -0,0 +1,139 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.BIN; +import unit.java.sdk.model.CardLevelLimits; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateIndividualDebitCardAttributes + */ +public class CreateIndividualDebitCardAttributesTest { + private final CreateIndividualDebitCardAttributes model = new CreateIndividualDebitCardAttributes(); + + /** + * Model tests for CreateIndividualDebitCardAttributes + */ + @Test + public void testCreateIndividualDebitCardAttributes() { + // TODO: test CreateIndividualDebitCardAttributes + } + + /** + * Test the property 'shippingAddress' + */ + @Test + public void shippingAddressTest() { + // TODO: test shippingAddress + } + + /** + * Test the property 'design' + */ + @Test + public void designTest() { + // TODO: test design + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'limits' + */ + @Test + public void limitsTest() { + // TODO: test limits + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'bin' + */ + @Test + public void binTest() { + // TODO: test bin + } + + /** + * Test the property 'cardQualifier' + */ + @Test + public void cardQualifierTest() { + // TODO: test cardQualifier + } + + /** + * Test the property 'cardDesignId' + */ + @Test + public void cardDesignIdTest() { + // TODO: test cardDesignId + } + + /** + * Test the property 'additionalEmbossedText' + */ + @Test + public void additionalEmbossedTextTest() { + // TODO: test additionalEmbossedText + } + + /** + * Test the property 'activeForOnlineUse' + */ + @Test + public void activeForOnlineUseTest() { + // TODO: test activeForOnlineUse + } + + /** + * Test the property 'printOnlyBusinessName' + */ + @Test + public void printOnlyBusinessNameTest() { + // TODO: test printOnlyBusinessName + } + + /** + * Test the property 'expiryDate' + */ + @Test + public void expiryDateTest() { + // TODO: test expiryDate + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateIndividualDebitCardTest.java b/src/test/java/unit/java/sdk/model/CreateIndividualDebitCardTest.java new file mode 100644 index 00000000..6fa24938 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateIndividualDebitCardTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCardRelationships; +import unit.java.sdk.model.CreateIndividualDebitCardAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateIndividualDebitCard + */ +public class CreateIndividualDebitCardTest { + private final CreateIndividualDebitCard model = new CreateIndividualDebitCard(); + + /** + * Model tests for CreateIndividualDebitCard + */ + @Test + public void testCreateIndividualDebitCard() { + // TODO: test CreateIndividualDebitCard + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateIndividualVirtualDebitCardAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateIndividualVirtualDebitCardAttributesTest.java new file mode 100644 index 00000000..c32790cd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateIndividualVirtualDebitCardAttributesTest.java @@ -0,0 +1,90 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BIN; +import unit.java.sdk.model.CardLevelLimits; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateIndividualVirtualDebitCardAttributes + */ +public class CreateIndividualVirtualDebitCardAttributesTest { + private final CreateIndividualVirtualDebitCardAttributes model = new CreateIndividualVirtualDebitCardAttributes(); + + /** + * Model tests for CreateIndividualVirtualDebitCardAttributes + */ + @Test + public void testCreateIndividualVirtualDebitCardAttributes() { + // TODO: test CreateIndividualVirtualDebitCardAttributes + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'limits' + */ + @Test + public void limitsTest() { + // TODO: test limits + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'bin' + */ + @Test + public void binTest() { + // TODO: test bin + } + + /** + * Test the property 'cardQualifier' + */ + @Test + public void cardQualifierTest() { + // TODO: test cardQualifier + } + + /** + * Test the property 'expiryDate' + */ + @Test + public void expiryDateTest() { + // TODO: test expiryDate + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateIndividualVirtualDebitCardTest.java b/src/test/java/unit/java/sdk/model/CreateIndividualVirtualDebitCardTest.java new file mode 100644 index 00000000..fc38096c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateIndividualVirtualDebitCardTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCardRelationships; +import unit.java.sdk.model.CreateIndividualVirtualDebitCardAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateIndividualVirtualDebitCard + */ +public class CreateIndividualVirtualDebitCardTest { + private final CreateIndividualVirtualDebitCard model = new CreateIndividualVirtualDebitCard(); + + /** + * Model tests for CreateIndividualVirtualDebitCard + */ + @Test + public void testCreateIndividualVirtualDebitCard() { + // TODO: test CreateIndividualVirtualDebitCard + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateOfficerTest.java b/src/test/java/unit/java/sdk/model/CreateOfficerTest.java new file mode 100644 index 00000000..cb6acd93 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateOfficerTest.java @@ -0,0 +1,160 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.EvaluationParams; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.SourceOfIncome; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateOfficer + */ +public class CreateOfficerTest { + private final CreateOfficer model = new CreateOfficer(); + + /** + * Model tests for CreateOfficer + */ + @Test + public void testCreateOfficer() { + // TODO: test CreateOfficer + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'ssn' + */ + @Test + public void ssnTest() { + // TODO: test ssn + } + + /** + * Test the property 'passport' + */ + @Test + public void passportTest() { + // TODO: test passport + } + + /** + * Test the property 'nationality' + */ + @Test + public void nationalityTest() { + // TODO: test nationality + } + + /** + * Test the property 'matriculaConsular' + */ + @Test + public void matriculaConsularTest() { + // TODO: test matriculaConsular + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** + * Test the property 'title' + */ + @Test + public void titleTest() { + // TODO: test title + } + + /** + * Test the property 'evaluationParams' + */ + @Test + public void evaluationParamsTest() { + // TODO: test evaluationParams + } + + /** + * Test the property 'occupation' + */ + @Test + public void occupationTest() { + // TODO: test occupation + } + + /** + * Test the property 'annualIncome' + */ + @Test + public void annualIncomeTest() { + // TODO: test annualIncome + } + + /** + * Test the property 'sourceOfIncome' + */ + @Test + public void sourceOfIncomeTest() { + // TODO: test sourceOfIncome + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreatePaymentDataTest.java b/src/test/java/unit/java/sdk/model/CreatePaymentDataTest.java new file mode 100644 index 00000000..787ef8bd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreatePaymentDataTest.java @@ -0,0 +1,73 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchPayment; +import unit.java.sdk.model.CreateAchPaymentCounterparty; +import unit.java.sdk.model.CreateAchPaymentPlaid; +import unit.java.sdk.model.CreateAchPaymentRelationships; +import unit.java.sdk.model.CreateBillPayment; +import unit.java.sdk.model.CreateBookPayment; +import unit.java.sdk.model.CreatePushToCardPayment; +import unit.java.sdk.model.CreatePushToCardPaymentAttributes; +import unit.java.sdk.model.CreateWirePayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreatePaymentData + */ +public class CreatePaymentDataTest { + private final CreatePaymentData model = new CreatePaymentData(); + + /** + * Model tests for CreatePaymentData + */ + @Test + public void testCreatePaymentData() { + // TODO: test CreatePaymentData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreatePaymentTest.java b/src/test/java/unit/java/sdk/model/CreatePaymentTest.java new file mode 100644 index 00000000..560f0f17 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreatePaymentTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreatePaymentData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreatePayment + */ +public class CreatePaymentTest { + private final CreatePayment model = new CreatePayment(); + + /** + * Model tests for CreatePayment + */ + @Test + public void testCreatePayment() { + // TODO: test CreatePayment + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreatePlaidCounterpartyAttributesTest.java b/src/test/java/unit/java/sdk/model/CreatePlaidCounterpartyAttributesTest.java new file mode 100644 index 00000000..5dcbee86 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreatePlaidCounterpartyAttributesTest.java @@ -0,0 +1,96 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreatePlaidCounterpartyAttributes + */ +public class CreatePlaidCounterpartyAttributesTest { + private final CreatePlaidCounterpartyAttributes model = new CreatePlaidCounterpartyAttributes(); + + /** + * Model tests for CreatePlaidCounterpartyAttributes + */ + @Test + public void testCreatePlaidCounterpartyAttributes() { + // TODO: test CreatePlaidCounterpartyAttributes + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'verifyName' + */ + @Test + public void verifyNameTest() { + // TODO: test verifyName + } + + /** + * Test the property 'plaidProcessorToken' + */ + @Test + public void plaidProcessorTokenTest() { + // TODO: test plaidProcessorToken + } + + /** + * Test the property 'permissions' + */ + @Test + public void permissionsTest() { + // TODO: test permissions + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreatePlaidCounterpartyTest.java b/src/test/java/unit/java/sdk/model/CreatePlaidCounterpartyTest.java new file mode 100644 index 00000000..c35e0714 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreatePlaidCounterpartyTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateCounterpartyRelationships; +import unit.java.sdk.model.CreatePlaidCounterpartyAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreatePlaidCounterparty + */ +public class CreatePlaidCounterpartyTest { + private final CreatePlaidCounterparty model = new CreatePlaidCounterparty(); + + /** + * Model tests for CreatePlaidCounterparty + */ + @Test + public void testCreatePlaidCounterparty() { + // TODO: test CreatePlaidCounterparty + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreatePowerOfAttorneyAgentTest.java b/src/test/java/unit/java/sdk/model/CreatePowerOfAttorneyAgentTest.java new file mode 100644 index 00000000..f04a73cd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreatePowerOfAttorneyAgentTest.java @@ -0,0 +1,137 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.EvaluationParams; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreatePowerOfAttorneyAgent + */ +public class CreatePowerOfAttorneyAgentTest { + private final CreatePowerOfAttorneyAgent model = new CreatePowerOfAttorneyAgent(); + + /** + * Model tests for CreatePowerOfAttorneyAgent + */ + @Test + public void testCreatePowerOfAttorneyAgent() { + // TODO: test CreatePowerOfAttorneyAgent + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'ssn' + */ + @Test + public void ssnTest() { + // TODO: test ssn + } + + /** + * Test the property 'passport' + */ + @Test + public void passportTest() { + // TODO: test passport + } + + /** + * Test the property 'nationality' + */ + @Test + public void nationalityTest() { + // TODO: test nationality + } + + /** + * Test the property 'matriculaConsular' + */ + @Test + public void matriculaConsularTest() { + // TODO: test matriculaConsular + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** + * Test the property 'jwtSubject' + */ + @Test + public void jwtSubjectTest() { + // TODO: test jwtSubject + } + + /** + * Test the property 'evaluationParams' + */ + @Test + public void evaluationParamsTest() { + // TODO: test evaluationParams + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreatePushToCardPaymentAttributesConfigurationTest.java b/src/test/java/unit/java/sdk/model/CreatePushToCardPaymentAttributesConfigurationTest.java new file mode 100644 index 00000000..7fe964f7 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreatePushToCardPaymentAttributesConfigurationTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Astra; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreatePushToCardPaymentAttributesConfiguration + */ +public class CreatePushToCardPaymentAttributesConfigurationTest { + private final CreatePushToCardPaymentAttributesConfiguration model = new CreatePushToCardPaymentAttributesConfiguration(); + + /** + * Model tests for CreatePushToCardPaymentAttributesConfiguration + */ + @Test + public void testCreatePushToCardPaymentAttributesConfiguration() { + // TODO: test CreatePushToCardPaymentAttributesConfiguration + } + + /** + * Test the property 'astra' + */ + @Test + public void astraTest() { + // TODO: test astra + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreatePushToCardPaymentAttributesTest.java b/src/test/java/unit/java/sdk/model/CreatePushToCardPaymentAttributesTest.java new file mode 100644 index 00000000..e84bf221 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreatePushToCardPaymentAttributesTest.java @@ -0,0 +1,81 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreatePushToCardPaymentAttributesConfiguration; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreatePushToCardPaymentAttributes + */ +public class CreatePushToCardPaymentAttributesTest { + private final CreatePushToCardPaymentAttributes model = new CreatePushToCardPaymentAttributes(); + + /** + * Model tests for CreatePushToCardPaymentAttributes + */ + @Test + public void testCreatePushToCardPaymentAttributes() { + // TODO: test CreatePushToCardPaymentAttributes + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property '_configuration' + */ + @Test + public void _configurationTest() { + // TODO: test _configuration + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreatePushToCardPaymentTest.java b/src/test/java/unit/java/sdk/model/CreatePushToCardPaymentTest.java new file mode 100644 index 00000000..df17aea4 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreatePushToCardPaymentTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchPaymentRelationships; +import unit.java.sdk.model.CreatePushToCardPaymentAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreatePushToCardPayment + */ +public class CreatePushToCardPaymentTest { + private final CreatePushToCardPayment model = new CreatePushToCardPayment(); + + /** + * Model tests for CreatePushToCardPayment + */ + @Test + public void testCreatePushToCardPayment() { + // TODO: test CreatePushToCardPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateRecurringCreditAchPaymentAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateRecurringCreditAchPaymentAttributesTest.java new file mode 100644 index 00000000..0886ee83 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateRecurringCreditAchPaymentAttributesTest.java @@ -0,0 +1,89 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Schedule1; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateRecurringCreditAchPaymentAttributes + */ +public class CreateRecurringCreditAchPaymentAttributesTest { + private final CreateRecurringCreditAchPaymentAttributes model = new CreateRecurringCreditAchPaymentAttributes(); + + /** + * Model tests for CreateRecurringCreditAchPaymentAttributes + */ + @Test + public void testCreateRecurringCreditAchPaymentAttributes() { + // TODO: test CreateRecurringCreditAchPaymentAttributes + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'addenda' + */ + @Test + public void addendaTest() { + // TODO: test addenda + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'schedule' + */ + @Test + public void scheduleTest() { + // TODO: test schedule + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateRecurringCreditAchPaymentTest.java b/src/test/java/unit/java/sdk/model/CreateRecurringCreditAchPaymentTest.java new file mode 100644 index 00000000..ded98347 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateRecurringCreditAchPaymentTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchPaymentCounterpartyRelationships; +import unit.java.sdk.model.CreateRecurringCreditAchPaymentAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateRecurringCreditAchPayment + */ +public class CreateRecurringCreditAchPaymentTest { + private final CreateRecurringCreditAchPayment model = new CreateRecurringCreditAchPayment(); + + /** + * Model tests for CreateRecurringCreditAchPayment + */ + @Test + public void testCreateRecurringCreditAchPayment() { + // TODO: test CreateRecurringCreditAchPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateRecurringCreditBookPaymentAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateRecurringCreditBookPaymentAttributesTest.java new file mode 100644 index 00000000..c1a959ac --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateRecurringCreditBookPaymentAttributesTest.java @@ -0,0 +1,89 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Schedule1; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateRecurringCreditBookPaymentAttributes + */ +public class CreateRecurringCreditBookPaymentAttributesTest { + private final CreateRecurringCreditBookPaymentAttributes model = new CreateRecurringCreditBookPaymentAttributes(); + + /** + * Model tests for CreateRecurringCreditBookPaymentAttributes + */ + @Test + public void testCreateRecurringCreditBookPaymentAttributes() { + // TODO: test CreateRecurringCreditBookPaymentAttributes + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'transactionSummaryOverride' + */ + @Test + public void transactionSummaryOverrideTest() { + // TODO: test transactionSummaryOverride + } + + /** + * Test the property 'schedule' + */ + @Test + public void scheduleTest() { + // TODO: test schedule + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateRecurringCreditBookPaymentTest.java b/src/test/java/unit/java/sdk/model/CreateRecurringCreditBookPaymentTest.java new file mode 100644 index 00000000..0828efa1 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateRecurringCreditBookPaymentTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBookPaymentRelationships; +import unit.java.sdk.model.CreateRecurringCreditBookPaymentAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateRecurringCreditBookPayment + */ +public class CreateRecurringCreditBookPaymentTest { + private final CreateRecurringCreditBookPayment model = new CreateRecurringCreditBookPayment(); + + /** + * Model tests for CreateRecurringCreditBookPayment + */ + @Test + public void testCreateRecurringCreditBookPayment() { + // TODO: test CreateRecurringCreditBookPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateRecurringDebitAchPaymentAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateRecurringDebitAchPaymentAttributesTest.java new file mode 100644 index 00000000..eff63464 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateRecurringDebitAchPaymentAttributesTest.java @@ -0,0 +1,113 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Schedule1; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateRecurringDebitAchPaymentAttributes + */ +public class CreateRecurringDebitAchPaymentAttributesTest { + private final CreateRecurringDebitAchPaymentAttributes model = new CreateRecurringDebitAchPaymentAttributes(); + + /** + * Model tests for CreateRecurringDebitAchPaymentAttributes + */ + @Test + public void testCreateRecurringDebitAchPaymentAttributes() { + // TODO: test CreateRecurringDebitAchPaymentAttributes + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'addenda' + */ + @Test + public void addendaTest() { + // TODO: test addenda + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'sameDay' + */ + @Test + public void sameDayTest() { + // TODO: test sameDay + } + + /** + * Test the property 'verifyCounterpartyBalance' + */ + @Test + public void verifyCounterpartyBalanceTest() { + // TODO: test verifyCounterpartyBalance + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'schedule' + */ + @Test + public void scheduleTest() { + // TODO: test schedule + } + + /** + * Test the property 'clearingDaysOverride' + */ + @Test + public void clearingDaysOverrideTest() { + // TODO: test clearingDaysOverride + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateRecurringDebitAchPaymentTest.java b/src/test/java/unit/java/sdk/model/CreateRecurringDebitAchPaymentTest.java new file mode 100644 index 00000000..0e845ea7 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateRecurringDebitAchPaymentTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchPaymentCounterpartyRelationships; +import unit.java.sdk.model.CreateRecurringDebitAchPaymentAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateRecurringDebitAchPayment + */ +public class CreateRecurringDebitAchPaymentTest { + private final CreateRecurringDebitAchPayment model = new CreateRecurringDebitAchPayment(); + + /** + * Model tests for CreateRecurringDebitAchPayment + */ + @Test + public void testCreateRecurringDebitAchPayment() { + // TODO: test CreateRecurringDebitAchPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateRecurringPaymentDataTest.java b/src/test/java/unit/java/sdk/model/CreateRecurringPaymentDataTest.java new file mode 100644 index 00000000..3493631d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateRecurringPaymentDataTest.java @@ -0,0 +1,69 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateBookPaymentRelationships; +import unit.java.sdk.model.CreateRecurringCreditAchPayment; +import unit.java.sdk.model.CreateRecurringCreditBookPayment; +import unit.java.sdk.model.CreateRecurringCreditBookPaymentAttributes; +import unit.java.sdk.model.CreateRecurringDebitAchPayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateRecurringPaymentData + */ +public class CreateRecurringPaymentDataTest { + private final CreateRecurringPaymentData model = new CreateRecurringPaymentData(); + + /** + * Model tests for CreateRecurringPaymentData + */ + @Test + public void testCreateRecurringPaymentData() { + // TODO: test CreateRecurringPaymentData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateRecurringPaymentTest.java b/src/test/java/unit/java/sdk/model/CreateRecurringPaymentTest.java new file mode 100644 index 00000000..6329cc20 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateRecurringPaymentTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateRecurringPaymentData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateRecurringPayment + */ +public class CreateRecurringPaymentTest { + private final CreateRecurringPayment model = new CreateRecurringPayment(); + + /** + * Model tests for CreateRecurringPayment + */ + @Test + public void testCreateRecurringPayment() { + // TODO: test CreateRecurringPayment + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateRepaymentDataTest.java b/src/test/java/unit/java/sdk/model/CreateRepaymentDataTest.java new file mode 100644 index 00000000..08cbb10d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateRepaymentDataTest.java @@ -0,0 +1,68 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchRepayment; +import unit.java.sdk.model.CreateBookRepayment; +import unit.java.sdk.model.CreateBookRepaymentAttributes; +import unit.java.sdk.model.CreateBookRepaymentRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateRepaymentData + */ +public class CreateRepaymentDataTest { + private final CreateRepaymentData model = new CreateRepaymentData(); + + /** + * Model tests for CreateRepaymentData + */ + @Test + public void testCreateRepaymentData() { + // TODO: test CreateRepaymentData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateRepaymentTest.java b/src/test/java/unit/java/sdk/model/CreateRepaymentTest.java new file mode 100644 index 00000000..d2d2327a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateRepaymentTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateRepaymentData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateRepayment + */ +public class CreateRepaymentTest { + private final CreateRepayment model = new CreateRepayment(); + + /** + * Model tests for CreateRepayment + */ + @Test + public void testCreateRepayment() { + // TODO: test CreateRepayment + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateRewardDataAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateRewardDataAttributesTest.java new file mode 100644 index 00000000..c5c72d8d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateRewardDataAttributesTest.java @@ -0,0 +1,72 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateRewardDataAttributes + */ +public class CreateRewardDataAttributesTest { + private final CreateRewardDataAttributes model = new CreateRewardDataAttributes(); + + /** + * Model tests for CreateRewardDataAttributes + */ + @Test + public void testCreateRewardDataAttributes() { + // TODO: test CreateRewardDataAttributes + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateRewardDataTest.java b/src/test/java/unit/java/sdk/model/CreateRewardDataTest.java new file mode 100644 index 00000000..80503f4f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateRewardDataTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateRewardDataAttributes; +import unit.java.sdk.model.CreateRewardRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateRewardData + */ +public class CreateRewardDataTest { + private final CreateRewardData model = new CreateRewardData(); + + /** + * Model tests for CreateRewardData + */ + @Test + public void testCreateRewardData() { + // TODO: test CreateRewardData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateRewardRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CreateRewardRelationshipsTest.java new file mode 100644 index 00000000..c8b85ea4 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateRewardRelationshipsTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsReceivePaymentTransaction; +import unit.java.sdk.model.Relationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateRewardRelationships + */ +public class CreateRewardRelationshipsTest { + private final CreateRewardRelationships model = new CreateRewardRelationships(); + + /** + * Model tests for CreateRewardRelationships + */ + @Test + public void testCreateRewardRelationships() { + // TODO: test CreateRewardRelationships + } + + /** + * Test the property 'fundingAccount' + */ + @Test + public void fundingAccountTest() { + // TODO: test fundingAccount + } + + /** + * Test the property 'receivingAccount' + */ + @Test + public void receivingAccountTest() { + // TODO: test receivingAccount + } + + /** + * Test the property 'rewardedTransaction' + */ + @Test + public void rewardedTransactionTest() { + // TODO: test rewardedTransaction + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateRewardTest.java b/src/test/java/unit/java/sdk/model/CreateRewardTest.java new file mode 100644 index 00000000..10fdf086 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateRewardTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateRewardData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateReward + */ +public class CreateRewardTest { + private final CreateReward model = new CreateReward(); + + /** + * Model tests for CreateReward + */ + @Test + public void testCreateReward() { + // TODO: test CreateReward + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateSoleProprietorApplicationAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateSoleProprietorApplicationAttributesTest.java new file mode 100644 index 00000000..22433d14 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateSoleProprietorApplicationAttributesTest.java @@ -0,0 +1,276 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.BusinessVertical; +import unit.java.sdk.model.CreatePowerOfAttorneyAgent; +import unit.java.sdk.model.DeviceFingerprint; +import unit.java.sdk.model.EvaluationParams; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Industry; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.SoleProprietorshipAnnualRevenue; +import unit.java.sdk.model.SoleProprietorshipNumberOfEmployees; +import unit.java.sdk.model.SourceOfIncome; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateSoleProprietorApplicationAttributes + */ +public class CreateSoleProprietorApplicationAttributesTest { + private final CreateSoleProprietorApplicationAttributes model = new CreateSoleProprietorApplicationAttributes(); + + /** + * Model tests for CreateSoleProprietorApplicationAttributes + */ + @Test + public void testCreateSoleProprietorApplicationAttributes() { + // TODO: test CreateSoleProprietorApplicationAttributes + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'ssn' + */ + @Test + public void ssnTest() { + // TODO: test ssn + } + + /** + * Test the property 'passport' + */ + @Test + public void passportTest() { + // TODO: test passport + } + + /** + * Test the property 'nationality' + */ + @Test + public void nationalityTest() { + // TODO: test nationality + } + + /** + * Test the property 'matriculaConsular' + */ + @Test + public void matriculaConsularTest() { + // TODO: test matriculaConsular + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** + * Test the property 'dba' + */ + @Test + public void dbaTest() { + // TODO: test dba + } + + /** + * Test the property 'ein' + */ + @Test + public void einTest() { + // TODO: test ein + } + + /** + * Test the property 'ip' + */ + @Test + public void ipTest() { + // TODO: test ip + } + + /** + * Test the property 'soleProprietorship' + */ + @Test + public void soleProprietorshipTest() { + // TODO: test soleProprietorship + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'deviceFingerprints' + */ + @Test + public void deviceFingerprintsTest() { + // TODO: test deviceFingerprints + } + + /** + * Test the property 'jwtSubject' + */ + @Test + public void jwtSubjectTest() { + // TODO: test jwtSubject + } + + /** + * Test the property 'powerOfAttorneyAgent' + */ + @Test + public void powerOfAttorneyAgentTest() { + // TODO: test powerOfAttorneyAgent + } + + /** + * Test the property 'industry' + */ + @Test + public void industryTest() { + // TODO: test industry + } + + /** + * Test the property 'evaluationParams' + */ + @Test + public void evaluationParamsTest() { + // TODO: test evaluationParams + } + + /** + * Test the property 'occupation' + */ + @Test + public void occupationTest() { + // TODO: test occupation + } + + /** + * Test the property 'annualIncome' + */ + @Test + public void annualIncomeTest() { + // TODO: test annualIncome + } + + /** + * Test the property 'sourceOfIncome' + */ + @Test + public void sourceOfIncomeTest() { + // TODO: test sourceOfIncome + } + + /** + * Test the property 'annualRevenue' + */ + @Test + public void annualRevenueTest() { + // TODO: test annualRevenue + } + + /** + * Test the property 'numberOfEmployees' + */ + @Test + public void numberOfEmployeesTest() { + // TODO: test numberOfEmployees + } + + /** + * Test the property 'businessVertical' + */ + @Test + public void businessVerticalTest() { + // TODO: test businessVertical + } + + /** + * Test the property 'website' + */ + @Test + public void websiteTest() { + // TODO: test website + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateSoleProprietorApplicationTest.java b/src/test/java/unit/java/sdk/model/CreateSoleProprietorApplicationTest.java new file mode 100644 index 00000000..9e7de1bb --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateSoleProprietorApplicationTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateSoleProprietorApplicationAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateSoleProprietorApplication + */ +public class CreateSoleProprietorApplicationTest { + private final CreateSoleProprietorApplication model = new CreateSoleProprietorApplication(); + + /** + * Model tests for CreateSoleProprietorApplication + */ + @Test + public void testCreateSoleProprietorApplication() { + // TODO: test CreateSoleProprietorApplication + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateStopPaymentTest.java b/src/test/java/unit/java/sdk/model/CreateStopPaymentTest.java new file mode 100644 index 00000000..a9a2dfd0 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateStopPaymentTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.StopPayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateStopPayment + */ +public class CreateStopPaymentTest { + private final CreateStopPayment model = new CreateStopPayment(); + + /** + * Model tests for CreateStopPayment + */ + @Test + public void testCreateStopPayment() { + // TODO: test CreateStopPayment + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateTrustApplicationAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateTrustApplicationAttributesTest.java new file mode 100644 index 00000000..28cc2ecd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateTrustApplicationAttributesTest.java @@ -0,0 +1,151 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Beneficiary; +import unit.java.sdk.model.DeviceFingerprint; +import unit.java.sdk.model.Grantor; +import unit.java.sdk.model.TrustContact; +import unit.java.sdk.model.Trustee; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateTrustApplicationAttributes + */ +public class CreateTrustApplicationAttributesTest { + private final CreateTrustApplicationAttributes model = new CreateTrustApplicationAttributes(); + + /** + * Model tests for CreateTrustApplicationAttributes + */ + @Test + public void testCreateTrustApplicationAttributes() { + // TODO: test CreateTrustApplicationAttributes + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'stateOfIncorporation' + */ + @Test + public void stateOfIncorporationTest() { + // TODO: test stateOfIncorporation + } + + /** + * Test the property 'revocability' + */ + @Test + public void revocabilityTest() { + // TODO: test revocability + } + + /** + * Test the property 'sourceOfFunds' + */ + @Test + public void sourceOfFundsTest() { + // TODO: test sourceOfFunds + } + + /** + * Test the property 'taxId' + */ + @Test + public void taxIdTest() { + // TODO: test taxId + } + + /** + * Test the property 'grantor' + */ + @Test + public void grantorTest() { + // TODO: test grantor + } + + /** + * Test the property 'trustees' + */ + @Test + public void trusteesTest() { + // TODO: test trustees + } + + /** + * Test the property 'beneficiaries' + */ + @Test + public void beneficiariesTest() { + // TODO: test beneficiaries + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'ip' + */ + @Test + public void ipTest() { + // TODO: test ip + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'deviceFingerprints' + */ + @Test + public void deviceFingerprintsTest() { + // TODO: test deviceFingerprints + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateTrustApplicationTest.java b/src/test/java/unit/java/sdk/model/CreateTrustApplicationTest.java new file mode 100644 index 00000000..2e50239d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateTrustApplicationTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateTrustApplicationAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateTrustApplication + */ +public class CreateTrustApplicationTest { + private final CreateTrustApplication model = new CreateTrustApplication(); + + /** + * Model tests for CreateTrustApplication + */ + @Test + public void testCreateTrustApplication() { + // TODO: test CreateTrustApplication + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateWebhookDataAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateWebhookDataAttributesTest.java new file mode 100644 index 00000000..e4fb1036 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateWebhookDataAttributesTest.java @@ -0,0 +1,96 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateWebhookDataAttributes + */ +public class CreateWebhookDataAttributesTest { + private final CreateWebhookDataAttributes model = new CreateWebhookDataAttributes(); + + /** + * Model tests for CreateWebhookDataAttributes + */ + @Test + public void testCreateWebhookDataAttributes() { + // TODO: test CreateWebhookDataAttributes + } + + /** + * Test the property 'label' + */ + @Test + public void labelTest() { + // TODO: test label + } + + /** + * Test the property 'url' + */ + @Test + public void urlTest() { + // TODO: test url + } + + /** + * Test the property 'token' + */ + @Test + public void tokenTest() { + // TODO: test token + } + + /** + * Test the property 'contentType' + */ + @Test + public void contentTypeTest() { + // TODO: test contentType + } + + /** + * Test the property 'deliveryMode' + */ + @Test + public void deliveryModeTest() { + // TODO: test deliveryMode + } + + /** + * Test the property 'includeResources' + */ + @Test + public void includeResourcesTest() { + // TODO: test includeResources + } + + /** + * Test the property 'subscriptionType' + */ + @Test + public void subscriptionTypeTest() { + // TODO: test subscriptionType + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateWebhookDataTest.java b/src/test/java/unit/java/sdk/model/CreateWebhookDataTest.java new file mode 100644 index 00000000..03b7a5b4 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateWebhookDataTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateWebhookDataAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateWebhookData + */ +public class CreateWebhookDataTest { + private final CreateWebhookData model = new CreateWebhookData(); + + /** + * Model tests for CreateWebhookData + */ + @Test + public void testCreateWebhookData() { + // TODO: test CreateWebhookData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateWebhookTest.java b/src/test/java/unit/java/sdk/model/CreateWebhookTest.java new file mode 100644 index 00000000..078acd60 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateWebhookTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateWebhookData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateWebhook + */ +public class CreateWebhookTest { + private final CreateWebhook model = new CreateWebhook(); + + /** + * Model tests for CreateWebhook + */ + @Test + public void testCreateWebhook() { + // TODO: test CreateWebhook + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateWirePaymentAttributesTest.java b/src/test/java/unit/java/sdk/model/CreateWirePaymentAttributesTest.java new file mode 100644 index 00000000..d21ca584 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateWirePaymentAttributesTest.java @@ -0,0 +1,89 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.WireCounterparty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateWirePaymentAttributes + */ +public class CreateWirePaymentAttributesTest { + private final CreateWirePaymentAttributes model = new CreateWirePaymentAttributes(); + + /** + * Model tests for CreateWirePaymentAttributes + */ + @Test + public void testCreateWirePaymentAttributes() { + // TODO: test CreateWirePaymentAttributes + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'counterparty' + */ + @Test + public void counterpartyTest() { + // TODO: test counterparty + } + + /** + * Test the property 'idempotencyKey' + */ + @Test + public void idempotencyKeyTest() { + // TODO: test idempotencyKey + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreateWirePaymentTest.java b/src/test/java/unit/java/sdk/model/CreateWirePaymentTest.java new file mode 100644 index 00000000..6a6e684e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreateWirePaymentTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreateAchPaymentRelationships; +import unit.java.sdk.model.CreateWirePaymentAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreateWirePayment + */ +public class CreateWirePaymentTest { + private final CreateWirePayment model = new CreateWirePayment(); + + /** + * Model tests for CreateWirePayment + */ + @Test + public void testCreateWirePayment() { + // TODO: test CreateWirePayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreditAccountAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/CreditAccountAllOfAttributesTest.java new file mode 100644 index 00000000..faeba124 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreditAccountAllOfAttributesTest.java @@ -0,0 +1,161 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreditAccountAllOfAttributes + */ +public class CreditAccountAllOfAttributesTest { + private final CreditAccountAllOfAttributes model = new CreditAccountAllOfAttributes(); + + /** + * Model tests for CreditAccountAllOfAttributes + */ + @Test + public void testCreditAccountAllOfAttributes() { + // TODO: test CreditAccountAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'creditTerms' + */ + @Test + public void creditTermsTest() { + // TODO: test creditTerms + } + + /** + * Test the property 'currency' + */ + @Test + public void currencyTest() { + // TODO: test currency + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'hold' + */ + @Test + public void holdTest() { + // TODO: test hold + } + + /** + * Test the property 'available' + */ + @Test + public void availableTest() { + // TODO: test available + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'closeReason' + */ + @Test + public void closeReasonTest() { + // TODO: test closeReason + } + + /** + * Test the property 'fraudReason' + */ + @Test + public void fraudReasonTest() { + // TODO: test fraudReason + } + + /** + * Test the property 'closeReasonText' + */ + @Test + public void closeReasonTextTest() { + // TODO: test closeReasonText + } + + /** + * Test the property 'freezeReason' + */ + @Test + public void freezeReasonTest() { + // TODO: test freezeReason + } + + /** + * Test the property 'creditLimit' + */ + @Test + public void creditLimitTest() { + // TODO: test creditLimit + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreditAccountRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CreditAccountRelationshipsTest.java new file mode 100644 index 00000000..0eb46fa3 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreditAccountRelationshipsTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import unit.java.sdk.model.CustomerLinkage; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreditAccountRelationships + */ +public class CreditAccountRelationshipsTest { + private final CreditAccountRelationships model = new CreditAccountRelationships(); + + /** + * Model tests for CreditAccountRelationships + */ + @Test + public void testCreditAccountRelationships() { + // TODO: test CreditAccountRelationships + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreditAccountTest.java b/src/test/java/unit/java/sdk/model/CreditAccountTest.java new file mode 100644 index 00000000..ead89f52 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreditAccountTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Account; +import unit.java.sdk.model.CreditAccountAllOfAttributes; +import unit.java.sdk.model.CreditAccountRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreditAccount + */ +public class CreditAccountTest { + private final CreditAccount model = new CreditAccount(); + + /** + * Model tests for CreditAccount + */ + @Test + public void testCreditAccount() { + // TODO: test CreditAccount + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreditLimitsAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/CreditLimitsAllOfAttributesTest.java new file mode 100644 index 00000000..4ebec654 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreditLimitsAllOfAttributesTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.DepositLimitsAllOfAttributesCard; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreditLimitsAllOfAttributes + */ +public class CreditLimitsAllOfAttributesTest { + private final CreditLimitsAllOfAttributes model = new CreditLimitsAllOfAttributes(); + + /** + * Model tests for CreditLimitsAllOfAttributes + */ + @Test + public void testCreditLimitsAllOfAttributes() { + // TODO: test CreditLimitsAllOfAttributes + } + + /** + * Test the property 'card' + */ + @Test + public void cardTest() { + // TODO: test card + } + +} diff --git a/src/test/java/unit/java/sdk/model/CreditLimitsTest.java b/src/test/java/unit/java/sdk/model/CreditLimitsTest.java new file mode 100644 index 00000000..93a88bd2 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CreditLimitsTest.java @@ -0,0 +1,61 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CreditLimitsAllOfAttributes; +import unit.java.sdk.model.Limits1; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CreditLimits + */ +public class CreditLimitsTest { + private final CreditLimits model = new CreditLimits(); + + /** + * Model tests for CreditLimits + */ + @Test + public void testCreditLimits() { + // TODO: test CreditLimits + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/CustomerLinkageDataTest.java b/src/test/java/unit/java/sdk/model/CustomerLinkageDataTest.java new file mode 100644 index 00000000..bb45bcf8 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CustomerLinkageDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CustomerLinkageData + */ +public class CustomerLinkageDataTest { + private final CustomerLinkageData model = new CustomerLinkageData(); + + /** + * Model tests for CustomerLinkageData + */ + @Test + public void testCustomerLinkageData() { + // TODO: test CustomerLinkageData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/CustomerLinkageTest.java b/src/test/java/unit/java/sdk/model/CustomerLinkageTest.java new file mode 100644 index 00000000..7b672155 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CustomerLinkageTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomerLinkageData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CustomerLinkage + */ +public class CustomerLinkageTest { + private final CustomerLinkage model = new CustomerLinkage(); + + /** + * Model tests for CustomerLinkage + */ + @Test + public void testCustomerLinkage() { + // TODO: test CustomerLinkage + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CustomerRelationshipTest.java b/src/test/java/unit/java/sdk/model/CustomerRelationshipTest.java new file mode 100644 index 00000000..cfc3726d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CustomerRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsCustomerData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CustomerRelationship + */ +public class CustomerRelationshipTest { + private final CustomerRelationship model = new CustomerRelationship(); + + /** + * Model tests for CustomerRelationship + */ + @Test + public void testCustomerRelationship() { + // TODO: test CustomerRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/CustomerRelationshipsTest.java b/src/test/java/unit/java/sdk/model/CustomerRelationshipsTest.java new file mode 100644 index 00000000..3942299d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CustomerRelationshipsTest.java @@ -0,0 +1,60 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import unit.java.sdk.model.OrgRelationship; +import unit.java.sdk.model.Relationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CustomerRelationships + */ +public class CustomerRelationshipsTest { + private final CustomerRelationships model = new CustomerRelationships(); + + /** + * Model tests for CustomerRelationships + */ + @Test + public void testCustomerRelationships() { + // TODO: test CustomerRelationships + } + + /** + * Test the property 'org' + */ + @Test + public void orgTest() { + // TODO: test org + } + + /** + * Test the property 'application' + */ + @Test + public void applicationTest() { + // TODO: test application + } + +} diff --git a/src/test/java/unit/java/sdk/model/CustomerRepaymentReturnedTransactionTest.java b/src/test/java/unit/java/sdk/model/CustomerRepaymentReturnedTransactionTest.java new file mode 100644 index 00000000..a79ac7d4 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CustomerRepaymentReturnedTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.FeeTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CustomerRepaymentReturnedTransaction + */ +public class CustomerRepaymentReturnedTransactionTest { + private final CustomerRepaymentReturnedTransaction model = new CustomerRepaymentReturnedTransaction(); + + /** + * Model tests for CustomerRepaymentReturnedTransaction + */ + @Test + public void testCustomerRepaymentReturnedTransaction() { + // TODO: test CustomerRepaymentReturnedTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CustomerRepaymentTransactionTest.java b/src/test/java/unit/java/sdk/model/CustomerRepaymentTransactionTest.java new file mode 100644 index 00000000..ddb7d526 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CustomerRepaymentTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.FeeTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CustomerRepaymentTransaction + */ +public class CustomerRepaymentTransactionTest { + private final CustomerRepaymentTransaction model = new CustomerRepaymentTransaction(); + + /** + * Model tests for CustomerRepaymentTransaction + */ + @Test + public void testCustomerRepaymentTransaction() { + // TODO: test CustomerRepaymentTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/CustomerTest.java b/src/test/java/unit/java/sdk/model/CustomerTest.java new file mode 100644 index 00000000..d91c6d3e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CustomerTest.java @@ -0,0 +1,59 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Customer + */ +public class CustomerTest { + private final Customer model = new Customer(); + + /** + * Model tests for Customer + */ + @Test + public void testCustomer() { + // TODO: test Customer + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/unit/java/sdk/model/CustomerTokenAttributesTest.java b/src/test/java/unit/java/sdk/model/CustomerTokenAttributesTest.java new file mode 100644 index 00000000..0981d22f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CustomerTokenAttributesTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CustomerTokenAttributes + */ +public class CustomerTokenAttributesTest { + private final CustomerTokenAttributes model = new CustomerTokenAttributes(); + + /** + * Model tests for CustomerTokenAttributes + */ + @Test + public void testCustomerTokenAttributes() { + // TODO: test CustomerTokenAttributes + } + + /** + * Test the property 'token' + */ + @Test + public void tokenTest() { + // TODO: test token + } + + /** + * Test the property 'expiresIn' + */ + @Test + public void expiresInTest() { + // TODO: test expiresIn + } + +} diff --git a/src/test/java/unit/java/sdk/model/CustomerTokenTest.java b/src/test/java/unit/java/sdk/model/CustomerTokenTest.java new file mode 100644 index 00000000..6cf8fb33 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CustomerTokenTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomerTokenAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CustomerToken + */ +public class CustomerTokenTest { + private final CustomerToken model = new CustomerToken(); + + /** + * Model tests for CustomerToken + */ + @Test + public void testCustomerToken() { + // TODO: test CustomerToken + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/CustomerTokenVerificationAttributesTest.java b/src/test/java/unit/java/sdk/model/CustomerTokenVerificationAttributesTest.java new file mode 100644 index 00000000..500d7bec --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CustomerTokenVerificationAttributesTest.java @@ -0,0 +1,48 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CustomerTokenVerificationAttributes + */ +public class CustomerTokenVerificationAttributesTest { + private final CustomerTokenVerificationAttributes model = new CustomerTokenVerificationAttributes(); + + /** + * Model tests for CustomerTokenVerificationAttributes + */ + @Test + public void testCustomerTokenVerificationAttributes() { + // TODO: test CustomerTokenVerificationAttributes + } + + /** + * Test the property 'verificationToken' + */ + @Test + public void verificationTokenTest() { + // TODO: test verificationToken + } + +} diff --git a/src/test/java/unit/java/sdk/model/CustomerTokenVerificationTest.java b/src/test/java/unit/java/sdk/model/CustomerTokenVerificationTest.java new file mode 100644 index 00000000..1eb9192f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CustomerTokenVerificationTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomerTokenVerificationAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CustomerTokenVerification + */ +public class CustomerTokenVerificationTest { + private final CustomerTokenVerification model = new CustomerTokenVerification(); + + /** + * Model tests for CustomerTokenVerification + */ + @Test + public void testCustomerTokenVerification() { + // TODO: test CustomerTokenVerification + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/CustomersRelationshipDataInnerTest.java b/src/test/java/unit/java/sdk/model/CustomersRelationshipDataInnerTest.java new file mode 100644 index 00000000..043167a0 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CustomersRelationshipDataInnerTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CustomersRelationshipDataInner + */ +public class CustomersRelationshipDataInnerTest { + private final CustomersRelationshipDataInner model = new CustomersRelationshipDataInner(); + + /** + * Model tests for CustomersRelationshipDataInner + */ + @Test + public void testCustomersRelationshipDataInner() { + // TODO: test CustomersRelationshipDataInner + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/unit/java/sdk/model/CustomersRelationshipTest.java b/src/test/java/unit/java/sdk/model/CustomersRelationshipTest.java new file mode 100644 index 00000000..650290ff --- /dev/null +++ b/src/test/java/unit/java/sdk/model/CustomersRelationshipTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.CustomersRelationshipDataInner; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for CustomersRelationship + */ +public class CustomersRelationshipTest { + private final CustomersRelationship model = new CustomersRelationship(); + + /** + * Model tests for CustomersRelationship + */ + @Test + public void testCustomersRelationship() { + // TODO: test CustomersRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/DeclineAuthorizationRequestAttributesTest.java b/src/test/java/unit/java/sdk/model/DeclineAuthorizationRequestAttributesTest.java new file mode 100644 index 00000000..9cda4da9 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DeclineAuthorizationRequestAttributesTest.java @@ -0,0 +1,48 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DeclineAuthorizationRequestAttributes + */ +public class DeclineAuthorizationRequestAttributesTest { + private final DeclineAuthorizationRequestAttributes model = new DeclineAuthorizationRequestAttributes(); + + /** + * Model tests for DeclineAuthorizationRequestAttributes + */ + @Test + public void testDeclineAuthorizationRequestAttributes() { + // TODO: test DeclineAuthorizationRequestAttributes + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + +} diff --git a/src/test/java/unit/java/sdk/model/DeclineAuthorizationRequestTest.java b/src/test/java/unit/java/sdk/model/DeclineAuthorizationRequestTest.java new file mode 100644 index 00000000..38a28e45 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DeclineAuthorizationRequestTest.java @@ -0,0 +1,48 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DeclineAuthorizationRequest + */ +public class DeclineAuthorizationRequestTest { + private final DeclineAuthorizationRequest model = new DeclineAuthorizationRequest(); + + /** + * Model tests for DeclineAuthorizationRequest + */ + @Test + public void testDeclineAuthorizationRequest() { + // TODO: test DeclineAuthorizationRequest + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/DepositAccountAllOfAttributesSecondaryAccountNumberTest.java b/src/test/java/unit/java/sdk/model/DepositAccountAllOfAttributesSecondaryAccountNumberTest.java new file mode 100644 index 00000000..1c02f073 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DepositAccountAllOfAttributesSecondaryAccountNumberTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DepositAccountAllOfAttributesSecondaryAccountNumber + */ +public class DepositAccountAllOfAttributesSecondaryAccountNumberTest { + private final DepositAccountAllOfAttributesSecondaryAccountNumber model = new DepositAccountAllOfAttributesSecondaryAccountNumber(); + + /** + * Model tests for DepositAccountAllOfAttributesSecondaryAccountNumber + */ + @Test + public void testDepositAccountAllOfAttributesSecondaryAccountNumber() { + // TODO: test DepositAccountAllOfAttributesSecondaryAccountNumber + } + + /** + * Test the property 'routingNumber' + */ + @Test + public void routingNumberTest() { + // TODO: test routingNumber + } + + /** + * Test the property 'accountNumber' + */ + @Test + public void accountNumberTest() { + // TODO: test accountNumber + } + +} diff --git a/src/test/java/unit/java/sdk/model/DepositAccountAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/DepositAccountAllOfAttributesTest.java new file mode 100644 index 00000000..b723878f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DepositAccountAllOfAttributesTest.java @@ -0,0 +1,210 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.DepositAccountAllOfAttributesSecondaryAccountNumber; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DepositAccountAllOfAttributes + */ +public class DepositAccountAllOfAttributesTest { + private final DepositAccountAllOfAttributes model = new DepositAccountAllOfAttributes(); + + /** + * Model tests for DepositAccountAllOfAttributes + */ + @Test + public void testDepositAccountAllOfAttributes() { + // TODO: test DepositAccountAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'depositProduct' + */ + @Test + public void depositProductTest() { + // TODO: test depositProduct + } + + /** + * Test the property 'routingNumber' + */ + @Test + public void routingNumberTest() { + // TODO: test routingNumber + } + + /** + * Test the property 'accountNumber' + */ + @Test + public void accountNumberTest() { + // TODO: test accountNumber + } + + /** + * Test the property 'secondaryAccountNumber' + */ + @Test + public void secondaryAccountNumberTest() { + // TODO: test secondaryAccountNumber + } + + /** + * Test the property 'currency' + */ + @Test + public void currencyTest() { + // TODO: test currency + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'overdraftLimit' + */ + @Test + public void overdraftLimitTest() { + // TODO: test overdraftLimit + } + + /** + * Test the property 'hold' + */ + @Test + public void holdTest() { + // TODO: test hold + } + + /** + * Test the property 'available' + */ + @Test + public void availableTest() { + // TODO: test available + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'closeReason' + */ + @Test + public void closeReasonTest() { + // TODO: test closeReason + } + + /** + * Test the property 'fraudReason' + */ + @Test + public void fraudReasonTest() { + // TODO: test fraudReason + } + + /** + * Test the property 'closeReasonText' + */ + @Test + public void closeReasonTextTest() { + // TODO: test closeReasonText + } + + /** + * Test the property 'freezeReason' + */ + @Test + public void freezeReasonTest() { + // TODO: test freezeReason + } + + /** + * Test the property 'maskedAccountNumber' + */ + @Test + public void maskedAccountNumberTest() { + // TODO: test maskedAccountNumber + } + + /** + * Test the property 'isOverdrawnWithinLimit' + */ + @Test + public void isOverdrawnWithinLimitTest() { + // TODO: test isOverdrawnWithinLimit + } + + /** + * Test the property 'dacaStatus' + */ + @Test + public void dacaStatusTest() { + // TODO: test dacaStatus + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + +} diff --git a/src/test/java/unit/java/sdk/model/DepositAccountRelationshipsTest.java b/src/test/java/unit/java/sdk/model/DepositAccountRelationshipsTest.java new file mode 100644 index 00000000..40d4d36d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DepositAccountRelationshipsTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import unit.java.sdk.model.CustomerLinkage; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DepositAccountRelationships + */ +public class DepositAccountRelationshipsTest { + private final DepositAccountRelationships model = new DepositAccountRelationships(); + + /** + * Model tests for DepositAccountRelationships + */ + @Test + public void testDepositAccountRelationships() { + // TODO: test DepositAccountRelationships + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + +} diff --git a/src/test/java/unit/java/sdk/model/DepositAccountTest.java b/src/test/java/unit/java/sdk/model/DepositAccountTest.java new file mode 100644 index 00000000..538901fa --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DepositAccountTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Account; +import unit.java.sdk.model.DepositAccountAllOfAttributes; +import unit.java.sdk.model.DepositAccountRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DepositAccount + */ +public class DepositAccountTest { + private final DepositAccount model = new DepositAccount(); + + /** + * Model tests for DepositAccount + */ + @Test + public void testDepositAccount() { + // TODO: test DepositAccount + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesAchLimitsTest.java b/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesAchLimitsTest.java new file mode 100644 index 00000000..10ae593a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesAchLimitsTest.java @@ -0,0 +1,89 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DepositLimitsAllOfAttributesAchLimits + */ +public class DepositLimitsAllOfAttributesAchLimitsTest { + private final DepositLimitsAllOfAttributesAchLimits model = new DepositLimitsAllOfAttributesAchLimits(); + + /** + * Model tests for DepositLimitsAllOfAttributesAchLimits + */ + @Test + public void testDepositLimitsAllOfAttributesAchLimits() { + // TODO: test DepositLimitsAllOfAttributesAchLimits + } + + /** + * Test the property 'dailyDebit' + */ + @Test + public void dailyDebitTest() { + // TODO: test dailyDebit + } + + /** + * Test the property 'dailyCredit' + */ + @Test + public void dailyCreditTest() { + // TODO: test dailyCredit + } + + /** + * Test the property 'monthlyDebit' + */ + @Test + public void monthlyDebitTest() { + // TODO: test monthlyDebit + } + + /** + * Test the property 'monthlyDebitSoft' + */ + @Test + public void monthlyDebitSoftTest() { + // TODO: test monthlyDebitSoft + } + + /** + * Test the property 'dailyDebitSoft' + */ + @Test + public void dailyDebitSoftTest() { + // TODO: test dailyDebitSoft + } + + /** + * Test the property 'monthlyCredit' + */ + @Test + public void monthlyCreditTest() { + // TODO: test monthlyCredit + } + +} diff --git a/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesAchTest.java b/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesAchTest.java new file mode 100644 index 00000000..ffc59ada --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesAchTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.DepositLimitsAllOfAttributesAchLimits; +import unit.java.sdk.model.DepositLimitsAllOfAttributesAchTotalsDaily; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DepositLimitsAllOfAttributesAch + */ +public class DepositLimitsAllOfAttributesAchTest { + private final DepositLimitsAllOfAttributesAch model = new DepositLimitsAllOfAttributesAch(); + + /** + * Model tests for DepositLimitsAllOfAttributesAch + */ + @Test + public void testDepositLimitsAllOfAttributesAch() { + // TODO: test DepositLimitsAllOfAttributesAch + } + + /** + * Test the property 'limits' + */ + @Test + public void limitsTest() { + // TODO: test limits + } + + /** + * Test the property 'totalsDaily' + */ + @Test + public void totalsDailyTest() { + // TODO: test totalsDaily + } + + /** + * Test the property 'totalsMonthly' + */ + @Test + public void totalsMonthlyTest() { + // TODO: test totalsMonthly + } + +} diff --git a/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesAchTotalsDailyTest.java b/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesAchTotalsDailyTest.java new file mode 100644 index 00000000..288722dc --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesAchTotalsDailyTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DepositLimitsAllOfAttributesAchTotalsDaily + */ +public class DepositLimitsAllOfAttributesAchTotalsDailyTest { + private final DepositLimitsAllOfAttributesAchTotalsDaily model = new DepositLimitsAllOfAttributesAchTotalsDaily(); + + /** + * Model tests for DepositLimitsAllOfAttributesAchTotalsDaily + */ + @Test + public void testDepositLimitsAllOfAttributesAchTotalsDaily() { + // TODO: test DepositLimitsAllOfAttributesAchTotalsDaily + } + + /** + * Test the property 'debits' + */ + @Test + public void debitsTest() { + // TODO: test debits + } + + /** + * Test the property 'credits' + */ + @Test + public void creditsTest() { + // TODO: test credits + } + +} diff --git a/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCardLimitsTest.java b/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCardLimitsTest.java new file mode 100644 index 00000000..59978818 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCardLimitsTest.java @@ -0,0 +1,73 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DepositLimitsAllOfAttributesCardLimits + */ +public class DepositLimitsAllOfAttributesCardLimitsTest { + private final DepositLimitsAllOfAttributesCardLimits model = new DepositLimitsAllOfAttributesCardLimits(); + + /** + * Model tests for DepositLimitsAllOfAttributesCardLimits + */ + @Test + public void testDepositLimitsAllOfAttributesCardLimits() { + // TODO: test DepositLimitsAllOfAttributesCardLimits + } + + /** + * Test the property 'dailyWithdrawal' + */ + @Test + public void dailyWithdrawalTest() { + // TODO: test dailyWithdrawal + } + + /** + * Test the property 'dailyDeposit' + */ + @Test + public void dailyDepositTest() { + // TODO: test dailyDeposit + } + + /** + * Test the property 'dailyPurchase' + */ + @Test + public void dailyPurchaseTest() { + // TODO: test dailyPurchase + } + + /** + * Test the property 'dailyCardTransaction' + */ + @Test + public void dailyCardTransactionTest() { + // TODO: test dailyCardTransaction + } + +} diff --git a/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCardTest.java b/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCardTest.java new file mode 100644 index 00000000..950c4357 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCardTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.DepositLimitsAllOfAttributesCardLimits; +import unit.java.sdk.model.DepositLimitsAllOfAttributesCardTotalsDaily; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DepositLimitsAllOfAttributesCard + */ +public class DepositLimitsAllOfAttributesCardTest { + private final DepositLimitsAllOfAttributesCard model = new DepositLimitsAllOfAttributesCard(); + + /** + * Model tests for DepositLimitsAllOfAttributesCard + */ + @Test + public void testDepositLimitsAllOfAttributesCard() { + // TODO: test DepositLimitsAllOfAttributesCard + } + + /** + * Test the property 'limits' + */ + @Test + public void limitsTest() { + // TODO: test limits + } + + /** + * Test the property 'totalsDaily' + */ + @Test + public void totalsDailyTest() { + // TODO: test totalsDaily + } + +} diff --git a/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCardTotalsDailyTest.java b/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCardTotalsDailyTest.java new file mode 100644 index 00000000..618bc867 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCardTotalsDailyTest.java @@ -0,0 +1,73 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DepositLimitsAllOfAttributesCardTotalsDaily + */ +public class DepositLimitsAllOfAttributesCardTotalsDailyTest { + private final DepositLimitsAllOfAttributesCardTotalsDaily model = new DepositLimitsAllOfAttributesCardTotalsDaily(); + + /** + * Model tests for DepositLimitsAllOfAttributesCardTotalsDaily + */ + @Test + public void testDepositLimitsAllOfAttributesCardTotalsDaily() { + // TODO: test DepositLimitsAllOfAttributesCardTotalsDaily + } + + /** + * Test the property 'withdrawals' + */ + @Test + public void withdrawalsTest() { + // TODO: test withdrawals + } + + /** + * Test the property 'deposits' + */ + @Test + public void depositsTest() { + // TODO: test deposits + } + + /** + * Test the property 'purchases' + */ + @Test + public void purchasesTest() { + // TODO: test purchases + } + + /** + * Test the property 'cardTransactions' + */ + @Test + public void cardTransactionsTest() { + // TODO: test cardTransactions + } + +} diff --git a/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCheckDepositLimitsTest.java b/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCheckDepositLimitsTest.java new file mode 100644 index 00000000..7463ee30 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCheckDepositLimitsTest.java @@ -0,0 +1,73 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DepositLimitsAllOfAttributesCheckDepositLimits + */ +public class DepositLimitsAllOfAttributesCheckDepositLimitsTest { + private final DepositLimitsAllOfAttributesCheckDepositLimits model = new DepositLimitsAllOfAttributesCheckDepositLimits(); + + /** + * Model tests for DepositLimitsAllOfAttributesCheckDepositLimits + */ + @Test + public void testDepositLimitsAllOfAttributesCheckDepositLimits() { + // TODO: test DepositLimitsAllOfAttributesCheckDepositLimits + } + + /** + * Test the property 'daily' + */ + @Test + public void dailyTest() { + // TODO: test daily + } + + /** + * Test the property 'monthly' + */ + @Test + public void monthlyTest() { + // TODO: test monthly + } + + /** + * Test the property 'dailySoft' + */ + @Test + public void dailySoftTest() { + // TODO: test dailySoft + } + + /** + * Test the property 'monthlySoft' + */ + @Test + public void monthlySoftTest() { + // TODO: test monthlySoft + } + +} diff --git a/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCheckDepositTest.java b/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCheckDepositTest.java new file mode 100644 index 00000000..f0f8cd59 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesCheckDepositTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import unit.java.sdk.model.DepositLimitsAllOfAttributesCheckDepositLimits; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DepositLimitsAllOfAttributesCheckDeposit + */ +public class DepositLimitsAllOfAttributesCheckDepositTest { + private final DepositLimitsAllOfAttributesCheckDeposit model = new DepositLimitsAllOfAttributesCheckDeposit(); + + /** + * Model tests for DepositLimitsAllOfAttributesCheckDeposit + */ + @Test + public void testDepositLimitsAllOfAttributesCheckDeposit() { + // TODO: test DepositLimitsAllOfAttributesCheckDeposit + } + + /** + * Test the property 'limits' + */ + @Test + public void limitsTest() { + // TODO: test limits + } + + /** + * Test the property 'totalsDaily' + */ + @Test + public void totalsDailyTest() { + // TODO: test totalsDaily + } + + /** + * Test the property 'totalsMonthly' + */ + @Test + public void totalsMonthlyTest() { + // TODO: test totalsMonthly + } + +} diff --git a/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesTest.java new file mode 100644 index 00000000..3b272f0f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DepositLimitsAllOfAttributesTest.java @@ -0,0 +1,67 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.DepositLimitsAllOfAttributesAch; +import unit.java.sdk.model.DepositLimitsAllOfAttributesCard; +import unit.java.sdk.model.DepositLimitsAllOfAttributesCheckDeposit; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DepositLimitsAllOfAttributes + */ +public class DepositLimitsAllOfAttributesTest { + private final DepositLimitsAllOfAttributes model = new DepositLimitsAllOfAttributes(); + + /** + * Model tests for DepositLimitsAllOfAttributes + */ + @Test + public void testDepositLimitsAllOfAttributes() { + // TODO: test DepositLimitsAllOfAttributes + } + + /** + * Test the property 'ach' + */ + @Test + public void achTest() { + // TODO: test ach + } + + /** + * Test the property 'card' + */ + @Test + public void cardTest() { + // TODO: test card + } + + /** + * Test the property 'checkDeposit' + */ + @Test + public void checkDepositTest() { + // TODO: test checkDeposit + } + +} diff --git a/src/test/java/unit/java/sdk/model/DepositLimitsTest.java b/src/test/java/unit/java/sdk/model/DepositLimitsTest.java new file mode 100644 index 00000000..92161503 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DepositLimitsTest.java @@ -0,0 +1,61 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.DepositLimitsAllOfAttributes; +import unit.java.sdk.model.Limits1; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DepositLimits + */ +public class DepositLimitsTest { + private final DepositLimits model = new DepositLimits(); + + /** + * Model tests for DepositLimits + */ + @Test + public void testDepositLimits() { + // TODO: test DepositLimits + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/DeviceFingerprintTest.java b/src/test/java/unit/java/sdk/model/DeviceFingerprintTest.java new file mode 100644 index 00000000..d493251a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DeviceFingerprintTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DeviceFingerprint + */ +public class DeviceFingerprintTest { + private final DeviceFingerprint model = new DeviceFingerprint(); + + /** + * Model tests for DeviceFingerprint + */ + @Test + public void testDeviceFingerprint() { + // TODO: test DeviceFingerprint + } + + /** + * Test the property 'provider' + */ + @Test + public void providerTest() { + // TODO: test provider + } + + /** + * Test the property 'value' + */ + @Test + public void valueTest() { + // TODO: test value + } + +} diff --git a/src/test/java/unit/java/sdk/model/DishonoredAchTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/DishonoredAchTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..e32f87e5 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DishonoredAchTransactionAllOfAttributesTest.java @@ -0,0 +1,145 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DishonoredAchTransactionAllOfAttributes + */ +public class DishonoredAchTransactionAllOfAttributesTest { + private final DishonoredAchTransactionAllOfAttributes model = new DishonoredAchTransactionAllOfAttributes(); + + /** + * Model tests for DishonoredAchTransactionAllOfAttributes + */ + @Test + public void testDishonoredAchTransactionAllOfAttributes() { + // TODO: test DishonoredAchTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'counterpartyName' + */ + @Test + public void counterpartyNameTest() { + // TODO: test counterpartyName + } + + /** + * Test the property 'counterpartyRoutingNumber' + */ + @Test + public void counterpartyRoutingNumberTest() { + // TODO: test counterpartyRoutingNumber + } + + /** + * Test the property 'traceNumber' + */ + @Test + public void traceNumberTest() { + // TODO: test traceNumber + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** + * Test the property 'secCode' + */ + @Test + public void secCodeTest() { + // TODO: test secCode + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/DishonoredAchTransactionTest.java b/src/test/java/unit/java/sdk/model/DishonoredAchTransactionTest.java new file mode 100644 index 00000000..6552777a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DishonoredAchTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.DishonoredAchTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DishonoredAchTransaction + */ +public class DishonoredAchTransactionTest { + private final DishonoredAchTransaction model = new DishonoredAchTransaction(); + + /** + * Model tests for DishonoredAchTransaction + */ + @Test + public void testDishonoredAchTransaction() { + // TODO: test DishonoredAchTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/DisputeAttributesStatusHistoryInnerTest.java b/src/test/java/unit/java/sdk/model/DisputeAttributesStatusHistoryInnerTest.java new file mode 100644 index 00000000..3f5c6113 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DisputeAttributesStatusHistoryInnerTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DisputeAttributesStatusHistoryInner + */ +public class DisputeAttributesStatusHistoryInnerTest { + private final DisputeAttributesStatusHistoryInner model = new DisputeAttributesStatusHistoryInner(); + + /** + * Model tests for DisputeAttributesStatusHistoryInner + */ + @Test + public void testDisputeAttributesStatusHistoryInner() { + // TODO: test DisputeAttributesStatusHistoryInner + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + +} diff --git a/src/test/java/unit/java/sdk/model/DisputeAttributesTest.java b/src/test/java/unit/java/sdk/model/DisputeAttributesTest.java new file mode 100644 index 00000000..f3e8f353 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DisputeAttributesTest.java @@ -0,0 +1,116 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.DisputeAttributesStatusHistoryInner; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DisputeAttributes + */ +public class DisputeAttributesTest { + private final DisputeAttributes model = new DisputeAttributes(); + + /** + * Model tests for DisputeAttributes + */ + @Test + public void testDisputeAttributes() { + // TODO: test DisputeAttributes + } + + /** + * Test the property 'source' + */ + @Test + public void sourceTest() { + // TODO: test source + } + + /** + * Test the property 'externalId' + */ + @Test + public void externalIdTest() { + // TODO: test externalId + } + + /** + * Test the property 'link' + */ + @Test + public void linkTest() { + // TODO: test link + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'statusHistory' + */ + @Test + public void statusHistoryTest() { + // TODO: test statusHistory + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'decisionReason' + */ + @Test + public void decisionReasonTest() { + // TODO: test decisionReason + } + +} diff --git a/src/test/java/unit/java/sdk/model/DisputeRelationshipsTest.java b/src/test/java/unit/java/sdk/model/DisputeRelationshipsTest.java new file mode 100644 index 00000000..80591f9d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DisputeRelationshipsTest.java @@ -0,0 +1,65 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DisputeRelationships + */ +public class DisputeRelationshipsTest { + private final DisputeRelationships model = new DisputeRelationships(); + + /** + * Model tests for DisputeRelationships + */ + @Test + public void testDisputeRelationships() { + // TODO: test DisputeRelationships + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'transaction' + */ + @Test + public void transactionTest() { + // TODO: test transaction + } + +} diff --git a/src/test/java/unit/java/sdk/model/DisputeSettlementTransactionTest.java b/src/test/java/unit/java/sdk/model/DisputeSettlementTransactionTest.java new file mode 100644 index 00000000..3b137ec6 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DisputeSettlementTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.FeeTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DisputeSettlementTransaction + */ +public class DisputeSettlementTransactionTest { + private final DisputeSettlementTransaction model = new DisputeSettlementTransaction(); + + /** + * Model tests for DisputeSettlementTransaction + */ + @Test + public void testDisputeSettlementTransaction() { + // TODO: test DisputeSettlementTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/DisputeTest.java b/src/test/java/unit/java/sdk/model/DisputeTest.java new file mode 100644 index 00000000..3816ccb1 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DisputeTest.java @@ -0,0 +1,74 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.DisputeAttributes; +import unit.java.sdk.model.DisputeRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Dispute + */ +public class DisputeTest { + private final Dispute model = new Dispute(); + + /** + * Model tests for Dispute + */ + @Test + public void testDispute() { + // TODO: test Dispute + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/DisputeTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/DisputeTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..69a471fa --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DisputeTransactionAllOfAttributesTest.java @@ -0,0 +1,105 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DisputeTransactionAllOfAttributes + */ +public class DisputeTransactionAllOfAttributesTest { + private final DisputeTransactionAllOfAttributes model = new DisputeTransactionAllOfAttributes(); + + /** + * Model tests for DisputeTransactionAllOfAttributes + */ + @Test + public void testDisputeTransactionAllOfAttributes() { + // TODO: test DisputeTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** + * Test the property 'disputeId' + */ + @Test + public void disputeIdTest() { + // TODO: test disputeId + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/DisputeTransactionTest.java b/src/test/java/unit/java/sdk/model/DisputeTransactionTest.java new file mode 100644 index 00000000..8278fb54 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DisputeTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.DisputeTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DisputeTransaction + */ +public class DisputeTransactionTest { + private final DisputeTransaction model = new DisputeTransaction(); + + /** + * Model tests for DisputeTransaction + */ + @Test + public void testDisputeTransaction() { + // TODO: test DisputeTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/DocumentAttributesTest.java b/src/test/java/unit/java/sdk/model/DocumentAttributesTest.java new file mode 100644 index 00000000..d1bd7984 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DocumentAttributesTest.java @@ -0,0 +1,202 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DocumentAttributes + */ +public class DocumentAttributesTest { + private final DocumentAttributes model = new DocumentAttributes(); + + /** + * Model tests for DocumentAttributes + */ + @Test + public void testDocumentAttributes() { + // TODO: test DocumentAttributes + } + + /** + * Test the property 'documentType' + */ + @Test + public void documentTypeTest() { + // TODO: test documentType + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'nationality' + */ + @Test + public void nationalityTest() { + // TODO: test nationality + } + + /** + * Test the property 'ssn' + */ + @Test + public void ssnTest() { + // TODO: test ssn + } + + /** + * Test the property 'passport' + */ + @Test + public void passportTest() { + // TODO: test passport + } + + /** + * Test the property 'matriculaConsular' + */ + @Test + public void matriculaConsularTest() { + // TODO: test matriculaConsular + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'dateOfIncorporation' + */ + @Test + public void dateOfIncorporationTest() { + // TODO: test dateOfIncorporation + } + + /** + * Test the property 'stateOfIncorporation' + */ + @Test + public void stateOfIncorporationTest() { + // TODO: test stateOfIncorporation + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** + * Test the property 'ein' + */ + @Test + public void einTest() { + // TODO: test ein + } + + /** + * Test the property 'reasonCode' + */ + @Test + public void reasonCodeTest() { + // TODO: test reasonCode + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** + * Test the property 'evaluationId' + */ + @Test + public void evaluationIdTest() { + // TODO: test evaluationId + } + + /** + * Test the property 'frontDocumentId' + */ + @Test + public void frontDocumentIdTest() { + // TODO: test frontDocumentId + } + + /** + * Test the property 'backDocumentId' + */ + @Test + public void backDocumentIdTest() { + // TODO: test backDocumentId + } + + /** + * Test the property 'frontDocumentStoreId' + */ + @Test + public void frontDocumentStoreIdTest() { + // TODO: test frontDocumentStoreId + } + + /** + * Test the property 'backDocumentStoreId' + */ + @Test + public void backDocumentStoreIdTest() { + // TODO: test backDocumentStoreId + } + +} diff --git a/src/test/java/unit/java/sdk/model/DocumentTest.java b/src/test/java/unit/java/sdk/model/DocumentTest.java new file mode 100644 index 00000000..2eb37afd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DocumentTest.java @@ -0,0 +1,65 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.DocumentAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Document + */ +public class DocumentTest { + private final Document model = new Document(); + + /** + * Model tests for Document + */ + @Test + public void testDocument() { + // TODO: test Document + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/DocumentsRelationshipDataInnerTest.java b/src/test/java/unit/java/sdk/model/DocumentsRelationshipDataInnerTest.java new file mode 100644 index 00000000..c6cd1a56 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DocumentsRelationshipDataInnerTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DocumentsRelationshipDataInner + */ +public class DocumentsRelationshipDataInnerTest { + private final DocumentsRelationshipDataInner model = new DocumentsRelationshipDataInner(); + + /** + * Model tests for DocumentsRelationshipDataInner + */ + @Test + public void testDocumentsRelationshipDataInner() { + // TODO: test DocumentsRelationshipDataInner + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/DocumentsRelationshipTest.java b/src/test/java/unit/java/sdk/model/DocumentsRelationshipTest.java new file mode 100644 index 00000000..784c99fb --- /dev/null +++ b/src/test/java/unit/java/sdk/model/DocumentsRelationshipTest.java @@ -0,0 +1,53 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import unit.java.sdk.model.DocumentsRelationshipDataInner; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DocumentsRelationship + */ +public class DocumentsRelationshipTest { + private final DocumentsRelationship model = new DocumentsRelationship(); + + /** + * Model tests for DocumentsRelationship + */ + @Test + public void testDocumentsRelationship() { + // TODO: test DocumentsRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/EntityTypeTest.java b/src/test/java/unit/java/sdk/model/EntityTypeTest.java new file mode 100644 index 00000000..02a9182b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/EntityTypeTest.java @@ -0,0 +1,32 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for EntityType + */ +public class EntityTypeTest { + /** + * Model tests for EntityType + */ + @Test + public void testEntityType() { + // TODO: test EntityType + } + +} diff --git a/src/test/java/unit/java/sdk/model/EvaluationParamsTest.java b/src/test/java/unit/java/sdk/model/EvaluationParamsTest.java new file mode 100644 index 00000000..f58943dc --- /dev/null +++ b/src/test/java/unit/java/sdk/model/EvaluationParamsTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for EvaluationParams + */ +public class EvaluationParamsTest { + private final EvaluationParams model = new EvaluationParams(); + + /** + * Model tests for EvaluationParams + */ + @Test + public void testEvaluationParams() { + // TODO: test EvaluationParams + } + + /** + * Test the property 'useSelfieVerification' + */ + @Test + public void useSelfieVerificationTest() { + // TODO: test useSelfieVerification + } + + /** + * Test the property 'requireIdVerification' + */ + @Test + public void requireIdVerificationTest() { + // TODO: test requireIdVerification + } + +} diff --git a/src/test/java/unit/java/sdk/model/EventTest.java b/src/test/java/unit/java/sdk/model/EventTest.java new file mode 100644 index 00000000..95a1fbdc --- /dev/null +++ b/src/test/java/unit/java/sdk/model/EventTest.java @@ -0,0 +1,72 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Event + */ +public class EventTest { + private final Event model = new Event(); + + /** + * Model tests for Event + */ + @Test + public void testEvent() { + // TODO: test Event + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter10Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter10Test.java new file mode 100644 index 00000000..b503e8cc --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter10Test.java @@ -0,0 +1,64 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter10 + */ +public class ExecuteFilterParameter10Test { + private final ExecuteFilterParameter10 model = new ExecuteFilterParameter10(); + + /** + * Model tests for ExecuteFilterParameter10 + */ + @Test + public void testExecuteFilterParameter10() { + // TODO: test ExecuteFilterParameter10 + } + + /** + * Test the property 'accountId' + */ + @Test + public void accountIdTest() { + // TODO: test accountId + } + + /** + * Test the property 'customerId' + */ + @Test + public void customerIdTest() { + // TODO: test customerId + } + + /** + * Test the property 'period' + */ + @Test + public void periodTest() { + // TODO: test period + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter11Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter11Test.java new file mode 100644 index 00000000..cff27738 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter11Test.java @@ -0,0 +1,114 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter11 + */ +public class ExecuteFilterParameter11Test { + private final ExecuteFilterParameter11 model = new ExecuteFilterParameter11(); + + /** + * Model tests for ExecuteFilterParameter11 + */ + @Test + public void testExecuteFilterParameter11() { + // TODO: test ExecuteFilterParameter11 + } + + /** + * Test the property 'transactionId' + */ + @Test + public void transactionIdTest() { + // TODO: test transactionId + } + + /** + * Test the property 'rewardedTransactionId' + */ + @Test + public void rewardedTransactionIdTest() { + // TODO: test rewardedTransactionId + } + + /** + * Test the property 'receivingAccountId' + */ + @Test + public void receivingAccountIdTest() { + // TODO: test receivingAccountId + } + + /** + * Test the property 'customerId' + */ + @Test + public void customerIdTest() { + // TODO: test customerId + } + + /** + * Test the property 'cardId' + */ + @Test + public void cardIdTest() { + // TODO: test cardId + } + + /** + * Test the property 'since' + */ + @Test + public void sinceTest() { + // TODO: test since + } + + /** + * Test the property 'until' + */ + @Test + public void untilTest() { + // TODO: test until + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter12Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter12Test.java new file mode 100644 index 00000000..baf9a51b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter12Test.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter12 + */ +public class ExecuteFilterParameter12Test { + private final ExecuteFilterParameter12 model = new ExecuteFilterParameter12(); + + /** + * Model tests for ExecuteFilterParameter12 + */ + @Test + public void testExecuteFilterParameter12() { + // TODO: test ExecuteFilterParameter12 + } + + /** + * Test the property 'since' + */ + @Test + public void sinceTest() { + // TODO: test since + } + + /** + * Test the property 'until' + */ + @Test + public void untilTest() { + // TODO: test until + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter13Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter13Test.java new file mode 100644 index 00000000..d1e9f87b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter13Test.java @@ -0,0 +1,76 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter13 + */ +public class ExecuteFilterParameter13Test { + private final ExecuteFilterParameter13 model = new ExecuteFilterParameter13(); + + /** + * Model tests for ExecuteFilterParameter13 + */ + @Test + public void testExecuteFilterParameter13() { + // TODO: test ExecuteFilterParameter13 + } + + /** + * Test the property 'accountId' + */ + @Test + public void accountIdTest() { + // TODO: test accountId + } + + /** + * Test the property 'customerId' + */ + @Test + public void customerIdTest() { + // TODO: test customerId + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter14Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter14Test.java new file mode 100644 index 00000000..5c70fc25 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter14Test.java @@ -0,0 +1,72 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter14 + */ +public class ExecuteFilterParameter14Test { + private final ExecuteFilterParameter14 model = new ExecuteFilterParameter14(); + + /** + * Model tests for ExecuteFilterParameter14 + */ + @Test + public void testExecuteFilterParameter14() { + // TODO: test ExecuteFilterParameter14 + } + + /** + * Test the property 'since' + */ + @Test + public void sinceTest() { + // TODO: test since + } + + /** + * Test the property 'until' + */ + @Test + public void untilTest() { + // TODO: test until + } + + /** + * Test the property 'fromId' + */ + @Test + public void fromIdTest() { + // TODO: test fromId + } + + /** + * Test the property 'toId' + */ + @Test + public void toIdTest() { + // TODO: test toId + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter15Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter15Test.java new file mode 100644 index 00000000..7f0a6235 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter15Test.java @@ -0,0 +1,72 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter15 + */ +public class ExecuteFilterParameter15Test { + private final ExecuteFilterParameter15 model = new ExecuteFilterParameter15(); + + /** + * Model tests for ExecuteFilterParameter15 + */ + @Test + public void testExecuteFilterParameter15() { + // TODO: test ExecuteFilterParameter15 + } + + /** + * Test the property 'coordinates' + */ + @Test + public void coordinatesTest() { + // TODO: test coordinates + } + + /** + * Test the property 'searchRadius' + */ + @Test + public void searchRadiusTest() { + // TODO: test searchRadius + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter16Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter16Test.java new file mode 100644 index 00000000..dcdc0e69 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter16Test.java @@ -0,0 +1,148 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter16 + */ +public class ExecuteFilterParameter16Test { + private final ExecuteFilterParameter16 model = new ExecuteFilterParameter16(); + + /** + * Model tests for ExecuteFilterParameter16 + */ + @Test + public void testExecuteFilterParameter16() { + // TODO: test ExecuteFilterParameter16 + } + + /** + * Test the property 'accountId' + */ + @Test + public void accountIdTest() { + // TODO: test accountId + } + + /** + * Test the property 'customerId' + */ + @Test + public void customerIdTest() { + // TODO: test customerId + } + + /** + * Test the property 'query' + */ + @Test + public void queryTest() { + // TODO: test query + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'since' + */ + @Test + public void sinceTest() { + // TODO: test since + } + + /** + * Test the property 'until' + */ + @Test + public void untilTest() { + // TODO: test until + } + + /** + * Test the property 'cardId' + */ + @Test + public void cardIdTest() { + // TODO: test cardId + } + + /** + * Test the property 'excludeFees' + */ + @Test + public void excludeFeesTest() { + // TODO: test excludeFees + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'fromAmount' + */ + @Test + public void fromAmountTest() { + // TODO: test fromAmount + } + + /** + * Test the property 'toAmount' + */ + @Test + public void toAmountTest() { + // TODO: test toAmount + } + + /** + * Test the property 'accountType' + */ + @Test + public void accountTypeTest() { + // TODO: test accountType + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter17Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter17Test.java new file mode 100644 index 00000000..938ee653 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter17Test.java @@ -0,0 +1,48 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter17 + */ +public class ExecuteFilterParameter17Test { + private final ExecuteFilterParameter17 model = new ExecuteFilterParameter17(); + + /** + * Model tests for ExecuteFilterParameter17 + */ + @Test + public void testExecuteFilterParameter17() { + // TODO: test ExecuteFilterParameter17 + } + + /** + * Test the property 'query' + */ + @Test + public void queryTest() { + // TODO: test query + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter18Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter18Test.java new file mode 100644 index 00000000..0a5e90e6 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter18Test.java @@ -0,0 +1,82 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter18 + */ +public class ExecuteFilterParameter18Test { + private final ExecuteFilterParameter18 model = new ExecuteFilterParameter18(); + + /** + * Model tests for ExecuteFilterParameter18 + */ + @Test + public void testExecuteFilterParameter18() { + // TODO: test ExecuteFilterParameter18 + } + + /** + * Test the property 'accountId' + */ + @Test + public void accountIdTest() { + // TODO: test accountId + } + + /** + * Test the property 'creditAccountId' + */ + @Test + public void creditAccountIdTest() { + // TODO: test creditAccountId + } + + /** + * Test the property 'customerId' + */ + @Test + public void customerIdTest() { + // TODO: test customerId + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter19Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter19Test.java new file mode 100644 index 00000000..55bf0e3e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter19Test.java @@ -0,0 +1,116 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter19 + */ +public class ExecuteFilterParameter19Test { + private final ExecuteFilterParameter19 model = new ExecuteFilterParameter19(); + + /** + * Model tests for ExecuteFilterParameter19 + */ + @Test + public void testExecuteFilterParameter19() { + // TODO: test ExecuteFilterParameter19 + } + + /** + * Test the property 'accountId' + */ + @Test + public void accountIdTest() { + // TODO: test accountId + } + + /** + * Test the property 'customerId' + */ + @Test + public void customerIdTest() { + // TODO: test customerId + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'since' + */ + @Test + public void sinceTest() { + // TODO: test since + } + + /** + * Test the property 'until' + */ + @Test + public void untilTest() { + // TODO: test until + } + + /** + * Test the property 'fromAmount' + */ + @Test + public void fromAmountTest() { + // TODO: test fromAmount + } + + /** + * Test the property 'toAmount' + */ + @Test + public void toAmountTest() { + // TODO: test toAmount + } + + /** + * Test the property 'checkNumber' + */ + @Test + public void checkNumberTest() { + // TODO: test checkNumber + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter1Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter1Test.java new file mode 100644 index 00000000..8e45fa84 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter1Test.java @@ -0,0 +1,76 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter1 + */ +public class ExecuteFilterParameter1Test { + private final ExecuteFilterParameter1 model = new ExecuteFilterParameter1(); + + /** + * Model tests for ExecuteFilterParameter1 + */ + @Test + public void testExecuteFilterParameter1() { + // TODO: test ExecuteFilterParameter1 + } + + /** + * Test the property 'query' + */ + @Test + public void queryTest() { + // TODO: test query + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter20Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter20Test.java new file mode 100644 index 00000000..4ba5afdb --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter20Test.java @@ -0,0 +1,116 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter20 + */ +public class ExecuteFilterParameter20Test { + private final ExecuteFilterParameter20 model = new ExecuteFilterParameter20(); + + /** + * Model tests for ExecuteFilterParameter20 + */ + @Test + public void testExecuteFilterParameter20() { + // TODO: test ExecuteFilterParameter20 + } + + /** + * Test the property 'accountId' + */ + @Test + public void accountIdTest() { + // TODO: test accountId + } + + /** + * Test the property 'customerId' + */ + @Test + public void customerIdTest() { + // TODO: test customerId + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'since' + */ + @Test + public void sinceTest() { + // TODO: test since + } + + /** + * Test the property 'until' + */ + @Test + public void untilTest() { + // TODO: test until + } + + /** + * Test the property 'fromAmount' + */ + @Test + public void fromAmountTest() { + // TODO: test fromAmount + } + + /** + * Test the property 'toAmount' + */ + @Test + public void toAmountTest() { + // TODO: test toAmount + } + + /** + * Test the property 'checkNumber' + */ + @Test + public void checkNumberTest() { + // TODO: test checkNumber + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter2Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter2Test.java new file mode 100644 index 00000000..1d8ca913 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter2Test.java @@ -0,0 +1,93 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter2 + */ +public class ExecuteFilterParameter2Test { + private final ExecuteFilterParameter2 model = new ExecuteFilterParameter2(); + + /** + * Model tests for ExecuteFilterParameter2 + */ + @Test + public void testExecuteFilterParameter2() { + // TODO: test ExecuteFilterParameter2 + } + + /** + * Test the property 'customerId' + */ + @Test + public void customerIdTest() { + // TODO: test customerId + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'fromBalance' + */ + @Test + public void fromBalanceTest() { + // TODO: test fromBalance + } + + /** + * Test the property 'toBalance' + */ + @Test + public void toBalanceTest() { + // TODO: test toBalance + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter3Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter3Test.java new file mode 100644 index 00000000..de9dca6f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter3Test.java @@ -0,0 +1,76 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter3 + */ +public class ExecuteFilterParameter3Test { + private final ExecuteFilterParameter3 model = new ExecuteFilterParameter3(); + + /** + * Model tests for ExecuteFilterParameter3 + */ + @Test + public void testExecuteFilterParameter3() { + // TODO: test ExecuteFilterParameter3 + } + + /** + * Test the property 'query' + */ + @Test + public void queryTest() { + // TODO: test query + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter4Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter4Test.java new file mode 100644 index 00000000..4b2082fe --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter4Test.java @@ -0,0 +1,148 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter4 + */ +public class ExecuteFilterParameter4Test { + private final ExecuteFilterParameter4 model = new ExecuteFilterParameter4(); + + /** + * Model tests for ExecuteFilterParameter4 + */ + @Test + public void testExecuteFilterParameter4() { + // TODO: test ExecuteFilterParameter4 + } + + /** + * Test the property 'accountId' + */ + @Test + public void accountIdTest() { + // TODO: test accountId + } + + /** + * Test the property 'customerId' + */ + @Test + public void customerIdTest() { + // TODO: test customerId + } + + /** + * Test the property 'counterpartyAccountId' + */ + @Test + public void counterpartyAccountIdTest() { + // TODO: test counterpartyAccountId + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'since' + */ + @Test + public void sinceTest() { + // TODO: test since + } + + /** + * Test the property 'until' + */ + @Test + public void untilTest() { + // TODO: test until + } + + /** + * Test the property 'fromAmount' + */ + @Test + public void fromAmountTest() { + // TODO: test fromAmount + } + + /** + * Test the property 'toAmount' + */ + @Test + public void toAmountTest() { + // TODO: test toAmount + } + + /** + * Test the property 'recurringPaymentId' + */ + @Test + public void recurringPaymentIdTest() { + // TODO: test recurringPaymentId + } + + /** + * Test the property 'feature' + */ + @Test + public void featureTest() { + // TODO: test feature + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter5Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter5Test.java new file mode 100644 index 00000000..7cee9537 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter5Test.java @@ -0,0 +1,84 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter5 + */ +public class ExecuteFilterParameter5Test { + private final ExecuteFilterParameter5 model = new ExecuteFilterParameter5(); + + /** + * Model tests for ExecuteFilterParameter5 + */ + @Test + public void testExecuteFilterParameter5() { + // TODO: test ExecuteFilterParameter5 + } + + /** + * Test the property 'customerId' + */ + @Test + public void customerIdTest() { + // TODO: test customerId + } + + /** + * Test the property 'accountNumber' + */ + @Test + public void accountNumberTest() { + // TODO: test accountNumber + } + + /** + * Test the property 'routingNumber' + */ + @Test + public void routingNumberTest() { + // TODO: test routingNumber + } + + /** + * Test the property 'permissions' + */ + @Test + public void permissionsTest() { + // TODO: test permissions + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter6Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter6Test.java new file mode 100644 index 00000000..b59eb655 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter6Test.java @@ -0,0 +1,106 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter6 + */ +public class ExecuteFilterParameter6Test { + private final ExecuteFilterParameter6 model = new ExecuteFilterParameter6(); + + /** + * Model tests for ExecuteFilterParameter6 + */ + @Test + public void testExecuteFilterParameter6() { + // TODO: test ExecuteFilterParameter6 + } + + /** + * Test the property 'accountId' + */ + @Test + public void accountIdTest() { + // TODO: test accountId + } + + /** + * Test the property 'customerId' + */ + @Test + public void customerIdTest() { + // TODO: test customerId + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'fromStartTime' + */ + @Test + public void fromStartTimeTest() { + // TODO: test fromStartTime + } + + /** + * Test the property 'toStartTime' + */ + @Test + public void toStartTimeTest() { + // TODO: test toStartTime + } + + /** + * Test the property 'fromEndTime' + */ + @Test + public void fromEndTimeTest() { + // TODO: test fromEndTime + } + + /** + * Test the property 'toEndTime' + */ + @Test + public void toEndTimeTest() { + // TODO: test toEndTime + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter7Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter7Test.java new file mode 100644 index 00000000..4b8c1ab9 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter7Test.java @@ -0,0 +1,76 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter7 + */ +public class ExecuteFilterParameter7Test { + private final ExecuteFilterParameter7 model = new ExecuteFilterParameter7(); + + /** + * Model tests for ExecuteFilterParameter7 + */ + @Test + public void testExecuteFilterParameter7() { + // TODO: test ExecuteFilterParameter7 + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'accountId' + */ + @Test + public void accountIdTest() { + // TODO: test accountId + } + + /** + * Test the property 'customerId' + */ + @Test + public void customerIdTest() { + // TODO: test customerId + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter8Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter8Test.java new file mode 100644 index 00000000..eac9a9ce --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter8Test.java @@ -0,0 +1,130 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter8 + */ +public class ExecuteFilterParameter8Test { + private final ExecuteFilterParameter8 model = new ExecuteFilterParameter8(); + + /** + * Model tests for ExecuteFilterParameter8 + */ + @Test + public void testExecuteFilterParameter8() { + // TODO: test ExecuteFilterParameter8 + } + + /** + * Test the property 'accountId' + */ + @Test + public void accountIdTest() { + // TODO: test accountId + } + + /** + * Test the property 'accountType' + */ + @Test + public void accountTypeTest() { + // TODO: test accountType + } + + /** + * Test the property 'customerId' + */ + @Test + public void customerIdTest() { + // TODO: test customerId + } + + /** + * Test the property 'cardId' + */ + @Test + public void cardIdTest() { + // TODO: test cardId + } + + /** + * Test the property 'includeNonAuthorized' + */ + @Test + public void includeNonAuthorizedTest() { + // TODO: test includeNonAuthorized + } + + /** + * Test the property 'merchantCategoryCode' + */ + @Test + public void merchantCategoryCodeTest() { + // TODO: test merchantCategoryCode + } + + /** + * Test the property 'since' + */ + @Test + public void sinceTest() { + // TODO: test since + } + + /** + * Test the property 'until' + */ + @Test + public void untilTest() { + // TODO: test until + } + + /** + * Test the property 'fromAmount' + */ + @Test + public void fromAmountTest() { + // TODO: test fromAmount + } + + /** + * Test the property 'toAmount' + */ + @Test + public void toAmountTest() { + // TODO: test toAmount + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameter9Test.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter9Test.java new file mode 100644 index 00000000..2bfbdf14 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameter9Test.java @@ -0,0 +1,82 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter9 + */ +public class ExecuteFilterParameter9Test { + private final ExecuteFilterParameter9 model = new ExecuteFilterParameter9(); + + /** + * Model tests for ExecuteFilterParameter9 + */ + @Test + public void testExecuteFilterParameter9() { + // TODO: test ExecuteFilterParameter9 + } + + /** + * Test the property 'accountId' + */ + @Test + public void accountIdTest() { + // TODO: test accountId + } + + /** + * Test the property 'customerId' + */ + @Test + public void customerIdTest() { + // TODO: test customerId + } + + /** + * Test the property 'merchantCategoryCode' + */ + @Test + public void merchantCategoryCodeTest() { + // TODO: test merchantCategoryCode + } + + /** + * Test the property 'fromAmount' + */ + @Test + public void fromAmountTest() { + // TODO: test fromAmount + } + + /** + * Test the property 'toAmount' + */ + @Test + public void toAmountTest() { + // TODO: test toAmount + } + +} diff --git a/src/test/java/unit/java/sdk/model/ExecuteFilterParameterTest.java b/src/test/java/unit/java/sdk/model/ExecuteFilterParameterTest.java new file mode 100644 index 00000000..017c9f65 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ExecuteFilterParameterTest.java @@ -0,0 +1,76 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ExecuteFilterParameter + */ +public class ExecuteFilterParameterTest { + private final ExecuteFilterParameter model = new ExecuteFilterParameter(); + + /** + * Model tests for ExecuteFilterParameter + */ + @Test + public void testExecuteFilterParameter() { + // TODO: test ExecuteFilterParameter + } + + /** + * Test the property 'query' + */ + @Test + public void queryTest() { + // TODO: test query + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/FeeAttributesTest.java b/src/test/java/unit/java/sdk/model/FeeAttributesTest.java new file mode 100644 index 00000000..dad1c03e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/FeeAttributesTest.java @@ -0,0 +1,64 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for FeeAttributes + */ +public class FeeAttributesTest { + private final FeeAttributes model = new FeeAttributes(); + + /** + * Model tests for FeeAttributes + */ + @Test + public void testFeeAttributes() { + // TODO: test FeeAttributes + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/FeeRelationshipsTest.java b/src/test/java/unit/java/sdk/model/FeeRelationshipsTest.java new file mode 100644 index 00000000..98771341 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/FeeRelationshipsTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for FeeRelationships + */ +public class FeeRelationshipsTest { + private final FeeRelationships model = new FeeRelationships(); + + /** + * Model tests for FeeRelationships + */ + @Test + public void testFeeRelationships() { + // TODO: test FeeRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + +} diff --git a/src/test/java/unit/java/sdk/model/FeeTest.java b/src/test/java/unit/java/sdk/model/FeeTest.java new file mode 100644 index 00000000..89946ada --- /dev/null +++ b/src/test/java/unit/java/sdk/model/FeeTest.java @@ -0,0 +1,74 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.FeeAttributes; +import unit.java.sdk.model.FeeRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Fee + */ +public class FeeTest { + private final Fee model = new Fee(); + + /** + * Model tests for Fee + */ + @Test + public void testFee() { + // TODO: test Fee + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/FeeTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/FeeTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..e538aaba --- /dev/null +++ b/src/test/java/unit/java/sdk/model/FeeTransactionAllOfAttributesTest.java @@ -0,0 +1,89 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for FeeTransactionAllOfAttributes + */ +public class FeeTransactionAllOfAttributesTest { + private final FeeTransactionAllOfAttributes model = new FeeTransactionAllOfAttributes(); + + /** + * Model tests for FeeTransactionAllOfAttributes + */ + @Test + public void testFeeTransactionAllOfAttributes() { + // TODO: test FeeTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/FeeTransactionTest.java b/src/test/java/unit/java/sdk/model/FeeTransactionTest.java new file mode 100644 index 00000000..e04a71f3 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/FeeTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.FeeTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for FeeTransaction + */ +public class FeeTransactionTest { + private final FeeTransaction model = new FeeTransaction(); + + /** + * Model tests for FeeTransaction + */ + @Test + public void testFeeTransaction() { + // TODO: test FeeTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/FreezeAccountRequestAttributesTest.java b/src/test/java/unit/java/sdk/model/FreezeAccountRequestAttributesTest.java new file mode 100644 index 00000000..46f8d669 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/FreezeAccountRequestAttributesTest.java @@ -0,0 +1,60 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for FreezeAccountRequestAttributes + */ +public class FreezeAccountRequestAttributesTest { + private final FreezeAccountRequestAttributes model = new FreezeAccountRequestAttributes(); + + /** + * Model tests for FreezeAccountRequestAttributes + */ + @Test + public void testFreezeAccountRequestAttributes() { + // TODO: test FreezeAccountRequestAttributes + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** + * Test the property 'reasonText' + */ + @Test + public void reasonTextTest() { + // TODO: test reasonText + } + +} diff --git a/src/test/java/unit/java/sdk/model/FreezeAccountRequestTest.java b/src/test/java/unit/java/sdk/model/FreezeAccountRequestTest.java new file mode 100644 index 00000000..fbb3bec2 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/FreezeAccountRequestTest.java @@ -0,0 +1,48 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for FreezeAccountRequest + */ +public class FreezeAccountRequestTest { + private final FreezeAccountRequest model = new FreezeAccountRequest(); + + /** + * Model tests for FreezeAccountRequest + */ + @Test + public void testFreezeAccountRequest() { + // TODO: test FreezeAccountRequest + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/FullNameTest.java b/src/test/java/unit/java/sdk/model/FullNameTest.java new file mode 100644 index 00000000..ca4bec90 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/FullNameTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for FullName + */ +public class FullNameTest { + private final FullName model = new FullName(); + + /** + * Model tests for FullName + */ + @Test + public void testFullName() { + // TODO: test FullName + } + + /** + * Test the property 'first' + */ + @Test + public void firstTest() { + // TODO: test first + } + + /** + * Test the property 'last' + */ + @Test + public void lastTest() { + // TODO: test last + } + +} diff --git a/src/test/java/unit/java/sdk/model/GrantorTest.java b/src/test/java/unit/java/sdk/model/GrantorTest.java new file mode 100644 index 00000000..3a16fb45 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/GrantorTest.java @@ -0,0 +1,150 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Grantor + */ +public class GrantorTest { + private final Grantor model = new Grantor(); + + /** + * Model tests for Grantor + */ + @Test + public void testGrantor() { + // TODO: test Grantor + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'ssn' + */ + @Test + public void ssnTest() { + // TODO: test ssn + } + + /** + * Test the property 'passport' + */ + @Test + public void passportTest() { + // TODO: test passport + } + + /** + * Test the property 'matriculaConsular' + */ + @Test + public void matriculaConsularTest() { + // TODO: test matriculaConsular + } + + /** + * Test the property 'nationality' + */ + @Test + public void nationalityTest() { + // TODO: test nationality + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** + * Test the property 'evaluationId' + */ + @Test + public void evaluationIdTest() { + // TODO: test evaluationId + } + + /** + * Test the property 'evaluationFlags' + */ + @Test + public void evaluationFlagsTest() { + // TODO: test evaluationFlags + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'maskedSSN' + */ + @Test + public void maskedSSNTest() { + // TODO: test maskedSSN + } + +} diff --git a/src/test/java/unit/java/sdk/model/HealthcareAmountsTest.java b/src/test/java/unit/java/sdk/model/HealthcareAmountsTest.java new file mode 100644 index 00000000..2b6d0b61 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/HealthcareAmountsTest.java @@ -0,0 +1,88 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for HealthcareAmounts + */ +public class HealthcareAmountsTest { + private final HealthcareAmounts model = new HealthcareAmounts(); + + /** + * Model tests for HealthcareAmounts + */ + @Test + public void testHealthcareAmounts() { + // TODO: test HealthcareAmounts + } + + /** + * Test the property 'transitAmount' + */ + @Test + public void transitAmountTest() { + // TODO: test transitAmount + } + + /** + * Test the property 'prescriptionRXAmount' + */ + @Test + public void prescriptionRXAmountTest() { + // TODO: test prescriptionRXAmount + } + + /** + * Test the property 'visionOpticalAmount' + */ + @Test + public void visionOpticalAmountTest() { + // TODO: test visionOpticalAmount + } + + /** + * Test the property 'clinicOtherQualifiedMedicalAmount' + */ + @Test + public void clinicOtherQualifiedMedicalAmountTest() { + // TODO: test clinicOtherQualifiedMedicalAmount + } + + /** + * Test the property 'dentalAmount' + */ + @Test + public void dentalAmountTest() { + // TODO: test dentalAmount + } + + /** + * Test the property 'totalHealthcareAmount' + */ + @Test + public void totalHealthcareAmountTest() { + // TODO: test totalHealthcareAmount + } + +} diff --git a/src/test/java/unit/java/sdk/model/IncludedResourceInnerTest.java b/src/test/java/unit/java/sdk/model/IncludedResourceInnerTest.java new file mode 100644 index 00000000..2bd6a4a7 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/IncludedResourceInnerTest.java @@ -0,0 +1,72 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for IncludedResourceInner + */ +public class IncludedResourceInnerTest { + private final IncludedResourceInner model = new IncludedResourceInner(); + + /** + * Model tests for IncludedResourceInner + */ + @Test + public void testIncludedResourceInner() { + // TODO: test IncludedResourceInner + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/IncomingAchRelationshipDataTest.java b/src/test/java/unit/java/sdk/model/IncomingAchRelationshipDataTest.java new file mode 100644 index 00000000..c900115a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/IncomingAchRelationshipDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for IncomingAchRelationshipData + */ +public class IncomingAchRelationshipDataTest { + private final IncomingAchRelationshipData model = new IncomingAchRelationshipData(); + + /** + * Model tests for IncomingAchRelationshipData + */ + @Test + public void testIncomingAchRelationshipData() { + // TODO: test IncomingAchRelationshipData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/IncomingAchRelationshipTest.java b/src/test/java/unit/java/sdk/model/IncomingAchRelationshipTest.java new file mode 100644 index 00000000..43801bad --- /dev/null +++ b/src/test/java/unit/java/sdk/model/IncomingAchRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.IncomingAchRelationshipData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for IncomingAchRelationship + */ +public class IncomingAchRelationshipTest { + private final IncomingAchRelationship model = new IncomingAchRelationship(); + + /** + * Model tests for IncomingAchRelationship + */ + @Test + public void testIncomingAchRelationship() { + // TODO: test IncomingAchRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/IndividualApplicationAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/IndividualApplicationAllOfAttributesTest.java new file mode 100644 index 00000000..109d319a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/IndividualApplicationAllOfAttributesTest.java @@ -0,0 +1,419 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.ApplicationStatus; +import unit.java.sdk.model.BusinessVertical; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Industry; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.PowerOfAttorneyAgent; +import unit.java.sdk.model.SoleProprietorshipAnnualRevenue; +import unit.java.sdk.model.SoleProprietorshipNumberOfEmployees; +import unit.java.sdk.model.SourceOfIncome; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for IndividualApplicationAllOfAttributes + */ +public class IndividualApplicationAllOfAttributesTest { + private final IndividualApplicationAllOfAttributes model = new IndividualApplicationAllOfAttributes(); + + /** + * Model tests for IndividualApplicationAllOfAttributes + */ + @Test + public void testIndividualApplicationAllOfAttributes() { + // TODO: test IndividualApplicationAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'evaluationOutcome' + */ + @Test + public void evaluationOutcomeTest() { + // TODO: test evaluationOutcome + } + + /** + * Test the property 'evaluationId' + */ + @Test + public void evaluationIdTest() { + // TODO: test evaluationId + } + + /** + * Test the property 'evaluationEntityId' + */ + @Test + public void evaluationEntityIdTest() { + // TODO: test evaluationEntityId + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'ssn' + */ + @Test + public void ssnTest() { + // TODO: test ssn + } + + /** + * Test the property 'passport' + */ + @Test + public void passportTest() { + // TODO: test passport + } + + /** + * Test the property 'nationality' + */ + @Test + public void nationalityTest() { + // TODO: test nationality + } + + /** + * Test the property 'matriculaConsular' + */ + @Test + public void matriculaConsularTest() { + // TODO: test matriculaConsular + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** + * Test the property 'dba' + */ + @Test + public void dbaTest() { + // TODO: test dba + } + + /** + * Test the property 'ein' + */ + @Test + public void einTest() { + // TODO: test ein + } + + /** + * Test the property 'ip' + */ + @Test + public void ipTest() { + // TODO: test ip + } + + /** + * Test the property 'soleProprietorship' + */ + @Test + public void soleProprietorshipTest() { + // TODO: test soleProprietorship + } + + /** + * Test the property 'decisionMethod' + */ + @Test + public void decisionMethodTest() { + // TODO: test decisionMethod + } + + /** + * Test the property 'decisionUserId' + */ + @Test + public void decisionUserIdTest() { + // TODO: test decisionUserId + } + + /** + * Test the property 'decisionReason' + */ + @Test + public void decisionReasonTest() { + // TODO: test decisionReason + } + + /** + * Test the property 'decisionDateTime' + */ + @Test + public void decisionDateTimeTest() { + // TODO: test decisionDateTime + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'riskRate' + */ + @Test + public void riskRateTest() { + // TODO: test riskRate + } + + /** + * Test the property 'evaluationFlags' + */ + @Test + public void evaluationFlagsTest() { + // TODO: test evaluationFlags + } + + /** + * Test the property 'evaluationScores' + */ + @Test + public void evaluationScoresTest() { + // TODO: test evaluationScores + } + + /** + * Test the property 'ipLocationDetails' + */ + @Test + public void ipLocationDetailsTest() { + // TODO: test ipLocationDetails + } + + /** + * Test the property 'phoneLocationDetails' + */ + @Test + public void phoneLocationDetailsTest() { + // TODO: test phoneLocationDetails + } + + /** + * Test the property 'maskedSSN' + */ + @Test + public void maskedSSNTest() { + // TODO: test maskedSSN + } + + /** + * Test the property 'maskedPassport' + */ + @Test + public void maskedPassportTest() { + // TODO: test maskedPassport + } + + /** + * Test the property 'maskedMatriculaConsular' + */ + @Test + public void maskedMatriculaConsularTest() { + // TODO: test maskedMatriculaConsular + } + + /** + * Test the property 'jwtSubject' + */ + @Test + public void jwtSubjectTest() { + // TODO: test jwtSubject + } + + /** + * Test the property 'archived' + */ + @Test + public void archivedTest() { + // TODO: test archived + } + + /** + * Test the property 'powerOfAttorneyAgent' + */ + @Test + public void powerOfAttorneyAgentTest() { + // TODO: test powerOfAttorneyAgent + } + + /** + * Test the property 'industry' + */ + @Test + public void industryTest() { + // TODO: test industry + } + + /** + * Test the property 'idTheftScore' + */ + @Test + public void idTheftScoreTest() { + // TODO: test idTheftScore + } + + /** + * Test the property 'occupation' + */ + @Test + public void occupationTest() { + // TODO: test occupation + } + + /** + * Test the property 'annualIncome' + */ + @Test + public void annualIncomeTest() { + // TODO: test annualIncome + } + + /** + * Test the property 'sourceOfIncome' + */ + @Test + public void sourceOfIncomeTest() { + // TODO: test sourceOfIncome + } + + /** + * Test the property 'annualRevenue' + */ + @Test + public void annualRevenueTest() { + // TODO: test annualRevenue + } + + /** + * Test the property 'numberOfEmployees' + */ + @Test + public void numberOfEmployeesTest() { + // TODO: test numberOfEmployees + } + + /** + * Test the property 'businessVertical' + */ + @Test + public void businessVerticalTest() { + // TODO: test businessVertical + } + + /** + * Test the property 'website' + */ + @Test + public void websiteTest() { + // TODO: test website + } + +} diff --git a/src/test/java/unit/java/sdk/model/IndividualApplicationTest.java b/src/test/java/unit/java/sdk/model/IndividualApplicationTest.java new file mode 100644 index 00000000..cb86c5c3 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/IndividualApplicationTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Application; +import unit.java.sdk.model.ApplicationRelationships; +import unit.java.sdk.model.IndividualApplicationAllOfAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for IndividualApplication + */ +public class IndividualApplicationTest { + private final IndividualApplication model = new IndividualApplication(); + + /** + * Model tests for IndividualApplication + */ + @Test + public void testIndividualApplication() { + // TODO: test IndividualApplication + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/IndividualCustomerAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/IndividualCustomerAllOfAttributesTest.java new file mode 100644 index 00000000..56e9a775 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/IndividualCustomerAllOfAttributesTest.java @@ -0,0 +1,228 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.AuthorizedUser; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for IndividualCustomerAllOfAttributes + */ +public class IndividualCustomerAllOfAttributesTest { + private final IndividualCustomerAllOfAttributes model = new IndividualCustomerAllOfAttributes(); + + /** + * Model tests for IndividualCustomerAllOfAttributes + */ + @Test + public void testIndividualCustomerAllOfAttributes() { + // TODO: test IndividualCustomerAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'ssn' + */ + @Test + public void ssnTest() { + // TODO: test ssn + } + + /** + * Test the property 'passport' + */ + @Test + public void passportTest() { + // TODO: test passport + } + + /** + * Test the property 'nationality' + */ + @Test + public void nationalityTest() { + // TODO: test nationality + } + + /** + * Test the property 'matriculaConsular' + */ + @Test + public void matriculaConsularTest() { + // TODO: test matriculaConsular + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** + * Test the property 'ein' + */ + @Test + public void einTest() { + // TODO: test ein + } + + /** + * Test the property 'dba' + */ + @Test + public void dbaTest() { + // TODO: test dba + } + + /** + * Test the property 'soleProprietorship' + */ + @Test + public void soleProprietorshipTest() { + // TODO: test soleProprietorship + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'riskRate' + */ + @Test + public void riskRateTest() { + // TODO: test riskRate + } + + /** + * Test the property 'maskedSSN' + */ + @Test + public void maskedSSNTest() { + // TODO: test maskedSSN + } + + /** + * Test the property 'maskedPassport' + */ + @Test + public void maskedPassportTest() { + // TODO: test maskedPassport + } + + /** + * Test the property 'maskedMatriculaConsular' + */ + @Test + public void maskedMatriculaConsularTest() { + // TODO: test maskedMatriculaConsular + } + + /** + * Test the property 'authorizedUsers' + */ + @Test + public void authorizedUsersTest() { + // TODO: test authorizedUsers + } + + /** + * Test the property 'jwtSubject' + */ + @Test + public void jwtSubjectTest() { + // TODO: test jwtSubject + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'archiveReason' + */ + @Test + public void archiveReasonTest() { + // TODO: test archiveReason + } + +} diff --git a/src/test/java/unit/java/sdk/model/IndividualCustomerTest.java b/src/test/java/unit/java/sdk/model/IndividualCustomerTest.java new file mode 100644 index 00000000..5ec91b8d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/IndividualCustomerTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Customer; +import unit.java.sdk.model.CustomerRelationships; +import unit.java.sdk.model.IndividualCustomerAllOfAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for IndividualCustomer + */ +public class IndividualCustomerTest { + private final IndividualCustomer model = new IndividualCustomer(); + + /** + * Model tests for IndividualCustomer + */ + @Test + public void testIndividualCustomer() { + // TODO: test IndividualCustomer + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/IndividualDebitCardAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/IndividualDebitCardAllOfAttributesTest.java new file mode 100644 index 00000000..08040645 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/IndividualDebitCardAllOfAttributesTest.java @@ -0,0 +1,123 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.PhysicalCardStatus; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for IndividualDebitCardAllOfAttributes + */ +public class IndividualDebitCardAllOfAttributesTest { + private final IndividualDebitCardAllOfAttributes model = new IndividualDebitCardAllOfAttributes(); + + /** + * Model tests for IndividualDebitCardAllOfAttributes + */ + @Test + public void testIndividualDebitCardAllOfAttributes() { + // TODO: test IndividualDebitCardAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'last4Digits' + */ + @Test + public void last4DigitsTest() { + // TODO: test last4Digits + } + + /** + * Test the property 'expirationDate' + */ + @Test + public void expirationDateTest() { + // TODO: test expirationDate + } + + /** + * Test the property 'shippingAddress' + */ + @Test + public void shippingAddressTest() { + // TODO: test shippingAddress + } + + /** + * Test the property 'bin' + */ + @Test + public void binTest() { + // TODO: test bin + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'design' + */ + @Test + public void designTest() { + // TODO: test design + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'freezeReason' + */ + @Test + public void freezeReasonTest() { + // TODO: test freezeReason + } + +} diff --git a/src/test/java/unit/java/sdk/model/IndividualDebitCardTest.java b/src/test/java/unit/java/sdk/model/IndividualDebitCardTest.java new file mode 100644 index 00000000..307e932c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/IndividualDebitCardTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Card; +import unit.java.sdk.model.CardRelationships; +import unit.java.sdk.model.IndividualDebitCardAllOfAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for IndividualDebitCard + */ +public class IndividualDebitCardTest { + private final IndividualDebitCard model = new IndividualDebitCard(); + + /** + * Model tests for IndividualDebitCard + */ + @Test + public void testIndividualDebitCard() { + // TODO: test IndividualDebitCard + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/IndividualVirtualDebitCardAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/IndividualVirtualDebitCardAllOfAttributesTest.java new file mode 100644 index 00000000..d897bb9b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/IndividualVirtualDebitCardAllOfAttributesTest.java @@ -0,0 +1,106 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.VirtualCardStatus; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for IndividualVirtualDebitCardAllOfAttributes + */ +public class IndividualVirtualDebitCardAllOfAttributesTest { + private final IndividualVirtualDebitCardAllOfAttributes model = new IndividualVirtualDebitCardAllOfAttributes(); + + /** + * Model tests for IndividualVirtualDebitCardAllOfAttributes + */ + @Test + public void testIndividualVirtualDebitCardAllOfAttributes() { + // TODO: test IndividualVirtualDebitCardAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'last4Digits' + */ + @Test + public void last4DigitsTest() { + // TODO: test last4Digits + } + + /** + * Test the property 'expirationDate' + */ + @Test + public void expirationDateTest() { + // TODO: test expirationDate + } + + /** + * Test the property 'bin' + */ + @Test + public void binTest() { + // TODO: test bin + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'freezeReason' + */ + @Test + public void freezeReasonTest() { + // TODO: test freezeReason + } + +} diff --git a/src/test/java/unit/java/sdk/model/IndividualVirtualDebitCardTest.java b/src/test/java/unit/java/sdk/model/IndividualVirtualDebitCardTest.java new file mode 100644 index 00000000..45bee011 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/IndividualVirtualDebitCardTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Card; +import unit.java.sdk.model.CardRelationships; +import unit.java.sdk.model.IndividualVirtualDebitCardAllOfAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for IndividualVirtualDebitCard + */ +public class IndividualVirtualDebitCardTest { + private final IndividualVirtualDebitCard model = new IndividualVirtualDebitCard(); + + /** + * Model tests for IndividualVirtualDebitCard + */ + @Test + public void testIndividualVirtualDebitCard() { + // TODO: test IndividualVirtualDebitCard + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/IndustryTest.java b/src/test/java/unit/java/sdk/model/IndustryTest.java new file mode 100644 index 00000000..ac5d6862 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/IndustryTest.java @@ -0,0 +1,32 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Industry + */ +public class IndustryTest { + /** + * Model tests for Industry + */ + @Test + public void testIndustry() { + // TODO: test Industry + } + +} diff --git a/src/test/java/unit/java/sdk/model/InstitutionAttributesTest.java b/src/test/java/unit/java/sdk/model/InstitutionAttributesTest.java new file mode 100644 index 00000000..6ca9824d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/InstitutionAttributesTest.java @@ -0,0 +1,80 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for InstitutionAttributes + */ +public class InstitutionAttributesTest { + private final InstitutionAttributes model = new InstitutionAttributes(); + + /** + * Model tests for InstitutionAttributes + */ + @Test + public void testInstitutionAttributes() { + // TODO: test InstitutionAttributes + } + + /** + * Test the property 'routingNumber' + */ + @Test + public void routingNumberTest() { + // TODO: test routingNumber + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'isWireSupported' + */ + @Test + public void isWireSupportedTest() { + // TODO: test isWireSupported + } + + /** + * Test the property 'isACHSupported' + */ + @Test + public void isACHSupportedTest() { + // TODO: test isACHSupported + } + +} diff --git a/src/test/java/unit/java/sdk/model/InstitutionTest.java b/src/test/java/unit/java/sdk/model/InstitutionTest.java new file mode 100644 index 00000000..7227e691 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/InstitutionTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.InstitutionAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Institution + */ +public class InstitutionTest { + private final Institution model = new Institution(); + + /** + * Model tests for Institution + */ + @Test + public void testInstitution() { + // TODO: test Institution + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/InterchangeTransactionTest.java b/src/test/java/unit/java/sdk/model/InterchangeTransactionTest.java new file mode 100644 index 00000000..a0d01624 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/InterchangeTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.FeeTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for InterchangeTransaction + */ +public class InterchangeTransactionTest { + private final InterchangeTransaction model = new InterchangeTransaction(); + + /** + * Model tests for InterchangeTransaction + */ + @Test + public void testInterchangeTransaction() { + // TODO: test InterchangeTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/InterestShareTransactionTest.java b/src/test/java/unit/java/sdk/model/InterestShareTransactionTest.java new file mode 100644 index 00000000..60d81b96 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/InterestShareTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.FeeTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for InterestShareTransaction + */ +public class InterestShareTransactionTest { + private final InterestShareTransaction model = new InterestShareTransaction(); + + /** + * Model tests for InterestShareTransaction + */ + @Test + public void testInterestShareTransaction() { + // TODO: test InterestShareTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/InterestTransactionTest.java b/src/test/java/unit/java/sdk/model/InterestTransactionTest.java new file mode 100644 index 00000000..38002178 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/InterestTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.FeeTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for InterestTransaction + */ +public class InterestTransactionTest { + private final InterestTransaction model = new InterestTransaction(); + + /** + * Model tests for InterestTransaction + */ + @Test + public void testInterestTransaction() { + // TODO: test InterestTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/Limits1Test.java b/src/test/java/unit/java/sdk/model/Limits1Test.java new file mode 100644 index 00000000..1679f1c9 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/Limits1Test.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Limits1 + */ +public class Limits1Test { + private final Limits1 model = new Limits1(); + + /** + * Model tests for Limits1 + */ + @Test + public void testLimits1() { + // TODO: test Limits1 + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/unit/java/sdk/model/LimitsAttributesCardLimitsTest.java b/src/test/java/unit/java/sdk/model/LimitsAttributesCardLimitsTest.java new file mode 100644 index 00000000..0002debb --- /dev/null +++ b/src/test/java/unit/java/sdk/model/LimitsAttributesCardLimitsTest.java @@ -0,0 +1,73 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for LimitsAttributesCardLimits + */ +public class LimitsAttributesCardLimitsTest { + private final LimitsAttributesCardLimits model = new LimitsAttributesCardLimits(); + + /** + * Model tests for LimitsAttributesCardLimits + */ + @Test + public void testLimitsAttributesCardLimits() { + // TODO: test LimitsAttributesCardLimits + } + + /** + * Test the property 'dailyWithdrawal' + */ + @Test + public void dailyWithdrawalTest() { + // TODO: test dailyWithdrawal + } + + /** + * Test the property 'dailyDeposit' + */ + @Test + public void dailyDepositTest() { + // TODO: test dailyDeposit + } + + /** + * Test the property 'dailyPurchase' + */ + @Test + public void dailyPurchaseTest() { + // TODO: test dailyPurchase + } + + /** + * Test the property 'dailyCardTransaction' + */ + @Test + public void dailyCardTransactionTest() { + // TODO: test dailyCardTransaction + } + +} diff --git a/src/test/java/unit/java/sdk/model/LimitsAttributesCardTest.java b/src/test/java/unit/java/sdk/model/LimitsAttributesCardTest.java new file mode 100644 index 00000000..37609d6d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/LimitsAttributesCardTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.LimitsAttributesCardLimits; +import unit.java.sdk.model.LimitsAttributesCardTotalsDaily; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for LimitsAttributesCard + */ +public class LimitsAttributesCardTest { + private final LimitsAttributesCard model = new LimitsAttributesCard(); + + /** + * Model tests for LimitsAttributesCard + */ + @Test + public void testLimitsAttributesCard() { + // TODO: test LimitsAttributesCard + } + + /** + * Test the property 'limits' + */ + @Test + public void limitsTest() { + // TODO: test limits + } + + /** + * Test the property 'totalsDaily' + */ + @Test + public void totalsDailyTest() { + // TODO: test totalsDaily + } + +} diff --git a/src/test/java/unit/java/sdk/model/LimitsAttributesCardTotalsDailyTest.java b/src/test/java/unit/java/sdk/model/LimitsAttributesCardTotalsDailyTest.java new file mode 100644 index 00000000..cac0f14d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/LimitsAttributesCardTotalsDailyTest.java @@ -0,0 +1,73 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for LimitsAttributesCardTotalsDaily + */ +public class LimitsAttributesCardTotalsDailyTest { + private final LimitsAttributesCardTotalsDaily model = new LimitsAttributesCardTotalsDaily(); + + /** + * Model tests for LimitsAttributesCardTotalsDaily + */ + @Test + public void testLimitsAttributesCardTotalsDaily() { + // TODO: test LimitsAttributesCardTotalsDaily + } + + /** + * Test the property 'withdrawal' + */ + @Test + public void withdrawalTest() { + // TODO: test withdrawal + } + + /** + * Test the property 'deposit' + */ + @Test + public void depositTest() { + // TODO: test deposit + } + + /** + * Test the property 'purchase' + */ + @Test + public void purchaseTest() { + // TODO: test purchase + } + + /** + * Test the property 'cardTransaction' + */ + @Test + public void cardTransactionTest() { + // TODO: test cardTransaction + } + +} diff --git a/src/test/java/unit/java/sdk/model/LimitsAttributesTest.java b/src/test/java/unit/java/sdk/model/LimitsAttributesTest.java new file mode 100644 index 00000000..4e08569f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/LimitsAttributesTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.LimitsAttributesCard; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for LimitsAttributes + */ +public class LimitsAttributesTest { + private final LimitsAttributes model = new LimitsAttributes(); + + /** + * Model tests for LimitsAttributes + */ + @Test + public void testLimitsAttributes() { + // TODO: test LimitsAttributes + } + + /** + * Test the property 'card' + */ + @Test + public void cardTest() { + // TODO: test card + } + +} diff --git a/src/test/java/unit/java/sdk/model/LimitsTest.java b/src/test/java/unit/java/sdk/model/LimitsTest.java new file mode 100644 index 00000000..77beef67 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/LimitsTest.java @@ -0,0 +1,65 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.LimitsAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Limits + */ +public class LimitsTest { + private final Limits model = new Limits(); + + /** + * Model tests for Limits + */ + @Test + public void testLimits() { + // TODO: test Limits + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/ListPageParametersObjectTest.java b/src/test/java/unit/java/sdk/model/ListPageParametersObjectTest.java new file mode 100644 index 00000000..0945f936 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ListPageParametersObjectTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ListPageParametersObject + */ +public class ListPageParametersObjectTest { + private final ListPageParametersObject model = new ListPageParametersObject(); + + /** + * Model tests for ListPageParametersObject + */ + @Test + public void testListPageParametersObject() { + // TODO: test ListPageParametersObject + } + + /** + * Test the property 'limit' + */ + @Test + public void limitTest() { + // TODO: test limit + } + + /** + * Test the property 'offset' + */ + @Test + public void offsetTest() { + // TODO: test offset + } + +} diff --git a/src/test/java/unit/java/sdk/model/MerchantTest.java b/src/test/java/unit/java/sdk/model/MerchantTest.java new file mode 100644 index 00000000..670e7fe7 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/MerchantTest.java @@ -0,0 +1,80 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Merchant + */ +public class MerchantTest { + private final Merchant model = new Merchant(); + + /** + * Model tests for Merchant + */ + @Test + public void testMerchant() { + // TODO: test Merchant + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'category' + */ + @Test + public void categoryTest() { + // TODO: test category + } + + /** + * Test the property 'location' + */ + @Test + public void locationTest() { + // TODO: test location + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/MonthlyScheduleTest.java b/src/test/java/unit/java/sdk/model/MonthlyScheduleTest.java new file mode 100644 index 00000000..c798f4c1 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/MonthlyScheduleTest.java @@ -0,0 +1,89 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for MonthlySchedule + */ +public class MonthlyScheduleTest { + private final MonthlySchedule model = new MonthlySchedule(); + + /** + * Model tests for MonthlySchedule + */ + @Test + public void testMonthlySchedule() { + // TODO: test MonthlySchedule + } + + /** + * Test the property 'startTime' + */ + @Test + public void startTimeTest() { + // TODO: test startTime + } + + /** + * Test the property 'endTime' + */ + @Test + public void endTimeTest() { + // TODO: test endTime + } + + /** + * Test the property 'dayOfMonth' + */ + @Test + public void dayOfMonthTest() { + // TODO: test dayOfMonth + } + + /** + * Test the property 'dayOfWeek' + */ + @Test + public void dayOfWeekTest() { + // TODO: test dayOfWeek + } + + /** + * Test the property 'interval' + */ + @Test + public void intervalTest() { + // TODO: test interval + } + + /** + * Test the property 'totalNumberOfPayments' + */ + @Test + public void totalNumberOfPaymentsTest() { + // TODO: test totalNumberOfPayments + } + +} diff --git a/src/test/java/unit/java/sdk/model/NegativeBalanceCoverageTransactionTest.java b/src/test/java/unit/java/sdk/model/NegativeBalanceCoverageTransactionTest.java new file mode 100644 index 00000000..26d7ddf2 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/NegativeBalanceCoverageTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.FeeTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for NegativeBalanceCoverageTransaction + */ +public class NegativeBalanceCoverageTransactionTest { + private final NegativeBalanceCoverageTransaction model = new NegativeBalanceCoverageTransaction(); + + /** + * Model tests for NegativeBalanceCoverageTransaction + */ + @Test + public void testNegativeBalanceCoverageTransaction() { + // TODO: test NegativeBalanceCoverageTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/OccupationTest.java b/src/test/java/unit/java/sdk/model/OccupationTest.java new file mode 100644 index 00000000..afbc9efe --- /dev/null +++ b/src/test/java/unit/java/sdk/model/OccupationTest.java @@ -0,0 +1,32 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Occupation + */ +public class OccupationTest { + /** + * Model tests for Occupation + */ + @Test + public void testOccupation() { + // TODO: test Occupation + } + +} diff --git a/src/test/java/unit/java/sdk/model/OfficerTest.java b/src/test/java/unit/java/sdk/model/OfficerTest.java new file mode 100644 index 00000000..77880911 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/OfficerTest.java @@ -0,0 +1,208 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.SourceOfIncome; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Officer + */ +public class OfficerTest { + private final Officer model = new Officer(); + + /** + * Model tests for Officer + */ + @Test + public void testOfficer() { + // TODO: test Officer + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'ssn' + */ + @Test + public void ssnTest() { + // TODO: test ssn + } + + /** + * Test the property 'passport' + */ + @Test + public void passportTest() { + // TODO: test passport + } + + /** + * Test the property 'nationality' + */ + @Test + public void nationalityTest() { + // TODO: test nationality + } + + /** + * Test the property 'matriculaConsular' + */ + @Test + public void matriculaConsularTest() { + // TODO: test matriculaConsular + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** + * Test the property 'evaluationId' + */ + @Test + public void evaluationIdTest() { + // TODO: test evaluationId + } + + /** + * Test the property 'title' + */ + @Test + public void titleTest() { + // TODO: test title + } + + /** + * Test the property 'evaluationFlags' + */ + @Test + public void evaluationFlagsTest() { + // TODO: test evaluationFlags + } + + /** + * Test the property 'maskedSSN' + */ + @Test + public void maskedSSNTest() { + // TODO: test maskedSSN + } + + /** + * Test the property 'maskedPassport' + */ + @Test + public void maskedPassportTest() { + // TODO: test maskedPassport + } + + /** + * Test the property 'maskedMatriculaConsular' + */ + @Test + public void maskedMatriculaConsularTest() { + // TODO: test maskedMatriculaConsular + } + + /** + * Test the property 'idTheftScore' + */ + @Test + public void idTheftScoreTest() { + // TODO: test idTheftScore + } + + /** + * Test the property 'occupation' + */ + @Test + public void occupationTest() { + // TODO: test occupation + } + + /** + * Test the property 'annualIncome' + */ + @Test + public void annualIncomeTest() { + // TODO: test annualIncome + } + + /** + * Test the property 'sourceOfIncome' + */ + @Test + public void sourceOfIncomeTest() { + // TODO: test sourceOfIncome + } + +} diff --git a/src/test/java/unit/java/sdk/model/OrgRelationshipDataTest.java b/src/test/java/unit/java/sdk/model/OrgRelationshipDataTest.java new file mode 100644 index 00000000..4b7b706f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/OrgRelationshipDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for OrgRelationshipData + */ +public class OrgRelationshipDataTest { + private final OrgRelationshipData model = new OrgRelationshipData(); + + /** + * Model tests for OrgRelationshipData + */ + @Test + public void testOrgRelationshipData() { + // TODO: test OrgRelationshipData + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/unit/java/sdk/model/OrgRelationshipTest.java b/src/test/java/unit/java/sdk/model/OrgRelationshipTest.java new file mode 100644 index 00000000..f71245d2 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/OrgRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.OrgRelationshipData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for OrgRelationship + */ +public class OrgRelationshipTest { + private final OrgRelationship model = new OrgRelationship(); + + /** + * Model tests for OrgRelationship + */ + @Test + public void testOrgRelationship() { + // TODO: test OrgRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/OriginatedAchTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/OriginatedAchTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..df95d98d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/OriginatedAchTransactionAllOfAttributesTest.java @@ -0,0 +1,130 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for OriginatedAchTransactionAllOfAttributes + */ +public class OriginatedAchTransactionAllOfAttributesTest { + private final OriginatedAchTransactionAllOfAttributes model = new OriginatedAchTransactionAllOfAttributes(); + + /** + * Model tests for OriginatedAchTransactionAllOfAttributes + */ + @Test + public void testOriginatedAchTransactionAllOfAttributes() { + // TODO: test OriginatedAchTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'addenda' + */ + @Test + public void addendaTest() { + // TODO: test addenda + } + + /** + * Test the property 'counterparty' + */ + @Test + public void counterpartyTest() { + // TODO: test counterparty + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'secCode' + */ + @Test + public void secCodeTest() { + // TODO: test secCode + } + + /** + * Test the property 'traceNumber' + */ + @Test + public void traceNumberTest() { + // TODO: test traceNumber + } + +} diff --git a/src/test/java/unit/java/sdk/model/OriginatedAchTransactionTest.java b/src/test/java/unit/java/sdk/model/OriginatedAchTransactionTest.java new file mode 100644 index 00000000..2647e2ad --- /dev/null +++ b/src/test/java/unit/java/sdk/model/OriginatedAchTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.OriginatedAchTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for OriginatedAchTransaction + */ +public class OriginatedAchTransactionTest { + private final OriginatedAchTransaction model = new OriginatedAchTransaction(); + + /** + * Model tests for OriginatedAchTransaction + */ + @Test + public void testOriginatedAchTransaction() { + // TODO: test OriginatedAchTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/PaginationMetaPaginationTest.java b/src/test/java/unit/java/sdk/model/PaginationMetaPaginationTest.java new file mode 100644 index 00000000..8b31f41d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PaginationMetaPaginationTest.java @@ -0,0 +1,64 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PaginationMetaPagination + */ +public class PaginationMetaPaginationTest { + private final PaginationMetaPagination model = new PaginationMetaPagination(); + + /** + * Model tests for PaginationMetaPagination + */ + @Test + public void testPaginationMetaPagination() { + // TODO: test PaginationMetaPagination + } + + /** + * Test the property 'limit' + */ + @Test + public void limitTest() { + // TODO: test limit + } + + /** + * Test the property 'offset' + */ + @Test + public void offsetTest() { + // TODO: test offset + } + + /** + * Test the property 'total' + */ + @Test + public void totalTest() { + // TODO: test total + } + +} diff --git a/src/test/java/unit/java/sdk/model/PaginationMetaTest.java b/src/test/java/unit/java/sdk/model/PaginationMetaTest.java new file mode 100644 index 00000000..2d6b6add --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PaginationMetaTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PaginationMetaPagination; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PaginationMeta + */ +public class PaginationMetaTest { + private final PaginationMeta model = new PaginationMeta(); + + /** + * Model tests for PaginationMeta + */ + @Test + public void testPaginationMeta() { + // TODO: test PaginationMeta + } + + /** + * Test the property 'pagination' + */ + @Test + public void paginationTest() { + // TODO: test pagination + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchAccountDataTest.java b/src/test/java/unit/java/sdk/model/PatchAccountDataTest.java new file mode 100644 index 00000000..1d74f15e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchAccountDataTest.java @@ -0,0 +1,59 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateCreditAccount; +import unit.java.sdk.model.UpdateCreditAccountAttributes; +import unit.java.sdk.model.UpdateDepositAccount; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchAccountData + */ +public class PatchAccountDataTest { + private final PatchAccountData model = new PatchAccountData(); + + /** + * Model tests for PatchAccountData + */ + @Test + public void testPatchAccountData() { + // TODO: test PatchAccountData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchAccountTest.java b/src/test/java/unit/java/sdk/model/PatchAccountTest.java new file mode 100644 index 00000000..9a247156 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchAccountTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchAccountData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchAccount + */ +public class PatchAccountTest { + private final PatchAccount model = new PatchAccount(); + + /** + * Model tests for PatchAccount + */ + @Test + public void testPatchAccount() { + // TODO: test PatchAccount + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchAchPaymentTest.java b/src/test/java/unit/java/sdk/model/PatchAchPaymentTest.java new file mode 100644 index 00000000..9c09a930 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchAchPaymentTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchTrustApplicationAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchAchPayment + */ +public class PatchAchPaymentTest { + private final PatchAchPayment model = new PatchAchPayment(); + + /** + * Model tests for PatchAchPayment + */ + @Test + public void testPatchAchPayment() { + // TODO: test PatchAchPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchAchReceivedPaymentTest.java b/src/test/java/unit/java/sdk/model/PatchAchReceivedPaymentTest.java new file mode 100644 index 00000000..aa92485e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchAchReceivedPaymentTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchTrustApplicationAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchAchReceivedPayment + */ +public class PatchAchReceivedPaymentTest { + private final PatchAchReceivedPayment model = new PatchAchReceivedPayment(); + + /** + * Model tests for PatchAchReceivedPayment + */ + @Test + public void testPatchAchReceivedPayment() { + // TODO: test PatchAchReceivedPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchBookPaymentTest.java b/src/test/java/unit/java/sdk/model/PatchBookPaymentTest.java new file mode 100644 index 00000000..fea0de1c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchBookPaymentTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchTrustApplicationAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchBookPayment + */ +public class PatchBookPaymentTest { + private final PatchBookPayment model = new PatchBookPayment(); + + /** + * Model tests for PatchBookPayment + */ + @Test + public void testPatchBookPayment() { + // TODO: test PatchBookPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchBookTransactionAttributesTest.java b/src/test/java/unit/java/sdk/model/PatchBookTransactionAttributesTest.java new file mode 100644 index 00000000..83ea8986 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchBookTransactionAttributesTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchBookTransactionAttributes + */ +public class PatchBookTransactionAttributesTest { + private final PatchBookTransactionAttributes model = new PatchBookTransactionAttributes(); + + /** + * Model tests for PatchBookTransactionAttributes + */ + @Test + public void testPatchBookTransactionAttributes() { + // TODO: test PatchBookTransactionAttributes + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchBookTransactionRelationshipsTest.java b/src/test/java/unit/java/sdk/model/PatchBookTransactionRelationshipsTest.java new file mode 100644 index 00000000..49ba578e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchBookTransactionRelationshipsTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountRelationship1; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchBookTransactionRelationships + */ +public class PatchBookTransactionRelationshipsTest { + private final PatchBookTransactionRelationships model = new PatchBookTransactionRelationships(); + + /** + * Model tests for PatchBookTransactionRelationships + */ + @Test + public void testPatchBookTransactionRelationships() { + // TODO: test PatchBookTransactionRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchBookTransactionTest.java b/src/test/java/unit/java/sdk/model/PatchBookTransactionTest.java new file mode 100644 index 00000000..9ea7635a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchBookTransactionTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBookTransactionAttributes; +import unit.java.sdk.model.PatchBookTransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchBookTransaction + */ +public class PatchBookTransactionTest { + private final PatchBookTransaction model = new PatchBookTransaction(); + + /** + * Model tests for PatchBookTransaction + */ + @Test + public void testPatchBookTransaction() { + // TODO: test PatchBookTransaction + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchBusinessApplicationAttributesTest.java b/src/test/java/unit/java/sdk/model/PatchBusinessApplicationAttributesTest.java new file mode 100644 index 00000000..a37a364e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchBusinessApplicationAttributesTest.java @@ -0,0 +1,118 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.BusinessAnnualRevenue; +import unit.java.sdk.model.BusinessNumberOfEmployees; +import unit.java.sdk.model.BusinessVertical; +import unit.java.sdk.model.CashFlow; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchBusinessApplicationAttributes + */ +public class PatchBusinessApplicationAttributesTest { + private final PatchBusinessApplicationAttributes model = new PatchBusinessApplicationAttributes(); + + /** + * Model tests for PatchBusinessApplicationAttributes + */ + @Test + public void testPatchBusinessApplicationAttributes() { + // TODO: test PatchBusinessApplicationAttributes + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'annualRevenue' + */ + @Test + public void annualRevenueTest() { + // TODO: test annualRevenue + } + + /** + * Test the property 'numberOfEmployees' + */ + @Test + public void numberOfEmployeesTest() { + // TODO: test numberOfEmployees + } + + /** + * Test the property 'cashFlow' + */ + @Test + public void cashFlowTest() { + // TODO: test cashFlow + } + + /** + * Test the property 'yearOfIncorporation' + */ + @Test + public void yearOfIncorporationTest() { + // TODO: test yearOfIncorporation + } + + /** + * Test the property 'countriesOfOperation' + */ + @Test + public void countriesOfOperationTest() { + // TODO: test countriesOfOperation + } + + /** + * Test the property 'stockSymbol' + */ + @Test + public void stockSymbolTest() { + // TODO: test stockSymbol + } + + /** + * Test the property 'website' + */ + @Test + public void websiteTest() { + // TODO: test website + } + + /** + * Test the property 'businessVertical' + */ + @Test + public void businessVerticalTest() { + // TODO: test businessVertical + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchBusinessApplicationBeneficialOwnerAttributesTest.java b/src/test/java/unit/java/sdk/model/PatchBusinessApplicationBeneficialOwnerAttributesTest.java new file mode 100644 index 00000000..77ffebfb --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchBusinessApplicationBeneficialOwnerAttributesTest.java @@ -0,0 +1,67 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.SourceOfIncome; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchBusinessApplicationBeneficialOwnerAttributes + */ +public class PatchBusinessApplicationBeneficialOwnerAttributesTest { + private final PatchBusinessApplicationBeneficialOwnerAttributes model = new PatchBusinessApplicationBeneficialOwnerAttributes(); + + /** + * Model tests for PatchBusinessApplicationBeneficialOwnerAttributes + */ + @Test + public void testPatchBusinessApplicationBeneficialOwnerAttributes() { + // TODO: test PatchBusinessApplicationBeneficialOwnerAttributes + } + + /** + * Test the property 'occupation' + */ + @Test + public void occupationTest() { + // TODO: test occupation + } + + /** + * Test the property 'annualIncome' + */ + @Test + public void annualIncomeTest() { + // TODO: test annualIncome + } + + /** + * Test the property 'sourceOfIncome' + */ + @Test + public void sourceOfIncomeTest() { + // TODO: test sourceOfIncome + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchBusinessApplicationBeneficialOwnerTest.java b/src/test/java/unit/java/sdk/model/PatchBusinessApplicationBeneficialOwnerTest.java new file mode 100644 index 00000000..8a4bdd11 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchBusinessApplicationBeneficialOwnerTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessApplicationBeneficialOwnerAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchBusinessApplicationBeneficialOwner + */ +public class PatchBusinessApplicationBeneficialOwnerTest { + private final PatchBusinessApplicationBeneficialOwner model = new PatchBusinessApplicationBeneficialOwner(); + + /** + * Model tests for PatchBusinessApplicationBeneficialOwner + */ + @Test + public void testPatchBusinessApplicationBeneficialOwner() { + // TODO: test PatchBusinessApplicationBeneficialOwner + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchBusinessApplicationOfficerAttributesOfficerTest.java b/src/test/java/unit/java/sdk/model/PatchBusinessApplicationOfficerAttributesOfficerTest.java new file mode 100644 index 00000000..10c8be6b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchBusinessApplicationOfficerAttributesOfficerTest.java @@ -0,0 +1,67 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.SourceOfIncome; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchBusinessApplicationOfficerAttributesOfficer + */ +public class PatchBusinessApplicationOfficerAttributesOfficerTest { + private final PatchBusinessApplicationOfficerAttributesOfficer model = new PatchBusinessApplicationOfficerAttributesOfficer(); + + /** + * Model tests for PatchBusinessApplicationOfficerAttributesOfficer + */ + @Test + public void testPatchBusinessApplicationOfficerAttributesOfficer() { + // TODO: test PatchBusinessApplicationOfficerAttributesOfficer + } + + /** + * Test the property 'occupation' + */ + @Test + public void occupationTest() { + // TODO: test occupation + } + + /** + * Test the property 'annualIncome' + */ + @Test + public void annualIncomeTest() { + // TODO: test annualIncome + } + + /** + * Test the property 'sourceOfIncome' + */ + @Test + public void sourceOfIncomeTest() { + // TODO: test sourceOfIncome + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchBusinessApplicationOfficerAttributesTest.java b/src/test/java/unit/java/sdk/model/PatchBusinessApplicationOfficerAttributesTest.java new file mode 100644 index 00000000..ceeae155 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchBusinessApplicationOfficerAttributesTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessApplicationOfficerAttributesOfficer; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchBusinessApplicationOfficerAttributes + */ +public class PatchBusinessApplicationOfficerAttributesTest { + private final PatchBusinessApplicationOfficerAttributes model = new PatchBusinessApplicationOfficerAttributes(); + + /** + * Model tests for PatchBusinessApplicationOfficerAttributes + */ + @Test + public void testPatchBusinessApplicationOfficerAttributes() { + // TODO: test PatchBusinessApplicationOfficerAttributes + } + + /** + * Test the property 'officer' + */ + @Test + public void officerTest() { + // TODO: test officer + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchBusinessApplicationOfficerTest.java b/src/test/java/unit/java/sdk/model/PatchBusinessApplicationOfficerTest.java new file mode 100644 index 00000000..afe32892 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchBusinessApplicationOfficerTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessApplicationOfficerAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchBusinessApplicationOfficer + */ +public class PatchBusinessApplicationOfficerTest { + private final PatchBusinessApplicationOfficer model = new PatchBusinessApplicationOfficer(); + + /** + * Model tests for PatchBusinessApplicationOfficer + */ + @Test + public void testPatchBusinessApplicationOfficer() { + // TODO: test PatchBusinessApplicationOfficer + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchBusinessApplicationTest.java b/src/test/java/unit/java/sdk/model/PatchBusinessApplicationTest.java new file mode 100644 index 00000000..274b89b4 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchBusinessApplicationTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessApplicationAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchBusinessApplication + */ +public class PatchBusinessApplicationTest { + private final PatchBusinessApplication model = new PatchBusinessApplication(); + + /** + * Model tests for PatchBusinessApplication + */ + @Test + public void testPatchBusinessApplication() { + // TODO: test PatchBusinessApplication + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchBusinessCreditCardTest.java b/src/test/java/unit/java/sdk/model/PatchBusinessCreditCardTest.java new file mode 100644 index 00000000..95627463 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchBusinessCreditCardTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessDebitCardAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchBusinessCreditCard + */ +public class PatchBusinessCreditCardTest { + private final PatchBusinessCreditCard model = new PatchBusinessCreditCard(); + + /** + * Model tests for PatchBusinessCreditCard + */ + @Test + public void testPatchBusinessCreditCard() { + // TODO: test PatchBusinessCreditCard + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchBusinessDebitCardAttributesTest.java b/src/test/java/unit/java/sdk/model/PatchBusinessDebitCardAttributesTest.java new file mode 100644 index 00000000..36aa092a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchBusinessDebitCardAttributesTest.java @@ -0,0 +1,111 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.CardLevelLimits; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchBusinessDebitCardAttributes + */ +public class PatchBusinessDebitCardAttributesTest { + private final PatchBusinessDebitCardAttributes model = new PatchBusinessDebitCardAttributes(); + + /** + * Model tests for PatchBusinessDebitCardAttributes + */ + @Test + public void testPatchBusinessDebitCardAttributes() { + // TODO: test PatchBusinessDebitCardAttributes + } + + /** + * Test the property 'shippingAddress' + */ + @Test + public void shippingAddressTest() { + // TODO: test shippingAddress + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'design' + */ + @Test + public void designTest() { + // TODO: test design + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'limits' + */ + @Test + public void limitsTest() { + // TODO: test limits + } + + /** + * Test the property 'defaultFundingAccountId' + */ + @Test + public void defaultFundingAccountIdTest() { + // TODO: test defaultFundingAccountId + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchBusinessDebitCardTest.java b/src/test/java/unit/java/sdk/model/PatchBusinessDebitCardTest.java new file mode 100644 index 00000000..c1989ddf --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchBusinessDebitCardTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessDebitCardAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchBusinessDebitCard + */ +public class PatchBusinessDebitCardTest { + private final PatchBusinessDebitCard model = new PatchBusinessDebitCard(); + + /** + * Model tests for PatchBusinessDebitCard + */ + @Test + public void testPatchBusinessDebitCard() { + // TODO: test PatchBusinessDebitCard + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchBusinessVirtualCreditCardTest.java b/src/test/java/unit/java/sdk/model/PatchBusinessVirtualCreditCardTest.java new file mode 100644 index 00000000..c2819109 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchBusinessVirtualCreditCardTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessVirtualDebitCardAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchBusinessVirtualCreditCard + */ +public class PatchBusinessVirtualCreditCardTest { + private final PatchBusinessVirtualCreditCard model = new PatchBusinessVirtualCreditCard(); + + /** + * Model tests for PatchBusinessVirtualCreditCard + */ + @Test + public void testPatchBusinessVirtualCreditCard() { + // TODO: test PatchBusinessVirtualCreditCard + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchBusinessVirtualDebitCardAttributesTest.java b/src/test/java/unit/java/sdk/model/PatchBusinessVirtualDebitCardAttributesTest.java new file mode 100644 index 00000000..f1222aab --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchBusinessVirtualDebitCardAttributesTest.java @@ -0,0 +1,91 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.CardLevelLimits; +import unit.java.sdk.model.Phone; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchBusinessVirtualDebitCardAttributes + */ +public class PatchBusinessVirtualDebitCardAttributesTest { + private final PatchBusinessVirtualDebitCardAttributes model = new PatchBusinessVirtualDebitCardAttributes(); + + /** + * Model tests for PatchBusinessVirtualDebitCardAttributes + */ + @Test + public void testPatchBusinessVirtualDebitCardAttributes() { + // TODO: test PatchBusinessVirtualDebitCardAttributes + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'limits' + */ + @Test + public void limitsTest() { + // TODO: test limits + } + + /** + * Test the property 'defaultFundingAccountId' + */ + @Test + public void defaultFundingAccountIdTest() { + // TODO: test defaultFundingAccountId + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchBusinessVirtualDebitCardTest.java b/src/test/java/unit/java/sdk/model/PatchBusinessVirtualDebitCardTest.java new file mode 100644 index 00000000..7236b34a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchBusinessVirtualDebitCardTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessVirtualDebitCardAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchBusinessVirtualDebitCard + */ +public class PatchBusinessVirtualDebitCardTest { + private final PatchBusinessVirtualDebitCard model = new PatchBusinessVirtualDebitCard(); + + /** + * Model tests for PatchBusinessVirtualDebitCard + */ + @Test + public void testPatchBusinessVirtualDebitCard() { + // TODO: test PatchBusinessVirtualDebitCard + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchChargebackTransactionTest.java b/src/test/java/unit/java/sdk/model/PatchChargebackTransactionTest.java new file mode 100644 index 00000000..3a5f209d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchChargebackTransactionTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBookTransactionAttributes; +import unit.java.sdk.model.PatchBookTransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchChargebackTransaction + */ +public class PatchChargebackTransactionTest { + private final PatchChargebackTransaction model = new PatchChargebackTransaction(); + + /** + * Model tests for PatchChargebackTransaction + */ + @Test + public void testPatchChargebackTransaction() { + // TODO: test PatchChargebackTransaction + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchCheckDepositAttributesTest.java b/src/test/java/unit/java/sdk/model/PatchCheckDepositAttributesTest.java new file mode 100644 index 00000000..cd8330d1 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchCheckDepositAttributesTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchCheckDepositAttributes + */ +public class PatchCheckDepositAttributesTest { + private final PatchCheckDepositAttributes model = new PatchCheckDepositAttributes(); + + /** + * Model tests for PatchCheckDepositAttributes + */ + @Test + public void testPatchCheckDepositAttributes() { + // TODO: test PatchCheckDepositAttributes + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchCheckDepositTest.java b/src/test/java/unit/java/sdk/model/PatchCheckDepositTest.java new file mode 100644 index 00000000..462f95ec --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchCheckDepositTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchCheckDepositAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchCheckDeposit + */ +public class PatchCheckDepositTest { + private final PatchCheckDeposit model = new PatchCheckDeposit(); + + /** + * Model tests for PatchCheckDeposit + */ + @Test + public void testPatchCheckDeposit() { + // TODO: test PatchCheckDeposit + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchCounterpartyAttributesTest.java b/src/test/java/unit/java/sdk/model/PatchCounterpartyAttributesTest.java new file mode 100644 index 00000000..a400268d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchCounterpartyAttributesTest.java @@ -0,0 +1,80 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchCounterpartyAttributes + */ +public class PatchCounterpartyAttributesTest { + private final PatchCounterpartyAttributes model = new PatchCounterpartyAttributes(); + + /** + * Model tests for PatchCounterpartyAttributes + */ + @Test + public void testPatchCounterpartyAttributes() { + // TODO: test PatchCounterpartyAttributes + } + + /** + * Test the property 'plaidProcessorToken' + */ + @Test + public void plaidProcessorTokenTest() { + // TODO: test plaidProcessorToken + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'permissions' + */ + @Test + public void permissionsTest() { + // TODO: test permissions + } + + /** + * Test the property 'verifyName' + */ + @Test + public void verifyNameTest() { + // TODO: test verifyName + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchCounterpartyTest.java b/src/test/java/unit/java/sdk/model/PatchCounterpartyTest.java new file mode 100644 index 00000000..2c289eba --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchCounterpartyTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchCounterpartyAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchCounterparty + */ +public class PatchCounterpartyTest { + private final PatchCounterparty model = new PatchCounterparty(); + + /** + * Model tests for PatchCounterparty + */ + @Test + public void testPatchCounterparty() { + // TODO: test PatchCounterparty + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchIndividualApplicationAttributesTest.java b/src/test/java/unit/java/sdk/model/PatchIndividualApplicationAttributesTest.java new file mode 100644 index 00000000..b95a7519 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchIndividualApplicationAttributesTest.java @@ -0,0 +1,75 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AnnualIncome; +import unit.java.sdk.model.Occupation; +import unit.java.sdk.model.SourceOfIncome; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchIndividualApplicationAttributes + */ +public class PatchIndividualApplicationAttributesTest { + private final PatchIndividualApplicationAttributes model = new PatchIndividualApplicationAttributes(); + + /** + * Model tests for PatchIndividualApplicationAttributes + */ + @Test + public void testPatchIndividualApplicationAttributes() { + // TODO: test PatchIndividualApplicationAttributes + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'occupation' + */ + @Test + public void occupationTest() { + // TODO: test occupation + } + + /** + * Test the property 'annualIncome' + */ + @Test + public void annualIncomeTest() { + // TODO: test annualIncome + } + + /** + * Test the property 'sourceOfIncome' + */ + @Test + public void sourceOfIncomeTest() { + // TODO: test sourceOfIncome + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchIndividualApplicationTest.java b/src/test/java/unit/java/sdk/model/PatchIndividualApplicationTest.java new file mode 100644 index 00000000..e560c31c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchIndividualApplicationTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchIndividualApplicationAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchIndividualApplication + */ +public class PatchIndividualApplicationTest { + private final PatchIndividualApplication model = new PatchIndividualApplication(); + + /** + * Model tests for PatchIndividualApplication + */ + @Test + public void testPatchIndividualApplication() { + // TODO: test PatchIndividualApplication + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchIndividualDebitCardAttributesTest.java b/src/test/java/unit/java/sdk/model/PatchIndividualDebitCardAttributesTest.java new file mode 100644 index 00000000..38aac28d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchIndividualDebitCardAttributesTest.java @@ -0,0 +1,86 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.CardLevelLimits; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchIndividualDebitCardAttributes + */ +public class PatchIndividualDebitCardAttributesTest { + private final PatchIndividualDebitCardAttributes model = new PatchIndividualDebitCardAttributes(); + + /** + * Model tests for PatchIndividualDebitCardAttributes + */ + @Test + public void testPatchIndividualDebitCardAttributes() { + // TODO: test PatchIndividualDebitCardAttributes + } + + /** + * Test the property 'shippingAddress' + */ + @Test + public void shippingAddressTest() { + // TODO: test shippingAddress + } + + /** + * Test the property 'design' + */ + @Test + public void designTest() { + // TODO: test design + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'limits' + */ + @Test + public void limitsTest() { + // TODO: test limits + } + + /** + * Test the property 'defaultFundingAccountId' + */ + @Test + public void defaultFundingAccountIdTest() { + // TODO: test defaultFundingAccountId + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchIndividualDebitCardTest.java b/src/test/java/unit/java/sdk/model/PatchIndividualDebitCardTest.java new file mode 100644 index 00000000..12def9b9 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchIndividualDebitCardTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchIndividualDebitCardAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchIndividualDebitCard + */ +public class PatchIndividualDebitCardTest { + private final PatchIndividualDebitCard model = new PatchIndividualDebitCard(); + + /** + * Model tests for PatchIndividualDebitCard + */ + @Test + public void testPatchIndividualDebitCard() { + // TODO: test PatchIndividualDebitCard + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchIndividualVirtualDebitCardAttributesTest.java b/src/test/java/unit/java/sdk/model/PatchIndividualVirtualDebitCardAttributesTest.java new file mode 100644 index 00000000..b4868964 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchIndividualVirtualDebitCardAttributesTest.java @@ -0,0 +1,65 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CardLevelLimits; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchIndividualVirtualDebitCardAttributes + */ +public class PatchIndividualVirtualDebitCardAttributesTest { + private final PatchIndividualVirtualDebitCardAttributes model = new PatchIndividualVirtualDebitCardAttributes(); + + /** + * Model tests for PatchIndividualVirtualDebitCardAttributes + */ + @Test + public void testPatchIndividualVirtualDebitCardAttributes() { + // TODO: test PatchIndividualVirtualDebitCardAttributes + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'limits' + */ + @Test + public void limitsTest() { + // TODO: test limits + } + + /** + * Test the property 'defaultFundingAccountId' + */ + @Test + public void defaultFundingAccountIdTest() { + // TODO: test defaultFundingAccountId + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchIndividualVirtualDebitCardTest.java b/src/test/java/unit/java/sdk/model/PatchIndividualVirtualDebitCardTest.java new file mode 100644 index 00000000..79efa450 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchIndividualVirtualDebitCardTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchIndividualVirtualDebitCardAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchIndividualVirtualDebitCard + */ +public class PatchIndividualVirtualDebitCardTest { + private final PatchIndividualVirtualDebitCard model = new PatchIndividualVirtualDebitCard(); + + /** + * Model tests for PatchIndividualVirtualDebitCard + */ + @Test + public void testPatchIndividualVirtualDebitCard() { + // TODO: test PatchIndividualVirtualDebitCard + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchSoleProprietorApplicationAttributesTest.java b/src/test/java/unit/java/sdk/model/PatchSoleProprietorApplicationAttributesTest.java new file mode 100644 index 00000000..e49dd7e3 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchSoleProprietorApplicationAttributesTest.java @@ -0,0 +1,83 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.BusinessVertical; +import unit.java.sdk.model.SoleProprietorshipAnnualRevenue; +import unit.java.sdk.model.SoleProprietorshipNumberOfEmployees; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchSoleProprietorApplicationAttributes + */ +public class PatchSoleProprietorApplicationAttributesTest { + private final PatchSoleProprietorApplicationAttributes model = new PatchSoleProprietorApplicationAttributes(); + + /** + * Model tests for PatchSoleProprietorApplicationAttributes + */ + @Test + public void testPatchSoleProprietorApplicationAttributes() { + // TODO: test PatchSoleProprietorApplicationAttributes + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'annualRevenue' + */ + @Test + public void annualRevenueTest() { + // TODO: test annualRevenue + } + + /** + * Test the property 'numberOfEmployees' + */ + @Test + public void numberOfEmployeesTest() { + // TODO: test numberOfEmployees + } + + /** + * Test the property 'businessVertical' + */ + @Test + public void businessVerticalTest() { + // TODO: test businessVertical + } + + /** + * Test the property 'website' + */ + @Test + public void websiteTest() { + // TODO: test website + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchSoleProprietorApplicationTest.java b/src/test/java/unit/java/sdk/model/PatchSoleProprietorApplicationTest.java new file mode 100644 index 00000000..4a931b99 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchSoleProprietorApplicationTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchSoleProprietorApplicationAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchSoleProprietorApplication + */ +public class PatchSoleProprietorApplicationTest { + private final PatchSoleProprietorApplication model = new PatchSoleProprietorApplication(); + + /** + * Model tests for PatchSoleProprietorApplication + */ + @Test + public void testPatchSoleProprietorApplication() { + // TODO: test PatchSoleProprietorApplication + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchTransactionTagsAttributesTest.java b/src/test/java/unit/java/sdk/model/PatchTransactionTagsAttributesTest.java new file mode 100644 index 00000000..b931e71a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchTransactionTagsAttributesTest.java @@ -0,0 +1,48 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchTransactionTagsAttributes + */ +public class PatchTransactionTagsAttributesTest { + private final PatchTransactionTagsAttributes model = new PatchTransactionTagsAttributes(); + + /** + * Model tests for PatchTransactionTagsAttributes + */ + @Test + public void testPatchTransactionTagsAttributes() { + // TODO: test PatchTransactionTagsAttributes + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchTransactionTagsTest.java b/src/test/java/unit/java/sdk/model/PatchTransactionTagsTest.java new file mode 100644 index 00000000..0e85a3bb --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchTransactionTagsTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchTransactionTagsAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchTransactionTags + */ +public class PatchTransactionTagsTest { + private final PatchTransactionTags model = new PatchTransactionTags(); + + /** + * Model tests for PatchTransactionTags + */ + @Test + public void testPatchTransactionTags() { + // TODO: test PatchTransactionTags + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchTrustApplicationAttributesTest.java b/src/test/java/unit/java/sdk/model/PatchTrustApplicationAttributesTest.java new file mode 100644 index 00000000..8f9f085a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchTrustApplicationAttributesTest.java @@ -0,0 +1,48 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchTrustApplicationAttributes + */ +public class PatchTrustApplicationAttributesTest { + private final PatchTrustApplicationAttributes model = new PatchTrustApplicationAttributes(); + + /** + * Model tests for PatchTrustApplicationAttributes + */ + @Test + public void testPatchTrustApplicationAttributes() { + // TODO: test PatchTrustApplicationAttributes + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/PatchTrustApplicationTest.java b/src/test/java/unit/java/sdk/model/PatchTrustApplicationTest.java new file mode 100644 index 00000000..1bb21913 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PatchTrustApplicationTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchTrustApplicationAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PatchTrustApplication + */ +public class PatchTrustApplicationTest { + private final PatchTrustApplication model = new PatchTrustApplication(); + + /** + * Model tests for PatchTrustApplication + */ + @Test + public void testPatchTrustApplication() { + // TODO: test PatchTrustApplication + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PaymentAdvanceTransactionTest.java b/src/test/java/unit/java/sdk/model/PaymentAdvanceTransactionTest.java new file mode 100644 index 00000000..2f173bda --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PaymentAdvanceTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PaymentAdvanceTransaction + */ +public class PaymentAdvanceTransactionTest { + private final PaymentAdvanceTransaction model = new PaymentAdvanceTransaction(); + + /** + * Model tests for PaymentAdvanceTransaction + */ + @Test + public void testPaymentAdvanceTransaction() { + // TODO: test PaymentAdvanceTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/PaymentRelationshipDataTest.java b/src/test/java/unit/java/sdk/model/PaymentRelationshipDataTest.java new file mode 100644 index 00000000..d2dbe959 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PaymentRelationshipDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PaymentRelationshipData + */ +public class PaymentRelationshipDataTest { + private final PaymentRelationshipData model = new PaymentRelationshipData(); + + /** + * Model tests for PaymentRelationshipData + */ + @Test + public void testPaymentRelationshipData() { + // TODO: test PaymentRelationshipData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/PaymentRelationshipTest.java b/src/test/java/unit/java/sdk/model/PaymentRelationshipTest.java new file mode 100644 index 00000000..342f2f64 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PaymentRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PaymentRelationshipData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PaymentRelationship + */ +public class PaymentRelationshipTest { + private final PaymentRelationship model = new PaymentRelationship(); + + /** + * Model tests for PaymentRelationship + */ + @Test + public void testPaymentRelationship() { + // TODO: test PaymentRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/PaymentRelationshipsCustomersDataInnerTest.java b/src/test/java/unit/java/sdk/model/PaymentRelationshipsCustomersDataInnerTest.java new file mode 100644 index 00000000..559bf16f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PaymentRelationshipsCustomersDataInnerTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PaymentRelationshipsCustomersDataInner + */ +public class PaymentRelationshipsCustomersDataInnerTest { + private final PaymentRelationshipsCustomersDataInner model = new PaymentRelationshipsCustomersDataInner(); + + /** + * Model tests for PaymentRelationshipsCustomersDataInner + */ + @Test + public void testPaymentRelationshipsCustomersDataInner() { + // TODO: test PaymentRelationshipsCustomersDataInner + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/unit/java/sdk/model/PaymentRelationshipsCustomersTest.java b/src/test/java/unit/java/sdk/model/PaymentRelationshipsCustomersTest.java new file mode 100644 index 00000000..7599ef61 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PaymentRelationshipsCustomersTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.PaymentRelationshipsCustomersDataInner; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PaymentRelationshipsCustomers + */ +public class PaymentRelationshipsCustomersTest { + private final PaymentRelationshipsCustomers model = new PaymentRelationshipsCustomers(); + + /** + * Model tests for PaymentRelationshipsCustomers + */ + @Test + public void testPaymentRelationshipsCustomers() { + // TODO: test PaymentRelationshipsCustomers + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/PaymentRelationshipsTest.java b/src/test/java/unit/java/sdk/model/PaymentRelationshipsTest.java new file mode 100644 index 00000000..8bb3e791 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PaymentRelationshipsTest.java @@ -0,0 +1,100 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import unit.java.sdk.model.PaymentRelationshipsCustomers; +import unit.java.sdk.model.Relationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PaymentRelationships + */ +public class PaymentRelationshipsTest { + private final PaymentRelationships model = new PaymentRelationships(); + + /** + * Model tests for PaymentRelationships + */ + @Test + public void testPaymentRelationships() { + // TODO: test PaymentRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + + /** + * Test the property 'customers' + */ + @Test + public void customersTest() { + // TODO: test customers + } + + /** + * Test the property 'counterparty' + */ + @Test + public void counterpartyTest() { + // TODO: test counterparty + } + + /** + * Test the property 'counterpartyAccount' + */ + @Test + public void counterpartyAccountTest() { + // TODO: test counterpartyAccount + } + + /** + * Test the property 'transaction' + */ + @Test + public void transactionTest() { + // TODO: test transaction + } + + /** + * Test the property 'recurringPayment' + */ + @Test + public void recurringPaymentTest() { + // TODO: test recurringPayment + } + +} diff --git a/src/test/java/unit/java/sdk/model/PaymentTest.java b/src/test/java/unit/java/sdk/model/PaymentTest.java new file mode 100644 index 00000000..3934ba68 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PaymentTest.java @@ -0,0 +1,59 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Payment + */ +public class PaymentTest { + private final Payment model = new Payment(); + + /** + * Model tests for Payment + */ + @Test + public void testPayment() { + // TODO: test Payment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/PhoneTest.java b/src/test/java/unit/java/sdk/model/PhoneTest.java new file mode 100644 index 00000000..ab333460 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PhoneTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Phone + */ +public class PhoneTest { + private final Phone model = new Phone(); + + /** + * Model tests for Phone + */ + @Test + public void testPhone() { + // TODO: test Phone + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'number' + */ + @Test + public void numberTest() { + // TODO: test number + } + +} diff --git a/src/test/java/unit/java/sdk/model/PhysicalCardStatusTest.java b/src/test/java/unit/java/sdk/model/PhysicalCardStatusTest.java new file mode 100644 index 00000000..b1d89e62 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PhysicalCardStatusTest.java @@ -0,0 +1,32 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PhysicalCardStatus + */ +public class PhysicalCardStatusTest { + /** + * Model tests for PhysicalCardStatus + */ + @Test + public void testPhysicalCardStatus() { + // TODO: test PhysicalCardStatus + } + +} diff --git a/src/test/java/unit/java/sdk/model/PinStatusAttributesTest.java b/src/test/java/unit/java/sdk/model/PinStatusAttributesTest.java new file mode 100644 index 00000000..9cecc5e2 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PinStatusAttributesTest.java @@ -0,0 +1,48 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PinStatusAttributes + */ +public class PinStatusAttributesTest { + private final PinStatusAttributes model = new PinStatusAttributes(); + + /** + * Model tests for PinStatusAttributes + */ + @Test + public void testPinStatusAttributes() { + // TODO: test PinStatusAttributes + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/unit/java/sdk/model/PinStatusTest.java b/src/test/java/unit/java/sdk/model/PinStatusTest.java new file mode 100644 index 00000000..78537a74 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PinStatusTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PinStatusAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PinStatus + */ +public class PinStatusTest { + private final PinStatus model = new PinStatus(); + + /** + * Model tests for PinStatus + */ + @Test + public void testPinStatus() { + // TODO: test PinStatus + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/PowerOfAttorneyAgentTest.java b/src/test/java/unit/java/sdk/model/PowerOfAttorneyAgentTest.java new file mode 100644 index 00000000..b7400f5f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PowerOfAttorneyAgentTest.java @@ -0,0 +1,173 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PowerOfAttorneyAgent + */ +public class PowerOfAttorneyAgentTest { + private final PowerOfAttorneyAgent model = new PowerOfAttorneyAgent(); + + /** + * Model tests for PowerOfAttorneyAgent + */ + @Test + public void testPowerOfAttorneyAgent() { + // TODO: test PowerOfAttorneyAgent + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'ssn' + */ + @Test + public void ssnTest() { + // TODO: test ssn + } + + /** + * Test the property 'passport' + */ + @Test + public void passportTest() { + // TODO: test passport + } + + /** + * Test the property 'nationality' + */ + @Test + public void nationalityTest() { + // TODO: test nationality + } + + /** + * Test the property 'matriculaConsular' + */ + @Test + public void matriculaConsularTest() { + // TODO: test matriculaConsular + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** + * Test the property 'evaluationId' + */ + @Test + public void evaluationIdTest() { + // TODO: test evaluationId + } + + /** + * Test the property 'evaluationFlags' + */ + @Test + public void evaluationFlagsTest() { + // TODO: test evaluationFlags + } + + /** + * Test the property 'maskedSSN' + */ + @Test + public void maskedSSNTest() { + // TODO: test maskedSSN + } + + /** + * Test the property 'maskedPassport' + */ + @Test + public void maskedPassportTest() { + // TODO: test maskedPassport + } + + /** + * Test the property 'maskedMatriculaConsular' + */ + @Test + public void maskedMatriculaConsularTest() { + // TODO: test maskedMatriculaConsular + } + + /** + * Test the property 'idTheftScore' + */ + @Test + public void idTheftScoreTest() { + // TODO: test idTheftScore + } + +} diff --git a/src/test/java/unit/java/sdk/model/PurchaseAuthorizationRequestAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/PurchaseAuthorizationRequestAllOfAttributesTest.java new file mode 100644 index 00000000..712216a7 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PurchaseAuthorizationRequestAllOfAttributesTest.java @@ -0,0 +1,180 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.CardVerificationData; +import unit.java.sdk.model.HealthcareAmounts; +import unit.java.sdk.model.Merchant; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PurchaseAuthorizationRequestAllOfAttributes + */ +public class PurchaseAuthorizationRequestAllOfAttributesTest { + private final PurchaseAuthorizationRequestAllOfAttributes model = new PurchaseAuthorizationRequestAllOfAttributes(); + + /** + * Model tests for PurchaseAuthorizationRequestAllOfAttributes + */ + @Test + public void testPurchaseAuthorizationRequestAllOfAttributes() { + // TODO: test PurchaseAuthorizationRequestAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'partialApprovalAllowed' + */ + @Test + public void partialApprovalAllowedTest() { + // TODO: test partialApprovalAllowed + } + + /** + * Test the property 'approvedAmount' + */ + @Test + public void approvedAmountTest() { + // TODO: test approvedAmount + } + + /** + * Test the property 'declineReason' + */ + @Test + public void declineReasonTest() { + // TODO: test declineReason + } + + /** + * Test the property 'merchant' + */ + @Test + public void merchantTest() { + // TODO: test merchant + } + + /** + * Test the property 'recurring' + */ + @Test + public void recurringTest() { + // TODO: test recurring + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'healthcareAmounts' + */ + @Test + public void healthcareAmountsTest() { + // TODO: test healthcareAmounts + } + + /** + * Test the property 'paymentMethod' + */ + @Test + public void paymentMethodTest() { + // TODO: test paymentMethod + } + + /** + * Test the property 'digitalWallet' + */ + @Test + public void digitalWalletTest() { + // TODO: test digitalWallet + } + + /** + * Test the property 'cardVerificationData' + */ + @Test + public void cardVerificationDataTest() { + // TODO: test cardVerificationData + } + + /** + * Test the property 'ecommerce' + */ + @Test + public void ecommerceTest() { + // TODO: test ecommerce + } + + /** + * Test the property 'cardPresent' + */ + @Test + public void cardPresentTest() { + // TODO: test cardPresent + } + + /** + * Test the property 'cardNetwork' + */ + @Test + public void cardNetworkTest() { + // TODO: test cardNetwork + } + + /** + * Test the property 'cashWithdrawalAmount' + */ + @Test + public void cashWithdrawalAmountTest() { + // TODO: test cashWithdrawalAmount + } + +} diff --git a/src/test/java/unit/java/sdk/model/PurchaseAuthorizationRequestTest.java b/src/test/java/unit/java/sdk/model/PurchaseAuthorizationRequestTest.java new file mode 100644 index 00000000..7fb8bb2e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PurchaseAuthorizationRequestTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationRequest; +import unit.java.sdk.model.AuthorizationRequestRelationships; +import unit.java.sdk.model.PurchaseAuthorizationRequestAllOfAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PurchaseAuthorizationRequest + */ +public class PurchaseAuthorizationRequestTest { + private final PurchaseAuthorizationRequest model = new PurchaseAuthorizationRequest(); + + /** + * Model tests for PurchaseAuthorizationRequest + */ + @Test + public void testPurchaseAuthorizationRequest() { + // TODO: test PurchaseAuthorizationRequest + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/PurchaseTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/PurchaseTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..5c4730a9 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PurchaseTransactionAllOfAttributesTest.java @@ -0,0 +1,200 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.CardVerificationData; +import unit.java.sdk.model.Coordinates; +import unit.java.sdk.model.Merchant; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PurchaseTransactionAllOfAttributes + */ +public class PurchaseTransactionAllOfAttributesTest { + private final PurchaseTransactionAllOfAttributes model = new PurchaseTransactionAllOfAttributes(); + + /** + * Model tests for PurchaseTransactionAllOfAttributes + */ + @Test + public void testPurchaseTransactionAllOfAttributes() { + // TODO: test PurchaseTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'cardLast4Digits' + */ + @Test + public void cardLast4DigitsTest() { + // TODO: test cardLast4Digits + } + + /** + * Test the property 'merchant' + */ + @Test + public void merchantTest() { + // TODO: test merchant + } + + /** + * Test the property 'coordinates' + */ + @Test + public void coordinatesTest() { + // TODO: test coordinates + } + + /** + * Test the property 'recurring' + */ + @Test + public void recurringTest() { + // TODO: test recurring + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'networkTransactionId' + */ + @Test + public void networkTransactionIdTest() { + // TODO: test networkTransactionId + } + + /** + * Test the property 'interchange' + */ + @Test + public void interchangeTest() { + // TODO: test interchange + } + + /** + * Test the property 'ecommerce' + */ + @Test + public void ecommerceTest() { + // TODO: test ecommerce + } + + /** + * Test the property 'cardPresent' + */ + @Test + public void cardPresentTest() { + // TODO: test cardPresent + } + + /** + * Test the property 'internationalServiceFee' + */ + @Test + public void internationalServiceFeeTest() { + // TODO: test internationalServiceFee + } + + /** + * Test the property 'paymentMethod' + */ + @Test + public void paymentMethodTest() { + // TODO: test paymentMethod + } + + /** + * Test the property 'digitalWallet' + */ + @Test + public void digitalWalletTest() { + // TODO: test digitalWallet + } + + /** + * Test the property 'cardVerificationData' + */ + @Test + public void cardVerificationDataTest() { + // TODO: test cardVerificationData + } + + /** + * Test the property 'cardNetwork' + */ + @Test + public void cardNetworkTest() { + // TODO: test cardNetwork + } + +} diff --git a/src/test/java/unit/java/sdk/model/PurchaseTransactionTest.java b/src/test/java/unit/java/sdk/model/PurchaseTransactionTest.java new file mode 100644 index 00000000..d4bb5f8b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/PurchaseTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PurchaseTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for PurchaseTransaction + */ +public class PurchaseTransactionTest { + private final PurchaseTransaction model = new PurchaseTransaction(); + + /** + * Model tests for PurchaseTransaction + */ + @Test + public void testPurchaseTransaction() { + // TODO: test PurchaseTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReceivedAchTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/ReceivedAchTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..0e0c5aec --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReceivedAchTransactionAllOfAttributesTest.java @@ -0,0 +1,145 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReceivedAchTransactionAllOfAttributes + */ +public class ReceivedAchTransactionAllOfAttributesTest { + private final ReceivedAchTransactionAllOfAttributes model = new ReceivedAchTransactionAllOfAttributes(); + + /** + * Model tests for ReceivedAchTransactionAllOfAttributes + */ + @Test + public void testReceivedAchTransactionAllOfAttributes() { + // TODO: test ReceivedAchTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'addenda' + */ + @Test + public void addendaTest() { + // TODO: test addenda + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'counterpartyName' + */ + @Test + public void counterpartyNameTest() { + // TODO: test counterpartyName + } + + /** + * Test the property 'counterpartyRoutingNumber' + */ + @Test + public void counterpartyRoutingNumberTest() { + // TODO: test counterpartyRoutingNumber + } + + /** + * Test the property 'traceNumber' + */ + @Test + public void traceNumberTest() { + // TODO: test traceNumber + } + + /** + * Test the property 'secCode' + */ + @Test + public void secCodeTest() { + // TODO: test secCode + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReceivedAchTransactionTest.java b/src/test/java/unit/java/sdk/model/ReceivedAchTransactionTest.java new file mode 100644 index 00000000..ff2dbc42 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReceivedAchTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedAchTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReceivedAchTransaction + */ +public class ReceivedAchTransactionTest { + private final ReceivedAchTransaction model = new ReceivedAchTransaction(); + + /** + * Model tests for ReceivedAchTransaction + */ + @Test + public void testReceivedAchTransaction() { + // TODO: test ReceivedAchTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReceivedPaymentAttributesTest.java b/src/test/java/unit/java/sdk/model/ReceivedPaymentAttributesTest.java new file mode 100644 index 00000000..5e551e00 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReceivedPaymentAttributesTest.java @@ -0,0 +1,177 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReceivedPaymentAttributes + */ +public class ReceivedPaymentAttributesTest { + private final ReceivedPaymentAttributes model = new ReceivedPaymentAttributes(); + + /** + * Model tests for ReceivedPaymentAttributes + */ + @Test + public void testReceivedPaymentAttributes() { + // TODO: test ReceivedPaymentAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'completionDate' + */ + @Test + public void completionDateTest() { + // TODO: test completionDate + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'wasAdvanced' + */ + @Test + public void wasAdvancedTest() { + // TODO: test wasAdvanced + } + + /** + * Test the property 'isAdvanceable' + */ + @Test + public void isAdvanceableTest() { + // TODO: test isAdvanceable + } + + /** + * Test the property 'isAdvaceable' + */ + @Test + public void isAdvaceableTest() { + // TODO: test isAdvaceable + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'counterpartyRoutingNumber' + */ + @Test + public void counterpartyRoutingNumberTest() { + // TODO: test counterpartyRoutingNumber + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'addenda' + */ + @Test + public void addendaTest() { + // TODO: test addenda + } + + /** + * Test the property 'traceNumber' + */ + @Test + public void traceNumberTest() { + // TODO: test traceNumber + } + + /** + * Test the property 'secCode' + */ + @Test + public void secCodeTest() { + // TODO: test secCode + } + + /** + * Test the property 'returnReason' + */ + @Test + public void returnReasonTest() { + // TODO: test returnReason + } + + /** + * Test the property 'receivingEntityName' + */ + @Test + public void receivingEntityNameTest() { + // TODO: test receivingEntityName + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipDataTest.java b/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipDataTest.java new file mode 100644 index 00000000..077c3127 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReceivedPaymentRelationshipData + */ +public class ReceivedPaymentRelationshipDataTest { + private final ReceivedPaymentRelationshipData model = new ReceivedPaymentRelationshipData(); + + /** + * Model tests for ReceivedPaymentRelationshipData + */ + @Test + public void testReceivedPaymentRelationshipData() { + // TODO: test ReceivedPaymentRelationshipData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipTest.java b/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipTest.java new file mode 100644 index 00000000..5d13c6b2 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReceivedPaymentRelationship + */ +public class ReceivedPaymentRelationshipTest { + private final ReceivedPaymentRelationship model = new ReceivedPaymentRelationship(); + + /** + * Model tests for ReceivedPaymentRelationship + */ + @Test + public void testReceivedPaymentRelationship() { + // TODO: test ReceivedPaymentRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipsCustomerDataTest.java b/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipsCustomerDataTest.java new file mode 100644 index 00000000..f0847deb --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipsCustomerDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReceivedPaymentRelationshipsCustomerData + */ +public class ReceivedPaymentRelationshipsCustomerDataTest { + private final ReceivedPaymentRelationshipsCustomerData model = new ReceivedPaymentRelationshipsCustomerData(); + + /** + * Model tests for ReceivedPaymentRelationshipsCustomerData + */ + @Test + public void testReceivedPaymentRelationshipsCustomerData() { + // TODO: test ReceivedPaymentRelationshipsCustomerData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipsCustomerTest.java b/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipsCustomerTest.java new file mode 100644 index 00000000..290afa6d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipsCustomerTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsCustomerData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReceivedPaymentRelationshipsCustomer + */ +public class ReceivedPaymentRelationshipsCustomerTest { + private final ReceivedPaymentRelationshipsCustomer model = new ReceivedPaymentRelationshipsCustomer(); + + /** + * Model tests for ReceivedPaymentRelationshipsCustomer + */ + @Test + public void testReceivedPaymentRelationshipsCustomer() { + // TODO: test ReceivedPaymentRelationshipsCustomer + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipsReceivePaymentTransactionDataTest.java b/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipsReceivePaymentTransactionDataTest.java new file mode 100644 index 00000000..ce6239fd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipsReceivePaymentTransactionDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReceivedPaymentRelationshipsReceivePaymentTransactionData + */ +public class ReceivedPaymentRelationshipsReceivePaymentTransactionDataTest { + private final ReceivedPaymentRelationshipsReceivePaymentTransactionData model = new ReceivedPaymentRelationshipsReceivePaymentTransactionData(); + + /** + * Model tests for ReceivedPaymentRelationshipsReceivePaymentTransactionData + */ + @Test + public void testReceivedPaymentRelationshipsReceivePaymentTransactionData() { + // TODO: test ReceivedPaymentRelationshipsReceivePaymentTransactionData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipsReceivePaymentTransactionTest.java b/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipsReceivePaymentTransactionTest.java new file mode 100644 index 00000000..dd6538aa --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipsReceivePaymentTransactionTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsReceivePaymentTransactionData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReceivedPaymentRelationshipsReceivePaymentTransaction + */ +public class ReceivedPaymentRelationshipsReceivePaymentTransactionTest { + private final ReceivedPaymentRelationshipsReceivePaymentTransaction model = new ReceivedPaymentRelationshipsReceivePaymentTransaction(); + + /** + * Model tests for ReceivedPaymentRelationshipsReceivePaymentTransaction + */ + @Test + public void testReceivedPaymentRelationshipsReceivePaymentTransaction() { + // TODO: test ReceivedPaymentRelationshipsReceivePaymentTransaction + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipsTest.java b/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipsTest.java new file mode 100644 index 00000000..47dc1f72 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReceivedPaymentRelationshipsTest.java @@ -0,0 +1,85 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import unit.java.sdk.model.ReceivedPaymentRelationshipsCustomer; +import unit.java.sdk.model.ReceivedPaymentRelationshipsReceivePaymentTransaction; +import unit.java.sdk.model.RelationshipsAccount; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReceivedPaymentRelationships + */ +public class ReceivedPaymentRelationshipsTest { + private final ReceivedPaymentRelationships model = new ReceivedPaymentRelationships(); + + /** + * Model tests for ReceivedPaymentRelationships + */ + @Test + public void testReceivedPaymentRelationships() { + // TODO: test ReceivedPaymentRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + + /** + * Test the property 'receivePaymentTransaction' + */ + @Test + public void receivePaymentTransactionTest() { + // TODO: test receivePaymentTransaction + } + + /** + * Test the property 'paymentAdvanceTransaction' + */ + @Test + public void paymentAdvanceTransactionTest() { + // TODO: test paymentAdvanceTransaction + } + + /** + * Test the property 'repayPaymentAdvanceTransaction' + */ + @Test + public void repayPaymentAdvanceTransactionTest() { + // TODO: test repayPaymentAdvanceTransaction + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReceivedPaymentTest.java b/src/test/java/unit/java/sdk/model/ReceivedPaymentTest.java new file mode 100644 index 00000000..c52f8fa6 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReceivedPaymentTest.java @@ -0,0 +1,74 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentAttributes; +import unit.java.sdk.model.ReceivedPaymentRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReceivedPayment + */ +public class ReceivedPaymentTest { + private final ReceivedPayment model = new ReceivedPayment(); + + /** + * Model tests for ReceivedPayment + */ + @Test + public void testReceivedPayment() { + // TODO: test ReceivedPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReceivingAccountRelationshipTest.java b/src/test/java/unit/java/sdk/model/ReceivingAccountRelationshipTest.java new file mode 100644 index 00000000..53c7d42e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReceivingAccountRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsAccountData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReceivingAccountRelationship + */ +public class ReceivingAccountRelationshipTest { + private final ReceivingAccountRelationship model = new ReceivingAccountRelationship(); + + /** + * Model tests for ReceivingAccountRelationship + */ + @Test + public void testReceivingAccountRelationship() { + // TODO: test ReceivingAccountRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsAccountDataTest.java b/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsAccountDataTest.java new file mode 100644 index 00000000..15e3378e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsAccountDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringAchPaymentRelationshipsAccountData + */ +public class RecurringAchPaymentRelationshipsAccountDataTest { + private final RecurringAchPaymentRelationshipsAccountData model = new RecurringAchPaymentRelationshipsAccountData(); + + /** + * Model tests for RecurringAchPaymentRelationshipsAccountData + */ + @Test + public void testRecurringAchPaymentRelationshipsAccountData() { + // TODO: test RecurringAchPaymentRelationshipsAccountData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsAccountTest.java b/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsAccountTest.java new file mode 100644 index 00000000..acadc358 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsAccountTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsAccountData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringAchPaymentRelationshipsAccount + */ +public class RecurringAchPaymentRelationshipsAccountTest { + private final RecurringAchPaymentRelationshipsAccount model = new RecurringAchPaymentRelationshipsAccount(); + + /** + * Model tests for RecurringAchPaymentRelationshipsAccount + */ + @Test + public void testRecurringAchPaymentRelationshipsAccount() { + // TODO: test RecurringAchPaymentRelationshipsAccount + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsCounterpartyDataTest.java b/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsCounterpartyDataTest.java new file mode 100644 index 00000000..12a62f0c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsCounterpartyDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringAchPaymentRelationshipsCounterpartyData + */ +public class RecurringAchPaymentRelationshipsCounterpartyDataTest { + private final RecurringAchPaymentRelationshipsCounterpartyData model = new RecurringAchPaymentRelationshipsCounterpartyData(); + + /** + * Model tests for RecurringAchPaymentRelationshipsCounterpartyData + */ + @Test + public void testRecurringAchPaymentRelationshipsCounterpartyData() { + // TODO: test RecurringAchPaymentRelationshipsCounterpartyData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsCounterpartyTest.java b/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsCounterpartyTest.java new file mode 100644 index 00000000..577c60ac --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsCounterpartyTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsCounterpartyData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringAchPaymentRelationshipsCounterparty + */ +public class RecurringAchPaymentRelationshipsCounterpartyTest { + private final RecurringAchPaymentRelationshipsCounterparty model = new RecurringAchPaymentRelationshipsCounterparty(); + + /** + * Model tests for RecurringAchPaymentRelationshipsCounterparty + */ + @Test + public void testRecurringAchPaymentRelationshipsCounterparty() { + // TODO: test RecurringAchPaymentRelationshipsCounterparty + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsOrgDataTest.java b/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsOrgDataTest.java new file mode 100644 index 00000000..fa5f4221 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsOrgDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringAchPaymentRelationshipsOrgData + */ +public class RecurringAchPaymentRelationshipsOrgDataTest { + private final RecurringAchPaymentRelationshipsOrgData model = new RecurringAchPaymentRelationshipsOrgData(); + + /** + * Model tests for RecurringAchPaymentRelationshipsOrgData + */ + @Test + public void testRecurringAchPaymentRelationshipsOrgData() { + // TODO: test RecurringAchPaymentRelationshipsOrgData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsOrgTest.java b/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsOrgTest.java new file mode 100644 index 00000000..eaff40bd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsOrgTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsOrgData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringAchPaymentRelationshipsOrg + */ +public class RecurringAchPaymentRelationshipsOrgTest { + private final RecurringAchPaymentRelationshipsOrg model = new RecurringAchPaymentRelationshipsOrg(); + + /** + * Model tests for RecurringAchPaymentRelationshipsOrg + */ + @Test + public void testRecurringAchPaymentRelationshipsOrg() { + // TODO: test RecurringAchPaymentRelationshipsOrg + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsTest.java b/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsTest.java new file mode 100644 index 00000000..07859e56 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringAchPaymentRelationshipsTest.java @@ -0,0 +1,76 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsCustomer; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsAccount; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsCounterparty; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsOrg; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringAchPaymentRelationships + */ +public class RecurringAchPaymentRelationshipsTest { + private final RecurringAchPaymentRelationships model = new RecurringAchPaymentRelationships(); + + /** + * Model tests for RecurringAchPaymentRelationships + */ + @Test + public void testRecurringAchPaymentRelationships() { + // TODO: test RecurringAchPaymentRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'counterparty' + */ + @Test + public void counterpartyTest() { + // TODO: test counterparty + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + + /** + * Test the property 'org' + */ + @Test + public void orgTest() { + // TODO: test org + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringBookPaymentRelationshipsCounterpartyAccountDataTest.java b/src/test/java/unit/java/sdk/model/RecurringBookPaymentRelationshipsCounterpartyAccountDataTest.java new file mode 100644 index 00000000..165671cb --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringBookPaymentRelationshipsCounterpartyAccountDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringBookPaymentRelationshipsCounterpartyAccountData + */ +public class RecurringBookPaymentRelationshipsCounterpartyAccountDataTest { + private final RecurringBookPaymentRelationshipsCounterpartyAccountData model = new RecurringBookPaymentRelationshipsCounterpartyAccountData(); + + /** + * Model tests for RecurringBookPaymentRelationshipsCounterpartyAccountData + */ + @Test + public void testRecurringBookPaymentRelationshipsCounterpartyAccountData() { + // TODO: test RecurringBookPaymentRelationshipsCounterpartyAccountData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringBookPaymentRelationshipsCounterpartyAccountTest.java b/src/test/java/unit/java/sdk/model/RecurringBookPaymentRelationshipsCounterpartyAccountTest.java new file mode 100644 index 00000000..184f903f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringBookPaymentRelationshipsCounterpartyAccountTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringBookPaymentRelationshipsCounterpartyAccountData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringBookPaymentRelationshipsCounterpartyAccount + */ +public class RecurringBookPaymentRelationshipsCounterpartyAccountTest { + private final RecurringBookPaymentRelationshipsCounterpartyAccount model = new RecurringBookPaymentRelationshipsCounterpartyAccount(); + + /** + * Model tests for RecurringBookPaymentRelationshipsCounterpartyAccount + */ + @Test + public void testRecurringBookPaymentRelationshipsCounterpartyAccount() { + // TODO: test RecurringBookPaymentRelationshipsCounterpartyAccount + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringBookPaymentRelationshipsTest.java b/src/test/java/unit/java/sdk/model/RecurringBookPaymentRelationshipsTest.java new file mode 100644 index 00000000..d8f22467 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringBookPaymentRelationshipsTest.java @@ -0,0 +1,76 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsCustomer; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsAccount; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsOrg; +import unit.java.sdk.model.RecurringBookPaymentRelationshipsCounterpartyAccount; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringBookPaymentRelationships + */ +public class RecurringBookPaymentRelationshipsTest { + private final RecurringBookPaymentRelationships model = new RecurringBookPaymentRelationships(); + + /** + * Model tests for RecurringBookPaymentRelationships + */ + @Test + public void testRecurringBookPaymentRelationships() { + // TODO: test RecurringBookPaymentRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'counterpartyAccount' + */ + @Test + public void counterpartyAccountTest() { + // TODO: test counterpartyAccount + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + + /** + * Test the property 'org' + */ + @Test + public void orgTest() { + // TODO: test org + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringCreditAchPaymentAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/RecurringCreditAchPaymentAllOfAttributesTest.java new file mode 100644 index 00000000..d4250568 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringCreditAchPaymentAllOfAttributesTest.java @@ -0,0 +1,114 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Schedule; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringCreditAchPaymentAllOfAttributes + */ +public class RecurringCreditAchPaymentAllOfAttributesTest { + private final RecurringCreditAchPaymentAllOfAttributes model = new RecurringCreditAchPaymentAllOfAttributes(); + + /** + * Model tests for RecurringCreditAchPaymentAllOfAttributes + */ + @Test + public void testRecurringCreditAchPaymentAllOfAttributes() { + // TODO: test RecurringCreditAchPaymentAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'addenda' + */ + @Test + public void addendaTest() { + // TODO: test addenda + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'schedule' + */ + @Test + public void scheduleTest() { + // TODO: test schedule + } + + /** + * Test the property 'numberOfPayments' + */ + @Test + public void numberOfPaymentsTest() { + // TODO: test numberOfPayments + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringCreditAchPaymentTest.java b/src/test/java/unit/java/sdk/model/RecurringCreditAchPaymentTest.java new file mode 100644 index 00000000..5d315fe3 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringCreditAchPaymentTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringAchPaymentRelationships; +import unit.java.sdk.model.RecurringCreditAchPaymentAllOfAttributes; +import unit.java.sdk.model.RecurringPayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringCreditAchPayment + */ +public class RecurringCreditAchPaymentTest { + private final RecurringCreditAchPayment model = new RecurringCreditAchPayment(); + + /** + * Model tests for RecurringCreditAchPayment + */ + @Test + public void testRecurringCreditAchPayment() { + // TODO: test RecurringCreditAchPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringCreditBookPaymentAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/RecurringCreditBookPaymentAllOfAttributesTest.java new file mode 100644 index 00000000..024c73a0 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringCreditBookPaymentAllOfAttributesTest.java @@ -0,0 +1,106 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Schedule; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringCreditBookPaymentAllOfAttributes + */ +public class RecurringCreditBookPaymentAllOfAttributesTest { + private final RecurringCreditBookPaymentAllOfAttributes model = new RecurringCreditBookPaymentAllOfAttributes(); + + /** + * Model tests for RecurringCreditBookPaymentAllOfAttributes + */ + @Test + public void testRecurringCreditBookPaymentAllOfAttributes() { + // TODO: test RecurringCreditBookPaymentAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'schedule' + */ + @Test + public void scheduleTest() { + // TODO: test schedule + } + + /** + * Test the property 'numberOfPayments' + */ + @Test + public void numberOfPaymentsTest() { + // TODO: test numberOfPayments + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringCreditBookPaymentTest.java b/src/test/java/unit/java/sdk/model/RecurringCreditBookPaymentTest.java new file mode 100644 index 00000000..88a8c944 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringCreditBookPaymentTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringBookPaymentRelationships; +import unit.java.sdk.model.RecurringCreditBookPaymentAllOfAttributes; +import unit.java.sdk.model.RecurringPayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringCreditBookPayment + */ +public class RecurringCreditBookPaymentTest { + private final RecurringCreditBookPayment model = new RecurringCreditBookPayment(); + + /** + * Model tests for RecurringCreditBookPayment + */ + @Test + public void testRecurringCreditBookPayment() { + // TODO: test RecurringCreditBookPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringDebitAchPaymentAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/RecurringDebitAchPaymentAllOfAttributesTest.java new file mode 100644 index 00000000..2ad22909 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringDebitAchPaymentAllOfAttributesTest.java @@ -0,0 +1,130 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Schedule; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringDebitAchPaymentAllOfAttributes + */ +public class RecurringDebitAchPaymentAllOfAttributesTest { + private final RecurringDebitAchPaymentAllOfAttributes model = new RecurringDebitAchPaymentAllOfAttributes(); + + /** + * Model tests for RecurringDebitAchPaymentAllOfAttributes + */ + @Test + public void testRecurringDebitAchPaymentAllOfAttributes() { + // TODO: test RecurringDebitAchPaymentAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'addenda' + */ + @Test + public void addendaTest() { + // TODO: test addenda + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'schedule' + */ + @Test + public void scheduleTest() { + // TODO: test schedule + } + + /** + * Test the property 'numberOfPayments' + */ + @Test + public void numberOfPaymentsTest() { + // TODO: test numberOfPayments + } + + /** + * Test the property 'verifyCounterpartyBalance' + */ + @Test + public void verifyCounterpartyBalanceTest() { + // TODO: test verifyCounterpartyBalance + } + + /** + * Test the property 'sameDay' + */ + @Test + public void sameDayTest() { + // TODO: test sameDay + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringDebitAchPaymentTest.java b/src/test/java/unit/java/sdk/model/RecurringDebitAchPaymentTest.java new file mode 100644 index 00000000..18776ae6 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringDebitAchPaymentTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringAchPaymentRelationships; +import unit.java.sdk.model.RecurringDebitAchPaymentAllOfAttributes; +import unit.java.sdk.model.RecurringPayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringDebitAchPayment + */ +public class RecurringDebitAchPaymentTest { + private final RecurringDebitAchPayment model = new RecurringDebitAchPayment(); + + /** + * Model tests for RecurringDebitAchPayment + */ + @Test + public void testRecurringDebitAchPayment() { + // TODO: test RecurringDebitAchPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringPaymentRelationshipDataTest.java b/src/test/java/unit/java/sdk/model/RecurringPaymentRelationshipDataTest.java new file mode 100644 index 00000000..036956c6 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringPaymentRelationshipDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringPaymentRelationshipData + */ +public class RecurringPaymentRelationshipDataTest { + private final RecurringPaymentRelationshipData model = new RecurringPaymentRelationshipData(); + + /** + * Model tests for RecurringPaymentRelationshipData + */ + @Test + public void testRecurringPaymentRelationshipData() { + // TODO: test RecurringPaymentRelationshipData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringPaymentRelationshipTest.java b/src/test/java/unit/java/sdk/model/RecurringPaymentRelationshipTest.java new file mode 100644 index 00000000..562729a0 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringPaymentRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringPaymentRelationshipData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringPaymentRelationship + */ +public class RecurringPaymentRelationshipTest { + private final RecurringPaymentRelationship model = new RecurringPaymentRelationship(); + + /** + * Model tests for RecurringPaymentRelationship + */ + @Test + public void testRecurringPaymentRelationship() { + // TODO: test RecurringPaymentRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/RecurringPaymentTest.java b/src/test/java/unit/java/sdk/model/RecurringPaymentTest.java new file mode 100644 index 00000000..a1f67ab4 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RecurringPaymentTest.java @@ -0,0 +1,59 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RecurringPayment + */ +public class RecurringPaymentTest { + private final RecurringPayment model = new RecurringPayment(); + + /** + * Model tests for RecurringPayment + */ + @Test + public void testRecurringPayment() { + // TODO: test RecurringPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/RelatedTransactionRelationshipTest.java b/src/test/java/unit/java/sdk/model/RelatedTransactionRelationshipTest.java new file mode 100644 index 00000000..08128187 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RelatedTransactionRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsReceivePaymentTransactionData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RelatedTransactionRelationship + */ +public class RelatedTransactionRelationshipTest { + private final RelatedTransactionRelationship model = new RelatedTransactionRelationship(); + + /** + * Model tests for RelatedTransactionRelationship + */ + @Test + public void testRelatedTransactionRelationship() { + // TODO: test RelatedTransactionRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/RelatedTransactionTest.java b/src/test/java/unit/java/sdk/model/RelatedTransactionTest.java new file mode 100644 index 00000000..ecf61c77 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RelatedTransactionTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsReceivePaymentTransactionData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RelatedTransaction + */ +public class RelatedTransactionTest { + private final RelatedTransaction model = new RelatedTransaction(); + + /** + * Model tests for RelatedTransaction + */ + @Test + public void testRelatedTransaction() { + // TODO: test RelatedTransaction + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/RelationshipDataTest.java b/src/test/java/unit/java/sdk/model/RelationshipDataTest.java new file mode 100644 index 00000000..d9cf85ea --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RelationshipDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RelationshipData + */ +public class RelationshipDataTest { + private final RelationshipData model = new RelationshipData(); + + /** + * Model tests for RelationshipData + */ + @Test + public void testRelationshipData() { + // TODO: test RelationshipData + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/unit/java/sdk/model/RelationshipTest.java b/src/test/java/unit/java/sdk/model/RelationshipTest.java new file mode 100644 index 00000000..75bdd7b8 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RelationshipData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Relationship + */ +public class RelationshipTest { + private final Relationship model = new Relationship(); + + /** + * Model tests for Relationship + */ + @Test + public void testRelationship() { + // TODO: test Relationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/Relationships1AccountDataTest.java b/src/test/java/unit/java/sdk/model/Relationships1AccountDataTest.java new file mode 100644 index 00000000..027d86ca --- /dev/null +++ b/src/test/java/unit/java/sdk/model/Relationships1AccountDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Relationships1AccountData + */ +public class Relationships1AccountDataTest { + private final Relationships1AccountData model = new Relationships1AccountData(); + + /** + * Model tests for Relationships1AccountData + */ + @Test + public void testRelationships1AccountData() { + // TODO: test Relationships1AccountData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/Relationships1AccountTest.java b/src/test/java/unit/java/sdk/model/Relationships1AccountTest.java new file mode 100644 index 00000000..e405438c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/Relationships1AccountTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationships1AccountData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Relationships1Account + */ +public class Relationships1AccountTest { + private final Relationships1Account model = new Relationships1Account(); + + /** + * Model tests for Relationships1Account + */ + @Test + public void testRelationships1Account() { + // TODO: test Relationships1Account + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/Relationships1Test.java b/src/test/java/unit/java/sdk/model/Relationships1Test.java new file mode 100644 index 00000000..482ec12b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/Relationships1Test.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Relationships1Account; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Relationships1 + */ +public class Relationships1Test { + private final Relationships1 model = new Relationships1(); + + /** + * Model tests for Relationships1 + */ + @Test + public void testRelationships1() { + // TODO: test Relationships1 + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + +} diff --git a/src/test/java/unit/java/sdk/model/RelationshipsAccountDataTest.java b/src/test/java/unit/java/sdk/model/RelationshipsAccountDataTest.java new file mode 100644 index 00000000..5d4fe621 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RelationshipsAccountDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RelationshipsAccountData + */ +public class RelationshipsAccountDataTest { + private final RelationshipsAccountData model = new RelationshipsAccountData(); + + /** + * Model tests for RelationshipsAccountData + */ + @Test + public void testRelationshipsAccountData() { + // TODO: test RelationshipsAccountData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/RelationshipsAccountTest.java b/src/test/java/unit/java/sdk/model/RelationshipsAccountTest.java new file mode 100644 index 00000000..bec290f9 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RelationshipsAccountTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RelationshipsAccountData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RelationshipsAccount + */ +public class RelationshipsAccountTest { + private final RelationshipsAccount model = new RelationshipsAccount(); + + /** + * Model tests for RelationshipsAccount + */ + @Test + public void testRelationshipsAccount() { + // TODO: test RelationshipsAccount + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/RelationshipsCustomerDataTest.java b/src/test/java/unit/java/sdk/model/RelationshipsCustomerDataTest.java new file mode 100644 index 00000000..163e3a6b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RelationshipsCustomerDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RelationshipsCustomerData + */ +public class RelationshipsCustomerDataTest { + private final RelationshipsCustomerData model = new RelationshipsCustomerData(); + + /** + * Model tests for RelationshipsCustomerData + */ + @Test + public void testRelationshipsCustomerData() { + // TODO: test RelationshipsCustomerData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/RelationshipsCustomerTest.java b/src/test/java/unit/java/sdk/model/RelationshipsCustomerTest.java new file mode 100644 index 00000000..db80be46 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RelationshipsCustomerTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RelationshipsCustomerData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RelationshipsCustomer + */ +public class RelationshipsCustomerTest { + private final RelationshipsCustomer model = new RelationshipsCustomer(); + + /** + * Model tests for RelationshipsCustomer + */ + @Test + public void testRelationshipsCustomer() { + // TODO: test RelationshipsCustomer + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/RelationshipsTest.java b/src/test/java/unit/java/sdk/model/RelationshipsTest.java new file mode 100644 index 00000000..e884b54b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RelationshipsTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RelationshipsAccount; +import unit.java.sdk.model.RelationshipsCustomer; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Relationships + */ +public class RelationshipsTest { + private final Relationships model = new Relationships(); + + /** + * Model tests for Relationships + */ + @Test + public void testRelationships() { + // TODO: test Relationships + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReleaseTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/ReleaseTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..b7a704dd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReleaseTransactionAllOfAttributesTest.java @@ -0,0 +1,131 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.Counterparty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReleaseTransactionAllOfAttributes + */ +public class ReleaseTransactionAllOfAttributesTest { + private final ReleaseTransactionAllOfAttributes model = new ReleaseTransactionAllOfAttributes(); + + /** + * Model tests for ReleaseTransactionAllOfAttributes + */ + @Test + public void testReleaseTransactionAllOfAttributes() { + // TODO: test ReleaseTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'senderName' + */ + @Test + public void senderNameTest() { + // TODO: test senderName + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'senderAccountNumber' + */ + @Test + public void senderAccountNumberTest() { + // TODO: test senderAccountNumber + } + + /** + * Test the property 'senderAddress' + */ + @Test + public void senderAddressTest() { + // TODO: test senderAddress + } + + /** + * Test the property 'counterparty' + */ + @Test + public void counterpartyTest() { + // TODO: test counterparty + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReleaseTransactionTest.java b/src/test/java/unit/java/sdk/model/ReleaseTransactionTest.java new file mode 100644 index 00000000..2bd27f14 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReleaseTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReleaseTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReleaseTransaction + */ +public class ReleaseTransactionTest { + private final ReleaseTransaction model = new ReleaseTransaction(); + + /** + * Model tests for ReleaseTransaction + */ + @Test + public void testReleaseTransaction() { + // TODO: test ReleaseTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/RepaidPaymentAdvanceTransactionTest.java b/src/test/java/unit/java/sdk/model/RepaidPaymentAdvanceTransactionTest.java new file mode 100644 index 00000000..848e6577 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RepaidPaymentAdvanceTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RepaidPaymentAdvanceTransaction + */ +public class RepaidPaymentAdvanceTransactionTest { + private final RepaidPaymentAdvanceTransaction model = new RepaidPaymentAdvanceTransaction(); + + /** + * Model tests for RepaidPaymentAdvanceTransaction + */ + @Test + public void testRepaidPaymentAdvanceTransaction() { + // TODO: test RepaidPaymentAdvanceTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/RepaymentRelationshipDataTest.java b/src/test/java/unit/java/sdk/model/RepaymentRelationshipDataTest.java new file mode 100644 index 00000000..08126b28 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RepaymentRelationshipDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RepaymentRelationshipData + */ +public class RepaymentRelationshipDataTest { + private final RepaymentRelationshipData model = new RepaymentRelationshipData(); + + /** + * Model tests for RepaymentRelationshipData + */ + @Test + public void testRepaymentRelationshipData() { + // TODO: test RepaymentRelationshipData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/RepaymentRelationshipTest.java b/src/test/java/unit/java/sdk/model/RepaymentRelationshipTest.java new file mode 100644 index 00000000..82adf57c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RepaymentRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RepaymentRelationshipData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RepaymentRelationship + */ +public class RepaymentRelationshipTest { + private final RepaymentRelationship model = new RepaymentRelationship(); + + /** + * Model tests for RepaymentRelationship + */ + @Test + public void testRepaymentRelationship() { + // TODO: test RepaymentRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/RepaymentTest.java b/src/test/java/unit/java/sdk/model/RepaymentTest.java new file mode 100644 index 00000000..aa2aa712 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RepaymentTest.java @@ -0,0 +1,59 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Repayment + */ +public class RepaymentTest { + private final Repayment model = new Repayment(); + + /** + * Model tests for Repayment + */ + @Test + public void testRepayment() { + // TODO: test Repayment + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/unit/java/sdk/model/RequireIdVerificationTest.java b/src/test/java/unit/java/sdk/model/RequireIdVerificationTest.java new file mode 100644 index 00000000..dd87e583 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RequireIdVerificationTest.java @@ -0,0 +1,64 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RequireIdVerification + */ +public class RequireIdVerificationTest { + private final RequireIdVerification model = new RequireIdVerification(); + + /** + * Model tests for RequireIdVerification + */ + @Test + public void testRequireIdVerification() { + // TODO: test RequireIdVerification + } + + /** + * Test the property 'individual' + */ + @Test + public void individualTest() { + // TODO: test individual + } + + /** + * Test the property 'officer' + */ + @Test + public void officerTest() { + // TODO: test officer + } + + /** + * Test the property 'beneficialOwners' + */ + @Test + public void beneficialOwnersTest() { + // TODO: test beneficialOwners + } + +} diff --git a/src/test/java/unit/java/sdk/model/ResponseContactTest.java b/src/test/java/unit/java/sdk/model/ResponseContactTest.java new file mode 100644 index 00000000..d52241d4 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ResponseContactTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ResponseContact + */ +public class ResponseContactTest { + private final ResponseContact model = new ResponseContact(); + + /** + * Model tests for ResponseContact + */ + @Test + public void testResponseContact() { + // TODO: test ResponseContact + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'jwtSubject' + */ + @Test + public void jwtSubjectTest() { + // TODO: test jwtSubject + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReturnCheckPaymentRequestDataAttributesTest.java b/src/test/java/unit/java/sdk/model/ReturnCheckPaymentRequestDataAttributesTest.java new file mode 100644 index 00000000..c312e30c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReturnCheckPaymentRequestDataAttributesTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReturnReason; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReturnCheckPaymentRequestDataAttributes + */ +public class ReturnCheckPaymentRequestDataAttributesTest { + private final ReturnCheckPaymentRequestDataAttributes model = new ReturnCheckPaymentRequestDataAttributes(); + + /** + * Model tests for ReturnCheckPaymentRequestDataAttributes + */ + @Test + public void testReturnCheckPaymentRequestDataAttributes() { + // TODO: test ReturnCheckPaymentRequestDataAttributes + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReturnCheckPaymentRequestDataTest.java b/src/test/java/unit/java/sdk/model/ReturnCheckPaymentRequestDataTest.java new file mode 100644 index 00000000..741a3bca --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReturnCheckPaymentRequestDataTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReturnCheckPaymentRequestDataAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReturnCheckPaymentRequestData + */ +public class ReturnCheckPaymentRequestDataTest { + private final ReturnCheckPaymentRequestData model = new ReturnCheckPaymentRequestData(); + + /** + * Model tests for ReturnCheckPaymentRequestData + */ + @Test + public void testReturnCheckPaymentRequestData() { + // TODO: test ReturnCheckPaymentRequestData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReturnCheckPaymentRequestTest.java b/src/test/java/unit/java/sdk/model/ReturnCheckPaymentRequestTest.java new file mode 100644 index 00000000..5d4aa918 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReturnCheckPaymentRequestTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReturnCheckPaymentRequestData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReturnCheckPaymentRequest + */ +public class ReturnCheckPaymentRequestTest { + private final ReturnCheckPaymentRequest model = new ReturnCheckPaymentRequest(); + + /** + * Model tests for ReturnCheckPaymentRequest + */ + @Test + public void testReturnCheckPaymentRequest() { + // TODO: test ReturnCheckPaymentRequest + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReturnReasonTest.java b/src/test/java/unit/java/sdk/model/ReturnReasonTest.java new file mode 100644 index 00000000..67001c12 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReturnReasonTest.java @@ -0,0 +1,32 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReturnReason + */ +public class ReturnReasonTest { + /** + * Model tests for ReturnReason + */ + @Test + public void testReturnReason() { + // TODO: test ReturnReason + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReturnedAchTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/ReturnedAchTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..0ec20ce2 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReturnedAchTransactionAllOfAttributesTest.java @@ -0,0 +1,129 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReturnedAchTransactionAllOfAttributes + */ +public class ReturnedAchTransactionAllOfAttributesTest { + private final ReturnedAchTransactionAllOfAttributes model = new ReturnedAchTransactionAllOfAttributes(); + + /** + * Model tests for ReturnedAchTransactionAllOfAttributes + */ + @Test + public void testReturnedAchTransactionAllOfAttributes() { + // TODO: test ReturnedAchTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'counterpartyName' + */ + @Test + public void counterpartyNameTest() { + // TODO: test counterpartyName + } + + /** + * Test the property 'counterpartyRoutingNumber' + */ + @Test + public void counterpartyRoutingNumberTest() { + // TODO: test counterpartyRoutingNumber + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** + * Test the property 'achReason' + */ + @Test + public void achReasonTest() { + // TODO: test achReason + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReturnedAchTransactionTest.java b/src/test/java/unit/java/sdk/model/ReturnedAchTransactionTest.java new file mode 100644 index 00000000..5fb3191b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReturnedAchTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReturnedAchTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReturnedAchTransaction + */ +public class ReturnedAchTransactionTest { + private final ReturnedAchTransaction model = new ReturnedAchTransaction(); + + /** + * Model tests for ReturnedAchTransaction + */ + @Test + public void testReturnedAchTransaction() { + // TODO: test ReturnedAchTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReturnedCheckDepositTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/ReturnedCheckDepositTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..f5ab3965 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReturnedCheckDepositTransactionAllOfAttributesTest.java @@ -0,0 +1,97 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReturnedCheckDepositTransactionAllOfAttributes + */ +public class ReturnedCheckDepositTransactionAllOfAttributesTest { + private final ReturnedCheckDepositTransactionAllOfAttributes model = new ReturnedCheckDepositTransactionAllOfAttributes(); + + /** + * Model tests for ReturnedCheckDepositTransactionAllOfAttributes + */ + @Test + public void testReturnedCheckDepositTransactionAllOfAttributes() { + // TODO: test ReturnedCheckDepositTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReturnedCheckDepositTransactionTest.java b/src/test/java/unit/java/sdk/model/ReturnedCheckDepositTransactionTest.java new file mode 100644 index 00000000..db6d71a4 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReturnedCheckDepositTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReturnedCheckDepositTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReturnedCheckDepositTransaction + */ +public class ReturnedCheckDepositTransactionTest { + private final ReturnedCheckDepositTransaction model = new ReturnedCheckDepositTransaction(); + + /** + * Model tests for ReturnedCheckDepositTransaction + */ + @Test + public void testReturnedCheckDepositTransaction() { + // TODO: test ReturnedCheckDepositTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReturnedCheckPaymentTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/ReturnedCheckPaymentTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..930f4f4b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReturnedCheckPaymentTransactionAllOfAttributesTest.java @@ -0,0 +1,97 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReturnedCheckPaymentTransactionAllOfAttributes + */ +public class ReturnedCheckPaymentTransactionAllOfAttributesTest { + private final ReturnedCheckPaymentTransactionAllOfAttributes model = new ReturnedCheckPaymentTransactionAllOfAttributes(); + + /** + * Model tests for ReturnedCheckPaymentTransactionAllOfAttributes + */ + @Test + public void testReturnedCheckPaymentTransactionAllOfAttributes() { + // TODO: test ReturnedCheckPaymentTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReturnedCheckPaymentTransactionTest.java b/src/test/java/unit/java/sdk/model/ReturnedCheckPaymentTransactionTest.java new file mode 100644 index 00000000..5b25d19f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReturnedCheckPaymentTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReturnedCheckPaymentTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReturnedCheckPaymentTransaction + */ +public class ReturnedCheckPaymentTransactionTest { + private final ReturnedCheckPaymentTransaction model = new ReturnedCheckPaymentTransaction(); + + /** + * Model tests for ReturnedCheckPaymentTransaction + */ + @Test + public void testReturnedCheckPaymentTransaction() { + // TODO: test ReturnedCheckPaymentTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReturnedReceivedAchTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/ReturnedReceivedAchTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..83baeefe --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReturnedReceivedAchTransactionAllOfAttributesTest.java @@ -0,0 +1,105 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReturnedReceivedAchTransactionAllOfAttributes + */ +public class ReturnedReceivedAchTransactionAllOfAttributesTest { + private final ReturnedReceivedAchTransactionAllOfAttributes model = new ReturnedReceivedAchTransactionAllOfAttributes(); + + /** + * Model tests for ReturnedReceivedAchTransactionAllOfAttributes + */ + @Test + public void testReturnedReceivedAchTransactionAllOfAttributes() { + // TODO: test ReturnedReceivedAchTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReturnedReceivedAchTransactionTest.java b/src/test/java/unit/java/sdk/model/ReturnedReceivedAchTransactionTest.java new file mode 100644 index 00000000..3d7bff40 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReturnedReceivedAchTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReturnedReceivedAchTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReturnedReceivedAchTransaction + */ +public class ReturnedReceivedAchTransactionTest { + private final ReturnedReceivedAchTransaction model = new ReturnedReceivedAchTransaction(); + + /** + * Model tests for ReturnedReceivedAchTransaction + */ + @Test + public void testReturnedReceivedAchTransaction() { + // TODO: test ReturnedReceivedAchTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReturnedRelationshipTest.java b/src/test/java/unit/java/sdk/model/ReturnedRelationshipTest.java new file mode 100644 index 00000000..5231663a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReturnedRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsReceivePaymentTransactionData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReturnedRelationship + */ +public class ReturnedRelationshipTest { + private final ReturnedRelationship model = new ReturnedRelationship(); + + /** + * Model tests for ReturnedRelationship + */ + @Test + public void testReturnedRelationship() { + // TODO: test ReturnedRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReversalTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/ReversalTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..72e5fc17 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReversalTransactionAllOfAttributesTest.java @@ -0,0 +1,117 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReversalTransactionAllOfAttributes + */ +public class ReversalTransactionAllOfAttributesTest { + private final ReversalTransactionAllOfAttributes model = new ReversalTransactionAllOfAttributes(); + + /** + * Model tests for ReversalTransactionAllOfAttributes + */ + @Test + public void testReversalTransactionAllOfAttributes() { + // TODO: test ReversalTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'cardLast4Digits' + */ + @Test + public void cardLast4DigitsTest() { + // TODO: test cardLast4Digits + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'networkTransactionId' + */ + @Test + public void networkTransactionIdTest() { + // TODO: test networkTransactionId + } + + /** + * Test the property 'internationalServiceFee' + */ + @Test + public void internationalServiceFeeTest() { + // TODO: test internationalServiceFee + } + +} diff --git a/src/test/java/unit/java/sdk/model/ReversalTransactionTest.java b/src/test/java/unit/java/sdk/model/ReversalTransactionTest.java new file mode 100644 index 00000000..b60309e5 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ReversalTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReversalTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ReversalTransaction + */ +public class ReversalTransactionTest { + private final ReversalTransaction model = new ReversalTransaction(); + + /** + * Model tests for ReversalTransaction + */ + @Test + public void testReversalTransaction() { + // TODO: test ReversalTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/RevocabilityTest.java b/src/test/java/unit/java/sdk/model/RevocabilityTest.java new file mode 100644 index 00000000..af0d7f77 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RevocabilityTest.java @@ -0,0 +1,32 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Revocability + */ +public class RevocabilityTest { + /** + * Model tests for Revocability + */ + @Test + public void testRevocability() { + // TODO: test Revocability + } + +} diff --git a/src/test/java/unit/java/sdk/model/RewardAttributesTest.java b/src/test/java/unit/java/sdk/model/RewardAttributesTest.java new file mode 100644 index 00000000..3e67766b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RewardAttributesTest.java @@ -0,0 +1,89 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RewardAttributes + */ +public class RewardAttributesTest { + private final RewardAttributes model = new RewardAttributes(); + + /** + * Model tests for RewardAttributes + */ + @Test + public void testRewardAttributes() { + // TODO: test RewardAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'rejectReason' + */ + @Test + public void rejectReasonTest() { + // TODO: test rejectReason + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/RewardRelationshipDataTest.java b/src/test/java/unit/java/sdk/model/RewardRelationshipDataTest.java new file mode 100644 index 00000000..232fa5d3 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RewardRelationshipDataTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RewardRelationshipData + */ +public class RewardRelationshipDataTest { + private final RewardRelationshipData model = new RewardRelationshipData(); + + /** + * Model tests for RewardRelationshipData + */ + @Test + public void testRewardRelationshipData() { + // TODO: test RewardRelationshipData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/unit/java/sdk/model/RewardRelationshipTest.java b/src/test/java/unit/java/sdk/model/RewardRelationshipTest.java new file mode 100644 index 00000000..0c9c7c83 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RewardRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RewardRelationshipData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RewardRelationship + */ +public class RewardRelationshipTest { + private final RewardRelationship model = new RewardRelationship(); + + /** + * Model tests for RewardRelationship + */ + @Test + public void testRewardRelationship() { + // TODO: test RewardRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/RewardRelationshipsTest.java b/src/test/java/unit/java/sdk/model/RewardRelationshipsTest.java new file mode 100644 index 00000000..b9f21ea0 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RewardRelationshipsTest.java @@ -0,0 +1,91 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CardRelationship; +import unit.java.sdk.model.Relationship; +import unit.java.sdk.model.TransactionRelationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RewardRelationships + */ +public class RewardRelationshipsTest { + private final RewardRelationships model = new RewardRelationships(); + + /** + * Model tests for RewardRelationships + */ + @Test + public void testRewardRelationships() { + // TODO: test RewardRelationships + } + + /** + * Test the property 'receivingAccount' + */ + @Test + public void receivingAccountTest() { + // TODO: test receivingAccount + } + + /** + * Test the property 'fundingAccount' + */ + @Test + public void fundingAccountTest() { + // TODO: test fundingAccount + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + + /** + * Test the property 'rewardedTransaction' + */ + @Test + public void rewardedTransactionTest() { + // TODO: test rewardedTransaction + } + + /** + * Test the property 'transaction' + */ + @Test + public void transactionTest() { + // TODO: test transaction + } + + /** + * Test the property 'card' + */ + @Test + public void cardTest() { + // TODO: test card + } + +} diff --git a/src/test/java/unit/java/sdk/model/RewardTest.java b/src/test/java/unit/java/sdk/model/RewardTest.java new file mode 100644 index 00000000..11c898cf --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RewardTest.java @@ -0,0 +1,74 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RewardAttributes; +import unit.java.sdk.model.RewardRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Reward + */ +public class RewardTest { + private final Reward model = new Reward(); + + /** + * Model tests for Reward + */ + @Test + public void testReward() { + // TODO: test Reward + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/RewardTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/RewardTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..6b865bdd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RewardTransactionAllOfAttributesTest.java @@ -0,0 +1,98 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RewardTransactionAllOfAttributes + */ +public class RewardTransactionAllOfAttributesTest { + private final RewardTransactionAllOfAttributes model = new RewardTransactionAllOfAttributes(); + + /** + * Model tests for RewardTransactionAllOfAttributes + */ + @Test + public void testRewardTransactionAllOfAttributes() { + // TODO: test RewardTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'receiverCounterparty' + */ + @Test + public void receiverCounterpartyTest() { + // TODO: test receiverCounterparty + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/RewardTransactionTest.java b/src/test/java/unit/java/sdk/model/RewardTransactionTest.java new file mode 100644 index 00000000..74400962 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/RewardTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RewardTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for RewardTransaction + */ +public class RewardTransactionTest { + private final RewardTransaction model = new RewardTransaction(); + + /** + * Model tests for RewardTransaction + */ + @Test + public void testRewardTransaction() { + // TODO: test RewardTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/Schedule1Test.java b/src/test/java/unit/java/sdk/model/Schedule1Test.java new file mode 100644 index 00000000..fac00bae --- /dev/null +++ b/src/test/java/unit/java/sdk/model/Schedule1Test.java @@ -0,0 +1,90 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import unit.java.sdk.model.MonthlySchedule; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Schedule1 + */ +public class Schedule1Test { + private final Schedule1 model = new Schedule1(); + + /** + * Model tests for Schedule1 + */ + @Test + public void testSchedule1() { + // TODO: test Schedule1 + } + + /** + * Test the property 'startTime' + */ + @Test + public void startTimeTest() { + // TODO: test startTime + } + + /** + * Test the property 'endTime' + */ + @Test + public void endTimeTest() { + // TODO: test endTime + } + + /** + * Test the property 'dayOfMonth' + */ + @Test + public void dayOfMonthTest() { + // TODO: test dayOfMonth + } + + /** + * Test the property 'dayOfWeek' + */ + @Test + public void dayOfWeekTest() { + // TODO: test dayOfWeek + } + + /** + * Test the property 'interval' + */ + @Test + public void intervalTest() { + // TODO: test interval + } + + /** + * Test the property 'totalNumberOfPayments' + */ + @Test + public void totalNumberOfPaymentsTest() { + // TODO: test totalNumberOfPayments + } + +} diff --git a/src/test/java/unit/java/sdk/model/ScheduleTest.java b/src/test/java/unit/java/sdk/model/ScheduleTest.java new file mode 100644 index 00000000..8b9b0c88 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/ScheduleTest.java @@ -0,0 +1,89 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Schedule + */ +public class ScheduleTest { + private final Schedule model = new Schedule(); + + /** + * Model tests for Schedule + */ + @Test + public void testSchedule() { + // TODO: test Schedule + } + + /** + * Test the property 'startTime' + */ + @Test + public void startTimeTest() { + // TODO: test startTime + } + + /** + * Test the property 'endTime' + */ + @Test + public void endTimeTest() { + // TODO: test endTime + } + + /** + * Test the property 'interval' + */ + @Test + public void intervalTest() { + // TODO: test interval + } + + /** + * Test the property 'dayOfMonth' + */ + @Test + public void dayOfMonthTest() { + // TODO: test dayOfMonth + } + + /** + * Test the property 'nextScheduledAction' + */ + @Test + public void nextScheduledActionTest() { + // TODO: test nextScheduledAction + } + + /** + * Test the property 'totalNumberOfPayments' + */ + @Test + public void totalNumberOfPaymentsTest() { + // TODO: test totalNumberOfPayments + } + +} diff --git a/src/test/java/unit/java/sdk/model/SettlementTransactionTest.java b/src/test/java/unit/java/sdk/model/SettlementTransactionTest.java new file mode 100644 index 00000000..e24248e6 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/SettlementTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for SettlementTransaction + */ +public class SettlementTransactionTest { + private final SettlementTransaction model = new SettlementTransaction(); + + /** + * Model tests for SettlementTransaction + */ + @Test + public void testSettlementTransaction() { + // TODO: test SettlementTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/SoleProprietorshipAnnualRevenueTest.java b/src/test/java/unit/java/sdk/model/SoleProprietorshipAnnualRevenueTest.java new file mode 100644 index 00000000..2921ad89 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/SoleProprietorshipAnnualRevenueTest.java @@ -0,0 +1,32 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for SoleProprietorshipAnnualRevenue + */ +public class SoleProprietorshipAnnualRevenueTest { + /** + * Model tests for SoleProprietorshipAnnualRevenue + */ + @Test + public void testSoleProprietorshipAnnualRevenue() { + // TODO: test SoleProprietorshipAnnualRevenue + } + +} diff --git a/src/test/java/unit/java/sdk/model/SoleProprietorshipNumberOfEmployeesTest.java b/src/test/java/unit/java/sdk/model/SoleProprietorshipNumberOfEmployeesTest.java new file mode 100644 index 00000000..6740fe8f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/SoleProprietorshipNumberOfEmployeesTest.java @@ -0,0 +1,32 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for SoleProprietorshipNumberOfEmployees + */ +public class SoleProprietorshipNumberOfEmployeesTest { + /** + * Model tests for SoleProprietorshipNumberOfEmployees + */ + @Test + public void testSoleProprietorshipNumberOfEmployees() { + // TODO: test SoleProprietorshipNumberOfEmployees + } + +} diff --git a/src/test/java/unit/java/sdk/model/SourceOfFundsTest.java b/src/test/java/unit/java/sdk/model/SourceOfFundsTest.java new file mode 100644 index 00000000..4d1c5c95 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/SourceOfFundsTest.java @@ -0,0 +1,32 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for SourceOfFunds + */ +public class SourceOfFundsTest { + /** + * Model tests for SourceOfFunds + */ + @Test + public void testSourceOfFunds() { + // TODO: test SourceOfFunds + } + +} diff --git a/src/test/java/unit/java/sdk/model/SourceOfIncomeTest.java b/src/test/java/unit/java/sdk/model/SourceOfIncomeTest.java new file mode 100644 index 00000000..361df6f9 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/SourceOfIncomeTest.java @@ -0,0 +1,32 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for SourceOfIncome + */ +public class SourceOfIncomeTest { + /** + * Model tests for SourceOfIncome + */ + @Test + public void testSourceOfIncome() { + // TODO: test SourceOfIncome + } + +} diff --git a/src/test/java/unit/java/sdk/model/SponsoredInterestTransactionTest.java b/src/test/java/unit/java/sdk/model/SponsoredInterestTransactionTest.java new file mode 100644 index 00000000..eb963102 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/SponsoredInterestTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositTransactionAllOfAttributes; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for SponsoredInterestTransaction + */ +public class SponsoredInterestTransactionTest { + private final SponsoredInterestTransaction model = new SponsoredInterestTransaction(); + + /** + * Model tests for SponsoredInterestTransaction + */ + @Test + public void testSponsoredInterestTransaction() { + // TODO: test SponsoredInterestTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/StatementAttributesTest.java b/src/test/java/unit/java/sdk/model/StatementAttributesTest.java new file mode 100644 index 00000000..651c6e1e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/StatementAttributesTest.java @@ -0,0 +1,48 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for StatementAttributes + */ +public class StatementAttributesTest { + private final StatementAttributes model = new StatementAttributes(); + + /** + * Model tests for StatementAttributes + */ + @Test + public void testStatementAttributes() { + // TODO: test StatementAttributes + } + + /** + * Test the property 'period' + */ + @Test + public void periodTest() { + // TODO: test period + } + +} diff --git a/src/test/java/unit/java/sdk/model/StatementRelationshipsTest.java b/src/test/java/unit/java/sdk/model/StatementRelationshipsTest.java new file mode 100644 index 00000000..ae102ccf --- /dev/null +++ b/src/test/java/unit/java/sdk/model/StatementRelationshipsTest.java @@ -0,0 +1,66 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomersRelationship; +import unit.java.sdk.model.Relationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for StatementRelationships + */ +public class StatementRelationshipsTest { + private final StatementRelationships model = new StatementRelationships(); + + /** + * Model tests for StatementRelationships + */ + @Test + public void testStatementRelationships() { + // TODO: test StatementRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + + /** + * Test the property 'customers' + */ + @Test + public void customersTest() { + // TODO: test customers + } + +} diff --git a/src/test/java/unit/java/sdk/model/StatementTest.java b/src/test/java/unit/java/sdk/model/StatementTest.java new file mode 100644 index 00000000..6dbe9c42 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/StatementTest.java @@ -0,0 +1,74 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.StatementAttributes; +import unit.java.sdk.model.StatementRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Statement + */ +public class StatementTest { + private final Statement model = new Statement(); + + /** + * Model tests for Statement + */ + @Test + public void testStatement() { + // TODO: test Statement + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/StatusEventStatusTest.java b/src/test/java/unit/java/sdk/model/StatusEventStatusTest.java new file mode 100644 index 00000000..f3321265 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/StatusEventStatusTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDepositStatus; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for StatusEventStatus + */ +public class StatusEventStatusTest { + private final StatusEventStatus model = new StatusEventStatus(); + + /** + * Model tests for StatusEventStatus + */ + @Test + public void testStatusEventStatus() { + // TODO: test StatusEventStatus + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/unit/java/sdk/model/StatusEventTest.java b/src/test/java/unit/java/sdk/model/StatusEventTest.java new file mode 100644 index 00000000..7b1c6b92 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/StatusEventTest.java @@ -0,0 +1,65 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.StatusEventStatus; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for StatusEvent + */ +public class StatusEventTest { + private final StatusEvent model = new StatusEvent(); + + /** + * Model tests for StatusEvent + */ + @Test + public void testStatusEvent() { + // TODO: test StatusEvent + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'updatedBy' + */ + @Test + public void updatedByTest() { + // TODO: test updatedBy + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/unit/java/sdk/model/StopPaymentAttributesTest.java b/src/test/java/unit/java/sdk/model/StopPaymentAttributesTest.java new file mode 100644 index 00000000..d3114b3b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/StopPaymentAttributesTest.java @@ -0,0 +1,89 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for StopPaymentAttributes + */ +public class StopPaymentAttributesTest { + private final StopPaymentAttributes model = new StopPaymentAttributes(); + + /** + * Model tests for StopPaymentAttributes + */ + @Test + public void testStopPaymentAttributes() { + // TODO: test StopPaymentAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'checkNumber' + */ + @Test + public void checkNumberTest() { + // TODO: test checkNumber + } + +} diff --git a/src/test/java/unit/java/sdk/model/StopPaymentListResponseTest.java b/src/test/java/unit/java/sdk/model/StopPaymentListResponseTest.java new file mode 100644 index 00000000..e497f60e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/StopPaymentListResponseTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.StopPayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for StopPaymentListResponse + */ +public class StopPaymentListResponseTest { + private final StopPaymentListResponse model = new StopPaymentListResponse(); + + /** + * Model tests for StopPaymentListResponse + */ + @Test + public void testStopPaymentListResponse() { + // TODO: test StopPaymentListResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/StopPaymentRelationshipsCheckPaymentsDataInnerTest.java b/src/test/java/unit/java/sdk/model/StopPaymentRelationshipsCheckPaymentsDataInnerTest.java new file mode 100644 index 00000000..eeaec64f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/StopPaymentRelationshipsCheckPaymentsDataInnerTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for StopPaymentRelationshipsCheckPaymentsDataInner + */ +public class StopPaymentRelationshipsCheckPaymentsDataInnerTest { + private final StopPaymentRelationshipsCheckPaymentsDataInner model = new StopPaymentRelationshipsCheckPaymentsDataInner(); + + /** + * Model tests for StopPaymentRelationshipsCheckPaymentsDataInner + */ + @Test + public void testStopPaymentRelationshipsCheckPaymentsDataInner() { + // TODO: test StopPaymentRelationshipsCheckPaymentsDataInner + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/unit/java/sdk/model/StopPaymentRelationshipsCheckPaymentsTest.java b/src/test/java/unit/java/sdk/model/StopPaymentRelationshipsCheckPaymentsTest.java new file mode 100644 index 00000000..cacae56d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/StopPaymentRelationshipsCheckPaymentsTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.StopPaymentRelationshipsCheckPaymentsDataInner; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for StopPaymentRelationshipsCheckPayments + */ +public class StopPaymentRelationshipsCheckPaymentsTest { + private final StopPaymentRelationshipsCheckPayments model = new StopPaymentRelationshipsCheckPayments(); + + /** + * Model tests for StopPaymentRelationshipsCheckPayments + */ + @Test + public void testStopPaymentRelationshipsCheckPayments() { + // TODO: test StopPaymentRelationshipsCheckPayments + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/StopPaymentRelationshipsTest.java b/src/test/java/unit/java/sdk/model/StopPaymentRelationshipsTest.java new file mode 100644 index 00000000..ec80f928 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/StopPaymentRelationshipsTest.java @@ -0,0 +1,76 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomersRelationship; +import unit.java.sdk.model.ReceivedPaymentRelationshipsCustomer; +import unit.java.sdk.model.RecurringAchPaymentRelationshipsAccount; +import unit.java.sdk.model.StopPaymentRelationshipsCheckPayments; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for StopPaymentRelationships + */ +public class StopPaymentRelationshipsTest { + private final StopPaymentRelationships model = new StopPaymentRelationships(); + + /** + * Model tests for StopPaymentRelationships + */ + @Test + public void testStopPaymentRelationships() { + // TODO: test StopPaymentRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + + /** + * Test the property 'customers' + */ + @Test + public void customersTest() { + // TODO: test customers + } + + /** + * Test the property 'checkPayments' + */ + @Test + public void checkPaymentsTest() { + // TODO: test checkPayments + } + +} diff --git a/src/test/java/unit/java/sdk/model/StopPaymentResponseTest.java b/src/test/java/unit/java/sdk/model/StopPaymentResponseTest.java new file mode 100644 index 00000000..69cc199e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/StopPaymentResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.StopPayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for StopPaymentResponse + */ +public class StopPaymentResponseTest { + private final StopPaymentResponse model = new StopPaymentResponse(); + + /** + * Model tests for StopPaymentResponse + */ + @Test + public void testStopPaymentResponse() { + // TODO: test StopPaymentResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/StopPaymentTest.java b/src/test/java/unit/java/sdk/model/StopPaymentTest.java new file mode 100644 index 00000000..edc584e0 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/StopPaymentTest.java @@ -0,0 +1,74 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.StopPaymentAttributes; +import unit.java.sdk.model.StopPaymentRelationships; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for StopPayment + */ +public class StopPaymentTest { + private final StopPayment model = new StopPayment(); + + /** + * Model tests for StopPayment + */ + @Test + public void testStopPayment() { + // TODO: test StopPayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/TransactionRelationshipTest.java b/src/test/java/unit/java/sdk/model/TransactionRelationshipTest.java new file mode 100644 index 00000000..3a5a3030 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/TransactionRelationshipTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPaymentRelationshipsReceivePaymentTransactionData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for TransactionRelationship + */ +public class TransactionRelationshipTest { + private final TransactionRelationship model = new TransactionRelationship(); + + /** + * Model tests for TransactionRelationship + */ + @Test + public void testTransactionRelationship() { + // TODO: test TransactionRelationship + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/TransactionRelationshipsTest.java b/src/test/java/unit/java/sdk/model/TransactionRelationshipsTest.java new file mode 100644 index 00000000..b8790cb2 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/TransactionRelationshipsTest.java @@ -0,0 +1,246 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountRelationship2; +import unit.java.sdk.model.AuthorizationRelationship; +import unit.java.sdk.model.AuthorizationRequestRelationship; +import unit.java.sdk.model.CardRelationship; +import unit.java.sdk.model.ChargebackRelationship; +import unit.java.sdk.model.CheckDepositRelationship; +import unit.java.sdk.model.CheckPaymentRelationship; +import unit.java.sdk.model.CounterpartyAccountRelationship1; +import unit.java.sdk.model.CounterpartyCustomerRelationship; +import unit.java.sdk.model.CustomerRelationship; +import unit.java.sdk.model.CustomersRelationship; +import unit.java.sdk.model.IncomingAchRelationship; +import unit.java.sdk.model.OrgRelationship; +import unit.java.sdk.model.PaymentRelationship; +import unit.java.sdk.model.ReceivedPaymentRelationship; +import unit.java.sdk.model.ReceivingAccountRelationship; +import unit.java.sdk.model.RecurringPaymentRelationship; +import unit.java.sdk.model.RelatedTransaction; +import unit.java.sdk.model.RelatedTransactionRelationship; +import unit.java.sdk.model.RepaymentRelationship; +import unit.java.sdk.model.ReturnedRelationship; +import unit.java.sdk.model.RewardRelationship; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for TransactionRelationships + */ +public class TransactionRelationshipsTest { + private final TransactionRelationships model = new TransactionRelationships(); + + /** + * Model tests for TransactionRelationships + */ + @Test + public void testTransactionRelationships() { + // TODO: test TransactionRelationships + } + + /** + * Test the property 'account' + */ + @Test + public void accountTest() { + // TODO: test account + } + + /** + * Test the property 'receivingAccount' + */ + @Test + public void receivingAccountTest() { + // TODO: test receivingAccount + } + + /** + * Test the property 'customer' + */ + @Test + public void customerTest() { + // TODO: test customer + } + + /** + * Test the property 'customers' + */ + @Test + public void customersTest() { + // TODO: test customers + } + + /** + * Test the property 'counterpartyAccount' + */ + @Test + public void counterpartyAccountTest() { + // TODO: test counterpartyAccount + } + + /** + * Test the property 'counterpartyCustomer' + */ + @Test + public void counterpartyCustomerTest() { + // TODO: test counterpartyCustomer + } + + /** + * Test the property 'relatedTransaction' + */ + @Test + public void relatedTransactionTest() { + // TODO: test relatedTransaction + } + + /** + * Test the property 'disputedTransaction' + */ + @Test + public void disputedTransactionTest() { + // TODO: test disputedTransaction + } + + /** + * Test the property 'authorization' + */ + @Test + public void authorizationTest() { + // TODO: test authorization + } + + /** + * Test the property 'returned' + */ + @Test + public void returnedTest() { + // TODO: test returned + } + + /** + * Test the property 'payment' + */ + @Test + public void paymentTest() { + // TODO: test payment + } + + /** + * Test the property 'checkPayment' + */ + @Test + public void checkPaymentTest() { + // TODO: test checkPayment + } + + /** + * Test the property 'repayment' + */ + @Test + public void repaymentTest() { + // TODO: test repayment + } + + /** + * Test the property 'recurringPayment' + */ + @Test + public void recurringPaymentTest() { + // TODO: test recurringPayment + } + + /** + * Test the property 'org' + */ + @Test + public void orgTest() { + // TODO: test org + } + + /** + * Test the property 'card' + */ + @Test + public void cardTest() { + // TODO: test card + } + + /** + * Test the property 'incomingAch' + */ + @Test + public void incomingAchTest() { + // TODO: test incomingAch + } + + /** + * Test the property 'checkDeposit' + */ + @Test + public void checkDepositTest() { + // TODO: test checkDeposit + } + + /** + * Test the property 'authorizationRequest' + */ + @Test + public void authorizationRequestTest() { + // TODO: test authorizationRequest + } + + /** + * Test the property 'paymentAdvanceTransaction' + */ + @Test + public void paymentAdvanceTransactionTest() { + // TODO: test paymentAdvanceTransaction + } + + /** + * Test the property 'receivedPayment' + */ + @Test + public void receivedPaymentTest() { + // TODO: test receivedPayment + } + + /** + * Test the property 'chargeback' + */ + @Test + public void chargebackTest() { + // TODO: test chargeback + } + + /** + * Test the property 'reward' + */ + @Test + public void rewardTest() { + // TODO: test reward + } + +} diff --git a/src/test/java/unit/java/sdk/model/TransactionTest.java b/src/test/java/unit/java/sdk/model/TransactionTest.java new file mode 100644 index 00000000..91326a2d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/TransactionTest.java @@ -0,0 +1,59 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Transaction + */ +public class TransactionTest { + private final Transaction model = new Transaction(); + + /** + * Model tests for Transaction + */ + @Test + public void testTransaction() { + // TODO: test Transaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/unit/java/sdk/model/TrustApplicationAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/TrustApplicationAllOfAttributesTest.java new file mode 100644 index 00000000..97887780 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/TrustApplicationAllOfAttributesTest.java @@ -0,0 +1,266 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.ApplicationStatus; +import unit.java.sdk.model.Grantor; +import unit.java.sdk.model.Revocability; +import unit.java.sdk.model.SourceOfFunds; +import unit.java.sdk.model.TrustContact; +import unit.java.sdk.model.Trustee; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for TrustApplicationAllOfAttributes + */ +public class TrustApplicationAllOfAttributesTest { + private final TrustApplicationAllOfAttributes model = new TrustApplicationAllOfAttributes(); + + /** + * Model tests for TrustApplicationAllOfAttributes + */ + @Test + public void testTrustApplicationAllOfAttributes() { + // TODO: test TrustApplicationAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'evaluationOutcome' + */ + @Test + public void evaluationOutcomeTest() { + // TODO: test evaluationOutcome + } + + /** + * Test the property 'evaluationId' + */ + @Test + public void evaluationIdTest() { + // TODO: test evaluationId + } + + /** + * Test the property 'evaluationEntityId' + */ + @Test + public void evaluationEntityIdTest() { + // TODO: test evaluationEntityId + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'dateOfIncorporation' + */ + @Test + public void dateOfIncorporationTest() { + // TODO: test dateOfIncorporation + } + + /** + * Test the property 'stateOfIncorporation' + */ + @Test + public void stateOfIncorporationTest() { + // TODO: test stateOfIncorporation + } + + /** + * Test the property 'revocability' + */ + @Test + public void revocabilityTest() { + // TODO: test revocability + } + + /** + * Test the property 'sourceOfFunds' + */ + @Test + public void sourceOfFundsTest() { + // TODO: test sourceOfFunds + } + + /** + * Test the property 'taxId' + */ + @Test + public void taxIdTest() { + // TODO: test taxId + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'trustees' + */ + @Test + public void trusteesTest() { + // TODO: test trustees + } + + /** + * Test the property 'grantor' + */ + @Test + public void grantorTest() { + // TODO: test grantor + } + + /** + * Test the property 'ip' + */ + @Test + public void ipTest() { + // TODO: test ip + } + + /** + * Test the property 'decisionMethod' + */ + @Test + public void decisionMethodTest() { + // TODO: test decisionMethod + } + + /** + * Test the property 'decisionUserId' + */ + @Test + public void decisionUserIdTest() { + // TODO: test decisionUserId + } + + /** + * Test the property 'decisionReason' + */ + @Test + public void decisionReasonTest() { + // TODO: test decisionReason + } + + /** + * Test the property 'decisionDateTime' + */ + @Test + public void decisionDateTimeTest() { + // TODO: test decisionDateTime + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'riskRate' + */ + @Test + public void riskRateTest() { + // TODO: test riskRate + } + + /** + * Test the property 'evaluationFlags' + */ + @Test + public void evaluationFlagsTest() { + // TODO: test evaluationFlags + } + + /** + * Test the property 'ipLocationDetails' + */ + @Test + public void ipLocationDetailsTest() { + // TODO: test ipLocationDetails + } + + /** + * Test the property 'phoneLocationDetails' + */ + @Test + public void phoneLocationDetailsTest() { + // TODO: test phoneLocationDetails + } + + /** + * Test the property 'archived' + */ + @Test + public void archivedTest() { + // TODO: test archived + } + +} diff --git a/src/test/java/unit/java/sdk/model/TrustApplicationTest.java b/src/test/java/unit/java/sdk/model/TrustApplicationTest.java new file mode 100644 index 00000000..c613dd93 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/TrustApplicationTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Application; +import unit.java.sdk.model.ApplicationRelationships; +import unit.java.sdk.model.TrustApplicationAllOfAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for TrustApplication + */ +public class TrustApplicationTest { + private final TrustApplication model = new TrustApplication(); + + /** + * Model tests for TrustApplication + */ + @Test + public void testTrustApplication() { + // TODO: test TrustApplication + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/TrustContactTest.java b/src/test/java/unit/java/sdk/model/TrustContactTest.java new file mode 100644 index 00000000..a63f3b81 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/TrustContactTest.java @@ -0,0 +1,87 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for TrustContact + */ +public class TrustContactTest { + private final TrustContact model = new TrustContact(); + + /** + * Model tests for TrustContact + */ + @Test + public void testTrustContact() { + // TODO: test TrustContact + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'jwtSubject' + */ + @Test + public void jwtSubjectTest() { + // TODO: test jwtSubject + } + +} diff --git a/src/test/java/unit/java/sdk/model/TrustCustomerAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/TrustCustomerAllOfAttributesTest.java new file mode 100644 index 00000000..1cb3cf92 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/TrustCustomerAllOfAttributesTest.java @@ -0,0 +1,143 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.AuthorizedUser; +import unit.java.sdk.model.Revocability; +import unit.java.sdk.model.SourceOfFunds; +import unit.java.sdk.model.TrustContact; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for TrustCustomerAllOfAttributes + */ +public class TrustCustomerAllOfAttributesTest { + private final TrustCustomerAllOfAttributes model = new TrustCustomerAllOfAttributes(); + + /** + * Model tests for TrustCustomerAllOfAttributes + */ + @Test + public void testTrustCustomerAllOfAttributes() { + // TODO: test TrustCustomerAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'stateOfIncorporation' + */ + @Test + public void stateOfIncorporationTest() { + // TODO: test stateOfIncorporation + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'revocability' + */ + @Test + public void revocabilityTest() { + // TODO: test revocability + } + + /** + * Test the property 'sourceOfFunds' + */ + @Test + public void sourceOfFundsTest() { + // TODO: test sourceOfFunds + } + + /** + * Test the property 'taxId' + */ + @Test + public void taxIdTest() { + // TODO: test taxId + } + + /** + * Test the property 'riskRate' + */ + @Test + public void riskRateTest() { + // TODO: test riskRate + } + + /** + * Test the property 'authorizedUsers' + */ + @Test + public void authorizedUsersTest() { + // TODO: test authorizedUsers + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'archiveReason' + */ + @Test + public void archiveReasonTest() { + // TODO: test archiveReason + } + +} diff --git a/src/test/java/unit/java/sdk/model/TrustCustomerTest.java b/src/test/java/unit/java/sdk/model/TrustCustomerTest.java new file mode 100644 index 00000000..fe8f0f85 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/TrustCustomerTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Customer; +import unit.java.sdk.model.CustomerRelationships; +import unit.java.sdk.model.TrustCustomerAllOfAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for TrustCustomer + */ +public class TrustCustomerTest { + private final TrustCustomer model = new TrustCustomer(); + + /** + * Model tests for TrustCustomer + */ + @Test + public void testTrustCustomer() { + // TODO: test TrustCustomer + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/TrusteeTest.java b/src/test/java/unit/java/sdk/model/TrusteeTest.java new file mode 100644 index 00000000..f01629b6 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/TrusteeTest.java @@ -0,0 +1,116 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.FullName; +import unit.java.sdk.model.Phone; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Trustee + */ +public class TrusteeTest { + private final Trustee model = new Trustee(); + + /** + * Model tests for Trustee + */ + @Test + public void testTrustee() { + // TODO: test Trustee + } + + /** + * Test the property 'fullName' + */ + @Test + public void fullNameTest() { + // TODO: test fullName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'ssn' + */ + @Test + public void ssnTest() { + // TODO: test ssn + } + + /** + * Test the property 'passport' + */ + @Test + public void passportTest() { + // TODO: test passport + } + + /** + * Test the property 'nationality' + */ + @Test + public void nationalityTest() { + // TODO: test nationality + } + + /** + * Test the property 'matriculaConsular' + */ + @Test + public void matriculaConsularTest() { + // TODO: test matriculaConsular + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'dateOfBirth' + */ + @Test + public void dateOfBirthTest() { + // TODO: test dateOfBirth + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitAccountResponseTest.java b/src/test/java/unit/java/sdk/model/UnitAccountResponseTest.java new file mode 100644 index 00000000..eed51e82 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitAccountResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Account; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitAccountResponse + */ +public class UnitAccountResponseTest { + private final UnitAccountResponse model = new UnitAccountResponse(); + + /** + * Model tests for UnitAccountResponse + */ + @Test + public void testUnitAccountResponse() { + // TODO: test UnitAccountResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitAccountResponseWithIncludedTest.java b/src/test/java/unit/java/sdk/model/UnitAccountResponseWithIncludedTest.java new file mode 100644 index 00000000..f5cebf9d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitAccountResponseWithIncludedTest.java @@ -0,0 +1,60 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Account; +import unit.java.sdk.model.Customer; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitAccountResponseWithIncluded + */ +public class UnitAccountResponseWithIncludedTest { + private final UnitAccountResponseWithIncluded model = new UnitAccountResponseWithIncluded(); + + /** + * Model tests for UnitAccountResponseWithIncluded + */ + @Test + public void testUnitAccountResponseWithIncluded() { + // TODO: test UnitAccountResponseWithIncluded + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'included' + */ + @Test + public void includedTest() { + // TODO: test included + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitAccountsListResponseTest.java b/src/test/java/unit/java/sdk/model/UnitAccountsListResponseTest.java new file mode 100644 index 00000000..5ea55bd0 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitAccountsListResponseTest.java @@ -0,0 +1,69 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Account; +import unit.java.sdk.model.Customer; +import unit.java.sdk.model.PaginationMeta; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitAccountsListResponse + */ +public class UnitAccountsListResponseTest { + private final UnitAccountsListResponse model = new UnitAccountsListResponse(); + + /** + * Model tests for UnitAccountsListResponse + */ + @Test + public void testUnitAccountsListResponse() { + // TODO: test UnitAccountsListResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'included' + */ + @Test + public void includedTest() { + // TODO: test included + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitApiTokenResponseTest.java b/src/test/java/unit/java/sdk/model/UnitApiTokenResponseTest.java new file mode 100644 index 00000000..85e80452 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitApiTokenResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ApiToken; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitApiTokenResponse + */ +public class UnitApiTokenResponseTest { + private final UnitApiTokenResponse model = new UnitApiTokenResponse(); + + /** + * Model tests for UnitApiTokenResponse + */ + @Test + public void testUnitApiTokenResponse() { + // TODO: test UnitApiTokenResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitApplicationFormResponseTest.java b/src/test/java/unit/java/sdk/model/UnitApplicationFormResponseTest.java new file mode 100644 index 00000000..260bd726 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitApplicationFormResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ApplicationForm; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitApplicationFormResponse + */ +public class UnitApplicationFormResponseTest { + private final UnitApplicationFormResponse model = new UnitApplicationFormResponse(); + + /** + * Model tests for UnitApplicationFormResponse + */ + @Test + public void testUnitApplicationFormResponse() { + // TODO: test UnitApplicationFormResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitApplicationFormResponseWithIncludedTest.java b/src/test/java/unit/java/sdk/model/UnitApplicationFormResponseWithIncludedTest.java new file mode 100644 index 00000000..1a41699d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitApplicationFormResponseWithIncludedTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Application; +import unit.java.sdk.model.ApplicationForm; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitApplicationFormResponseWithIncluded + */ +public class UnitApplicationFormResponseWithIncludedTest { + private final UnitApplicationFormResponseWithIncluded model = new UnitApplicationFormResponseWithIncluded(); + + /** + * Model tests for UnitApplicationFormResponseWithIncluded + */ + @Test + public void testUnitApplicationFormResponseWithIncluded() { + // TODO: test UnitApplicationFormResponseWithIncluded + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'included' + */ + @Test + public void includedTest() { + // TODO: test included + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitApplicationFormsListResponseTest.java b/src/test/java/unit/java/sdk/model/UnitApplicationFormsListResponseTest.java new file mode 100644 index 00000000..8ea1625b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitApplicationFormsListResponseTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.ApplicationForm; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitApplicationFormsListResponse + */ +public class UnitApplicationFormsListResponseTest { + private final UnitApplicationFormsListResponse model = new UnitApplicationFormsListResponse(); + + /** + * Model tests for UnitApplicationFormsListResponse + */ + @Test + public void testUnitApplicationFormsListResponse() { + // TODO: test UnitApplicationFormsListResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitApplicationResponseWithIncludedTest.java b/src/test/java/unit/java/sdk/model/UnitApplicationResponseWithIncludedTest.java new file mode 100644 index 00000000..9c16c4ef --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitApplicationResponseWithIncludedTest.java @@ -0,0 +1,60 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Application; +import unit.java.sdk.model.IncludedResourceInner; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitApplicationResponseWithIncluded + */ +public class UnitApplicationResponseWithIncludedTest { + private final UnitApplicationResponseWithIncluded model = new UnitApplicationResponseWithIncluded(); + + /** + * Model tests for UnitApplicationResponseWithIncluded + */ + @Test + public void testUnitApplicationResponseWithIncluded() { + // TODO: test UnitApplicationResponseWithIncluded + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'included' + */ + @Test + public void includedTest() { + // TODO: test included + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitAuthorizationRequestResponseTest.java b/src/test/java/unit/java/sdk/model/UnitAuthorizationRequestResponseTest.java new file mode 100644 index 00000000..dc4f69b6 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitAuthorizationRequestResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationRequest; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitAuthorizationRequestResponse + */ +public class UnitAuthorizationRequestResponseTest { + private final UnitAuthorizationRequestResponse model = new UnitAuthorizationRequestResponse(); + + /** + * Model tests for UnitAuthorizationRequestResponse + */ + @Test + public void testUnitAuthorizationRequestResponse() { + // TODO: test UnitAuthorizationRequestResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitAuthorizationRequestsResponseTest.java b/src/test/java/unit/java/sdk/model/UnitAuthorizationRequestsResponseTest.java new file mode 100644 index 00000000..68ca9b8c --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitAuthorizationRequestsResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AuthorizationRequest; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitAuthorizationRequestsResponse + */ +public class UnitAuthorizationRequestsResponseTest { + private final UnitAuthorizationRequestsResponse model = new UnitAuthorizationRequestsResponse(); + + /** + * Model tests for UnitAuthorizationRequestsResponse + */ + @Test + public void testUnitAuthorizationRequestsResponse() { + // TODO: test UnitAuthorizationRequestsResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitAuthorizationResponseTest.java b/src/test/java/unit/java/sdk/model/UnitAuthorizationResponseTest.java new file mode 100644 index 00000000..fd5c6867 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitAuthorizationResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Authorization; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitAuthorizationResponse + */ +public class UnitAuthorizationResponseTest { + private final UnitAuthorizationResponse model = new UnitAuthorizationResponse(); + + /** + * Model tests for UnitAuthorizationResponse + */ + @Test + public void testUnitAuthorizationResponse() { + // TODO: test UnitAuthorizationResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitCancelApplicationResponseTest.java b/src/test/java/unit/java/sdk/model/UnitCancelApplicationResponseTest.java new file mode 100644 index 00000000..fd9f69d0 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitCancelApplicationResponseTest.java @@ -0,0 +1,60 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Application; +import unit.java.sdk.model.Document; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitCancelApplicationResponse + */ +public class UnitCancelApplicationResponseTest { + private final UnitCancelApplicationResponse model = new UnitCancelApplicationResponse(); + + /** + * Model tests for UnitCancelApplicationResponse + */ + @Test + public void testUnitCancelApplicationResponse() { + // TODO: test UnitCancelApplicationResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'included' + */ + @Test + public void includedTest() { + // TODO: test included + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitCardResponse1Test.java b/src/test/java/unit/java/sdk/model/UnitCardResponse1Test.java new file mode 100644 index 00000000..0ad24a0d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitCardResponse1Test.java @@ -0,0 +1,60 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Card; +import unit.java.sdk.model.IncludedResourceInner; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitCardResponse1 + */ +public class UnitCardResponse1Test { + private final UnitCardResponse1 model = new UnitCardResponse1(); + + /** + * Model tests for UnitCardResponse1 + */ + @Test + public void testUnitCardResponse1() { + // TODO: test UnitCardResponse1 + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'included' + */ + @Test + public void includedTest() { + // TODO: test included + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitCardResponse2Test.java b/src/test/java/unit/java/sdk/model/UnitCardResponse2Test.java new file mode 100644 index 00000000..4c2b6e02 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitCardResponse2Test.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PinStatus; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitCardResponse2 + */ +public class UnitCardResponse2Test { + private final UnitCardResponse2 model = new UnitCardResponse2(); + + /** + * Model tests for UnitCardResponse2 + */ + @Test + public void testUnitCardResponse2() { + // TODO: test UnitCardResponse2 + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitCardResponse3Test.java b/src/test/java/unit/java/sdk/model/UnitCardResponse3Test.java new file mode 100644 index 00000000..8d39bafa --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitCardResponse3Test.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Limits1; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitCardResponse3 + */ +public class UnitCardResponse3Test { + private final UnitCardResponse3 model = new UnitCardResponse3(); + + /** + * Model tests for UnitCardResponse3 + */ + @Test + public void testUnitCardResponse3() { + // TODO: test UnitCardResponse3 + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitCardResponseCardsListTest.java b/src/test/java/unit/java/sdk/model/UnitCardResponseCardsListTest.java new file mode 100644 index 00000000..45378814 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitCardResponseCardsListTest.java @@ -0,0 +1,60 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Card; +import unit.java.sdk.model.IncludedResourceInner; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitCardResponseCardsList + */ +public class UnitCardResponseCardsListTest { + private final UnitCardResponseCardsList model = new UnitCardResponseCardsList(); + + /** + * Model tests for UnitCardResponseCardsList + */ + @Test + public void testUnitCardResponseCardsList() { + // TODO: test UnitCardResponseCardsList + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'included' + */ + @Test + public void includedTest() { + // TODO: test included + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitCardResponseTest.java b/src/test/java/unit/java/sdk/model/UnitCardResponseTest.java new file mode 100644 index 00000000..7b9fb9a1 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitCardResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Card; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitCardResponse + */ +public class UnitCardResponseTest { + private final UnitCardResponse model = new UnitCardResponse(); + + /** + * Model tests for UnitCardResponse + */ + @Test + public void testUnitCardResponse() { + // TODO: test UnitCardResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitCheckDepositResponse1Test.java b/src/test/java/unit/java/sdk/model/UnitCheckDepositResponse1Test.java new file mode 100644 index 00000000..e7f01812 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitCheckDepositResponse1Test.java @@ -0,0 +1,48 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitCheckDepositResponse1 + */ +public class UnitCheckDepositResponse1Test { + private final UnitCheckDepositResponse1 model = new UnitCheckDepositResponse1(); + + /** + * Model tests for UnitCheckDepositResponse1 + */ + @Test + public void testUnitCheckDepositResponse1() { + // TODO: test UnitCheckDepositResponse1 + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitCheckDepositResponseTest.java b/src/test/java/unit/java/sdk/model/UnitCheckDepositResponseTest.java new file mode 100644 index 00000000..3f148664 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitCheckDepositResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckDeposit; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitCheckDepositResponse + */ +public class UnitCheckDepositResponseTest { + private final UnitCheckDepositResponse model = new UnitCheckDepositResponse(); + + /** + * Model tests for UnitCheckDepositResponse + */ + @Test + public void testUnitCheckDepositResponse() { + // TODO: test UnitCheckDepositResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitCheckPaymentResponseTest.java b/src/test/java/unit/java/sdk/model/UnitCheckPaymentResponseTest.java new file mode 100644 index 00000000..41e38d46 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitCheckPaymentResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CheckPayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitCheckPaymentResponse + */ +public class UnitCheckPaymentResponseTest { + private final UnitCheckPaymentResponse model = new UnitCheckPaymentResponse(); + + /** + * Model tests for UnitCheckPaymentResponse + */ + @Test + public void testUnitCheckPaymentResponse() { + // TODO: test UnitCheckPaymentResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitCounterpartiesListResponseTest.java b/src/test/java/unit/java/sdk/model/UnitCounterpartiesListResponseTest.java new file mode 100644 index 00000000..7a741660 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitCounterpartiesListResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty1; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitCounterpartiesListResponse + */ +public class UnitCounterpartiesListResponseTest { + private final UnitCounterpartiesListResponse model = new UnitCounterpartiesListResponse(); + + /** + * Model tests for UnitCounterpartiesListResponse + */ + @Test + public void testUnitCounterpartiesListResponse() { + // TODO: test UnitCounterpartiesListResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitCounterpartyResponse1Test.java b/src/test/java/unit/java/sdk/model/UnitCounterpartyResponse1Test.java new file mode 100644 index 00000000..30358930 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitCounterpartyResponse1Test.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CounterpartyBalance; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitCounterpartyResponse1 + */ +public class UnitCounterpartyResponse1Test { + private final UnitCounterpartyResponse1 model = new UnitCounterpartyResponse1(); + + /** + * Model tests for UnitCounterpartyResponse1 + */ + @Test + public void testUnitCounterpartyResponse1() { + // TODO: test UnitCounterpartyResponse1 + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitCounterpartyResponseTest.java b/src/test/java/unit/java/sdk/model/UnitCounterpartyResponseTest.java new file mode 100644 index 00000000..2db7bad6 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitCounterpartyResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty1; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitCounterpartyResponse + */ +public class UnitCounterpartyResponseTest { + private final UnitCounterpartyResponse model = new UnitCounterpartyResponse(); + + /** + * Model tests for UnitCounterpartyResponse + */ + @Test + public void testUnitCounterpartyResponse() { + // TODO: test UnitCounterpartyResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitCreateApplicationResponseTest.java b/src/test/java/unit/java/sdk/model/UnitCreateApplicationResponseTest.java new file mode 100644 index 00000000..5e0d998d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitCreateApplicationResponseTest.java @@ -0,0 +1,60 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Application; +import unit.java.sdk.model.Document; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitCreateApplicationResponse + */ +public class UnitCreateApplicationResponseTest { + private final UnitCreateApplicationResponse model = new UnitCreateApplicationResponse(); + + /** + * Model tests for UnitCreateApplicationResponse + */ + @Test + public void testUnitCreateApplicationResponse() { + // TODO: test UnitCreateApplicationResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'included' + */ + @Test + public void includedTest() { + // TODO: test included + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitCustomerResponseTest.java b/src/test/java/unit/java/sdk/model/UnitCustomerResponseTest.java new file mode 100644 index 00000000..2162b91b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitCustomerResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Customer; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitCustomerResponse + */ +public class UnitCustomerResponseTest { + private final UnitCustomerResponse model = new UnitCustomerResponse(); + + /** + * Model tests for UnitCustomerResponse + */ + @Test + public void testUnitCustomerResponse() { + // TODO: test UnitCustomerResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitCustomerTokenResponseTest.java b/src/test/java/unit/java/sdk/model/UnitCustomerTokenResponseTest.java new file mode 100644 index 00000000..616a59a6 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitCustomerTokenResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomerToken; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitCustomerTokenResponse + */ +public class UnitCustomerTokenResponseTest { + private final UnitCustomerTokenResponse model = new UnitCustomerTokenResponse(); + + /** + * Model tests for UnitCustomerTokenResponse + */ + @Test + public void testUnitCustomerTokenResponse() { + // TODO: test UnitCustomerTokenResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitCustomerTokenVerificationResponseTest.java b/src/test/java/unit/java/sdk/model/UnitCustomerTokenVerificationResponseTest.java new file mode 100644 index 00000000..e678a408 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitCustomerTokenVerificationResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.CustomerTokenVerification; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitCustomerTokenVerificationResponse + */ +public class UnitCustomerTokenVerificationResponseTest { + private final UnitCustomerTokenVerificationResponse model = new UnitCustomerTokenVerificationResponse(); + + /** + * Model tests for UnitCustomerTokenVerificationResponse + */ + @Test + public void testUnitCustomerTokenVerificationResponse() { + // TODO: test UnitCustomerTokenVerificationResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitCustomersListResponseTest.java b/src/test/java/unit/java/sdk/model/UnitCustomersListResponseTest.java new file mode 100644 index 00000000..551ac9e1 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitCustomersListResponseTest.java @@ -0,0 +1,60 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Customer; +import unit.java.sdk.model.PaginationMeta; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitCustomersListResponse + */ +public class UnitCustomersListResponseTest { + private final UnitCustomersListResponse model = new UnitCustomersListResponse(); + + /** + * Model tests for UnitCustomersListResponse + */ + @Test + public void testUnitCustomersListResponse() { + // TODO: test UnitCustomersListResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitDisputeResponseTest.java b/src/test/java/unit/java/sdk/model/UnitDisputeResponseTest.java new file mode 100644 index 00000000..0c1c2838 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitDisputeResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Dispute; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitDisputeResponse + */ +public class UnitDisputeResponseTest { + private final UnitDisputeResponse model = new UnitDisputeResponse(); + + /** + * Model tests for UnitDisputeResponse + */ + @Test + public void testUnitDisputeResponse() { + // TODO: test UnitDisputeResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitDocumentResponseTest.java b/src/test/java/unit/java/sdk/model/UnitDocumentResponseTest.java new file mode 100644 index 00000000..141303bd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitDocumentResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Document; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitDocumentResponse + */ +public class UnitDocumentResponseTest { + private final UnitDocumentResponse model = new UnitDocumentResponse(); + + /** + * Model tests for UnitDocumentResponse + */ + @Test + public void testUnitDocumentResponse() { + // TODO: test UnitDocumentResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitEventListResponseTest.java b/src/test/java/unit/java/sdk/model/UnitEventListResponseTest.java new file mode 100644 index 00000000..f8fecf06 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitEventListResponseTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Event; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitEventListResponse + */ +public class UnitEventListResponseTest { + private final UnitEventListResponse model = new UnitEventListResponse(); + + /** + * Model tests for UnitEventListResponse + */ + @Test + public void testUnitEventListResponse() { + // TODO: test UnitEventListResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitEventResponse1Test.java b/src/test/java/unit/java/sdk/model/UnitEventResponse1Test.java new file mode 100644 index 00000000..b694230b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitEventResponse1Test.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Event; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitEventResponse1 + */ +public class UnitEventResponse1Test { + private final UnitEventResponse1 model = new UnitEventResponse1(); + + /** + * Model tests for UnitEventResponse1 + */ + @Test + public void testUnitEventResponse1() { + // TODO: test UnitEventResponse1 + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitEventResponseTest.java b/src/test/java/unit/java/sdk/model/UnitEventResponseTest.java new file mode 100644 index 00000000..b86a7ece --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitEventResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Event; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitEventResponse + */ +public class UnitEventResponseTest { + private final UnitEventResponse model = new UnitEventResponse(); + + /** + * Model tests for UnitEventResponse + */ + @Test + public void testUnitEventResponse() { + // TODO: test UnitEventResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitFeeResponseTest.java b/src/test/java/unit/java/sdk/model/UnitFeeResponseTest.java new file mode 100644 index 00000000..6a1d7e15 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitFeeResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Fee; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitFeeResponse + */ +public class UnitFeeResponseTest { + private final UnitFeeResponse model = new UnitFeeResponse(); + + /** + * Model tests for UnitFeeResponse + */ + @Test + public void testUnitFeeResponse() { + // TODO: test UnitFeeResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitGetAccountEndOfDayListResponseTest.java b/src/test/java/unit/java/sdk/model/UnitGetAccountEndOfDayListResponseTest.java new file mode 100644 index 00000000..8a573edf --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitGetAccountEndOfDayListResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.AccountEndOfDay; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitGetAccountEndOfDayListResponse + */ +public class UnitGetAccountEndOfDayListResponseTest { + private final UnitGetAccountEndOfDayListResponse model = new UnitGetAccountEndOfDayListResponse(); + + /** + * Model tests for UnitGetAccountEndOfDayListResponse + */ + @Test + public void testUnitGetAccountEndOfDayListResponse() { + // TODO: test UnitGetAccountEndOfDayListResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitGetAccountLimitsResponseTest.java b/src/test/java/unit/java/sdk/model/UnitGetAccountLimitsResponseTest.java new file mode 100644 index 00000000..2325dc2f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitGetAccountLimitsResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Limits; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitGetAccountLimitsResponse + */ +public class UnitGetAccountLimitsResponseTest { + private final UnitGetAccountLimitsResponse model = new UnitGetAccountLimitsResponse(); + + /** + * Model tests for UnitGetAccountLimitsResponse + */ + @Test + public void testUnitGetAccountLimitsResponse() { + // TODO: test UnitGetAccountLimitsResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitInstitutionResponseTest.java b/src/test/java/unit/java/sdk/model/UnitInstitutionResponseTest.java new file mode 100644 index 00000000..a1c20229 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitInstitutionResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Institution; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitInstitutionResponse + */ +public class UnitInstitutionResponseTest { + private final UnitInstitutionResponse model = new UnitInstitutionResponse(); + + /** + * Model tests for UnitInstitutionResponse + */ + @Test + public void testUnitInstitutionResponse() { + // TODO: test UnitInstitutionResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitListApplicationsResponseTest.java b/src/test/java/unit/java/sdk/model/UnitListApplicationsResponseTest.java new file mode 100644 index 00000000..632e93a5 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitListApplicationsResponseTest.java @@ -0,0 +1,60 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Application; +import unit.java.sdk.model.PaginationMeta; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitListApplicationsResponse + */ +public class UnitListApplicationsResponseTest { + private final UnitListApplicationsResponse model = new UnitListApplicationsResponse(); + + /** + * Model tests for UnitListApplicationsResponse + */ + @Test + public void testUnitListApplicationsResponse() { + // TODO: test UnitListApplicationsResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitListAuthorizationRequestsResponseTest.java b/src/test/java/unit/java/sdk/model/UnitListAuthorizationRequestsResponseTest.java new file mode 100644 index 00000000..c13d0228 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitListAuthorizationRequestsResponseTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.AuthorizationRequest; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitListAuthorizationRequestsResponse + */ +public class UnitListAuthorizationRequestsResponseTest { + private final UnitListAuthorizationRequestsResponse model = new UnitListAuthorizationRequestsResponse(); + + /** + * Model tests for UnitListAuthorizationRequestsResponse + */ + @Test + public void testUnitListAuthorizationRequestsResponse() { + // TODO: test UnitListAuthorizationRequestsResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitListAuthorizationsResponseTest.java b/src/test/java/unit/java/sdk/model/UnitListAuthorizationsResponseTest.java new file mode 100644 index 00000000..d4e3e9c6 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitListAuthorizationsResponseTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Authorization; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitListAuthorizationsResponse + */ +public class UnitListAuthorizationsResponseTest { + private final UnitListAuthorizationsResponse model = new UnitListAuthorizationsResponse(); + + /** + * Model tests for UnitListAuthorizationsResponse + */ + @Test + public void testUnitListAuthorizationsResponse() { + // TODO: test UnitListAuthorizationsResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitListCheckDepositsResponseTest.java b/src/test/java/unit/java/sdk/model/UnitListCheckDepositsResponseTest.java new file mode 100644 index 00000000..596a017e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitListCheckDepositsResponseTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.CheckDeposit; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitListCheckDepositsResponse + */ +public class UnitListCheckDepositsResponseTest { + private final UnitListCheckDepositsResponse model = new UnitListCheckDepositsResponse(); + + /** + * Model tests for UnitListCheckDepositsResponse + */ + @Test + public void testUnitListCheckDepositsResponse() { + // TODO: test UnitListCheckDepositsResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitListCheckPaymentsResponseTest.java b/src/test/java/unit/java/sdk/model/UnitListCheckPaymentsResponseTest.java new file mode 100644 index 00000000..592fb1ee --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitListCheckPaymentsResponseTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.CheckPayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitListCheckPaymentsResponse + */ +public class UnitListCheckPaymentsResponseTest { + private final UnitListCheckPaymentsResponse model = new UnitListCheckPaymentsResponse(); + + /** + * Model tests for UnitListCheckPaymentsResponse + */ + @Test + public void testUnitListCheckPaymentsResponse() { + // TODO: test UnitListCheckPaymentsResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitListDocumentsResponseTest.java b/src/test/java/unit/java/sdk/model/UnitListDocumentsResponseTest.java new file mode 100644 index 00000000..b1a0d8db --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitListDocumentsResponseTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Document; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitListDocumentsResponse + */ +public class UnitListDocumentsResponseTest { + private final UnitListDocumentsResponse model = new UnitListDocumentsResponse(); + + /** + * Model tests for UnitListDocumentsResponse + */ + @Test + public void testUnitListDocumentsResponse() { + // TODO: test UnitListDocumentsResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitOrgApiTokensListResponseTest.java b/src/test/java/unit/java/sdk/model/UnitOrgApiTokensListResponseTest.java new file mode 100644 index 00000000..52410c20 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitOrgApiTokensListResponseTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.ApiToken; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitOrgApiTokensListResponse + */ +public class UnitOrgApiTokensListResponseTest { + private final UnitOrgApiTokensListResponse model = new UnitOrgApiTokensListResponse(); + + /** + * Model tests for UnitOrgApiTokensListResponse + */ + @Test + public void testUnitOrgApiTokensListResponse() { + // TODO: test UnitOrgApiTokensListResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitPaymentResponseTest.java b/src/test/java/unit/java/sdk/model/UnitPaymentResponseTest.java new file mode 100644 index 00000000..c7302266 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitPaymentResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Payment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitPaymentResponse + */ +public class UnitPaymentResponseTest { + private final UnitPaymentResponse model = new UnitPaymentResponse(); + + /** + * Model tests for UnitPaymentResponse + */ + @Test + public void testUnitPaymentResponse() { + // TODO: test UnitPaymentResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitPaymentResponseWithIncludedTest.java b/src/test/java/unit/java/sdk/model/UnitPaymentResponseWithIncludedTest.java new file mode 100644 index 00000000..8f951192 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitPaymentResponseWithIncludedTest.java @@ -0,0 +1,60 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.IncludedResourceInner; +import unit.java.sdk.model.Payment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitPaymentResponseWithIncluded + */ +public class UnitPaymentResponseWithIncludedTest { + private final UnitPaymentResponseWithIncluded model = new UnitPaymentResponseWithIncluded(); + + /** + * Model tests for UnitPaymentResponseWithIncluded + */ + @Test + public void testUnitPaymentResponseWithIncluded() { + // TODO: test UnitPaymentResponseWithIncluded + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'included' + */ + @Test + public void includedTest() { + // TODO: test included + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitPaymentsListResponseTest.java b/src/test/java/unit/java/sdk/model/UnitPaymentsListResponseTest.java new file mode 100644 index 00000000..585f4b19 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitPaymentsListResponseTest.java @@ -0,0 +1,69 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.IncludedResourceInner; +import unit.java.sdk.model.PaginationMeta; +import unit.java.sdk.model.Payment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitPaymentsListResponse + */ +public class UnitPaymentsListResponseTest { + private final UnitPaymentsListResponse model = new UnitPaymentsListResponse(); + + /** + * Model tests for UnitPaymentsListResponse + */ + @Test + public void testUnitPaymentsListResponse() { + // TODO: test UnitPaymentsListResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'included' + */ + @Test + public void includedTest() { + // TODO: test included + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitReceivedPaymentListResponseTest.java b/src/test/java/unit/java/sdk/model/UnitReceivedPaymentListResponseTest.java new file mode 100644 index 00000000..51053b86 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitReceivedPaymentListResponseTest.java @@ -0,0 +1,69 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.IncludedResourceInner; +import unit.java.sdk.model.PaginationMeta; +import unit.java.sdk.model.ReceivedPayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitReceivedPaymentListResponse + */ +public class UnitReceivedPaymentListResponseTest { + private final UnitReceivedPaymentListResponse model = new UnitReceivedPaymentListResponse(); + + /** + * Model tests for UnitReceivedPaymentListResponse + */ + @Test + public void testUnitReceivedPaymentListResponse() { + // TODO: test UnitReceivedPaymentListResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'included' + */ + @Test + public void includedTest() { + // TODO: test included + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitReceivedPaymentResponseTest.java b/src/test/java/unit/java/sdk/model/UnitReceivedPaymentResponseTest.java new file mode 100644 index 00000000..8fd074dd --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitReceivedPaymentResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.ReceivedPayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitReceivedPaymentResponse + */ +public class UnitReceivedPaymentResponseTest { + private final UnitReceivedPaymentResponse model = new UnitReceivedPaymentResponse(); + + /** + * Model tests for UnitReceivedPaymentResponse + */ + @Test + public void testUnitReceivedPaymentResponse() { + // TODO: test UnitReceivedPaymentResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitReceivedPaymentResponseWithIncludedTest.java b/src/test/java/unit/java/sdk/model/UnitReceivedPaymentResponseWithIncludedTest.java new file mode 100644 index 00000000..192cdb31 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitReceivedPaymentResponseWithIncludedTest.java @@ -0,0 +1,60 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.IncludedResourceInner; +import unit.java.sdk.model.ReceivedPayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitReceivedPaymentResponseWithIncluded + */ +public class UnitReceivedPaymentResponseWithIncludedTest { + private final UnitReceivedPaymentResponseWithIncluded model = new UnitReceivedPaymentResponseWithIncluded(); + + /** + * Model tests for UnitReceivedPaymentResponseWithIncluded + */ + @Test + public void testUnitReceivedPaymentResponseWithIncluded() { + // TODO: test UnitReceivedPaymentResponseWithIncluded + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'included' + */ + @Test + public void includedTest() { + // TODO: test included + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitRecurringPaymentListResponseTest.java b/src/test/java/unit/java/sdk/model/UnitRecurringPaymentListResponseTest.java new file mode 100644 index 00000000..185fddea --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitRecurringPaymentListResponseTest.java @@ -0,0 +1,60 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.PaginationMeta; +import unit.java.sdk.model.RecurringPayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitRecurringPaymentListResponse + */ +public class UnitRecurringPaymentListResponseTest { + private final UnitRecurringPaymentListResponse model = new UnitRecurringPaymentListResponse(); + + /** + * Model tests for UnitRecurringPaymentListResponse + */ + @Test + public void testUnitRecurringPaymentListResponse() { + // TODO: test UnitRecurringPaymentListResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitRecurringPaymentResponseTest.java b/src/test/java/unit/java/sdk/model/UnitRecurringPaymentResponseTest.java new file mode 100644 index 00000000..cb7cc5bf --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitRecurringPaymentResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.RecurringPayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitRecurringPaymentResponse + */ +public class UnitRecurringPaymentResponseTest { + private final UnitRecurringPaymentResponse model = new UnitRecurringPaymentResponse(); + + /** + * Model tests for UnitRecurringPaymentResponse + */ + @Test + public void testUnitRecurringPaymentResponse() { + // TODO: test UnitRecurringPaymentResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitRepaymentResponseTest.java b/src/test/java/unit/java/sdk/model/UnitRepaymentResponseTest.java new file mode 100644 index 00000000..b4795755 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitRepaymentResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Repayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitRepaymentResponse + */ +public class UnitRepaymentResponseTest { + private final UnitRepaymentResponse model = new UnitRepaymentResponse(); + + /** + * Model tests for UnitRepaymentResponse + */ + @Test + public void testUnitRepaymentResponse() { + // TODO: test UnitRepaymentResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitRepaymentsListResponseTest.java b/src/test/java/unit/java/sdk/model/UnitRepaymentsListResponseTest.java new file mode 100644 index 00000000..ea75217f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitRepaymentsListResponseTest.java @@ -0,0 +1,60 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.PaginationMeta; +import unit.java.sdk.model.Repayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitRepaymentsListResponse + */ +public class UnitRepaymentsListResponseTest { + private final UnitRepaymentsListResponse model = new UnitRepaymentsListResponse(); + + /** + * Model tests for UnitRepaymentsListResponse + */ + @Test + public void testUnitRepaymentsListResponse() { + // TODO: test UnitRepaymentsListResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitRewardResponseTest.java b/src/test/java/unit/java/sdk/model/UnitRewardResponseTest.java new file mode 100644 index 00000000..3372a83a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitRewardResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Reward; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitRewardResponse + */ +public class UnitRewardResponseTest { + private final UnitRewardResponse model = new UnitRewardResponse(); + + /** + * Model tests for UnitRewardResponse + */ + @Test + public void testUnitRewardResponse() { + // TODO: test UnitRewardResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitRewardsListResponseTest.java b/src/test/java/unit/java/sdk/model/UnitRewardsListResponseTest.java new file mode 100644 index 00000000..4e97db8f --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitRewardsListResponseTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Reward; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitRewardsListResponse + */ +public class UnitRewardsListResponseTest { + private final UnitRewardsListResponse model = new UnitRewardsListResponse(); + + /** + * Model tests for UnitRewardsListResponse + */ + @Test + public void testUnitRewardsListResponse() { + // TODO: test UnitRewardsListResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitStatementsResponseTest.java b/src/test/java/unit/java/sdk/model/UnitStatementsResponseTest.java new file mode 100644 index 00000000..7d5c81bf --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitStatementsResponseTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Statement; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitStatementsResponse + */ +public class UnitStatementsResponseTest { + private final UnitStatementsResponse model = new UnitStatementsResponse(); + + /** + * Model tests for UnitStatementsResponse + */ + @Test + public void testUnitStatementsResponse() { + // TODO: test UnitStatementsResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitTransactionResponse1Test.java b/src/test/java/unit/java/sdk/model/UnitTransactionResponse1Test.java new file mode 100644 index 00000000..5ffec3af --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitTransactionResponse1Test.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Transaction; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitTransactionResponse1 + */ +public class UnitTransactionResponse1Test { + private final UnitTransactionResponse1 model = new UnitTransactionResponse1(); + + /** + * Model tests for UnitTransactionResponse1 + */ + @Test + public void testUnitTransactionResponse1() { + // TODO: test UnitTransactionResponse1 + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitTransactionResponseTest.java b/src/test/java/unit/java/sdk/model/UnitTransactionResponseTest.java new file mode 100644 index 00000000..31775035 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitTransactionResponseTest.java @@ -0,0 +1,60 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.IncludedResourceInner; +import unit.java.sdk.model.Transaction; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitTransactionResponse + */ +public class UnitTransactionResponseTest { + private final UnitTransactionResponse model = new UnitTransactionResponse(); + + /** + * Model tests for UnitTransactionResponse + */ + @Test + public void testUnitTransactionResponse() { + // TODO: test UnitTransactionResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'included' + */ + @Test + public void includedTest() { + // TODO: test included + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitTransactionsListResponseTest.java b/src/test/java/unit/java/sdk/model/UnitTransactionsListResponseTest.java new file mode 100644 index 00000000..ce8ac7b7 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitTransactionsListResponseTest.java @@ -0,0 +1,69 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.IncludedResourceInner; +import unit.java.sdk.model.PaginationMeta; +import unit.java.sdk.model.Transaction; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitTransactionsListResponse + */ +public class UnitTransactionsListResponseTest { + private final UnitTransactionsListResponse model = new UnitTransactionsListResponse(); + + /** + * Model tests for UnitTransactionsListResponse + */ + @Test + public void testUnitTransactionsListResponse() { + // TODO: test UnitTransactionsListResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'included' + */ + @Test + public void includedTest() { + // TODO: test included + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitWebhookResponseTest.java b/src/test/java/unit/java/sdk/model/UnitWebhookResponseTest.java new file mode 100644 index 00000000..4e6f7f8a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitWebhookResponseTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Webhook; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitWebhookResponse + */ +public class UnitWebhookResponseTest { + private final UnitWebhookResponse model = new UnitWebhookResponse(); + + /** + * Model tests for UnitWebhookResponse + */ + @Test + public void testUnitWebhookResponse() { + // TODO: test UnitWebhookResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UnitWebhooksListResponseTest.java b/src/test/java/unit/java/sdk/model/UnitWebhooksListResponseTest.java new file mode 100644 index 00000000..0ab85cc2 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UnitWebhooksListResponseTest.java @@ -0,0 +1,51 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import unit.java.sdk.model.Webhook; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UnitWebhooksListResponse + */ +public class UnitWebhooksListResponseTest { + private final UnitWebhooksListResponse model = new UnitWebhooksListResponse(); + + /** + * Model tests for UnitWebhooksListResponse + */ + @Test + public void testUnitWebhooksListResponse() { + // TODO: test UnitWebhooksListResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateApplicationDataTest.java b/src/test/java/unit/java/sdk/model/UpdateApplicationDataTest.java new file mode 100644 index 00000000..a3a58310 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateApplicationDataTest.java @@ -0,0 +1,63 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessApplication; +import unit.java.sdk.model.PatchBusinessApplicationBeneficialOwner; +import unit.java.sdk.model.PatchBusinessApplicationOfficer; +import unit.java.sdk.model.PatchIndividualApplication; +import unit.java.sdk.model.PatchSoleProprietorApplication; +import unit.java.sdk.model.PatchTrustApplication; +import unit.java.sdk.model.PatchTrustApplicationAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateApplicationData + */ +public class UpdateApplicationDataTest { + private final UpdateApplicationData model = new UpdateApplicationData(); + + /** + * Model tests for UpdateApplicationData + */ + @Test + public void testUpdateApplicationData() { + // TODO: test UpdateApplicationData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateApplicationTest.java b/src/test/java/unit/java/sdk/model/UpdateApplicationTest.java new file mode 100644 index 00000000..5f5bc6bb --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateApplicationTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateApplicationData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateApplication + */ +public class UpdateApplicationTest { + private final UpdateApplication model = new UpdateApplication(); + + /** + * Model tests for UpdateApplication + */ + @Test + public void testUpdateApplication() { + // TODO: test UpdateApplication + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateBusinessCustomerAttributesTest.java b/src/test/java/unit/java/sdk/model/UpdateBusinessCustomerAttributesTest.java new file mode 100644 index 00000000..be7a5085 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateBusinessCustomerAttributesTest.java @@ -0,0 +1,106 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.AuthorizedUser; +import unit.java.sdk.model.Phone; +import unit.java.sdk.model.ResponseContact; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateBusinessCustomerAttributes + */ +public class UpdateBusinessCustomerAttributesTest { + private final UpdateBusinessCustomerAttributes model = new UpdateBusinessCustomerAttributes(); + + /** + * Model tests for UpdateBusinessCustomerAttributes + */ + @Test + public void testUpdateBusinessCustomerAttributes() { + // TODO: test UpdateBusinessCustomerAttributes + } + + /** + * Test the property 'dba' + */ + @Test + public void dbaTest() { + // TODO: test dba + } + + /** + * Test the property 'ein' + */ + @Test + public void einTest() { + // TODO: test ein + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'authorizedUsers' + */ + @Test + public void authorizedUsersTest() { + // TODO: test authorizedUsers + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateBusinessCustomerTest.java b/src/test/java/unit/java/sdk/model/UpdateBusinessCustomerTest.java new file mode 100644 index 00000000..0b2c7dde --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateBusinessCustomerTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateBusinessCustomerAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateBusinessCustomer + */ +public class UpdateBusinessCustomerTest { + private final UpdateBusinessCustomer model = new UpdateBusinessCustomer(); + + /** + * Model tests for UpdateBusinessCustomer + */ + @Test + public void testUpdateBusinessCustomer() { + // TODO: test UpdateBusinessCustomer + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateCardDataTest.java b/src/test/java/unit/java/sdk/model/UpdateCardDataTest.java new file mode 100644 index 00000000..de4d5507 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateCardDataTest.java @@ -0,0 +1,63 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBusinessCreditCard; +import unit.java.sdk.model.PatchBusinessDebitCard; +import unit.java.sdk.model.PatchBusinessVirtualCreditCard; +import unit.java.sdk.model.PatchBusinessVirtualDebitCard; +import unit.java.sdk.model.PatchBusinessVirtualDebitCardAttributes; +import unit.java.sdk.model.PatchIndividualDebitCard; +import unit.java.sdk.model.PatchIndividualVirtualDebitCard; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateCardData + */ +public class UpdateCardDataTest { + private final UpdateCardData model = new UpdateCardData(); + + /** + * Model tests for UpdateCardData + */ + @Test + public void testUpdateCardData() { + // TODO: test UpdateCardData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateCardTest.java b/src/test/java/unit/java/sdk/model/UpdateCardTest.java new file mode 100644 index 00000000..b4e4fadb --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateCardTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateCardData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateCard + */ +public class UpdateCardTest { + private final UpdateCard model = new UpdateCard(); + + /** + * Model tests for UpdateCard + */ + @Test + public void testUpdateCard() { + // TODO: test UpdateCard + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateCheckDepositTest.java b/src/test/java/unit/java/sdk/model/UpdateCheckDepositTest.java new file mode 100644 index 00000000..ae694a73 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateCheckDepositTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchCheckDeposit; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateCheckDeposit + */ +public class UpdateCheckDepositTest { + private final UpdateCheckDeposit model = new UpdateCheckDeposit(); + + /** + * Model tests for UpdateCheckDeposit + */ + @Test + public void testUpdateCheckDeposit() { + // TODO: test UpdateCheckDeposit + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateCounterpartyDataTest.java b/src/test/java/unit/java/sdk/model/UpdateCounterpartyDataTest.java new file mode 100644 index 00000000..aee58679 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateCounterpartyDataTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchCounterparty; +import unit.java.sdk.model.PatchCounterpartyAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateCounterpartyData + */ +public class UpdateCounterpartyDataTest { + private final UpdateCounterpartyData model = new UpdateCounterpartyData(); + + /** + * Model tests for UpdateCounterpartyData + */ + @Test + public void testUpdateCounterpartyData() { + // TODO: test UpdateCounterpartyData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateCounterpartyTest.java b/src/test/java/unit/java/sdk/model/UpdateCounterpartyTest.java new file mode 100644 index 00000000..f5e5aba9 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateCounterpartyTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateCounterpartyData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateCounterparty + */ +public class UpdateCounterpartyTest { + private final UpdateCounterparty model = new UpdateCounterparty(); + + /** + * Model tests for UpdateCounterparty + */ + @Test + public void testUpdateCounterparty() { + // TODO: test UpdateCounterparty + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateCreditAccountAttributesTest.java b/src/test/java/unit/java/sdk/model/UpdateCreditAccountAttributesTest.java new file mode 100644 index 00000000..71991c08 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateCreditAccountAttributesTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateCreditAccountAttributes + */ +public class UpdateCreditAccountAttributesTest { + private final UpdateCreditAccountAttributes model = new UpdateCreditAccountAttributes(); + + /** + * Model tests for UpdateCreditAccountAttributes + */ + @Test + public void testUpdateCreditAccountAttributes() { + // TODO: test UpdateCreditAccountAttributes + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'creditLimit' + */ + @Test + public void creditLimitTest() { + // TODO: test creditLimit + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateCreditAccountTest.java b/src/test/java/unit/java/sdk/model/UpdateCreditAccountTest.java new file mode 100644 index 00000000..5c39e0e7 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateCreditAccountTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateCreditAccountAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateCreditAccount + */ +public class UpdateCreditAccountTest { + private final UpdateCreditAccount model = new UpdateCreditAccount(); + + /** + * Model tests for UpdateCreditAccount + */ + @Test + public void testUpdateCreditAccount() { + // TODO: test UpdateCreditAccount + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateCustomerDataTest.java b/src/test/java/unit/java/sdk/model/UpdateCustomerDataTest.java new file mode 100644 index 00000000..d442e63b --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateCustomerDataTest.java @@ -0,0 +1,60 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateBusinessCustomer; +import unit.java.sdk.model.UpdateIndividualCustomer; +import unit.java.sdk.model.UpdateTrustCustomer; +import unit.java.sdk.model.UpdateTrustCustomerAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateCustomerData + */ +public class UpdateCustomerDataTest { + private final UpdateCustomerData model = new UpdateCustomerData(); + + /** + * Model tests for UpdateCustomerData + */ + @Test + public void testUpdateCustomerData() { + // TODO: test UpdateCustomerData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateCustomerTest.java b/src/test/java/unit/java/sdk/model/UpdateCustomerTest.java new file mode 100644 index 00000000..b62fa4ba --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateCustomerTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateCustomerData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateCustomer + */ +public class UpdateCustomerTest { + private final UpdateCustomer model = new UpdateCustomer(); + + /** + * Model tests for UpdateCustomer + */ + @Test + public void testUpdateCustomer() { + // TODO: test UpdateCustomer + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateDepositAccountAttributesTest.java b/src/test/java/unit/java/sdk/model/UpdateDepositAccountAttributesTest.java new file mode 100644 index 00000000..8e7a96d5 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateDepositAccountAttributesTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateDepositAccountAttributes + */ +public class UpdateDepositAccountAttributesTest { + private final UpdateDepositAccountAttributes model = new UpdateDepositAccountAttributes(); + + /** + * Model tests for UpdateDepositAccountAttributes + */ + @Test + public void testUpdateDepositAccountAttributes() { + // TODO: test UpdateDepositAccountAttributes + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'depositProduct' + */ + @Test + public void depositProductTest() { + // TODO: test depositProduct + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateDepositAccountTest.java b/src/test/java/unit/java/sdk/model/UpdateDepositAccountTest.java new file mode 100644 index 00000000..37c7a66d --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateDepositAccountTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateDepositAccountAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateDepositAccount + */ +public class UpdateDepositAccountTest { + private final UpdateDepositAccount model = new UpdateDepositAccount(); + + /** + * Model tests for UpdateDepositAccount + */ + @Test + public void testUpdateDepositAccount() { + // TODO: test UpdateDepositAccount + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateIndividualCustomerAttributesTest.java b/src/test/java/unit/java/sdk/model/UpdateIndividualCustomerAttributesTest.java new file mode 100644 index 00000000..13edd431 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateIndividualCustomerAttributesTest.java @@ -0,0 +1,105 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.Address; +import unit.java.sdk.model.AuthorizedUser; +import unit.java.sdk.model.Phone; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateIndividualCustomerAttributes + */ +public class UpdateIndividualCustomerAttributesTest { + private final UpdateIndividualCustomerAttributes model = new UpdateIndividualCustomerAttributes(); + + /** + * Model tests for UpdateIndividualCustomerAttributes + */ + @Test + public void testUpdateIndividualCustomerAttributes() { + // TODO: test UpdateIndividualCustomerAttributes + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + + /** + * Test the property 'dba' + */ + @Test + public void dbaTest() { + // TODO: test dba + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'authorizedUsers' + */ + @Test + public void authorizedUsersTest() { + // TODO: test authorizedUsers + } + + /** + * Test the property 'jwtSubject' + */ + @Test + public void jwtSubjectTest() { + // TODO: test jwtSubject + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateIndividualCustomerTest.java b/src/test/java/unit/java/sdk/model/UpdateIndividualCustomerTest.java new file mode 100644 index 00000000..f4a809cf --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateIndividualCustomerTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateIndividualCustomerAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateIndividualCustomer + */ +public class UpdateIndividualCustomerTest { + private final UpdateIndividualCustomer model = new UpdateIndividualCustomer(); + + /** + * Model tests for UpdateIndividualCustomer + */ + @Test + public void testUpdateIndividualCustomer() { + // TODO: test UpdateIndividualCustomer + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdatePaymentDataTest.java b/src/test/java/unit/java/sdk/model/UpdatePaymentDataTest.java new file mode 100644 index 00000000..99d4de41 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdatePaymentDataTest.java @@ -0,0 +1,59 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchAchPayment; +import unit.java.sdk.model.PatchBookPayment; +import unit.java.sdk.model.PatchTrustApplicationAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdatePaymentData + */ +public class UpdatePaymentDataTest { + private final UpdatePaymentData model = new UpdatePaymentData(); + + /** + * Model tests for UpdatePaymentData + */ + @Test + public void testUpdatePaymentData() { + // TODO: test UpdatePaymentData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdatePaymentTest.java b/src/test/java/unit/java/sdk/model/UpdatePaymentTest.java new file mode 100644 index 00000000..7facb950 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdatePaymentTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdatePaymentData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdatePayment + */ +public class UpdatePaymentTest { + private final UpdatePayment model = new UpdatePayment(); + + /** + * Model tests for UpdatePayment + */ + @Test + public void testUpdatePayment() { + // TODO: test UpdatePayment + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateReceivedPaymentDataTest.java b/src/test/java/unit/java/sdk/model/UpdateReceivedPaymentDataTest.java new file mode 100644 index 00000000..92170f16 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateReceivedPaymentDataTest.java @@ -0,0 +1,58 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchAchReceivedPayment; +import unit.java.sdk.model.PatchTrustApplicationAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateReceivedPaymentData + */ +public class UpdateReceivedPaymentDataTest { + private final UpdateReceivedPaymentData model = new UpdateReceivedPaymentData(); + + /** + * Model tests for UpdateReceivedPaymentData + */ + @Test + public void testUpdateReceivedPaymentData() { + // TODO: test UpdateReceivedPaymentData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateReceivedPaymentTest.java b/src/test/java/unit/java/sdk/model/UpdateReceivedPaymentTest.java new file mode 100644 index 00000000..d113b4a1 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateReceivedPaymentTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateReceivedPaymentData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateReceivedPayment + */ +public class UpdateReceivedPaymentTest { + private final UpdateReceivedPayment model = new UpdateReceivedPayment(); + + /** + * Model tests for UpdateReceivedPayment + */ + @Test + public void testUpdateReceivedPayment() { + // TODO: test UpdateReceivedPayment + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateTransactionDataTest.java b/src/test/java/unit/java/sdk/model/UpdateTransactionDataTest.java new file mode 100644 index 00000000..c8f5a6a2 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateTransactionDataTest.java @@ -0,0 +1,69 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.PatchBookTransaction; +import unit.java.sdk.model.PatchBookTransactionAttributes; +import unit.java.sdk.model.PatchBookTransactionRelationships; +import unit.java.sdk.model.PatchChargebackTransaction; +import unit.java.sdk.model.PatchTransactionTags; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateTransactionData + */ +public class UpdateTransactionDataTest { + private final UpdateTransactionData model = new UpdateTransactionData(); + + /** + * Model tests for UpdateTransactionData + */ + @Test + public void testUpdateTransactionData() { + // TODO: test UpdateTransactionData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateTransactionTest.java b/src/test/java/unit/java/sdk/model/UpdateTransactionTest.java new file mode 100644 index 00000000..f657e4d1 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateTransactionTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateTransactionData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateTransaction + */ +public class UpdateTransactionTest { + private final UpdateTransaction model = new UpdateTransaction(); + + /** + * Model tests for UpdateTransaction + */ + @Test + public void testUpdateTransaction() { + // TODO: test UpdateTransaction + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateTrustCustomerAttributesTest.java b/src/test/java/unit/java/sdk/model/UpdateTrustCustomerAttributesTest.java new file mode 100644 index 00000000..f355441a --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateTrustCustomerAttributesTest.java @@ -0,0 +1,72 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import unit.java.sdk.model.AuthorizedUser; +import unit.java.sdk.model.TrustContact; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateTrustCustomerAttributes + */ +public class UpdateTrustCustomerAttributesTest { + private final UpdateTrustCustomerAttributes model = new UpdateTrustCustomerAttributes(); + + /** + * Model tests for UpdateTrustCustomerAttributes + */ + @Test + public void testUpdateTrustCustomerAttributes() { + // TODO: test UpdateTrustCustomerAttributes + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'authorizedUsers' + */ + @Test + public void authorizedUsersTest() { + // TODO: test authorizedUsers + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateTrustCustomerTest.java b/src/test/java/unit/java/sdk/model/UpdateTrustCustomerTest.java new file mode 100644 index 00000000..9d9982d2 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateTrustCustomerTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateTrustCustomerAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateTrustCustomer + */ +public class UpdateTrustCustomerTest { + private final UpdateTrustCustomer model = new UpdateTrustCustomer(); + + /** + * Model tests for UpdateTrustCustomer + */ + @Test + public void testUpdateTrustCustomer() { + // TODO: test UpdateTrustCustomer + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateUnitRequestDataAttributesTest.java b/src/test/java/unit/java/sdk/model/UpdateUnitRequestDataAttributesTest.java new file mode 100644 index 00000000..a470c008 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateUnitRequestDataAttributesTest.java @@ -0,0 +1,48 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateUnitRequestDataAttributes + */ +public class UpdateUnitRequestDataAttributesTest { + private final UpdateUnitRequestDataAttributes model = new UpdateUnitRequestDataAttributes(); + + /** + * Model tests for UpdateUnitRequestDataAttributes + */ + @Test + public void testUpdateUnitRequestDataAttributes() { + // TODO: test UpdateUnitRequestDataAttributes + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateUnitRequestDataTest.java b/src/test/java/unit/java/sdk/model/UpdateUnitRequestDataTest.java new file mode 100644 index 00000000..bb06b462 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateUnitRequestDataTest.java @@ -0,0 +1,57 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateUnitRequestDataAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateUnitRequestData + */ +public class UpdateUnitRequestDataTest { + private final UpdateUnitRequestData model = new UpdateUnitRequestData(); + + /** + * Model tests for UpdateUnitRequestData + */ + @Test + public void testUpdateUnitRequestData() { + // TODO: test UpdateUnitRequestData + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/UpdateUnitRequestTest.java b/src/test/java/unit/java/sdk/model/UpdateUnitRequestTest.java new file mode 100644 index 00000000..c23658e7 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/UpdateUnitRequestTest.java @@ -0,0 +1,49 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.UpdateUnitRequestData; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for UpdateUnitRequest + */ +public class UpdateUnitRequestTest { + private final UpdateUnitRequest model = new UpdateUnitRequest(); + + /** + * Model tests for UpdateUnitRequest + */ + @Test + public void testUpdateUnitRequest() { + // TODO: test UpdateUnitRequest + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/unit/java/sdk/model/VerifyDocumentTest.java b/src/test/java/unit/java/sdk/model/VerifyDocumentTest.java new file mode 100644 index 00000000..a9326e2e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/VerifyDocumentTest.java @@ -0,0 +1,48 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for VerifyDocument + */ +public class VerifyDocumentTest { + private final VerifyDocument model = new VerifyDocument(); + + /** + * Model tests for VerifyDocument + */ + @Test + public void testVerifyDocument() { + // TODO: test VerifyDocument + } + + /** + * Test the property 'jobId' + */ + @Test + public void jobIdTest() { + // TODO: test jobId + } + +} diff --git a/src/test/java/unit/java/sdk/model/VirtualCardStatusTest.java b/src/test/java/unit/java/sdk/model/VirtualCardStatusTest.java new file mode 100644 index 00000000..9f6459a8 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/VirtualCardStatusTest.java @@ -0,0 +1,32 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for VirtualCardStatus + */ +public class VirtualCardStatusTest { + /** + * Model tests for VirtualCardStatus + */ + @Test + public void testVirtualCardStatus() { + // TODO: test VirtualCardStatus + } + +} diff --git a/src/test/java/unit/java/sdk/model/WebhookAttributesTest.java b/src/test/java/unit/java/sdk/model/WebhookAttributesTest.java new file mode 100644 index 00000000..856ed441 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/WebhookAttributesTest.java @@ -0,0 +1,105 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for WebhookAttributes + */ +public class WebhookAttributesTest { + private final WebhookAttributes model = new WebhookAttributes(); + + /** + * Model tests for WebhookAttributes + */ + @Test + public void testWebhookAttributes() { + // TODO: test WebhookAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'label' + */ + @Test + public void labelTest() { + // TODO: test label + } + + /** + * Test the property 'url' + */ + @Test + public void urlTest() { + // TODO: test url + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'contentType' + */ + @Test + public void contentTypeTest() { + // TODO: test contentType + } + + /** + * Test the property 'deliveryMode' + */ + @Test + public void deliveryModeTest() { + // TODO: test deliveryMode + } + + /** + * Test the property 'token' + */ + @Test + public void tokenTest() { + // TODO: test token + } + + /** + * Test the property 'subscriptionType' + */ + @Test + public void subscriptionTypeTest() { + // TODO: test subscriptionType + } + +} diff --git a/src/test/java/unit/java/sdk/model/WebhookTest.java b/src/test/java/unit/java/sdk/model/WebhookTest.java new file mode 100644 index 00000000..785b8fca --- /dev/null +++ b/src/test/java/unit/java/sdk/model/WebhookTest.java @@ -0,0 +1,65 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.WebhookAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Webhook + */ +public class WebhookTest { + private final Webhook model = new Webhook(); + + /** + * Model tests for Webhook + */ + @Test + public void testWebhook() { + // TODO: test Webhook + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + +} diff --git a/src/test/java/unit/java/sdk/model/WireCounterpartyTest.java b/src/test/java/unit/java/sdk/model/WireCounterpartyTest.java new file mode 100644 index 00000000..a8db905e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/WireCounterpartyTest.java @@ -0,0 +1,73 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Address; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for WireCounterparty + */ +public class WireCounterpartyTest { + private final WireCounterparty model = new WireCounterparty(); + + /** + * Model tests for WireCounterparty + */ + @Test + public void testWireCounterparty() { + // TODO: test WireCounterparty + } + + /** + * Test the property 'routingNumber' + */ + @Test + public void routingNumberTest() { + // TODO: test routingNumber + } + + /** + * Test the property 'accountNumber' + */ + @Test + public void accountNumberTest() { + // TODO: test accountNumber + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'address' + */ + @Test + public void addressTest() { + // TODO: test address + } + +} diff --git a/src/test/java/unit/java/sdk/model/WirePaymentAllOfAttributesImadOmadTest.java b/src/test/java/unit/java/sdk/model/WirePaymentAllOfAttributesImadOmadTest.java new file mode 100644 index 00000000..907cbd29 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/WirePaymentAllOfAttributesImadOmadTest.java @@ -0,0 +1,56 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for WirePaymentAllOfAttributesImadOmad + */ +public class WirePaymentAllOfAttributesImadOmadTest { + private final WirePaymentAllOfAttributesImadOmad model = new WirePaymentAllOfAttributesImadOmad(); + + /** + * Model tests for WirePaymentAllOfAttributesImadOmad + */ + @Test + public void testWirePaymentAllOfAttributesImadOmad() { + // TODO: test WirePaymentAllOfAttributesImadOmad + } + + /** + * Test the property 'imad' + */ + @Test + public void imadTest() { + // TODO: test imad + } + + /** + * Test the property 'omad' + */ + @Test + public void omadTest() { + // TODO: test omad + } + +} diff --git a/src/test/java/unit/java/sdk/model/WirePaymentAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/WirePaymentAllOfAttributesTest.java new file mode 100644 index 00000000..ad87c66e --- /dev/null +++ b/src/test/java/unit/java/sdk/model/WirePaymentAllOfAttributesTest.java @@ -0,0 +1,116 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.WireCounterparty; +import unit.java.sdk.model.WirePaymentAllOfAttributesImadOmad; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for WirePaymentAllOfAttributes + */ +public class WirePaymentAllOfAttributesTest { + private final WirePaymentAllOfAttributes model = new WirePaymentAllOfAttributes(); + + /** + * Model tests for WirePaymentAllOfAttributes + */ + @Test + public void testWirePaymentAllOfAttributes() { + // TODO: test WirePaymentAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'counterparty' + */ + @Test + public void counterpartyTest() { + // TODO: test counterparty + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'settlementDate' + */ + @Test + public void settlementDateTest() { + // TODO: test settlementDate + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + + /** + * Test the property 'imadOmad' + */ + @Test + public void imadOmadTest() { + // TODO: test imadOmad + } + +} diff --git a/src/test/java/unit/java/sdk/model/WirePaymentTest.java b/src/test/java/unit/java/sdk/model/WirePaymentTest.java new file mode 100644 index 00000000..3aaede60 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/WirePaymentTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Payment; +import unit.java.sdk.model.PaymentRelationships; +import unit.java.sdk.model.WirePaymentAllOfAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for WirePayment + */ +public class WirePaymentTest { + private final WirePayment model = new WirePayment(); + + /** + * Model tests for WirePayment + */ + @Test + public void testWirePayment() { + // TODO: test WirePayment + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/unit/java/sdk/model/WireTransactionAllOfAttributesTest.java b/src/test/java/unit/java/sdk/model/WireTransactionAllOfAttributesTest.java new file mode 100644 index 00000000..08ed4808 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/WireTransactionAllOfAttributesTest.java @@ -0,0 +1,155 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import unit.java.sdk.model.Counterparty; +import unit.java.sdk.model.WirePaymentAllOfAttributesImadOmad; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for WireTransactionAllOfAttributes + */ +public class WireTransactionAllOfAttributesTest { + private final WireTransactionAllOfAttributes model = new WireTransactionAllOfAttributes(); + + /** + * Model tests for WireTransactionAllOfAttributes + */ + @Test + public void testWireTransactionAllOfAttributes() { + // TODO: test WireTransactionAllOfAttributes + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'direction' + */ + @Test + public void directionTest() { + // TODO: test direction + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'balance' + */ + @Test + public void balanceTest() { + // TODO: test balance + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + + /** + * Test the property 'counterparty' + */ + @Test + public void counterpartyTest() { + // TODO: test counterparty + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'senderReference' + */ + @Test + public void senderReferenceTest() { + // TODO: test senderReference + } + + /** + * Test the property 'referenceForBeneficiary' + */ + @Test + public void referenceForBeneficiaryTest() { + // TODO: test referenceForBeneficiary + } + + /** + * Test the property 'originatorToBeneficiaryInformation' + */ + @Test + public void originatorToBeneficiaryInformationTest() { + // TODO: test originatorToBeneficiaryInformation + } + + /** + * Test the property 'beneficiaryInformation' + */ + @Test + public void beneficiaryInformationTest() { + // TODO: test beneficiaryInformation + } + + /** + * Test the property 'beneficiaryAdviceInformation' + */ + @Test + public void beneficiaryAdviceInformationTest() { + // TODO: test beneficiaryAdviceInformation + } + + /** + * Test the property 'imadOmad' + */ + @Test + public void imadOmadTest() { + // TODO: test imadOmad + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + +} diff --git a/src/test/java/unit/java/sdk/model/WireTransactionTest.java b/src/test/java/unit/java/sdk/model/WireTransactionTest.java new file mode 100644 index 00000000..38d2a284 --- /dev/null +++ b/src/test/java/unit/java/sdk/model/WireTransactionTest.java @@ -0,0 +1,78 @@ +/* + * Unit OpenAPI specifications + * An OpenAPI specifications for unit-sdk clients + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package unit.java.sdk.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import unit.java.sdk.model.Transaction; +import unit.java.sdk.model.TransactionRelationships; +import unit.java.sdk.model.WireTransactionAllOfAttributes; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for WireTransaction + */ +public class WireTransactionTest { + private final WireTransaction model = new WireTransaction(); + + /** + * Model tests for WireTransaction + */ + @Test + public void testWireTransaction() { + // TODO: test WireTransaction + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'attributes' + */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** + * Test the property 'relationships' + */ + @Test + public void relationshipsTest() { + // TODO: test relationships + } + +} diff --git a/src/test/java/org/openapitools/client/unit_photo.png b/src/test/java/unit/java/sdk/unit_photo.png similarity index 100% rename from src/test/java/org/openapitools/client/unit_photo.png rename to src/test/java/unit/java/sdk/unit_photo.png